1
0
Fork
You've already forked cpython
0
The Python programming language https://www.python.org/
  • Python 61.9%
  • C 35.8%
  • C++ 0.7%
  • M4 0.4%
  • HTML 0.3%
  • Other 0.6%
2026年02月28日 07:56:45 -05:00
.azure-pipelines CI: Update outdated references to Python version and GH issues ( #132394 ) 2025年04月11日 14:46:33 +00:00
.devcontainer GH-140472: Create a WASI devcontainer configuration (GH-140473) 2025年10月22日 16:11:48 -07:00
.github gh-145334: Make lazy import tests discoverable ( #145336 ) 2026年02月28日 01:44:50 +00:00
.well-known add floss.fund manifest provenance ( #137529 ) 2025年08月07日 15:35:39 -04:00
Android gh-144551: Update Android builds to use OpenSSL 3.0.19 (GH-144864) 2026年02月15日 23:02:07 -06:00
Apple gh-144551: Update iOS builds to use OpenSSL 3.0.19 (GH-144865) 2026年02月15日 23:02:23 -06:00
Doc gracefully update the behavior of buffering to support buffered text 2026年02月28日 07:55:21 -05:00
Grammar gh-145241: specialize SyntaxError for single trailing-comma with item ( #145282 ) 2026年02月28日 02:24:06 +00:00
Include avoid providing the release scripts in the tarball 2026年02月28日 07:54:05 -05:00
InternalDocs gh-144969: Document that the free threading GC can change ob_tid ( #144972 ) 2026年02月19日 01:49:09 +01:00
iOS/Resources/bin gh-138171: Migrate iOS testbed location and add Apple build script ( #138176 ) 2025年09月19日 13:23:38 +01:00
Lib gh-145269: simplify bisect.bisect doc example ( #145270 ) 2026年02月28日 09:09:39 +00:00
Mac gh-144551: Update OpenSSL version references in Mac/BuildScript/ (GH-144810) 2026年02月13日 16:50:15 -06:00
Misc gh-145241: specialize SyntaxError for single trailing-comma with item ( #145282 ) 2026年02月28日 02:24:06 +00:00
Modules Merge branch 'open-buffering-docs-fix' into rose 2026年02月28日 07:56:45 -05:00
Objects gh-145142: Make str.maketrans safe under free-threading (gh-145157) 2026年02月27日 16:08:15 +00:00
Parser gh-145241: specialize SyntaxError for single trailing-comma with item ( #145282 ) 2026年02月28日 02:24:06 +00:00
PC gh-143869: Add PEP 757 functions to the limited API ( #143906 ) 2026年01月21日 14:47:14 +01:00
PCbuild gh-145110: Fix cleaning of PGO builds in Windows build.bat script (GH-145111) 2026年02月23日 22:53:56 +00:00
Platforms/WASI GH-144533: Use wasmtime's --argv0 to auto-discover sysconfig in WASI builds ( #145328 ) 2026年02月28日 00:23:12 +00:00
Programs gh-142349: Implement PEP 810 - Explicit lazy imports ( #142351 ) 2026年02月12日 00:15:33 +00:00
Python gh-144316: Fix missing exception in _remote_debugging with debug=False ( #144442 ) 2026年02月26日 21:14:34 +00:00
release-tools @579eef7e6b avoid providing the release scripts in the tarball 2026年02月28日 07:54:05 -05:00
Tools gh-145230: Update lockbench (gh-145231) 2026年02月27日 14:09:05 -05:00
.coveragerc
.editorconfig Add .gram file to the .editorconfig ( #136680 ) 2025年07月16日 17:35:15 +03:00
.gitattributes GH-144179: Add value recording to JIT tracing front-end (GH-144303) 2026年02月02日 16:57:04 +00:00
.gitignore gh-142466: Pixi package definitions for downstream use ( #142469 ) 2025年12月15日 15:04:16 +00:00
.gitmodules add release-tools submodule 2026年02月28日 07:54:05 -05:00
.mailmap Update entry for Willow Chargin in .mailmap and ACKS ( #132714 ) 2025年04月19日 14:50:59 +00:00
.pre-commit-config.yaml Bump pre-commit hooks ( #144576 ) 2026年02月07日 23:14:18 +00:00
.readthedocs.yml Add CODEOWNERS and YAML to end-of-file-fixer and trailing-whitespace ( #134730 ) 2025年05月26日 18:42:38 +01:00
.ruff.toml Lint: Create a project-wide `.ruff.toml` settings file ( #133124 ) 2025年05月01日 08:28:44 +00:00
aclocal.m4
config.guess gh-115765: Upgrade to GNU Autoconf 2.72 ( #128411 ) 2025年01月03日 11:37:54 +00:00
config.sub
configure gh-145037: Fix Emscripten trampoline with emcc >= 4.0.19 ( #145038 ) 2026年02月26日 06:21:05 +08:00
configure.ac gh-145037: Fix Emscripten trampoline with emcc >= 4.0.19 ( #145038 ) 2026年02月26日 06:21:05 +08:00
install-sh gh-115765: Upgrade to GNU Autoconf 2.72 ( #128411 ) 2025年01月03日 11:37:54 +00:00
LICENSE
Makefile.pre.in gh-145334: Make lazy import tests discoverable ( #145336 ) 2026年02月28日 01:44:50 +00:00
pyconfig.h.in gh-144015: Add portable SIMD optimization for bytes.hex() et. al. (GH-143991) 2026年02月22日 19:19:03 -08:00
README.rst avoid providing the release scripts in the tarball 2026年02月28日 07:54:05 -05:00
rose-release.zsh copy and print release tarball 2026年02月28日 07:54:05 -05:00

This is Python version 3.15.0a6-rose-v2 alpha 6 (rose v2)

CPython build status on GitHub Actions

CPython build status on Azure DevOps

Python Discourse chat

Copyright © 2001 Python Software Foundation. All rights reserved.

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

General 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 usable 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.

To build Windows installer, see Tools/msi/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.

Enabled via configure's --with-lto flag. LTO takes advantage of the ability of recent compiler toolchains to optimize across the otherwise arbitrary .o file boundary when building final executables or shared libraries for additional performance gains.

What's New

We have a comprehensive overview of the changes in the What's new in Python 3.15 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.15 is online, updated daily.

It can also be downloaded in many formats for faster access. The documentation is downloadable in HTML, EPUB, 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.

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 buildbottest.

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.15 with 3.15 being the primary version, you would execute make install in your 3.15 build directory and make altinstall in the others.

Release Schedule

See PEP 790 for Python 3.15 release details.

Copyright © 2001 Python Software Foundation. All rights reserved.

Copyright © 2000 BeOpen.com. All rights reserved.

Copyright © 1995-2001 Corporation for National Research Initiatives. All rights reserved.

Copyright © 1991-1995 Stichting Mathematisch Centrum. All rights reserved.

See the LICENSE for information on the history of this software, terms & conditions for usage, and a DISCLAIMER OF ALL WARRANTIES.

This Python distribution contains no GNU General Public License (GPL) code, so it may be used in proprietary projects. There are interfaces to some GNU code but these are entirely optional.

All trademarks referenced herein are property of their respective holders.