See also Compile CPython on Windows.

Python developer mode


Strict developer mode:

PYTHONMALLOC=debug python3.6 -Werror -bb -X faulthandler script.py

Developer mode:

PYTHONMALLOC=debug python3.6 -Wd -b -X faulthandler script.py
  • Show DeprecationWarning and ResourceWarning warnings: python -Wd
  • Show BytesWarning warning: python -b
  • Enable faulthandler to get a Python traceback on segfault and fatal errors: python -X faulthandler
  • Debug hooks on Python memory allocators: PYTHONMALLOC=debug
  • Enable Python assertions (assert) and set __debug__ to True: remove (or just ignore) -O or -OO command line arguments

See also PYTHONASYNCIODEBUG=1 for asyncio.

=> implementated in Python 3.7 as: “python3 -X dev” or PYTHONDEVMODE=1 !

CPython infra

Services used by unit tests

  • pythontest.net services:

  • snakebite.net:

    # Testing connect timeout is tricky: we need to have IP connectivity
    # to a host that silently drops our packets.  We can't simulate this
    # from Python because it's a function of the underlying TCP/IP stack.
    # So, the following Snakebite host has been defined:
    blackhole = resolve_address('blackhole.snakebite.net', 56666)
    # Blackhole has been configured to silently drop any incoming packets.
    # No RSTs (for TCP) or ICMP UNREACH (for UDP/ICMP) will be sent back
    # to hosts that attempt to connect to this address: which is exactly
    # what we need to confidently test connect timeout.
    # However, we want to prevent false positives.  It's not unreasonable
    # to expect certain hosts may not be able to reach the blackhole, due
    # to firewalling or general network configuration.  In order to improve
    # our confidence in testing the blackhole, a corresponding 'whitehole'
    # has also been set up using one port higher:
    whitehole = resolve_address('whitehole.snakebite.net', 56667)
  • news.trigofacile.com:

  • ipv6.google.com:

    • test_ssl uses it to test IPv6: HTTP (tcp/80) and HTTPS (tcp/443)
  • sha256.tbs-internet.com:

    • test_ssl uses it to test x509 certificate signed by SHA256: HTTPS (tcp/443)

Package Index (PyPI)

cpython GitHub project



Embedded libraries

Update dependencies: https://github.com/python/cpython-source-deps/blob/master/README.rst

See my external_versions.py script: external version of embedded libraries from CPython source code (locally).

On security branches, some dependencies are outdated because no more macOS nor Windows installer is built. It was decided to not upgrade outdated zlib 1.2.5 in Python 3.3.7, since it’s specific to Windows, and no Windows user is expected to build his/her own Python 3.3 anymore.

See also cpython-bin-deps and cpython-source-deps.

Supported platforms

PEP 11 lists removal of supported platforms:

PEP 11 on Windows:

CPython’s Windows support now follows [Microsoft product support lifecycle]. A new feature release X.Y.0 will support all Windows releases whose extended support phase is not yet expired. Subsequent bug fix releases will support the same Windows releases as the original feature release (even if the extended support phase has ended).


  • Windows Supported Versions in Python (in the Python development master branch)
  • Windows Vista support dropped in Python 3.7
  • Windows XP support dropped in Python 3.5
  • Windows 2000 support dropped in Python 3.4
  • bpo-23451, 2015-03: “Python 3.5 now requires Windows Vista or newer”. See change1 and change2.
  • Python 2.7 supports Windows XP and newer


  • Python 3.7 dropped support for FreeBSD 9 and older.
  • FreeBSD 9 buildbot wokers have been removed in 2017

Well supported platforms on Python 3.6 and 2.7:

  • Linux
  • Windows: Vista and newer for Python 3.6, XP and newer for Python 2.7
  • macOS: XXX min version?
  • FreeBSD

Tested by Travis CI and buildbots.

Supported platform with best effort support:

  • Android API 24
  • OpenBSD
  • NetBSD
  • Solaris, OpenIndiana
  • AIX

Platforms not supported officially:

  • Cygwin
  • MinGW
  • HP-UX

Unofficial projects:

  • Python for OpenVMS
  • PythonD: PythonD is a 32-bit, multi-threaded, networking- and OpenGL-enabled Python interpreter for DOS and Windows.