diff --git a/.github/workflows/lint_and_test.yml b/.github/workflows/lint_and_test.yml index 8bf96224..b23b98c6 100644 --- a/.github/workflows/lint_and_test.yml +++ b/.github/workflows/lint_and_test.yml @@ -36,6 +36,8 @@ jobs: just-version: 1.14.0 - name: Setup environment to run tox + env: + UV_SYSTEM_PYTHON: 1 run: just setup-runner @@ -78,6 +80,8 @@ jobs: just-version: 1.14.0 - name: Setup environment to run tox + env: + UV_SYSTEM_PYTHON: 1 run: just setup-runner diff --git a/.github/workflows/test_all_oses.yml b/.github/workflows/test_all_oses.yml index 38f27145..7966911f 100644 --- a/.github/workflows/test_all_oses.yml +++ b/.github/workflows/test_all_oses.yml @@ -10,6 +10,9 @@ concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true +env: + UV_SYSTEM_PYTHON: 1 + jobs: testing: name: Testing (${{ matrix.python_version.tox }}, ${{ matrix.os }}) @@ -44,6 +47,8 @@ jobs: just-version: 1.14.0 - name: Setup environment to run tox + env: + UV_SYSTEM_PYTHON: 1 run: just setup-runner diff --git a/benchmarks/benchmarks/bench_nexus.py b/benchmarks/benchmarks/bench_nexus.py index ec2a93f2..55f092b7 100644 --- a/benchmarks/benchmarks/bench_nexus.py +++ b/benchmarks/benchmarks/bench_nexus.py @@ -267,7 +267,7 @@ def filtered_hubs(self) -> Iterable[HubDescription]: return BENCHMARK_HUBS def filtered_envs(self) -> Iterable[EnvDescription]: - if self.env_include: + if self.env_include and self.env_exclude: wild_envs = set(self.env_exclude) - {env_description.key for env_description in BENCHMARK_ENVS} if wild_envs: raise ValueError(f"Unknown envs {wild_envs}") diff --git a/justfile b/justfile index 455b018c..d6172875 100644 --- a/justfile +++ b/justfile @@ -7,15 +7,15 @@ set windows-powershell := true # prepare venv and repo for developing @bootstrap: pip install -r requirements/pre.txt - pip install -e . - pip install -r requirements/dev.txt + uv pip install -e . + uv pip install -r requirements/dev.txt pre-commit pre-commit install # sync version of installed packages @venv-sync: - pip-sync requirements/pre.txt requirements/dev.txt - pip install -e . + uv pip sync requirements/pre.txt requirements/dev.txt + uv pip install -e . # run all linters @lint: @@ -68,7 +68,7 @@ doc_target := "docs-build" [private] @setup-runner: pip install -r requirements/pre.txt - pip install -r requirements/runner.txt + uv pip install -r requirements/runner.txt [private] @inv *ARGS: diff --git a/requirements/bench.txt b/requirements/bench.txt index c15e8efd..748f9941 100644 --- a/requirements/bench.txt +++ b/requirements/bench.txt @@ -1,9 +1,5 @@ -# -# This file is autogenerated by pip-compile with Python 3.12 -# by the following command: -# -# pip-compile --allow-unsafe --output-file=requirements/bench.txt --strip-extras requirements/raw/bench.txt -# +# This file was autogenerated by uv via the following command: +# uv pip compile requirements/raw/bench.txt -o requirements/bench.txt --allow-unsafe --strip-extras --no-strip-markers -e ./benchmarks # via -r requirements/raw/bench.txt annotated-types==0.6.0 @@ -20,7 +16,7 @@ marshmallow==3.20.1 # via -r requirements/raw/bench.txt mashumaro==3.10 # via -r requirements/raw/bench.txt -msgspec==0.18.4 ; implementation_name != "pypy" +msgspec==0.18.4 ; implementation_name != 'pypy' # via -r requirements/raw/bench.txt packaging==24.0 # via diff --git a/requirements/bench_pypy38.txt b/requirements/bench_pypy38.txt index adcd49cf..00f373dd 100644 --- a/requirements/bench_pypy38.txt +++ b/requirements/bench_pypy38.txt @@ -1,9 +1,5 @@ -# -# This file is autogenerated by pip-compile with Python 3.12 -# by the following command: -# -# pip-compile --allow-unsafe --output-file=requirements/bench_pypy38.txt --strip-extras requirements/raw/bench_pypy38.txt -# +# This file was autogenerated by uv via the following command: +# uv pip compile requirements/raw/bench_pypy38.txt -o requirements/bench_pypy38.txt --allow-unsafe --strip-extras --no-strip-markers -e ./benchmarks # via -r requirements/raw/bench_pypy38.txt annotated-types==0.6.0 @@ -20,7 +16,7 @@ marshmallow==3.20.1 # via -r requirements/raw/bench_pypy38.txt mashumaro==3.10 # via -r requirements/raw/bench_pypy38.txt -msgspec==0.18.4 ; implementation_name != "pypy" +msgspec==0.18.4 ; implementation_name != 'pypy' # via -r requirements/raw/bench_pypy38.txt packaging==24.0 # via diff --git a/requirements/dev.txt b/requirements/dev.txt index 3fa8f344..54e440b5 100644 --- a/requirements/dev.txt +++ b/requirements/dev.txt @@ -1,9 +1,5 @@ -# -# This file is autogenerated by pip-compile with Python 3.12 -# by the following command: -# -# pip-compile --allow-unsafe --output-file=requirements/dev.txt --strip-extras requirements/raw/dev.txt -# +# This file was autogenerated by uv via the following command: +# uv pip compile requirements/raw/dev.txt -o requirements/dev.txt --allow-unsafe --strip-extras --no-strip-markers -e ./benchmarks # via -r requirements/raw/bench.txt -e ./tests/tests_helpers @@ -24,7 +20,7 @@ beautifulsoup4==4.12.3 # via furo build==1.2.1 # via pip-tools -cachetools==5.3.3 +cachetools==5.4.0 # via tox cattrs==23.1.2 # via -r requirements/raw/bench.txt @@ -69,7 +65,7 @@ docutils==0.20.1 # sphinx-paramlinks docutils-stubs==0.0.22 # via -r requirements/raw/doc.txt -filelock==3.13.4 +filelock==3.15.4 # via # tox # virtualenv @@ -83,7 +79,7 @@ gitdb==4.0.11 # via gitpython gitpython==3.1.43 # via -r requirements/raw/doc.txt -greenlet==3.0.3 +greenlet==3.0.3 ; platform_machine == 'AMD64' or platform_machine == 'WIN32' or platform_machine == 'aarch64' or platform_machine == 'amd64' or platform_machine == 'ppc64le' or platform_machine == 'win32' or platform_machine == 'x86_64' # via sqlalchemy identify==2.5.36 # via pre-commit @@ -126,7 +122,7 @@ mdit-py-plugins==0.4.0 # via myst-parser mdurl==0.1.2 # via markdown-it-py -msgspec==0.18.4 ; implementation_name != "pypy" +msgspec==0.18.4 ; implementation_name != 'pypy' # via -r requirements/raw/bench.txt mypy==1.9.0 # via -r requirements/raw/lint.txt @@ -140,7 +136,7 @@ numpy==1.26.4 # via # contourpy # matplotlib -packaging==24.0 +packaging==24.1 # via # build # marshmallow @@ -150,15 +146,20 @@ packaging==24.0 # pytest # sphinx # tox + # tox-uv pbr==6.0.0 # via sphinxcontrib-apidoc phonenumberslite==8.13.26 # via -r requirements/raw/test_extra_none.txt pillow==10.3.0 # via matplotlib +pip==24.0 + # via + # -r requirements/raw/pre.txt + # pip-tools pip-tools==7.4.1 # via -r requirements/raw/dev.txt -platformdirs==4.2.0 +platformdirs==4.2.2 # via # tox # virtualenv @@ -194,7 +195,7 @@ pyparsing==3.1.2 # via matplotlib pyperf==2.6.1 # via -r requirements/raw/bench.txt -pyproject-api==1.6.1 +pyproject-api==1.7.1 # via tox pyproject-hooks==1.0.0 # via @@ -220,6 +221,11 @@ ruff==0.4.1 # via -r requirements/raw/lint.txt schematics==2.1.1 # via -r requirements/raw/bench.txt +setuptools==69.5.1 + # via + # -r requirements/raw/dev.txt + # nodeenv + # pip-tools six==1.16.0 # via # mando @@ -278,7 +284,9 @@ toml==0.10.2 # via vulture towncrier==23.11.0 # via -r requirements/raw/dev.txt -tox==4.14.2 +tox==4.17.1 + # via tox-uv +tox-uv==1.11.1 # via -r requirements/raw/runner.txt typing-extensions==4.11.0 # via @@ -289,7 +297,11 @@ typing-extensions==4.11.0 # sqlalchemy urllib3==2.2.1 # via requests -virtualenv==20.25.3 +uv==0.2.34 + # via + # -r requirements/raw/pre.txt + # tox-uv +virtualenv==20.26.3 # via # pre-commit # tox @@ -299,14 +311,3 @@ wheel==0.43.0 # via # -r requirements/raw/pre.txt # pip-tools - -# The following packages are considered to be unsafe in a requirements file: -pip==24.0 - # via - # -r requirements/raw/pre.txt - # pip-tools -setuptools==69.5.1 - # via - # -r requirements/raw/dev.txt - # nodeenv - # pip-tools diff --git a/requirements/doc.txt b/requirements/doc.txt index b9276e93..caadd0bc 100644 --- a/requirements/doc.txt +++ b/requirements/doc.txt @@ -1,9 +1,5 @@ -# -# This file is autogenerated by pip-compile with Python 3.12 -# by the following command: -# -# pip-compile --allow-unsafe --output-file=requirements/doc.txt --strip-extras requirements/raw/doc.txt -# +# This file was autogenerated by uv via the following command: +# uv pip compile requirements/raw/doc.txt -o requirements/doc.txt --allow-unsafe --strip-extras --no-strip-markers -e ./benchmarks # via -r requirements/raw/bench.txt alabaster==0.7.16 @@ -63,7 +59,7 @@ mdit-py-plugins==0.4.0 # via myst-parser mdurl==0.1.2 # via markdown-it-py -msgspec==0.18.4 ; implementation_name != "pypy" +msgspec==0.18.4 ; implementation_name != 'pypy' # via -r requirements/raw/bench.txt myst-parser==2.0.0 # via -r requirements/raw/doc.txt diff --git a/requirements/lint.txt b/requirements/lint.txt index c3064b48..da562934 100644 --- a/requirements/lint.txt +++ b/requirements/lint.txt @@ -1,9 +1,5 @@ -# -# This file is autogenerated by pip-compile with Python 3.12 -# by the following command: -# -# pip-compile --allow-unsafe --output-file=requirements/lint.txt --strip-extras requirements/raw/lint.txt -# +# This file was autogenerated by uv via the following command: +# uv pip compile requirements/raw/lint.txt -o requirements/lint.txt --allow-unsafe --strip-extras --no-strip-markers -e ./benchmarks # via -r requirements/raw/bench.txt -e ./tests/tests_helpers @@ -30,7 +26,7 @@ cfgv==3.4.0 # via pre-commit charset-normalizer==3.3.2 # via requests -colorama==0.4.6 +colorama==0.4.6 ; python_version > '3.4' # via radon contourpy==1.2.1 # via matplotlib @@ -67,7 +63,7 @@ gitdb==4.0.11 # via gitpython gitpython==3.1.43 # via -r requirements/raw/doc.txt -greenlet==3.0.3 +greenlet==3.0.3 ; platform_machine == 'AMD64' or platform_machine == 'WIN32' or platform_machine == 'aarch64' or platform_machine == 'amd64' or platform_machine == 'ppc64le' or platform_machine == 'win32' or platform_machine == 'x86_64' # via sqlalchemy identify==2.5.36 # via pre-commit @@ -105,7 +101,7 @@ mdit-py-plugins==0.4.0 # via myst-parser mdurl==0.1.2 # via markdown-it-py -msgspec==0.18.4 ; implementation_name != "pypy" +msgspec==0.18.4 ; implementation_name != 'pypy' # via -r requirements/raw/bench.txt mypy==1.9.0 # via -r requirements/raw/lint.txt @@ -184,6 +180,8 @@ ruff==0.4.1 # via -r requirements/raw/lint.txt schematics==2.1.1 # via -r requirements/raw/bench.txt +setuptools==69.5.1 + # via nodeenv six==1.16.0 # via # mando @@ -253,7 +251,3 @@ virtualenv==20.25.3 # via pre-commit vulture==2.10 # via -r requirements/raw/lint.txt - -# The following packages are considered to be unsafe in a requirements file: -setuptools==69.5.1 - # via nodeenv diff --git a/requirements/pre.txt b/requirements/pre.txt index 8b5a7dc2..69fa0a40 100644 --- a/requirements/pre.txt +++ b/requirements/pre.txt @@ -1,12 +1,8 @@ -# -# This file is autogenerated by pip-compile with Python 3.12 -# by the following command: -# -# pip-compile --allow-unsafe --output-file=requirements/pre.txt --strip-extras requirements/raw/pre.txt -# -wheel==0.43.0 - # via -r requirements/raw/pre.txt - -# The following packages are considered to be unsafe in a requirements file: +# This file was autogenerated by uv via the following command: +# uv pip compile requirements/raw/pre.txt -o requirements/pre.txt --allow-unsafe --strip-extras --no-strip-markers pip==24.0 # via -r requirements/raw/pre.txt +uv==0.2.34 + # via -r requirements/raw/pre.txt +wheel==0.43.0 + # via -r requirements/raw/pre.txt diff --git a/requirements/raw/pre.txt b/requirements/raw/pre.txt index c9fbbb05..c8084a88 100644 --- a/requirements/raw/pre.txt +++ b/requirements/raw/pre.txt @@ -1,2 +1,3 @@ pip==24.0 wheel==0.43.0 +uv==0.2.34 diff --git a/requirements/raw/runner.txt b/requirements/raw/runner.txt index 9187419b..3e57c71f 100644 --- a/requirements/raw/runner.txt +++ b/requirements/raw/runner.txt @@ -1,3 +1,3 @@ -tox==4.14.2 +tox-uv==1.11.1 invoke==2.2.0 coverage==7.4.4 diff --git a/requirements/raw/test_extra_old.txt b/requirements/raw/test_extra_old.txt index c49d6391..c56acf74 100644 --- a/requirements/raw/test_extra_old.txt +++ b/requirements/raw/test_extra_old.txt @@ -1,7 +1,7 @@ -r test_extra_none.txt attrs==21.3.0 sqlalchemy==2.0.0 -pydantic==2.0.0 +pydantic==2.1.0 # pydantic-core has dependency: # `typing-extensions >=4.6.0,<4.7.0; platform_python_implementation == "PyPy"` diff --git a/requirements/runner.txt b/requirements/runner.txt index 0df5be1e..2868e270 100644 --- a/requirements/runner.txt +++ b/requirements/runner.txt @@ -1,10 +1,6 @@ -# -# This file is autogenerated by pip-compile with Python 3.12 -# by the following command: -# -# pip-compile --allow-unsafe --output-file=requirements/runner.txt --strip-extras requirements/raw/runner.txt -# -cachetools==5.3.3 +# This file was autogenerated by uv via the following command: +# uv pip compile requirements/raw/runner.txt -o requirements/runner.txt --allow-unsafe --strip-extras --no-strip-markers +cachetools==5.4.0 # via tox chardet==5.2.0 # via tox @@ -14,25 +10,30 @@ coverage==7.4.4 # via -r requirements/raw/runner.txt distlib==0.3.8 # via virtualenv -filelock==3.13.4 +filelock==3.15.4 # via # tox # virtualenv invoke==2.2.0 # via -r requirements/raw/runner.txt -packaging==24.0 +packaging==24.1 # via # pyproject-api # tox -platformdirs==4.2.0 + # tox-uv +platformdirs==4.2.2 # via # tox # virtualenv pluggy==1.5.0 # via tox -pyproject-api==1.6.1 +pyproject-api==1.7.1 # via tox -tox==4.14.2 +tox==4.17.1 + # via tox-uv +tox-uv==1.11.1 # via -r requirements/raw/runner.txt -virtualenv==20.25.3 +uv==0.2.34 + # via tox-uv +virtualenv==20.26.3 # via tox diff --git a/requirements/test_extra_new.txt b/requirements/test_extra_new.txt index 933dd4ee..62ffef8e 100644 --- a/requirements/test_extra_new.txt +++ b/requirements/test_extra_new.txt @@ -1,9 +1,5 @@ -# -# This file is autogenerated by pip-compile with Python 3.12 -# by the following command: -# -# pip-compile --allow-unsafe --output-file=requirements/test_extra_new.txt --strip-extras requirements/raw/test_extra_new.txt -# +# This file was autogenerated by uv via the following command: +# uv pip compile requirements/raw/test_extra_new.txt -o requirements/test_extra_new.txt --allow-unsafe --strip-extras --no-strip-markers -e ./tests/tests_helpers # via -r requirements/raw/test_extra_none.txt annotated-types==0.6.0 @@ -14,7 +10,7 @@ coverage==7.4.4 # via -r requirements/raw/test_extra_none.txt dirty-equals==0.7.1.post0 # via -r requirements/raw/test_extra_none.txt -greenlet==3.0.3 +greenlet==3.0.3 ; platform_machine == 'AMD64' or platform_machine == 'WIN32' or platform_machine == 'aarch64' or platform_machine == 'amd64' or platform_machine == 'ppc64le' or platform_machine == 'win32' or platform_machine == 'x86_64' # via sqlalchemy iniconfig==2.0.0 # via pytest diff --git a/requirements/test_extra_new_pypy38.txt b/requirements/test_extra_new_pypy38.txt index 8260bb8a..169d6add 100644 --- a/requirements/test_extra_new_pypy38.txt +++ b/requirements/test_extra_new_pypy38.txt @@ -1,9 +1,5 @@ -# -# This file is autogenerated by pip-compile with Python 3.12 -# by the following command: -# -# pip-compile --allow-unsafe --output-file=requirements/test_extra_new_pypy38.txt --strip-extras requirements/raw/test_extra_new_pypy38.txt -# +# This file was autogenerated by uv via the following command: +# uv pip compile requirements/raw/test_extra_new_pypy38.txt -o requirements/test_extra_new_pypy38.txt --allow-unsafe --strip-extras --no-strip-markers -e ./tests/tests_helpers # via -r requirements/raw/test_extra_none.txt annotated-types==0.6.0 @@ -14,7 +10,7 @@ coverage==7.4.4 # via -r requirements/raw/test_extra_none.txt dirty-equals==0.7.1.post0 # via -r requirements/raw/test_extra_none.txt -greenlet==3.0.3 +greenlet==3.0.3 ; platform_machine == 'AMD64' or platform_machine == 'WIN32' or platform_machine == 'aarch64' or platform_machine == 'amd64' or platform_machine == 'ppc64le' or platform_machine == 'win32' or platform_machine == 'x86_64' # via sqlalchemy iniconfig==2.0.0 # via pytest diff --git a/requirements/test_extra_none.txt b/requirements/test_extra_none.txt index 077a0c7f..2e5e0fa3 100644 --- a/requirements/test_extra_none.txt +++ b/requirements/test_extra_none.txt @@ -1,9 +1,5 @@ -# -# This file is autogenerated by pip-compile with Python 3.12 -# by the following command: -# -# pip-compile --allow-unsafe --output-file=requirements/test_extra_none.txt --strip-extras requirements/raw/test_extra_none.txt -# +# This file was autogenerated by uv via the following command: +# uv pip compile requirements/raw/test_extra_none.txt -o requirements/test_extra_none.txt --allow-unsafe --strip-extras --no-strip-markers -e ./tests/tests_helpers # via -r requirements/raw/test_extra_none.txt coverage==7.4.4 diff --git a/requirements/test_extra_old.txt b/requirements/test_extra_old.txt index d1bfe81d..182c2bd2 100644 --- a/requirements/test_extra_old.txt +++ b/requirements/test_extra_old.txt @@ -1,9 +1,5 @@ -# -# This file is autogenerated by pip-compile with Python 3.12 -# by the following command: -# -# pip-compile --allow-unsafe --output-file=requirements/test_extra_old.txt --strip-extras requirements/raw/test_extra_old.txt -# +# This file was autogenerated by uv via the following command: +# uv pip compile requirements/raw/test_extra_old.txt -o requirements/test_extra_old.txt --allow-unsafe --strip-extras --no-strip-markers -e ./tests/tests_helpers # via -r requirements/raw/test_extra_none.txt annotated-types==0.6.0 @@ -14,7 +10,7 @@ coverage==7.4.4 # via -r requirements/raw/test_extra_none.txt dirty-equals==0.7.1.post0 # via -r requirements/raw/test_extra_none.txt -greenlet==3.0.3 +greenlet==3.0.3 ; platform_machine == 'AMD64' or platform_machine == 'WIN32' or platform_machine == 'aarch64' or platform_machine == 'amd64' or platform_machine == 'ppc64le' or platform_machine == 'win32' or platform_machine == 'x86_64' # via sqlalchemy iniconfig==2.0.0 # via pytest @@ -24,9 +20,9 @@ phonenumberslite==8.13.26 # via -r requirements/raw/test_extra_none.txt pluggy==1.5.0 # via pytest -pydantic==2.0 +pydantic==2.1.0 # via -r requirements/raw/test_extra_old.txt -pydantic-core==2.0.1 +pydantic-core==2.4.0 # via pydantic pytest==7.4.2 # via -r requirements/raw/test_extra_none.txt diff --git a/scripts/invoke_tasks.py b/scripts/invoke_tasks.py index 9b4ac524..db76c668 100644 --- a/scripts/invoke_tasks.py +++ b/scripts/invoke_tasks.py @@ -41,8 +41,8 @@ def cov(c: Context, env_list, output="coverage.xml", parallel=False): def deps_compile(c: Context, upgrade=False): promises = [ c.run( - f'pip-compile {req} -o {Path("requirements") / req.name}' - ' -q --allow-unsafe --strip-extras' + f'uv pip compile {req} -o {Path("requirements") / req.name}' + ' -q --allow-unsafe --strip-extras --no-strip-markers' + if_str(upgrade, " --upgrade"), asynchronous=True, ) diff --git a/tox.ini b/tox.ini index ec6dd32d..3e9d250f 100644 --- a/tox.ini +++ b/tox.ini @@ -38,8 +38,8 @@ deps = -r requirements/lint.txt base_python = python3.11 install_commands = - python -m pip install -r requirements/pre.txt - python -m pip install {opts} {packages} + python -m uv pip install -r requirements/pre.txt + python -m uv pip install {opts} {packages} ignore_errors = true allowlist_externals = ruff