What's New in Python 3.10 - Python 3.10.0a0 Documentation
What's New in Python 3.10 - Python 3.10.0a0 Documentation
0a0 documentation
This article explains the new features in Python 3.10, compared to 3.9.
Note: Prerelease users should be aware that this document is currently in draft form. It will
be updated substantially as Python 3.10 moves towards release, so it’s worth checking
back even after reading earlier versions.
New Modules
None yet.
Improved Modules
base64
Add base64.b32hexencode() and base64.b32hexdecode() to support the Base32 Encoding
with Extended Hex Alphabet.
https://docs.python.org/3.10/whatsnew/3.10.html 1/4
8/16/2020 What’s New In Python 3.10 — Python 3.10.0a0 documentation
curses
The extended color functions added in ncurses 6.1 will be used transparently by
curses.color_content() , curses.init_color() , curses.init_pair() , and
curses.pair_content() . A new function, curses.has_extended_color_support() ,
indicates whether extended color support is provided by the underlying ncurses library.
(Contributed by Jeffrey Kintscher and Hans Petter Jansson in bpo-36982.)
glob
Added the root_dir and dir_fd parameters in glob() and iglob() which allow to specify the
root directory for searching. (Contributed by Serhiy Storchaka in bpo-38144.)
os
Added os.cpu_count() support for VxWorks RTOS. (Contributed by Peixing Xin in bpo-
41440.)
py_compile
sys
Add sys.orig_argv attribute: the list of the original command line arguments passed to the
Python executable. (Contributed by Victor Stinner in bpo-23427.)
xml
Optimizations
Constructors str() , bytes() and bytearray() are now faster (around 30–40% for
small objects). (Contributed by Serhiy Storchaka in bpo-41334.)
The runpy module now imports fewer modules. The python3 -m module-name
command startup time is 1.3x faster in average. (Contributed by Victor Stinner in bpo-
41006.)
Deprecated
Removed
https://docs.python.org/3.10/whatsnew/3.10.html 2/4
8/16/2020 What’s New In Python 3.10 — Python 3.10.0a0 documentation
Build Changes
The C99 functions snprintf() and vsnprintf() are now required to build Python.
(Contributed by Victor Stinner in bpo-36020.)
C API Changes
New Features
The result of PyNumber_Index() now always has exact type int . Previously, the result
could have been an instance of a subclass of int . (Contributed by Serhiy Storchaka in
bpo-40792.)
Add a new orig_argv member to the PyConfig structure: the list of the original
command line arguments passed to the Python executable. (Contributed by Victor
Stinner in bpo-23427.)
https://docs.python.org/3.10/whatsnew/3.10.html 3/4
8/16/2020 What’s New In Python 3.10 — Python 3.10.0a0 documentation
Removed
PyObject_AsCharBuffer() , PyObject_AsReadBuffer() ,
PyObject_CheckReadBuffer() , and PyObject_AsWriteBuffer() are removed. Please
migrate to new buffer protocol; PyObject_GetBuffer() and PyBuffer_Release() .
(Contributed by Inada Naoki in bpo-41103.)
Removed Py_UNICODE_str* functions manipulating Py_UNICODE* strings. (Contributed
by Inada Naoki in bpo-41123.)
https://docs.python.org/3.10/whatsnew/3.10.html 4/4