check-python-versions


Namecheck-python-versions JSON
Version 0.22.0 PyPI version JSON
download
home_pagehttps://github.com/mgedmin/check-python-versions
SummaryCompare supported Python versions in setup.py vs tox.ini et al.
upload_time2023-10-04 09:48:26
maintainer
docs_urlNone
authorMarius Gedminas
requires_python>=3.8
licenseGPL
keywords python packaging version checker linter setup.py tox travis appveyor
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage
            check-python-versions
=====================

.. image:: https://img.shields.io/pypi/v/check-python-versions.svg
    :target: https://pypi.org/project/check-python-versions/
    :alt: Latest release

.. image:: https://img.shields.io/pypi/pyversions/check-python-versions.svg
    :target: https://pypi.org/project/check-python-versions/
    :alt: Supported Python versions

.. image:: https://github.com/mgedmin/check-python-versions/workflows/build/badge.svg?branch=master
    :target: https://github.com/mgedmin/check-python-versions/actions
    :alt: Build status

.. image:: https://coveralls.io/repos/mgedmin/check-python-versions/badge.svg?branch=master
    :target: https://coveralls.io/r/mgedmin/check-python-versions
    :alt: Test coverage


This is a tool for Python package maintainers who want to explicitly state
which Python versions they support.


**The problem**: to properly support e.g. Python 2.7 and 3.6+ you have to
run tests with these Pythons.  This means

- you need a tox.ini with envlist = py27, py36, py37, py38, py39
- you need a .travis.yml with python: [ 2.7, 3.6, 3.7, 3.8, 3.9 ]
- if you support Windows, you need an appveyor.yml with %PYTHON% set to
  C:\\Python2.7, C:\\Python3.5, and so on
- if you're building manylinux wheels you need to ... you get the idea
- you have to tell the users which Python versions you support by specifying
  trove classifiers like "Programming Language :: Python :: 2.7"
- you probably also want to tell pip which versions you support by specifying
  python_requires=">= 2.7, !=3.0.* ..." because AFAIU PyPI classifiers are
  not fine-grained enough

Keeping all these lists consistent is a pain.

