Skip to content

Commit

Permalink
Upgrade bundled wheels (#2760)
Browse files Browse the repository at this point in the history
Signed-off-by: Bernát Gábor <[email protected]>
  • Loading branch information
gaborbernat committed Sep 7, 2024
1 parent 374660b commit d8f1b14
Show file tree
Hide file tree
Showing 18 changed files with 78 additions and 55 deletions.
9 changes: 4 additions & 5 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,11 @@ jobs:
- { os: macos-latest, py: "[email protected]" }
- { os: macos-latest, py: "[email protected]" }
- { os: ubuntu-latest, py: "3.7" }
- { os: windows-latest, py: "3.7" }
- { os: macos-13, py: "3.7" }
- { os: ubuntu-latest, py: "pypy-3.7" }
- { os: windows-latest, py: "pypy-3.7" }
- { os: macos-13, py: "pypy-3.7" }
exclude:
- { os: windows-latest, py: "pypy-3.10" }
- { os: windows-latest, py: "pypy-3.9" }
- { os: windows-latest, py: "pypy-3.8" }
steps:
- uses: taiki-e/install-action@cargo-binstall
- name: Install OS dependencies
Expand Down Expand Up @@ -97,7 +94,9 @@ jobs:
- name: Pick environment to run
run: |
import os; import platform; import sys; from pathlib import Path
env = f'TOXENV=py{"" if platform.python_implementation() == "CPython" else "py"}3{sys.version_info.minor}'
plat = platform.python_implementation()
e = f"3.{sys.version_info.minor}" if plat == "CPython" else f"pypy3{sys.version_info.minor}"
env = f"TOXENV={e}"
print(f"Picked: {env} for {sys.version} based of {sys.executable}")
with Path(os.environ["GITHUB_ENV"]).open("ta") as file_handler:
file_handler.write(env)
Expand Down
13 changes: 10 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ repos:
rev: 0.29.2
hooks:
- id: check-github-workflows
args: [ "--verbose" ]
args: ["--verbose"]
- repo: https://github.com/codespell-project/codespell
rev: v2.3.0
hooks:
- id: codespell
args: ["--write-changes"]
- repo: https://github.com/tox-dev/tox-ini-fmt
rev: "1.3.1"
rev: "1.3.2"
hooks:
- id: tox-ini-fmt
args: ["-p", "fix"]
Expand All @@ -24,11 +24,18 @@ repos:
hooks:
- id: pyproject-fmt
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.6.3"
rev: "v0.6.4"
hooks:
- id: ruff-format
- id: ruff
args: ["--fix", "--unsafe-fixes", "--exit-non-zero-on-fix"]
- repo: https://github.com/rbubley/mirrors-prettier
rev: "v3.3.3"
hooks:
- id: prettier
additional_dependencies:
- [email protected]
- "@prettier/[email protected]"
- repo: meta
hooks:
- id: check-hooks-apply
Expand Down
5 changes: 5 additions & 0 deletions docs/changelog/2760.bugfix.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Upgrade embedded wheels:

* wheel to ``0.44.0`` from ``0.43.0``
* pip to ``24.2`` from ``24.1``
* setuptools to ``74.1.2`` from ``70.1.0``
9 changes: 7 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ classifiers = [
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
"Topic :: Software Development :: Libraries",
Expand Down Expand Up @@ -121,6 +122,7 @@ lint.ignore = [
"D40", # no imperative mode for docstrings
"D203", # `one-blank-line-before-class` (D203) and `no-blank-line-before-class` (D211) are incompatible
"D212", # `multi-line-summary-first-line` (D212) and `multi-line-summary-second-line` (D213) are incompatible
"DOC", # no restructuredtext support
"INP001", # ignore implicit namespace packages
"ISC001", # conflict with formatter
"PLR0914", # Too many local variables
Expand All @@ -133,11 +135,11 @@ lint.ignore = [
]
lint.per-file-ignores."tests/**/*.py" = [
"D", # don't care about documentation in tests
"FBT", # don"t care about booleans as positional arguments in tests
"FBT", # don't care about booleans as positional arguments in tests
"INP001", # no implicit namespace
"PLC2701", # Private import
"PLR2004", # Magic value used in comparison, consider replacing with a constant variable
"S101", # asserts allowed in tests...
"S101", # asserts allowed in tests
"S603", # `subprocess` call: check for execution of untrusted input
]
lint.isort = { known-first-party = [
Expand All @@ -151,6 +153,9 @@ lint.preview = true
builtin = "clear,usage,en-GB_to_en-US"
count = true

[tool.pyproject-fmt]
max_supported_python = "3.13"

[tool.pytest.ini_options]
markers = [
"slow",
Expand Down
2 changes: 1 addition & 1 deletion src/virtualenv/config/cli/parser.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from __future__ import annotations
from __future__ import annotations # noqa: A005

import os
from argparse import SUPPRESS, ArgumentDefaultsHelpFormatter, ArgumentParser, Namespace
Expand Down
2 changes: 1 addition & 1 deletion src/virtualenv/create/via_global_ref/venv.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from __future__ import annotations
from __future__ import annotations # noqa: A005

import logging
from copy import copy
Expand Down
2 changes: 1 addition & 1 deletion src/virtualenv/seed/embed/via_app_data/pip_install/copy.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from __future__ import annotations
from __future__ import annotations # noqa: A005

import os
from pathlib import Path
Expand Down
42 changes: 21 additions & 21 deletions src/virtualenv/seed/wheels/embed/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,39 +12,39 @@
"wheel": "wheel-0.42.0-py3-none-any.whl",
},
"3.8": {
"pip": "pip-24.1-py3-none-any.whl",
"setuptools": "setuptools-70.1.0-py3-none-any.whl",
"wheel": "wheel-0.43.0-py3-none-any.whl",
"pip": "pip-24.2-py3-none-any.whl",
"setuptools": "setuptools-74.1.2-py3-none-any.whl",
"wheel": "wheel-0.44.0-py3-none-any.whl",
},
"3.9": {
"pip": "pip-24.1-py3-none-any.whl",
"setuptools": "setuptools-70.1.0-py3-none-any.whl",
"wheel": "wheel-0.43.0-py3-none-any.whl",
"pip": "pip-24.2-py3-none-any.whl",
"setuptools": "setuptools-74.1.2-py3-none-any.whl",
"wheel": "wheel-0.44.0-py3-none-any.whl",
},
"3.10": {
"pip": "pip-24.1-py3-none-any.whl",
"setuptools": "setuptools-70.1.0-py3-none-any.whl",
"wheel": "wheel-0.43.0-py3-none-any.whl",
"pip": "pip-24.2-py3-none-any.whl",
"setuptools": "setuptools-74.1.2-py3-none-any.whl",
"wheel": "wheel-0.44.0-py3-none-any.whl",
},
"3.11": {
"pip": "pip-24.1-py3-none-any.whl",
"setuptools": "setuptools-70.1.0-py3-none-any.whl",
"wheel": "wheel-0.43.0-py3-none-any.whl",
"pip": "pip-24.2-py3-none-any.whl",
"setuptools": "setuptools-74.1.2-py3-none-any.whl",
"wheel": "wheel-0.44.0-py3-none-any.whl",
},
"3.12": {
"pip": "pip-24.1-py3-none-any.whl",
"setuptools": "setuptools-70.1.0-py3-none-any.whl",
"wheel": "wheel-0.43.0-py3-none-any.whl",
"pip": "pip-24.2-py3-none-any.whl",
"setuptools": "setuptools-74.1.2-py3-none-any.whl",
"wheel": "wheel-0.44.0-py3-none-any.whl",
},
"3.13": {
"pip": "pip-24.1-py3-none-any.whl",
"setuptools": "setuptools-70.1.0-py3-none-any.whl",
"wheel": "wheel-0.43.0-py3-none-any.whl",
"pip": "pip-24.2-py3-none-any.whl",
"setuptools": "setuptools-74.1.2-py3-none-any.whl",
"wheel": "wheel-0.44.0-py3-none-any.whl",
},
"3.14": {
"pip": "pip-24.1-py3-none-any.whl",
"setuptools": "setuptools-70.1.0-py3-none-any.whl",
"wheel": "wheel-0.43.0-py3-none-any.whl",
"pip": "pip-24.2-py3-none-any.whl",
"setuptools": "setuptools-74.1.2-py3-none-any.whl",
"wheel": "wheel-0.44.0-py3-none-any.whl",
},
}
MAX = "3.7"
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
2 changes: 1 addition & 1 deletion src/virtualenv/seed/wheels/periodic_update.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ def __repr__(self) -> str:
)

def __eq__(self, other):
return type(self) == type(other) and all(
return type(self) == type(other) and all( # noqa: E721
getattr(self, k) == getattr(other, k) for k in ["filename", "release_date", "found_date", "source"]
)

Expand Down
2 changes: 1 addition & 1 deletion src/virtualenv/util/zipapp.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from __future__ import annotations
from __future__ import annotations # noqa: A005

import logging
import os
Expand Down
1 change: 1 addition & 0 deletions tests/unit/create/test_creator.py
Original file line number Diff line number Diff line change
Expand Up @@ -437,6 +437,7 @@ def list_files(path):


@pytest.mark.skipif(is_macos_brew(CURRENT), reason="no copy on brew")
@pytest.mark.skip(reason="https://github.com/pypa/setuptools/issues/4640")
def test_zip_importer_can_import_setuptools(tmp_path):
"""We're patching the loaders so might fail on r/o loaders, such as zipimporter on CPython<3.8"""
result = cli_run(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,11 @@
"original_executable": "/usr/bin/pypy3",
"system_executable": "/usr/bin/pypy3",
"has_venv": true,
"path": ["/usr/lib/pypy3.8", "/usr/local/lib/pypy3.8/dist-packages", "/usr/lib/python3/dist-packages"],
"path": [
"/usr/lib/pypy3.8",
"/usr/local/lib/pypy3.8/dist-packages",
"/usr/lib/python3/dist-packages"
],
"file_system_encoding": "utf-8",
"stdout_encoding": "UTF-8",
"sysconfig_scheme": null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@
"original_executable": "/tmp/pypy3.8-v7.3.8-linux64/bin/pypy",
"system_executable": "/tmp/pypy3.8-v7.3.8-linux64/bin/pypy",
"has_venv": true,
"path": ["/tmp/pypy3.8-v7.3.8-linux64/lib/pypy3.8", "/tmp/pypy3.8-v7.3.8-linux64/lib/pypy3.8/site-packages"],
"path": [
"/tmp/pypy3.8-v7.3.8-linux64/lib/pypy3.8",
"/tmp/pypy3.8-v7.3.8-linux64/lib/pypy3.8/site-packages"
],
"file_system_encoding": "utf-8",
"stdout_encoding": "UTF-8",
"sysconfig_scheme": null,
Expand Down
33 changes: 16 additions & 17 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@ requires =
tox>=4.2
env_list =
fix
py313
py312
py311
py310
py39
py38
py37
pypy3
coverage
readme
docs
3.13
3.12
3.11
3.10
3.9
3.8
3.7
skip_missing_interpreters = true

[testenv]
Expand Down Expand Up @@ -44,19 +44,19 @@ uv_seed = true
description = format the code base to adhere to our styles, and complain about what we cannot do automatically
skip_install = true
deps =
pre-commit>=3.7
pre-commit-uv>=4.1
commands =
pre-commit run --all-files --show-diff-on-failure

[testenv:readme]
description = check that the long description is valid (need for PyPI)
skip_install = true
deps =
build[virtualenv]>=1.2.1
twine>=5
build[uv]>=1.2.2
twine>=5.1.1
extras =
commands =
python -m build -o {envtmpdir} --wheel --sdist .
python -m build -o {envtmpdir} --installer uv --wheel --sdist .
twine check {envtmpdir}/*

[testenv:docs]
Expand All @@ -71,7 +71,7 @@ commands =
description = upgrade pip/wheels/setuptools to latest
skip_install = true
deps =
ruff>=0.3.7
ruff>=0.6.4
pass_env =
UPGRADE_ADVISORY
change_dir = {toxinidir}/tasks
Expand All @@ -83,8 +83,8 @@ uv_seed = true
description = do a release, required posarg of the version number
deps =
gitpython>=3.1.43
packaging>=24
towncrier>=23.11
packaging>=24.1
towncrier>=24.8
change_dir = {toxinidir}/tasks
commands =
python release.py --version {posargs}
Expand All @@ -96,15 +96,14 @@ extras =
docs
test
commands =
python -m pip list --format=columns
uv pip tree
python -c 'import sys; print(sys.executable)'
uv_seed = true

[testenv:zipapp]
description = generate a zipapp
skip_install = true
deps =
packaging>=24
packaging>=24.1
commands =
python tasks/make_zipapp.py
uv_seed = true

0 comments on commit d8f1b14

Please sign in to comment.