Menu

Tree [98dc81] dependabot/github_actions/dot-github/workflows/github_actions-14598a9f5f /
 History

HTTPS access


File Date Author Commit
 .azure-pipelines 2023-09-20 Hugo van Kemenade Hugo van Kemenade [9414dd] [3.11] gh-109408: Move Windows builds from Azur...
 .github 2024-09-03 dependabot[bot] dependabot[bot] [98dc81] build(deps): bump actions/download-artifact
 Doc 2024-02-06 Miss Islington (bot) Miss Islington (bot) [350d1d] [3.11] gh-46968: Fix invalid reference to Sound...
 Grammar 2023-10-18 Pablo Galindo Salgado Pablo Galindo Salgado [4e4a3e] [3.11] gh-110696: Fix incorrect syntax error me...
 Include 2023-06-25 Naveen M K Naveen M K [4293ab] Always convert `/` to `\\` before passing thoug...
 Lib 2024-02-10 Serhiy Storchaka Serhiy Storchaka [9d7324] Update Lib/test/test_xml_etree.py
 Mac 2024-02-06 Erlend E. Aasland Erlend E. Aasland [2e99ba] [3.11] gh-115009: Update macOS installer to use...
 Misc 2024-02-08 Serhiy Storchaka Serhiy Storchaka [47e63e] gh-115133: Fix tests for XMLPullParser with Exp...
 Modules 2023-07-28 Christoph Reiter Christoph Reiter [aad012] getpath: use normpath on all generated paths
 Objects 2021-06-17 Christoph Reiter Christoph Reiter [f1671f] cygpty isatty
 PC 2023-08-21 Christoph Reiter Christoph Reiter [36527d] Build and install libpython3.dll
 PCbuild 2024-02-06 Miss Islington (bot) Miss Islington (bot) [b5a679] [3.11] gh-111239: Update Windows build to use z...
 Parser 2024-01-02 Miss Islington (bot) Miss Islington (bot) [1c381e] [3.11] gh-113602: Bail out when the parser trie...
 Programs 2022-11-24 Miss Islington (bot) Miss Islington (bot) [4255a9] gh-98872: Fix a possible resource leak in Pytho...
 Python 2023-08-27 Christoph Reiter Christoph Reiter [71fb6a] LoadLibraryExW: make sure to only use backslash...
 Tools 2024-02-06 Erlend E. Aasland Erlend E. Aasland [ead9e7] [3.11] gh-115015: Argument Clinic: fix generate...
 .editorconfig 2023-10-10 Miss Islington (bot) Miss Islington (bot) [4b6787] [3.11] gh-110631: Set three-space indents for r...
 .gitattributes 2023-09-21 Victor Stinner Victor Stinner [8d9950] [3.11] gh-108303: Move tokenize-related data to...
 .gitignore 2022-11-01 Miss Islington (bot) Miss Islington (bot) [39e062] [3.11] gh-98925: Lower marshal recursion depth ...
 .mailmap 2023-04-30 Miss Islington (bot) Miss Islington (bot) [ba1632] [3.11] Update name in acknowledgements and add ...
 .pre-commit-config.yaml 2024-02-04 Alex Waygood Alex Waygood [510eb4] [3.11] Bump ruff to 0.2.0 (#114932) (#115008)
 .readthedocs.yml 2023-05-02 Hugo van Kemenade Hugo van Kemenade [b07bae] [3.11] Replace Netlify with Read the Docs build...
 LICENSE 2023-01-09 Miss Islington (bot) Miss Islington (bot) [07d1f9] [3.11] Update copyright years to 2023. (gh-1008...
 Makefile.pre.in 2023-12-02 Martin Storsjö Martin Storsjö [844f5b] Makefile: Add a dependency on $(LDLIBRARY) for ...
 README.rst 2024-02-06 Pablo Galindo Pablo Galindo [db85d5] Python 3.11.8
 aclocal.m4 2021-11-18 Christian Heimes Christian Heimes [25ecc0] bpo-45573: Introduce extension module flags in ...
 config.guess 2021-11-25 Christian Heimes Christian Heimes [dfcc6f] bpo-33393: Update config.guess and config.sub (...
 config.sub 2021-11-25 Christian Heimes Christian Heimes [dfcc6f] bpo-33393: Update config.guess and config.sub (...
 configure 2024-01-05 Erlend E. Aasland Erlend E. Aasland [1687e8] [3.11] gh-80532: Do not set ipv6type when cross...
 configure.ac 2023-06-25 Naveen M K Naveen M K [064fab] Don't convert `sysconfig.get_config_var('VPATH'...
 install-sh 2021-05-03 Pablo Galindo Pablo Galindo [2fc857] Update CI files to account for the master -> ma...
 mingw_ignorefile.txt 2022-06-05 Naveen M K Naveen M K [424cfc] Fix failing tests
 mingw_smoketests.py 2023-11-08 Naveen M K Naveen M K [32dc67] mingw_smoketests: add a test to check if syscon...
 pyconfig.h.in 2021-06-17 Алексей Алексей [fff9c7] Detect winsock2 and setup _socket module on MINGW
 setup.py 2023-08-25 Christoph Reiter Christoph Reiter [862562] setup.py: don't prepend the system library dire...

Read Me

This is Python version 3.11.8

<object data="https://github.com/python/cpython/workflows/Tests/badge.svg" type="image/svg+xml">CPython build status on GitHub Actions</object> CPython build status on Azure DevOps <object data="https://img.shields.io/badge/discourse-join_chat-brightgreen.svg" type="image/svg+xml">Python Discourse chat</object>

Copyright © 2001-2023 Python Software Foundation. All rights reserved.

See the end of this file for further copyright and license information.

Contributing to CPython

For more complete instructions on contributing to CPython development, see the Developer Guide.

Using Python

Installable Python kits, and information about using Python, are available at python.org.

Build Instructions

On Unix, Linux, BSD, macOS, and Cygwin:

./configure
make
make test
sudo make install

This will install Python as python3.

You can pass many options to the configure script; run ./configure --help to find out more. On macOS case-insensitive file systems and on Cygwin, the executable is called python.exe; elsewhere it's just python.

Building a complete Python installation requires the use of various additional third-party libraries, depending on your build platform and configure options. Not all standard library modules are buildable or useable on all platforms. Refer to the Install dependencies section of the Developer Guide for current detailed information on dependencies for various Linux distributions and macOS.

On macOS, there are additional configure and build options related to macOS framework and universal builds. Refer to Mac/README.rst.

On Windows, see PCbuild/readme.txt.

If you wish, you can create a subdirectory and invoke configure from there. For example:

mkdir debug
cd debug
../configure --with-pydebug
make
make test

(This will fail if you also built at the top-level directory. You should do a make clean at the top-level first.)

To get an optimized build of Python, configure --enable-optimizations before you run make. This sets the default make targets up to enable Profile Guided Optimization (PGO) and may be used to auto-enable Link Time Optimization (LTO) on some platforms. For more details, see the sections below.

Profile Guided Optimization

PGO takes advantage of recent versions of the GCC or Clang compilers. If used, either via configure --enable-optimizations or by manually running make profile-opt regardless of configure flags, the optimized build process will perform the following steps:

The entire Python directory is cleaned of temporary files that may have resulted from a previous compilation.

An instrumented version of the interpreter is built, using suitable compiler flags for each flavor. Note that this is just an intermediary step. The binary resulting from this step is not good for real-life workloads as it has profiling instructions embedded inside.

After the instrumented interpreter is built, the Makefile will run a training workload. This is necessary in order to profile the interpreter's execution. Note also that any output, both stdout and stderr, that may appear at this step is suppressed.

The final step is to build the actual interpreter, using the information collected from the instrumented one. The end result will be a Python binary that is optimized; suitable for distribution or production installation.

What's New

We have a comprehensive overview of the changes in the What's New in Python 3.11 document. For a more detailed change log, read Misc/NEWS, but a full accounting of changes can only be gleaned from the commit history.

If you want to install multiple versions of Python, see the section below entitled "Installing multiple versions".

Documentation

Documentation for Python 3.11 is online, updated daily.

It can also be downloaded in many formats for faster access. The documentation is downloadable in HTML, PDF, and reStructuredText formats; the latter version is primarily for documentation authors, translators, and people with special formatting requirements.

For information about building Python's documentation, refer to Doc/README.rst.

Converting From Python 2.x to 3.x

Significant backward incompatible changes were made for the release of Python 3.0, which may cause programs written for Python 2 to fail when run with Python 3. For more information about porting your code from Python 2 to Python 3, see the Porting HOWTO.

Testing

To test the interpreter, type make test in the top-level directory. The test set produces some output. You can generally ignore the messages about skipped tests due to optional features which can't be imported. If a message is printed about a failed test or a traceback or core dump is produced, something is wrong.

By default, tests are prevented from overusing resources like disk space and memory. To enable these tests, run make testall.

If any tests fail, you can re-run the failing test(s) in verbose mode. For example, if test_os and test_gdb failed, you can run:

make test TESTOPTS="-v test_os test_gdb"

If the failure persists and appears to be a problem with Python rather than your environment, you can file a bug report and include relevant output from that command to show the issue.

See Running & Writing Tests for more on running tests.

Installing multiple versions

On Unix and Mac systems if you intend to install multiple versions of Python using the same installation prefix (--prefix argument to the configure script) you must take care that your primary python executable is not overwritten by the installation of a different version. All files and directories installed using make altinstall contain the major and minor version and can thus live side-by-side. make install also creates ${prefix}/bin/python3 which refers to ${prefix}/bin/python3.X. If you intend to install multiple versions using the same prefix you must decide which version (if any) is your "primary" version. Install that version using make install. Install all other versions using make altinstall.

For example, if you want to install Python 2.7, 3.6, and 3.11 with 3.11 being the primary version, you would execute make install in your 3.11 build directory and make altinstall in the others.

Release Schedule

See PEP 664 for Python 3.11 release details.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.