**The solution**: ``check-python-versions`` will compare these lists and warn
you if they don't match ::

    $ check-python-versions ~/projects/*
    /home/mg/projects/check-manifest:

    setup.py says:              2.7, 3.6, 3.7, 3.8, 3.9, PyPy
    - python_requires says:     2.7, 3.6, 3.7, 3.8, 3.9
    tox.ini says:               2.7, 3.6, 3.7, 3.8, 3.9, PyPy, PyPy3
    .travis.yml says:           2.7, 3.6, 3.7, 3.8, 3.9, PyPy, PyPy3
    appveyor.yml says:          2.7, 3.6, 3.7, 3.8, 3.9


    /home/mg/projects/dozer:

    setup.py says:              2.7, 3.6, 3.7, 3.8, 3.9
    tox.ini says:               2.7, 3.6, 3.7, 3.8, 3.9
    .travis.yml says:           2.7, 3.6, 3.7, 3.8, 3.9
    appveyor.yml says:          2.7, 3.6, 3.7, 3.8, 3.9


    /home/mg/projects/eazysvn:

    setup.py says:              2.7, 3.6, 3.7, 3.8, 3.9, PyPy
    tox.ini says:               2.7, 3.6, 3.7, 3.8, 3.9, PyPy, PyPy3
    .travis.yml says:           2.7, 3.6, 3.7, 3.8, 3.9, PyPy, PyPy3
    appveyor.yml says:          2.7, 3.6, 3.7, 3.8, 3.9

    ...

    all ok!


Installation
------------

You need Python 3.6 or newer (f-strings!) to run check-python-versions.
Install it with ::

    python3 -m pip install check-python-versions


Usage
-----

::

    $ check-python-versions --help
    usage: check-python-versions [-h] [--version] [--expect VERSIONS]
                                 [--skip-non-packages] [--only FILES]
                                 [--add VERSIONS] [--drop VERSIONS]
                                 [--update VERSIONS] [--diff] [--dry-run]
                                 [where [where ...]]

    verify that supported Python versions are the same in setup.py, tox.ini,
    .travis.yml and appveyor.yml

    positional arguments:
      where                directory where a Python package with a setup.py and
                           other files is located

    optional arguments:
      -h, --help           show this help message and exit
      --version            show program's version number and exit
      --expect VERSIONS    expect these versions to be supported, e.g. --expect
                           2.7,3.5-3.8
      --skip-non-packages  skip arguments that are not Python packages without
                           warning about them
      --only FILES         check only the specified files (comma-separated list,
                           e.g. --only tox.ini,appveyor.yml)

    updating supported version lists (EXPERIMENTAL):
      --add VERSIONS       add these versions to supported ones, e.g --add 3.9
      --drop VERSIONS      drop these versions from supported ones, e.g --drop
                           2.6,3.4
      --update VERSIONS    update the set of supported versions, e.g. --update
                           2.7,3.5-3.9
      --diff               show a diff of proposed changes
      --dry-run            verify proposed changes without writing them to disk

If run without any arguments, check-python-versions will look for a setup.py in
the current working directory.

Exit status is 0 if all Python packages had consistent version numbers (and, if
--expect is specified, those numbers match your stated expectations).

If you specify multiple directories on the command line, then all packages
that failed a check will be listed at the end of the run, separated with
spaces, for easier copying and pasting onto shell command lines.  This is
helpful when, e.g. you want to run ::

    check-python-versions ~/src/zopefoundation/*

to check all 380+ packages, and then want re-run the checks only on the failed
ones, for a faster turnabout.

There's also experimental support for updating supported Python versions
so you can do things like ::

    check-python-versions ~/projects/* --add 3.9 --dry-run --expect 2.7,3.6-3.9
    check-python-versions ~/projects/* --drop 3.4 --diff
    check-python-versions ~/projects/* --update 2.7,3.6- --dry-run --diff
    check-python-versions ~/projects/* --add 3.9 --drop=-2.6,-3.5

(the last one will show a diff for each file and ask for interactive
confirmation before making any changes.)

Programmatically updating human-writable files is difficult, so expect
bugs (and please file issues).


Files
-----

**setup.py** or **pyproject.toml** is the only required file; if any of the
others are missing, they'll be ignored (and this will not be considered a
failure).

- **setup.py**: the ``classifiers`` argument passed to ``setup()`` is expected
  to have classifiers of the form::

        classifiers=[
            ...
            "Programming Language :: Python :: x.y",
            ...
        ],

  check-python-versions will attempt to parse the file and walk the AST to
  extract classifiers, but if that fails, it'll execute
  ``python setup.py --classifiers`` and parse the output.

  There's rudimentary support for dynamically-computed classifiers if at
  least one part is a list literal, e.g. this can work and can even be
  updated ::

        classifiers=[
            ...
            "Programming Language :: Python :: x.y",
            ...
        ] + ... expression that computes extra classifiers ...,

- **setup.py**: the ``python_requires`` argument passed to ``setup()``, if
  present::

        python_requires=">=2.7, !=3.0.*, !=3.1.*",

  check-python-versions will attempt to parse the file and walk the AST to
  extract the ``python_requires`` value.  It expects to find a string literal
  or a simple expression of the form ``"literal".join(["...", "..."])``.

- **pyproject.toml**: can have any of these::

    # PEP 621 static metadata

    [project]
    classifiers = [
        ...
        "Programming Language :: Python :: 3.8",
        ...
    ]
    requires-python = ">= 3.8"

    # old-style Flit metadata

    [tool.flit.metadata]
    classifiers = [
        ...
        "Programming Language :: Python :: 3.8",
        ...
    ]
    requires-python = ">= 3.8"

    # Poetry metadata

    [tool.poetry]
    classifiers = [
        ...
        "Programming Language :: Python :: 3.8",
        ...
    ]

    [tool.poetry.dependencies]
    python = "^3.8"

- **tox.ini**: if present, it's expected to have ::

    [tox]
    envlist = pyXY, ...

  Environment names like pyXY-ZZZ are also accepted; the suffix is ignored.

- **.travis.yml**: if present, it's expected to have ::

    python:
      - X.Y
      - ...

  and/or ::

    matrix:
      include:
        - python: X.Y
          ...
        - ...

  and/or ::

    jobs:
      include:
        - python: X.Y
          ...
        - ...

  and/or ::

    env:
      - TOXENV=...

  (but not all of these forms are supported for updates)

- **appveyor.yml**: if present, it's expected to have ::

    environment:
      matrix:
        - PYTHON: C:\\PythonX.Y
        - ...

  The environment variable name is assumed to be ``PYTHON`` (case-insensitive).
  The values should be one of

  - ``X.Y``
  - ``C:\\PythonX.Y`` (case-insensitive)
  - ``C:\\PythonX.Y-x64`` (case-insensitive)

  Alternatively, you can use ``TOXENV`` with the usual values (pyXY).

  (``TOXENV`` is currently not supported for updates.)

- **.manylinux-install.sh**: if present, it's expected to contain a loop like
  ::

    for PYBIN in /opt/python/*/bin; do
        if [[ "${PYBIN}" == *"cp27"* ]] || \
           [[ "${PYBIN}" == *"cp35"* ]] || \
           [[ "${PYBIN}" == *"cp36"* ]] || \
           [[ "${PYBIN}" == *"cp37"* ]] || \
           [[ "${PYBIN}" == *"cp38"* ]]; then
            "${PYBIN}/pip" install -e /io/
            "${PYBIN}/pip" wheel /io/ -w wheelhouse/
               rm -rf /io/build /io/*.egg-info
        fi
    done

  check-python-versions will look for $PYBIN tests of the form ::

    [[ "${PYBIN}" == *"cpXY"* ]]

  where X and Y are arbitrary digits.

  These scripts are used in several zopefoundation repositories like
  zopefoundation/zope.interface.  It's the least standartized format.

- **.github/workflows/*.yml**: if present, it's expected to have ::

    jobs:
      (anything):
        strategy:
          matrix:
            python-version:
              - X.Y
              - ...

  or ::

    jobs:
      (anything):
        strategy:
          matrix:
            config
              - [ X.Y, "pyXY" ]
              - ...


Python versions
---------------

In addition to CPython X.Y, check-python-versions will recognize PyPy and PyPy3
in some of the files:

- **setup.py** or **pyproject.toml** may have a ::

        'Programming Language :: Python :: Implementation :: PyPy',

  classifier

- **tox.ini** may have pypy[-suffix] and pypy3[-suffix] environments

- **.travis.yml** may have pypy and pypy3 jobs with optional version suffixes
  (e.g. pypy2.7-6.0.0, pypy3.5-6.0.0)

- **.github/workflows/*.yml**: may have pypy/pypy3/pypy-N.M/pypy-N.M-vX.Y.Z
  jobs.

- **appveyor.yml** and **.manylinux-install.sh** do not usually have pypy tests,
  so check-python-versions cannot recognize them, and these files are excluded
  from PyPy support consistency checks.

Upcoming Python releases (such as 3.12 in setup.py or 3.12-dev in a .travis.yml)
are also shown but do not cause mismatch errors.

In addition, ``python_requires`` in setup.py or ``requires-python`` in
pyproject.toml usually has a lower limit, but no upper limit.
check-python-versions will assume this means support up to
whatever's the latest Python 3.x release mentioned in other data sources, or
the current 3.x release (3.11 at the moment), whichever is lower.  This means
that new Python 3 releases don't suddenly cause all your lint checks to fail
if you use python_requires '>= 3.6' and such.

When you're specifying Python version ranges for --expect, --add, --drop or
--update, you can use

- ``X.Y`` (e.g. ``--add 3.8``)
- ``X.Y-U.V`` for an inclusive range (e.g. ``--add 3.5-3.8``)
- ``X.Y-``, which means from X.Y until the latest known release from the X
  series (e.g. ``--add 3.5-`` is equivalent to ``--add 3.5-3.7``)
- ``-X.Y``, which is the same as ``X.0-X.Y``
  (e.g. ``--drop -3.4`` is equivalent to ``--drop 3.0-3.4``)

or a comma-separated list of the above (e.g. ``--expect 2.7,3.5-``,
``--drop -2.6,-3.4``).

--expect/--add/--drop/--update currently do not allow specifying alternative
implementations (such as pypy).


pre-commit integration
----------------------

With `pre-commit <https://pre-commit.com>`_,
``check-python-versions`` can be part of your git-workflow.
Add the following snippet to your ``.pre-commit-config.yaml``.

.. code-block:: yaml

    repos:
    -   repo: https://github.com/mgedmin/check-python-versions
        rev: "0.22.0"
        hooks:
        -   id: check-python-versions

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/mgedmin/check-python-versions",
    "name": "check-python-versions",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "",
    "keywords": "python packaging version checker linter setup.py tox travis appveyor",
    "author": "Marius Gedminas",
    "author_email": "marius@gedmin.as",
    "download_url": "https://files.pythonhosted.org/packages/bf/df/b6e9cb1899566aee706f172b901648d7385e16bb0a0f3045a8c6cebefa39/check-python-versions-0.22.0.tar.gz",
    "platform": null,
    "description": "check-python-versions\n=====================\n\n.. image:: https://img.shields.io/pypi/v/check-python-versions.svg\n    :target: https://pypi.org/project/check-python-versions/\n    :alt: Latest release\n\n.. image:: https://img.shields.io/pypi/pyversions/check-python-versions.svg\n    :target: https://pypi.org/project/check-python-versions/\n    :alt: Supported Python versions\n\n.. image:: https://github.com/mgedmin/check-python-versions/workflows/build/badge.svg?branch=master\n    :target: https://github.com/mgedmin/check-python-versions/actions\n    :alt: Build status\n\n.. image:: https://coveralls.io/repos/mgedmin/check-python-versions/badge.svg?branch=master\n    :target: https://coveralls.io/r/mgedmin/check-python-versions\n    :alt: Test coverage\n\n\nThis is a tool for Python package maintainers who want to explicitly state\nwhich Python versions they support.\n\n\n**The problem**: to properly support e.g. Python 2.7 and 3.6+ you have to\nrun tests with these Pythons.  This means\n\n- you need a tox.ini with envlist = py27, py36, py37, py38, py39\n- you need a .travis.yml with python: [ 2.7, 3.6, 3.7, 3.8, 3.9 ]\n- if you support Windows, you need an appveyor.yml with %PYTHON% set to\n  C:\\\\Python2.7, C:\\\\Python3.5, and so on\n- if you're building manylinux wheels you need to ... you get the idea\n- you have to tell the users which Python versions you support by specifying\n  trove classifiers like \"Programming Language :: Python :: 2.7\"\n- you probably also want to tell pip which versions you support by specifying\n  python_requires=\">= 2.7, !=3.0.* ...\" because AFAIU PyPI classifiers are\n  not fine-grained enough\n\nKeeping all these lists consistent is a pain.\n\n**The solution**: ``check-python-versions`` will compare these lists and warn\nyou if they don't match ::\n\n    $ check-python-versions ~/projects/*\n    /home/mg/projects/check-manifest:\n\n    setup.py says:              2.7, 3.6, 3.7, 3.8, 3.9, PyPy\n    - python_requires says:     2.7, 3.6, 3.7, 3.8, 3.9\n    tox.ini says:               2.7, 3.6, 3.7, 3.8, 3.9, PyPy, PyPy3\n    .travis.yml says:           2.7, 3.6, 3.7, 3.8, 3.9, PyPy, PyPy3\n    appveyor.yml says:          2.7, 3.6, 3.7, 3.8, 3.9\n\n\n    /home/mg/projects/dozer:\n\n    setup.py says:              2.7, 3.6, 3.7, 3.8, 3.9\n    tox.ini says:               2.7, 3.6, 3.7, 3.8, 3.9\n    .travis.yml says:           2.7, 3.6, 3.7, 3.8, 3.9\n    appveyor.yml says:          2.7, 3.6, 3.7, 3.8, 3.9\n\n\n    /home/mg/projects/eazysvn:\n\n    setup.py says:              2.7, 3.6, 3.7, 3.8, 3.9, PyPy\n    tox.ini says:               2.7, 3.6, 3.7, 3.8, 3.9, PyPy, PyPy3\n    .travis.yml says:           2.7, 3.6, 3.7, 3.8, 3.9, PyPy, PyPy3\n    appveyor.yml says:          2.7, 3.6, 3.7, 3.8, 3.9\n\n    ...\n\n    all ok!\n\n\nInstallation\n------------\n\nYou need Python 3.6 or newer (f-strings!) to run check-python-versions.\nInstall it with ::\n\n    python3 -m pip install check-python-versions\n\n\nUsage\n-----\n\n::\n\n    $ check-python-versions --help\n    usage: check-python-versions [-h] [--version] [--expect VERSIONS]\n                                 [--skip-non-packages] [--only FILES]\n                                 [--add VERSIONS] [--drop VERSIONS]\n                                 [--update VERSIONS] [--diff] [--dry-run]\n                                 [where [where ...]]\n\n    verify that supported Python versions are the same in setup.py, tox.ini,\n    .travis.yml and appveyor.yml\n\n    positional arguments:\n      where                directory where a Python package with a setup.py and\n                           other files is located\n\n    optional arguments:\n      -h, --help           show this help message and exit\n      --version            show program's version number and exit\n      --expect VERSIONS    expect these versions to be supported, e.g. --expect\n                           2.7,3.5-3.8\n      --skip-non-packages  skip arguments that are not Python packages without\n                           warning about them\n      --only FILES         check only the specified files (comma-separated list,\n                           e.g. --only tox.ini,appveyor.yml)\n\n    updating supported version lists (EXPERIMENTAL):\n      --add VERSIONS       add these versions to supported ones, e.g --add 3.9\n      --drop VERSIONS      drop these versions from supported ones, e.g --drop\n                           2.6,3.4\n      --update VERSIONS    update the set of supported versions, e.g. --update\n                           2.7,3.5-3.9\n      --diff               show a diff of proposed changes\n      --dry-run            verify proposed changes without writing them to disk\n\nIf run without any arguments, check-python-versions will look for a setup.py in\nthe current working directory.\n\nExit status is 0 if all Python packages had consistent version numbers (and, if\n--expect is specified, those numbers match your stated expectations).\n\nIf you specify multiple directories on the command line, then all packages\nthat failed a check will be listed at the end of the run, separated with\nspaces, for easier copying and pasting onto shell command lines.  This is\nhelpful when, e.g. you want to run ::\n\n    check-python-versions ~/src/zopefoundation/*\n\nto check all 380+ packages, and then want re-run the checks only on the failed\nones, for a faster turnabout.\n\nThere's also experimental support for updating supported Python versions\nso you can do things like ::\n\n    check-python-versions ~/projects/* --add 3.9 --dry-run --expect 2.7,3.6-3.9\n    check-python-versions ~/projects/* --drop 3.4 --diff\n    check-python-versions ~/projects/* --update 2.7,3.6- --dry-run --diff\n    check-python-versions ~/projects/* --add 3.9 --drop=-2.6,-3.5\n\n(the last one will show a diff for each file and ask for interactive\nconfirmation before making any changes.)\n\nProgrammatically updating human-writable files is difficult, so expect\nbugs (and please file issues).\n\n\nFiles\n-----\n\n**setup.py** or **pyproject.toml** is the only required file; if any of the\nothers are missing, they'll be ignored (and this will not be considered a\nfailure).\n\n- **setup.py**: the ``classifiers`` argument passed to ``setup()`` is expected\n  to have classifiers of the form::\n\n        classifiers=[\n            ...\n            \"Programming Language :: Python :: x.y\",\n            ...\n        ],\n\n  check-python-versions will attempt to parse the file and walk the AST to\n  extract classifiers, but if that fails, it'll execute\n  ``python setup.py --classifiers`` and parse the output.\n\n  There's rudimentary support for dynamically-computed classifiers if at\n  least one part is a list literal, e.g. this can work and can even be\n  updated ::\n\n        classifiers=[\n            ...\n            \"Programming Language :: Python :: x.y\",\n            ...\n        ] + ... expression that computes extra classifiers ...,\n\n- **setup.py**: the ``python_requires`` argument passed to ``setup()``, if\n  present::\n\n        python_requires=\">=2.7, !=3.0.*, !=3.1.*\",\n\n  check-python-versions will attempt to parse the file and walk the AST to\n  extract the ``python_requires`` value.  It expects to find a string literal\n  or a simple expression of the form ``\"literal\".join([\"...\", \"...\"])``.\n\n- **pyproject.toml**: can have any of these::\n\n    # PEP 621 static metadata\n\n    [project]\n    classifiers = [\n        ...\n        \"Programming Language :: Python :: 3.8\",\n        ...\n    ]\n    requires-python = \">= 3.8\"\n\n    # old-style Flit metadata\n\n    [tool.flit.metadata]\n    classifiers = [\n        ...\n        \"Programming Language :: Python :: 3.8\",\n        ...\n    ]\n    requires-python = \">= 3.8\"\n\n    # Poetry metadata\n\n    [tool.poetry]\n    classifiers = [\n        ...\n        \"Programming Language :: Python :: 3.8\",\n        ...\n    ]\n\n    [tool.poetry.dependencies]\n    python = \"^3.8\"\n\n- **tox.ini**: if present, it's expected to have ::\n\n    [tox]\n    envlist = pyXY, ...\n\n  Environment names like pyXY-ZZZ are also accepted; the suffix is ignored.\n\n- **.travis.yml**: if present, it's expected to have ::\n\n    python:\n      - X.Y\n      - ...\n\n  and/or ::\n\n    matrix:\n      include:\n        - python: X.Y\n          ...\n        - ...\n\n  and/or ::\n\n    jobs:\n      include:\n        - python: X.Y\n          ...\n        - ...\n\n  and/or ::\n\n    env:\n      - TOXENV=...\n\n  (but not all of these forms are supported for updates)\n\n- **appveyor.yml**: if present, it's expected to have ::\n\n    environment:\n      matrix:\n        - PYTHON: C:\\\\PythonX.Y\n        - ...\n\n  The environment variable name is assumed to be ``PYTHON`` (case-insensitive).\n  The values should be one of\n\n  - ``X.Y``\n  - ``C:\\\\PythonX.Y`` (case-insensitive)\n  - ``C:\\\\PythonX.Y-x64`` (case-insensitive)\n\n  Alternatively, you can use ``TOXENV`` with the usual values (pyXY).\n\n  (``TOXENV`` is currently not supported for updates.)\n\n- **.manylinux-install.sh**: if present, it's expected to contain a loop like\n  ::\n\n    for PYBIN in /opt/python/*/bin; do\n        if [[ \"${PYBIN}\" == *\"cp27\"* ]] || \\\n           [[ \"${PYBIN}\" == *\"cp35\"* ]] || \\\n           [[ \"${PYBIN}\" == *\"cp36\"* ]] || \\\n           [[ \"${PYBIN}\" == *\"cp37\"* ]] || \\\n           [[ \"${PYBIN}\" == *\"cp38\"* ]]; then\n            \"${PYBIN}/pip\" install -e /io/\n            \"${PYBIN}/pip\" wheel /io/ -w wheelhouse/\n               rm -rf /io/build /io/*.egg-info\n        fi\n    done\n\n  check-python-versions will look for $PYBIN tests of the form ::\n\n    [[ \"${PYBIN}\" == *\"cpXY\"* ]]\n\n  where X and Y are arbitrary digits.\n\n  These scripts are used in several zopefoundation repositories like\n  zopefoundation/zope.interface.  It's the least standartized format.\n\n- **.github/workflows/*.yml**: if present, it's expected to have ::\n\n    jobs:\n      (anything):\n        strategy:\n          matrix:\n            python-version:\n              - X.Y\n              - ...\n\n  or ::\n\n    jobs:\n      (anything):\n        strategy:\n          matrix:\n            config\n              - [ X.Y, \"pyXY\" ]\n              - ...\n\n\nPython versions\n---------------\n\nIn addition to CPython X.Y, check-python-versions will recognize PyPy and PyPy3\nin some of the files:\n\n- **setup.py** or **pyproject.toml** may have a ::\n\n        'Programming Language :: Python :: Implementation :: PyPy',\n\n  classifier\n\n- **tox.ini** may have pypy[-suffix] and pypy3[-suffix] environments\n\n- **.travis.yml** may have pypy and pypy3 jobs with optional version suffixes\n  (e.g. pypy2.7-6.0.0, pypy3.5-6.0.0)\n\n- **.github/workflows/*.yml**: may have pypy/pypy3/pypy-N.M/pypy-N.M-vX.Y.Z\n  jobs.\n\n- **appveyor.yml** and **.manylinux-install.sh** do not usually have pypy tests,\n  so check-python-versions cannot recognize them, and these files are excluded\n  from PyPy support consistency checks.\n\nUpcoming Python releases (such as 3.12 in setup.py or 3.12-dev in a .travis.yml)\nare also shown but do not cause mismatch errors.\n\nIn addition, ``python_requires`` in setup.py or ``requires-python`` in\npyproject.toml usually has a lower limit, but no upper limit.\ncheck-python-versions will assume this means support up to\nwhatever's the latest Python 3.x release mentioned in other data sources, or\nthe current 3.x release (3.11 at the moment), whichever is lower.  This means\nthat new Python 3 releases don't suddenly cause all your lint checks to fail\nif you use python_requires '>= 3.6' and such.\n\nWhen you're specifying Python version ranges for --expect, --add, --drop or\n--update, you can use\n\n- ``X.Y`` (e.g. ``--add 3.8``)\n- ``X.Y-U.V`` for an inclusive range (e.g. ``--add 3.5-3.8``)\n- ``X.Y-``, which means from X.Y until the latest known release from the X\n  series (e.g. ``--add 3.5-`` is equivalent to ``--add 3.5-3.7``)\n- ``-X.Y``, which is the same as ``X.0-X.Y``\n  (e.g. ``--drop -3.4`` is equivalent to ``--drop 3.0-3.4``)\n\nor a comma-separated list of the above (e.g. ``--expect 2.7,3.5-``,\n``--drop -2.6,-3.4``).\n\n--expect/--add/--drop/--update currently do not allow specifying alternative\nimplementations (such as pypy).\n\n\npre-commit integration\n----------------------\n\nWith `pre-commit <https://pre-commit.com>`_,\n``check-python-versions`` can be part of your git-workflow.\nAdd the following snippet to your ``.pre-commit-config.yaml``.\n\n.. code-block:: yaml\n\n    repos:\n    -   repo: https://github.com/mgedmin/check-python-versions\n        rev: \"0.22.0\"\n        hooks:\n        -   id: check-python-versions\n",
    "bugtrack_url": null,
    "license": "GPL",
    "summary": "Compare supported Python versions in setup.py vs tox.ini et al.",
    "version": "0.22.0",
    "project_urls": {
        "Changelog": "https://github.com/mgedmin/check-python-versions/blob/master/CHANGES.rst",
        "Homepage": "https://github.com/mgedmin/check-python-versions",
        "Issues": "https://github.com/mgedmin/check-python-versions/issues",
        "Source Code": "https://github.com/mgedmin/check-python-versions"
    },
    "split_keywords": [
        "python",
        "packaging",
        "version",
        "checker",
        "linter",
        "setup.py",
        "tox",
        "travis",
        "appveyor"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "68875585c62bcfd86784d4898755f623c90bb3d8f2b8f7a037250d59d978e5e8",
                "md5": "639a756dba300fae88b0a098a550493d",
                "sha256": "59626ee8b9fb7a9029f12db36b1eabbe09b22cdc65a9eb1eaa269d5a68f577cf"
            },
            "downloads": -1,
            "filename": "check_python_versions-0.22.0-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "639a756dba300fae88b0a098a550493d",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": ">=3.8",
            "size": 68348,
            "upload_time": "2023-10-04T09:48:24",
            "upload_time_iso_8601": "2023-10-04T09:48:24.053110Z",
            "url": "https://files.pythonhosted.org/packages/68/87/5585c62bcfd86784d4898755f623c90bb3d8f2b8f7a037250d59d978e5e8/check_python_versions-0.22.0-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "bfdfb6e9cb1899566aee706f172b901648d7385e16bb0a0f3045a8c6cebefa39",
                "md5": "090c5a025f81c6d47e5e7b0d14b22dac",
                "sha256": "bfa8f82f2b7e0a3f9beb055aff92d9b616e3378accca37aa97619bf7eda85ee1"
            },
            "downloads": -1,
            "filename": "check-python-versions-0.22.0.tar.gz",
            "has_sig": false,
            "md5_digest": "090c5a025f81c6d47e5e7b0d14b22dac",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 80541,
            "upload_time": "2023-10-04T09:48:26",
            "upload_time_iso_8601": "2023-10-04T09:48:26.000151Z",
            "url": "https://files.pythonhosted.org/packages/bf/df/b6e9cb1899566aee706f172b901648d7385e16bb0a0f3045a8c6cebefa39/check-python-versions-0.22.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-10-04 09:48:26",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "mgedmin",
    "github_project": "check-python-versions",
    "travis_ci": false,
    "coveralls": true,
    "github_actions": true,
    "appveyor": true,
    "tox": true,
    "lcname": "check-python-versions"
}
        
Elapsed time: 0.12009s