# PyPy v7.3.12: release of python 2.7, 3.9, and 3.10

The PyPy team is proud to release version 7.3.12 of PyPy. This release includes a new string-to-int algorithm (also appearing in CPython 3.12) that is faster than the older one; support for symlinks in Windows; and our first Python3.10 version.

The release includes three different interpreters:

> - PyPy2.7, which is an interpreter supporting the syntax and the features of Python 2.7 including the stdlib for CPython 2.7.18+ (the `+` is for backported security updates)

> - PyPy3.9, which is an interpreter supporting the syntax and the features of Python 3.9, including the stdlib for CPython 3.9.17.

> - PyPy3.10, which is an interpreter supporting the syntax and the features of Python 3.10, including the stdlib for CPython 3.10.12. This is our first release of 3.10, but based on past experience we are quite confident in its compatibility with upstream. Of course, we recommend testing your code with this new version before putting it into production. Note it does require at least cython 0.29.35 or cython 3.0.0b3

The interpreters are based on much the same codebase, thus the multiple release. This is a micro release, all APIs are compatible with the other 7.3 releases. It follows after 7.3.11 release on Dec 29, 2022

We recommend updating. You can find links to download the v7.3.12 releases here:

> https://pypy.org/download.html

We would like to thank our donors for the continued support of the PyPy project. If PyPy is not quite good enough for your needs, we are available for direct consulting work. If PyPy is helping you out, we would love to hear about it and encourage submissions to our blog via a pull request to https://github.com/pypy/pypy.org

We would also like to thank our contributors and encourage new people to join the project. PyPy has many layers and we need help with all of them: bug fixes, PyPy and RPython documentation improvements, or general help with making RPython's JIT even better. Since the previous release, we have accepted contributions from one new contributor, thanks for pitching in, and welcome to the project!

If you are a python library maintainer and use C-extensions, please consider making a HPy / CFFI / cppyy version of your library that would be performant on PyPy. In any case, both cibuildwheel and the multibuild system support building wheels for PyPy.

## What is PyPy?

PyPy is a Python interpreter, a drop-in replacement for CPython It's fast (PyPy and CPython 3.7.4 performance comparison) due to its integrated tracing JIT compiler.

We also welcome developers of other dynamic languages to see what RPython can do for them.

We provide binary builds for:

> - x86 machines on most common operating systems (Linux 32/64 bits, Mac OS 64 bits, Windows 64 bits)

> - 64-bit ARM machines running Linux (`aarch64`).

> - Apple M1 arm64 machines (`macos_arm64`).

> - s390x running Linux

PyPy support Windows 32-bit, Linux PPC64 big- and little-endian, and Linux ARM 32 bit, but does not release binaries. Please reach out to us if you wish to sponsor binary releases for those platforms. Downstream packagers provide binary builds for debian, Fedora, conda, OpenBSD, FreeBSD, Gentoo, and more.

## Changelog

### For all versions

- Update vendored version of pycparser

- Update to ssl 1.1.1u, 3.0.9; lzma 5.2.10; and gdbm 1.23 when embedding libraries for a portable build

#### Bugfixes

- Allow creating `ctypes.py_object()` on a `weakref` (issue 3883)

- Add memory pressure for malloc allocations in `_ssl`, fix OpenSSL context use

- Pair OpenSSL allocation calls better with free calls in `_ssl` (issue 3887)

- Only define `SO` in `sysconfig` if `imp.get_suffixes()` has `imp.C_EXTENSION`

- Fix wrong assert in `intutils`, it should be an `InvalidLoop` instead (issue 3892:_)

- export `PyDescr_NewGetSet` and define `PyDescr_TYPE`, `PyDescr_NAME`

- `space.index(W_Bool)` should return an `int`, not a `bool` (issue 3906)

- Skip cpython pickling of `range`

- Support loading c-extension modules with both `powerpc64le-linux-gnu` and `ppc_64-linux-gnu` platform tags (issue 3834)

- Fix various cases where a mutating `__index__` method could crash the interpreter (issue 3917)

- Use C99 `NAN` for `Py_NAN`

#### Speedups and enhancements

- Do less string copies in the bytecode compiler

- Add missing CJK range in unicodedata version 13

- Implement the base 10 `string-to-int` conversion using a divide an conquer algorithm with complexity `O(n**1.58)`. The algorithm is due to Bjorn Martinsson and is part of CPython 3.12.

- Small refactoring in the JIT History class. It can now use the proper opencoder encoding of a trace immediately, not only after the inputargs are known

- Inline `get_field_updater` in JITted code to allow `FieldUpdater` to be alloc-removed everywhere

- Improve warmup a little bit: - directly put the two most common opcodes into the loop - add a special case for the int_add variant with a constant argument

- Use the `rbigint.add_int` (etc) shortcuts for the `int+int` overflowing operations

- Optimize the `goto_if_not_*` code: - don't call replace_box for fresh boxes that can't be stored anywhere yet - make the "same box" shortcut faster

### Python 3.9+

#### Bugfixes

- Fix corner case when computing `__main__.__file__` (issue 3881)

- Fix misnamed function (issue 3874)

- Disallow pickle of `staticmethod`, `classmethod`, and `DirEntry`

- Make sure that the max stackdepth is observed in method calls

- Fix `utf-16` and `utf-32` errorhandler replacement logic: if the replacement is bytes. those are just copied to the output

- Fix the problems of https://bugs.python.org/issue36819

- Fix `str_decode_raw_unicode_escape` for the case of `\\`, which was incorrectly special-cased.

- Forbid null bytes in `pwd.getpwnam`

- Use `r_longlong` math in nanosecond time for `perf_counter` on windows (issue 3890)

- Fix for `tuple.contains(obj)` using `item == obj` (bpo-37648)

- Allow indexing with a class with a `__index__` method

- Implement `__copy__` and `__deepcopy__` for `zlib` (de)compressors

- Fix weirdness about combining annotations and a global declaration of a name in some random function (issue 3925)

- Fix wrong implementation of `_copy_base` for slices of n-dimensional buffers (issue 3520)

- Trim the scope ID from IPV6 addresses (issue 3938, reversing the decision in issue 3628)

- Add `_hashlib.scrypt` (issue 3921)

- Properly create a C-level wrapper that calls `tp_finalize` when `__del__` is called, which allows us to use `CYTHON_USE_TP_FINALIZE` in cython

- Move `hpy.dist-info` to `hpy-0.0.4.dist-info` (issue 3579)

- Fix edged cases in `__rpow__` and `pow()` (issues 3912 and 3944)

- Remove `PyInt_FromLong` which was leftover from Python2

#### Speedups and enhancements

- Speed up `nametuple _replace` by code generation (issue 3884)

- Correct exception on positional arguments, while supporting empty namedtuple (?) at the same time

- Implement `os.symlink` and `os.readlink` on windows

- Fix `os.mkdir` for unicode handling via teaching rposix about utf-8 paths, which could lead to removing the last vestiges of unicode from rpython.

- Refactor `os.remove`/`os.unlink` to take symlink into account on windows

- Increment `macosx-version-min` to 10.9

- `space.newlong` returns a `W_LongObject` on pypy3, where there is no observable applevel difference between `W_IntObject` and `W_LongObject`

- Provide `_PyEval_GetAsyncGenFirstiter` and `_PyEval_GetAsyncGenFinalizer` for use by cython, towards fixing issue 3280

- Squeeze a little more accuracy out of windows `time.time()`, to make a cython test pass

- Use posonly args for `list.__init__` and `set.__init__`, simplifying code

- Use `rbigint.*_int` fast paths for comparisons between ints