Python 3.8.0 beta 1 has arrived: Have you peeked at the new v3.8 features yet?
The first beta release for Python version 3.8 is here. Check out the new features, report any potential bugs, give feedback, and catch a sneak peek on the newest release highlights in order to prepare yourself for what’s coming in Python 3.8. (Have you met the walrus operator?)
Python 3.8 is currently still undergoing development, but developers who want a preview of all the new features can whet their appetite. The beta preview for Python 3.8.0 arrived on June 4, 2019. This release is notable because it marks the feature freeze. From this point on, no new features will be included.
It is the first of four planned beta release previews. The beta preview allows the community to test out new features and report any issues they encounter for future bug fixes and tweaks.
The Python Software Foundation strongly encourages maintainers of third-party projects to test with v3.8 during its beta phase.
Developers should also keep in mind that this is a preview release. Thus, hold off on using it for development until the production-ready release arrives.
Python v3.8 highlights
How does v3.8 differ from v3.7? These are just a few of the version highlights:
- Assignment expressions: Have you met the cleverly named walrus operator yet? := is a new syntax added to v3.8 that assigns values to variables as part of an expression.
- Positional-only parameters: Introduces a new syntax /, for specifying positional-only parameters in Python function definitions.
- f-strings support = specifier: Used for easier debugging.
- Python Initialization Configuration: Adds a C API to Python Initialization for improved error reporting and the ability to override some computed parameters before they are applied. New structures and new functions have also been added, as well as
- Vectorcall protocol added to Python/C API: Optimizes calls of objects, fasted on the fastcall convention in CPython. (Feature slated to become finalized in v3.9.)
- Runtime audit hooks: Adds two APIs for providing insight on running applications.
- Pickle protocol 5 with out-of-band data: Standardizes new pickle protocol versions and all accompanying APIs. Pickle also now uses Protocol 4 by default, which improves performance.
- “Final” qualifier for typing
- Literal Types
- TypedDict: Type hints for dictionaries with a fixed set of keys
- LOAD_GLOBAL speed improvements
- Debug build uses same ABI in release and debug mode: now defining the
Py_DEBUGmacro no longer implies the
Py_TRACE_REFSmacro, so the ABI is now compatible.
- Fixed illegal statement:
finally:blocks now legal
- Improved modules: In Windows, the default event loop has been changed to
ProactorEventLoop, which now supports UDP and can be interrupted with
Refer to the documentation (currently in draft form; more details yet to come) for more information about what to expect in the upcoming release, including new features, optimizations, and performance upgrades.
Regarding the beta release, view the changelog for what sets this beta apart from the previous alpha pre-release.
According to the Python Software Foundation, the next beta release is currently scheduled for July 1, 2019. View the full release schedule for more information and all future plans regarding v3.8. Security update releases for v3.8 is projected until approximately October 2024.