Skip to main content

Get information about released & unreleased CPython and PyPy versions

Project description

Project Status: Active — The project has reached a stable, usable state and is being actively developed. CI Status https://codecov.io/gh/jwodder/pyversion-info/branch/master/graph/badge.svg https://img.shields.io/pypi/pyversions/pyversion-info.svg MIT License

GitHub | PyPI | Documentation | Issues | Changelog

Ever needed to know what Python versions were currently supported, or how many subversions a given Python version had? Wondering how long until a given version came out or reached end-of-life? Need to know what CPython versions a given PyPy version corresponds to? The answers to these and some other questions can be found with this library.

pyversion-info pulls its data every run from jwodder/pyversion-info-data on GitHub. Prerelease versions are not (currently) included. I promise 24-hour turnaround times for keeping the database up-to-date until I am hit by a bus.

See the documentation for more information.

Installation

pyversion-info requires Python 3.7 or higher. Just use pip for Python 3 (You have pip, right?) to install pyversion-info and its dependencies:

python3 -m pip install pyversion-info

Examples

(The given outputs are current as of 2021-11-04.)

Start out by fetching the database:

>>> from pyversion_info import VersionDatabase
>>> vd = VersionDatabase.fetch()

Get a list of all currently-supported CPython series:

>>> vd.cpython.supported_series()
['3.6', '3.7', '3.8', '3.9', '3.10']

When does 3.11 come out?

>>> vd.cpython.release_date("3.11")
datetime.date(2022, 10, 3)

When does 3.6 reach end-of-life?

>>> vd.cpython.eol_date("3.6")
datetime.date(2021, 12, 23)

Just how many micro versions does 3.9 have, anyway?

>>> vd.cpython.subversions("3.9")
['3.9.0', '3.9.1', '3.9.2', '3.9.3', '3.9.4', '3.9.5', '3.9.6', '3.9.7', '3.9.8', '3.9.9', '3.9.10', '3.9.11']

What major versions of PyPy are there?

>>> vd.pypy.major_versions()
['1', '2', '4', '5', '6', '7']

What CPython series do PyPy 7.3.* support?

>>> vd.pypy.supported_cpython_series("7.3")
['2.7', '3.6', '3.7', '3.8']

Caveats

The CPython database is generally only updated when an edit is made to a release schedule PEP. Occasionally, a deadline listed in a PEP is missed, but the PEP is not updated for a couple days, and so for a brief period this library will falsely report the given version as released.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyversion-info-1.1.0.tar.gz (28.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyversion_info-1.1.0-py3-none-any.whl (11.7 kB view details)

Uploaded Python 3

File details

Details for the file pyversion-info-1.1.0.tar.gz.

File metadata

  • Download URL: pyversion-info-1.1.0.tar.gz
  • Upload date:
  • Size: 28.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10

File hashes

Hashes for pyversion-info-1.1.0.tar.gz
Algorithm Hash digest
SHA256 1ed9b637073c77248bc5789f9329da9eeae6f490b08952a7748d794391572470
MD5 63baa608c6d6e674c85b775874ee95ec
BLAKE2b-256 81b85a0930297f255c1569d21fd73292c42df07e71b83b3935a13d2a64684f5a

See more details on using hashes here.

File details

Details for the file pyversion_info-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: pyversion_info-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 11.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10

File hashes

Hashes for pyversion_info-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 28e6be27fdc62dc9f6269ad34b0dbd04f51c7f0f63d9f8378fcad535c7b93375
MD5 f897016e8553fc62bbc100f3edba5d30
BLAKE2b-256 8803d9118bcd207915a9302c1346997afed95441352b724aa2620ef29224cbad

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page