Python 3.13.0a0 What’s Coming?

Exciting Features Await

Sarper Makas
2 min readJun 17, 2023
Python 3.13.0a0

Python 3.13.0a0 is currently in development and includes a number of new features and improvements. In this blog post, we’ll look at some of the new Python 3.13.0a0 features and provide some sample code to get you started.

The most recent version is 3.11.4, and 3.12 is in early preview. You can better understand Python 3.13.0a0 by reading these articles about Python 3.11.4 and Python 3.12.

New Features

There are no new modules yet, but there are some improved modules; they are array, io, pathlib, traceback, typing.

Performance Optimizations

From PEP 594:

Deprecated Features

  1. Deprecation of wave.Wave_read and wave.Wave_write methods
  2. Deprecation of keyword arguments in creating typing.NamedTuple classes
  3. Deprecation of functional syntax usage in creating typing.NamedTuple and typing.TypedDict classes
  4. Deprecation of the array’s'u' format code.
  5. Deprecation of ctypes.SetPointerType() and ctypes.ARRAY() functions

Removed Features

  1. Removal of telnetlib module.
  2. Removal of 2to3 program and lib2to3 module.
  3. Removal of namespaces typing.io and typing.re.
  4. Removal of webbrowser MacOSX class
  5. Removal of support for using pathlib.Path object as context managers
  6. Removal of configparser.LegacyINterpolation class.
  7. Removal of turtle.RowTurtle.settiltangle() method.
  8. Removal of certain unittest functions
  9. Removal of cgi and cgitb modules
  10. Removal of various modules and packages like sndhdr, pipes, ossaudiodev, mailcap, spwd, nntplib, nis, xdrlib, msilib, crypt, uu, aifc, audioop, chunk, imghdr, unittest.TestProgram.usageExit(), tkinter.tix, trashcan macros, locale.resetlocale(), logging.Logger.warn(), urllib.request.urlopen() parameters, webbrowser.MacOSXOSAScript._name attribute, re.template function, and re.TEMPLATE flag

C API Changes

Deprecated:

Deprecated old Python initialization functions such as

Removed

Removed functions deprecated in Python 3.9, such as PyEval_CallObject(), PyEval_CallObjectWithKeywords(), PyEval_CallFunction(), PyEval_CallMethod(), andPyEval_CFunction_Call().

The following old functions to configure the Python initialization, deprecated in Python 3.11, have been removed:

  • PySys_AddWarnOptionUnicode(): Use PyConfig.warnoptions instead.
  • PySys_AddWarnOption(): Use PyConfig.warnoptions instead.
  • PySys_AddXOption(): Use PyConfig.xoptions instead.
  • PySys_HasWarnOptions(): Use PyConfig.xoptions instead.
  • PySys_SetArgvEx(): Set PyConfig.argv instead.
  • PySys_SetArgv(): Set PyConfig.argv instead.
  • PySys_SetPath(): Set PyConfig.module_search_paths instead.
  • Py_SetPath(): Set PyConfig.module_search_paths instead.
  • Py_SetProgramName(): Set PyConfig.program_name instead.
  • Py_SetPythonHome(): Set PyConfig.home instead.
  • Py_SetStandardStreamEncoding(): Set PyConfig.stdio_encoding instead.
  • _Py_SetProgramFullPath(): Set PyConfig.executable instead.

Resources

3.13.0a0 Documentation (n.d.) 3.13.0a0 Documentation. https://docs.python.org/3.13/

What’s New in Python 3.13 (n.d.) Python Documentation. https://docs.python.org/3/whatsnew/3.13.html

--

--