Python 3.16.0a1 Adds Regex Set Operations and Unicode Property Escapes, Removes the asyncio Event Loop Policy System and Updates to Unicode 18.0.0
Python 3.16.0a1, released October 13, 2026, is the first of seven planned alphas; the draft What's New adds re set operations and \p{...} escapes and removes asyncio's event loop policy classes.
Overview
The first alpha of Python 3.16 is out. According to the Python.org release page, Python 3.16.0a1 has a release date of Oct. 13, 2026 and is “the first of seven planned alpha releases.” The page describes it as an early developer preview and says its use is “not recommended for production environments.” It follows the stable 3.15.0 release, which The Machine Herald covered earlier this month.
The changes listed below come from the What’s new in Python 3.16 document, which carries a note that it “is currently in draft form.” The document lists Savannah Ostrowski as editor. Its “Summary – Release highlights” and “New features” sections are empty at this stage, so the items below come from its other sections.
Release Schedule
The Python.org release page says features may be added until the start of the beta phase on May 4, 2027, and, if necessary, modified or deleted until the release candidate phase begins on July 27, 2027. It gives October 5, 2027 as the planned final release date. The next alpha, 3.16.0a2, is scheduled for November 10, 2026, and the full schedule is in PEP 826.
What Is New
- Regular expressions. According to the What’s new document, the
remodule now supports set operations and nested sets in character classes as described in Unicode Technical Standard #18: set difference ([A--B]), intersection ([A&&B]) and union ([A||B]). The document gives[a-z--[aeiou]]as an example that matches an ASCII lowercase consonant, credited to Serhiy Storchaka. The same document lists support for Unicode property escapes\p{...}and\P{...}, with\p{Lu},\p{Cased}and\p{ASCII}as examples, also credited to Serhiy Storchaka. It also says character class escapes such as\dand\woutside a character set are now compiled to a singleCATEGORYopcode, which it says speeds up matching of patterns such as\d+. - Unicode. The same document states that the Unicode database has been updated to Unicode 18.0.0.
- Language and built-ins.
iter()now accepts astop_exceptionparameter, andaiter()accepts the samestop_valueandstop_exceptionparameters. Frame objects now support weak references, a change credited to Łukasz Langa. - Math. New functions
math.cospi(),math.sinpi()andmath.tanpi()take half-turn angle arguments, andmath.acospi(),math.asinpi(),math.atanpi()andmath.atan2pi()return half-turn angles. The document says these functions are recommended by IEEE 754-2019 and standardized in C23, and credits Jeff Epler. - Standard library additions. The document lists
ZipFile.remove()andZipFile.repack()inzipfile(credited to Danny Lin),io.BytesIO.peek()(credited to Marcel Martin),ctypes.util.struct()for generatingStructuretypes from an annotation-based syntax (credited to Peter Bierma), andlzma.FILTER_ARM64andlzma.FILTER_RISCV.
Removals and Deprecations
The What’s new document lists several removals of APIs deprecated in earlier releases:
- In
asyncio, the event loop policy system, includingasyncio.AbstractEventLoopPolicy,asyncio.get_event_loop_policy()andasyncio.set_event_loop_policy(), is removed. The document says these had been deprecated since Python 3.14 and recommendsasyncio.run()orasyncio.Runnerwith a customloop_factoryinstead.asyncio.iscoroutinefunction()is also removed, withinspect.iscoroutinefunction()as the replacement. - The
'u'format code (wchar_t) is removed fromarray, with the'w'format code as the replacement. - The
functools.reduce()function no longer accepts function or sequence as keyword arguments in its Python implementation; the parameters are now positional-only. - Custom logging handlers using the
strmargument are no longer supported, andmimetypes.MimeTypes.add_type()now raisesValueErrorfor undotted extensions.
New deprecations include abc.abstractclassmethod, abc.abstractstaticmethod and abc.abstractproperty, which now raise a DeprecationWarning and are slated for removal in Python 3.21. The document also says the profile module is deprecated and will be removed in Python 3.17, with profiling.tracing as the replacement.
What We Don’t Know
The What’s new document is explicitly a draft, and the release page says alpha-phase features may still be modified or deleted. Items listed here may therefore change before the final release planned for October 5, 2027. Neither source provides performance figures for the alpha as a whole.