Switch to proviso for requirements.txt managementpull/1331/head
| @ -0,0 +1,4 @@ | |||
| --- | |||
| type: none | |||
| --- | |||
| Switch to proviso for requirements.txt management | |||
| @ -1,52 +0,0 @@ | |||
| # DO NOT EDIT THIS FILE DIRECTLY - use ./script/update-requirements to update | |||
| Pygments==2.19.2 | |||
| SecretStorage==3.4.0 | |||
| black==24.10.0 | |||
| build==1.3.0 | |||
| certifi==2025.10.5 | |||
| cffi==2.0.0 | |||
| changelet==0.3.0 | |||
| charset-normalizer==3.4.3 | |||
| click==8.1.8; python_version<'3.10' | |||
| click==8.3.0; python_version>='3.10' | |||
| cmarkgfm==2024.11.20 | |||
| coverage==7.10.7 | |||
| cryptography==46.0.2 | |||
| docutils==0.21.2 | |||
| id==1.5.0 | |||
| iniconfig==2.1.0 | |||
| isort==6.1.0 | |||
| jaraco.classes==3.4.0 | |||
| jaraco.context==6.0.1 | |||
| jaraco.functools==4.3.0 | |||
| jeepney==0.9.0 | |||
| keyring==25.6.0 | |||
| markdown-it-py==3.0.0 | |||
| mdurl==0.1.2 | |||
| more-itertools==10.8.0 | |||
| mypy_extensions==1.1.0 | |||
| nh3==0.3.1 | |||
| packaging==25.0 | |||
| pathspec==0.12.1 | |||
| platformdirs==4.5.0 | |||
| pluggy==1.6.0 | |||
| pprintpp==0.4.0 | |||
| pycountry==24.6.1 | |||
| pycountry-convert==0.7.2 | |||
| pycparser==2.23 | |||
| pyflakes==3.4.0 | |||
| pyproject_hooks==1.2.0 | |||
| pytest==8.4.2 | |||
| pytest-cov==7.0.0 | |||
| pytest-mock==3.15.1 | |||
| pytest_network==0.0.1 | |||
| readme_renderer==44.0 | |||
| repoze.lru==0.7 | |||
| requests==2.32.5 | |||
| requests-toolbelt==1.0.0 | |||
| rfc3986==2.0.0 | |||
| rich==14.1.0 | |||
| semver==3.0.4 | |||
| twine==6.2.0 | |||
| urllib3==2.5.0 | |||
| wheel==0.45.1 | |||
| @ -1,26 +0,0 @@ | |||
| # DO NOT EDIT THIS FILE DIRECTLY - use ./script/update-requirements to update | |||
| Jinja2==3.1.6 | |||
| MarkupSafe==3.0.3 | |||
| Sphinx==7.4.7; python_version=='3.9' | |||
| Sphinx==8.1.3; python_version=='3.10' | |||
| Sphinx==8.2.3; python_version>='3.11' | |||
| alabaster==0.7.16; python_version<'3.10' | |||
| alabaster==1.0.0; python_version>='3.10' | |||
| babel==2.17.0 | |||
| imagesize==1.4.1 | |||
| mdit-py-plugins==0.4.2; python_version=='3.9' | |||
| mdit-py-plugins==0.5.0; python_version>='3.10' | |||
| myst-parser==3.0.1; python_version<'3.10' | |||
| myst-parser==4.0.1; python_version>='3.10' | |||
| roman-numerals-py==3.1.0 | |||
| snowballstemmer==3.0.1 | |||
| sphinx-copybutton==0.5.2 | |||
| sphinx-rtd-theme==3.0.2 | |||
| sphinxcontrib-applehelp==2.0.0 | |||
| sphinxcontrib-devhelp==2.0.0 | |||
| sphinxcontrib-htmlhelp==2.1.0 | |||
| sphinxcontrib-jquery==4.1 | |||
| sphinxcontrib-jsmath==1.0.1 | |||
| sphinxcontrib-mermaid==1.0.0 | |||
| sphinxcontrib-qthelp==2.0.0 | |||
| sphinxcontrib-serializinghtml==2.0.0 | |||
| @ -1,8 +1,93 @@ | |||
| # DO NOT EDIT THIS FILE DIRECTLY - use ./script/update-requirements to update | |||
| PyYAML==6.0.3 | |||
| # DO NOT EDIT THIS FILE DIRECTLY - use ./script/update-requirements | |||
| alabaster==1.0.0 | |||
| anyio==4.11.0 | |||
| babel==2.17.0 | |||
| backports-tarfile==1.2.0; python_version=='3.10' or python_version=='3.11' | |||
| black==24.10.0 | |||
| build==1.3.0 | |||
| certifi==2025.11.12 | |||
| cffi==2.0.0 | |||
| changelet==0.3.0 | |||
| charset-normalizer==3.4.4 | |||
| click==8.3.1 | |||
| coverage==7.11.3 | |||
| cryptography==46.0.3 | |||
| dnspython==2.8.0 | |||
| docutils==0.21.2 | |||
| exceptiongroup==1.3.0; python_version=='3.10' | |||
| fqdn==1.5.1 | |||
| idna==3.10 | |||
| h11==0.16.0 | |||
| httpcore==1.0.9 | |||
| httpx==0.28.1 | |||
| id==1.5.0 | |||
| idna==3.11 | |||
| imagesize==1.4.1 | |||
| importlib-metadata==8.7.0; python_version=='3.10' or python_version=='3.11' | |||
| iniconfig==2.3.0 | |||
| isort==7.0.0 | |||
| jaraco-classes==3.4.0 | |||
| jaraco-context==6.0.1 | |||
| jaraco-functools==4.3.0 | |||
| jeepney==0.9.0 | |||
| jinja2==3.1.6 | |||
| keyring==25.7.0 | |||
| markdown-it-py==3.0.0 | |||
| markupsafe==3.0.3 | |||
| mdit-py-plugins==0.5.0 | |||
| mdurl==0.1.2 | |||
| more-itertools==10.8.0 | |||
| mypy-extensions==1.1.0 | |||
| myst-parser==4.0.1 | |||
| natsort==8.4.0 | |||
| nh3==0.3.2 | |||
| packaging==25.0 | |||
| pathspec==0.12.1 | |||
| platformdirs==4.5.0 | |||
| pluggy==1.6.0 | |||
| pprintpp==0.4.0 | |||
| proviso==0.0.1 | |||
| pycountry==24.6.1 | |||
| pycountry-convert==0.7.2 | |||
| pycparser==2.23 | |||
| pyflakes==3.4.0 | |||
| pygments==2.19.2 | |||
| pyproject-hooks==1.2.0 | |||
| pytest==9.0.1 | |||
| pytest-cov==7.0.0 | |||
| pytest-mock==3.15.1 | |||
| pytest-network==0.0.1 | |||
| python-dateutil==2.9.0.post0 | |||
| pyyaml==6.0.3 | |||
| readme-renderer==44.0 | |||
| repoze-lru==0.7 | |||
| requests==2.32.5 | |||
| requests-toolbelt==1.0.0 | |||
| resolvelib==1.2.1 | |||
| rfc3986==2.0.0 | |||
| rich==14.2.0 | |||
| roman-numerals-py==3.1.0; python_version=='3.11' or python_version=='3.12' or python_version=='3.13' or python_version=='3.14' | |||
| secretstorage==3.4.1 | |||
| semver==3.0.4 | |||
| setuptools==80.9.0 | |||
| six==1.17.0 | |||
| sniffio==1.3.1 | |||
| snowballstemmer==3.0.1 | |||
| sphinx==8.1.3; python_version=='3.10' | |||
| sphinx==8.2.3; python_version=='3.11' or python_version=='3.12' or python_version=='3.13' or python_version=='3.14' | |||
| sphinx-copybutton==0.5.2 | |||
| sphinx-rtd-theme==3.0.2 | |||
| sphinxcontrib-applehelp==2.0.0 | |||
| sphinxcontrib-devhelp==2.0.0 | |||
| sphinxcontrib-htmlhelp==2.1.0 | |||
| sphinxcontrib-jquery==4.1 | |||
| sphinxcontrib-jsmath==1.0.1 | |||
| sphinxcontrib-mermaid==1.0.0 | |||
| sphinxcontrib-qthelp==2.0.0 | |||
| sphinxcontrib-serializinghtml==2.0.0 | |||
| tomli==2.3.0; python_version=='3.10' | |||
| twine==6.2.0 | |||
| typing-extensions==4.15.0; python_version=='3.10' or python_version=='3.11' or python_version=='3.12' | |||
| unearth==0.18.1 | |||
| urllib3==2.5.0 | |||
| wheel==0.45.1 | |||
| zipp==3.23.0; python_version=='3.10' or python_version=='3.11' | |||
| @ -1,93 +1,5 @@ | |||
| #!/usr/bin/env python3 | |||
| #!/bin/bash | |||
| from os.path import join | |||
| from subprocess import check_call, check_output | |||
| from sys import argv, stdout | |||
| from tempfile import TemporaryDirectory | |||
| set -e | |||
| with TemporaryDirectory() as tmpdir: | |||
| check_call(['python3', '-m', 'venv', tmpdir]) | |||
| def install_and_list(target): | |||
| check_call([join(tmpdir, 'bin', 'pip'), 'install', target]) | |||
| frozen = ( | |||
| check_output([join(tmpdir, 'bin', 'pip'), 'freeze']) | |||
| .decode('utf-8') | |||
| .strip() | |||
| .split('\n') | |||
| ) | |||
| # file bit skips ourself | |||
| return set(p.split('=', 1)[0] for p in frozen if 'file' not in p) | |||
| # base needs | |||
| frozen = install_and_list('.') | |||
| # dev needs | |||
| dev_frozen = install_and_list('.[dev]') - frozen | |||
| # docs needs | |||
| docs_frozen = install_and_list('.[docs]') - dev_frozen - frozen | |||
| # find the installed version for each package | |||
| versions = {} | |||
| for pv in ( | |||
| check_output([join(tmpdir, 'bin', 'pip'), 'freeze']) | |||
| .decode('utf-8') | |||
| .strip() | |||
| .split('\n') | |||
| ): | |||
| if 'file' in pv: | |||
| # skip ourself | |||
| continue | |||
| p, v = pv.split('==') | |||
| versions[p] = (v,) | |||
| # special handling for older python versions due to libraries dropping support | |||
| # early | |||
| versions['alabaster'] = ( | |||
| "0.7.16; python_version<'3.10'", | |||
| f"{versions['alabaster'][0]}; python_version>='3.10'", | |||
| ) | |||
| versions['click'] = ( | |||
| "8.1.8; python_version<'3.10'", | |||
| f"{versions['click'][0]}; python_version>='3.10'", | |||
| ) | |||
| versions['myst-parser'] = ( | |||
| "3.0.1; python_version<'3.10'", | |||
| f"{versions['myst-parser'][0]}; python_version>='3.10'", | |||
| ) | |||
| versions['Sphinx'] = ( | |||
| "7.4.7; python_version=='3.9'", | |||
| "8.1.3; python_version=='3.10'", | |||
| f"{versions['Sphinx'][0]}; python_version>='3.11'", | |||
| ) | |||
| versions['mdit-py-plugins'] = ( | |||
| "0.4.2; python_version=='3.9'", | |||
| f"{versions['mdit-py-plugins'][0]}; python_version>='3.10'", | |||
| ) | |||
| def write_packages(fh, packages, header, prefix=''): | |||
| fh.write(header) | |||
| for p in sorted(packages): | |||
| for v in versions[p]: | |||
| fh.write(prefix) | |||
| fh.write(p) | |||
| fh.write('==') | |||
| fh.write(v) | |||
| fh.write('\n') | |||
| write_packages(stdout, frozen, header='base\n', prefix=' ') | |||
| write_packages(stdout, dev_frozen, header='dev\n', prefix=' ') | |||
| write_packages(stdout, docs_frozen, header='docs\n', prefix=' ') | |||
| header = f'# DO NOT EDIT THIS FILE DIRECTLY - use {argv[0]} to update\n' | |||
| with open('requirements.txt', 'w') as fh: | |||
| write_packages(fh, frozen, header=header) | |||
| with open('requirements-dev.txt', 'w') as fh: | |||
| write_packages(fh, dev_frozen, header=header) | |||
| with open('requirements-docs.txt', 'w') as fh: | |||
| write_packages(fh, docs_frozen, header=header) | |||
| proviso --header="# DO NOT EDIT THIS FILE DIRECTLY - use ./script/update-requirements" "$@" | |||