summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernát Gábor <gaborjbernat@gmail.com>2023-02-05 21:30:46 -0800
committerGitHub <noreply@github.com>2023-02-05 21:30:46 -0800
commit9b4b17f8af6db48a0166c6fe8a1f4155254e92f7 (patch)
tree6ac098f33b48cd4caae6f7f977e05c8ea09e68fd
parenta98c3f519f447de28a899f5e3f7bec5c754d6183 (diff)
downloadvirtualenv-9b4b17f8af6db48a0166c6fe8a1f4155254e92f7.tar.gz
Bump embedded pip and setuptools (#2489)
-rw-r--r--.github/ISSUE_TEMPLATE/feature-request.md3
-rw-r--r--.github/workflows/check.yml44
-rw-r--r--.pre-commit-config.yaml22
-rw-r--r--docs/changelog/2489.bugfix.rst1
-rw-r--r--pyproject.toml77
-rw-r--r--src/virtualenv/config/cli/parser.py1
-rw-r--r--src/virtualenv/seed/wheels/embed/__init__.py24
-rw-r--r--src/virtualenv/seed/wheels/embed/pip-23.0-py3-none-any.whl (renamed from src/virtualenv/seed/wheels/embed/pip-22.3.1-py3-none-any.whl)bin2051534 -> 2056044 bytes
-rw-r--r--src/virtualenv/seed/wheels/embed/setuptools-67.1.0-py3-none-any.whl (renamed from src/virtualenv/seed/wheels/embed/setuptools-65.6.3-py3-none-any.whl)bin1233963 -> 1082555 bytes
-rw-r--r--tests/integration/test_zipapp.py7
-rw-r--r--tox.ini39
11 files changed, 78 insertions, 140 deletions
diff --git a/.github/ISSUE_TEMPLATE/feature-request.md b/.github/ISSUE_TEMPLATE/feature-request.md
index c5c3864..8714ceb 100644
--- a/.github/ISSUE_TEMPLATE/feature-request.md
+++ b/.github/ISSUE_TEMPLATE/feature-request.md
@@ -18,7 +18,8 @@ assignees: ""
**Alternative Solutions**
-<!-- Have you tried to workaround the problem using virtualenv or other tools? Or a different approach to solving this issue? Please elaborate here. -->
+<!-- Have you tried to workaround the problem using virtualenv or other tools? Or a different approach to solving this
+issue? Please elaborate here. -->
**Additional context**
diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml
index 6524a6b..a711adb 100644
--- a/.github/workflows/check.yml
+++ b/.github/workflows/check.yml
@@ -93,48 +93,6 @@ jobs:
PYTEST_ADDOPTS: "-vv --durations=20"
CI_RUN: "yes"
DIFF_AGAINST: HEAD
- - name: Rename coverage report file
- run: |
- import os; import sys
- os.rename(f".tox/.coverage.{os.environ['TOXENV']}", f".tox/.coverage.{os.environ['TOXENV']}-{sys.platform}")
- shell: python
- - name: Upload coverage data
- uses: actions/upload-artifact@v3
- with:
- name: coverage-data
- path: ".tox/.coverage.*"
-
- coverage:
- name: Combine coverage
- runs-on: ubuntu-22.04
- needs: test
- steps:
- - uses: actions/checkout@v3
- with:
- fetch-depth: 0
- - uses: actions/setup-python@v4
- with:
- python-version: "3.11"
- - name: Install tox
- run: python -m pip install tox
- - name: Setup coverage tool
- run: tox -e coverage --notest
- - name: Install package builder
- run: python -m pip install build
- - name: Build package
- run: pyproject-build --wheel .
- - name: Download coverage data
- uses: actions/download-artifact@v3
- with:
- name: coverage-data
- path: .tox
- - name: Combine and report coverage
- run: tox -e coverage
- - name: Upload HTML report
- uses: actions/upload-artifact@v3
- with:
- name: html-report
- path: .tox/htmlcov
check:
name: ${{ matrix.tox_env }} - ${{ matrix.os }}
@@ -171,7 +129,7 @@ jobs:
UPGRADE_ADVISORY: "yes"
publish:
- needs: [check, coverage]
+ needs: [check]
runs-on: ubuntu-22.04
steps:
- name: Setup python to build package
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 90440e6..cc4e8a2 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -17,7 +17,7 @@ repos:
- id: add-trailing-comma
args: [--py36-plus]
- repo: https://github.com/asottile/pyupgrade
- rev: v3.2.1
+ rev: v3.3.1
hooks:
- id: pyupgrade
args: ["--py37-plus"]
@@ -28,25 +28,25 @@ repos:
- id: pyupgrade
files: "^(src/virtualenv/create/via_global_ref/_virtualenv.py|src/virtualenv/create/via_global_ref/builtin/python2/site.py|src/virtualenv/discovery/py_info.py|tasks/__main__zipapp.py)$"
- repo: https://github.com/PyCQA/isort
- rev: 5.11.4
+ rev: 5.12.0
hooks:
- id: isort
- repo: https://github.com/psf/black
- rev: 22.12.0
+ rev: 23.1.0
hooks:
- id: black
args: [--safe]
- repo: https://github.com/asottile/blacken-docs
- rev: v1.12.1
+ rev: 1.13.0
hooks:
- id: blacken-docs
- additional_dependencies: [black==22.12]
+ additional_dependencies: [black==23.1]
- repo: https://github.com/pre-commit/pygrep-hooks
- rev: v1.9.0
+ rev: v1.10.0
hooks:
- id: rst-backticks
- repo: https://github.com/tox-dev/tox-ini-fmt
- rev: "0.5.2"
+ rev: "0.6.1"
hooks:
- id: tox-ini-fmt
args: ["-p", "fix"]
@@ -55,11 +55,11 @@ repos:
hooks:
- id: flake8
additional_dependencies:
- - flake8-bugbear==22.12.6
+ - flake8-bugbear==23.1.20
- flake8-comprehensions==3.10.1
- flake8-pytest-style==1.6
- flake8-spellcheck==0.28
- - flake8-unused-arguments==0.0.12
+ - flake8-unused-arguments==0.0.13
- flake8-noqa==1.3
- pep8-naming==0.13.3
- flake8-pyproject==1.2.2
@@ -68,11 +68,11 @@ repos:
hooks:
- id: prettier
additional_dependencies:
- - prettier@3.0.0-alpha.4
+ - prettier@2.7.1
- "@prettier/plugin-xml@2.2"
args: ["--print-width=120", "--prose-wrap=always"]
- repo: https://github.com/igorshubovych/markdownlint-cli
- rev: v0.32.2
+ rev: v0.33.0
hooks:
- id: markdownlint
- repo: meta
diff --git a/docs/changelog/2489.bugfix.rst b/docs/changelog/2489.bugfix.rst
new file mode 100644
index 0000000..396f2b6
--- /dev/null
+++ b/docs/changelog/2489.bugfix.rst
@@ -0,0 +1 @@
+Bump embedded pip to ``23.0`` and setuptools to ``67.1`` - by :user:`gaborbernat`.
diff --git a/pyproject.toml b/pyproject.toml
index f14b417..1b56d6a 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,62 +1,71 @@
[build-system]
build-backend = "hatchling.build"
-requires = ["hatch-vcs>=0.3", "hatchling>=1.11.1"]
+requires = [
+ "hatch-vcs>=0.3",
+ "hatchling>=1.12.2",
+]
[project]
name = "virtualenv"
description = "Virtual Python Environment builder"
readme = "README.md"
+keywords = [
+ "environments",
+ "isolated",
+ "virtual",
+]
license = "MIT"
maintainers = [{ name = "Bernat Gabor", email = "gaborjbernat@gmail.com" }]
-urls.Documentation = "https://virtualenv.pypa.io"
-urls.Homepage = "https://github.com/pypa/virtualenv"
-urls.Source = "https://github.com/pypa/virtualenv"
-urls.Tracker = "https://github.com/pypa/virtualenv/issues"
-scripts.virtualenv = "virtualenv.__main__:run_with_catch"
requires-python = ">=3.7"
+classifiers = [
+ "Development Status :: 5 - Production/Stable",
+ "Intended Audience :: Developers",
+ "License :: OSI Approved :: MIT License",
+ "Operating System :: MacOS :: MacOS X",
+ "Operating System :: Microsoft :: Windows",
+ "Operating System :: POSIX",
+ "Programming Language :: Python :: 3",
+ "Programming Language :: Python :: 3 :: Only",
+ "Programming Language :: Python :: Implementation :: CPython",
+ "Programming Language :: Python :: Implementation :: PyPy",
+ "Topic :: Software Development :: Libraries",
+ "Topic :: Software Development :: Testing",
+ "Topic :: Utilities",
+]
+dynamic = [
+ "version",
+]
dependencies = [
"distlib<1,>=0.3.6",
"filelock<4,>=3.4.1",
'importlib-metadata>=4.8.3; python_version < "3.8"',
"platformdirs<3,>=2.4",
]
+optional-dependencies.docs = [
+ "proselint>=0.13",
+ "sphinx>=5.3",
+ "sphinx-argparse>=0.4",
+ "sphinx-rtd-theme>=1.1.1",
+ "towncrier>=22.12",
+]
optional-dependencies.test = [
"covdefaults>=2.2.2",
- "coverage>=7.0.2",
+ "coverage>=7.1",
"coverage-enable-subprocess>=1",
"flaky>=3.7",
- "packaging>=22",
- "pytest>=7.2",
+ "packaging>=23",
+ "pytest>=7.2.1",
"pytest-env>=0.8.1",
"pytest-freezegun>=0.4.2",
"pytest-mock>=3.10",
"pytest-randomly>=3.12",
"pytest-timeout>=2.1",
]
-optional-dependencies.docs = [
- "proselint>=0.13",
- "sphinx>=5.3",
- "sphinx-argparse>=0.4",
- "sphinx-rtd-theme>=1.1.1",
- "towncrier>=22.12",
-]
-keywords = ["environments", "isolated", "virtual"]
-classifiers = [
- "Development Status :: 5 - Production/Stable",
- "Intended Audience :: Developers",
- "License :: OSI Approved :: MIT License",
- "Operating System :: MacOS :: MacOS X",
- "Operating System :: Microsoft :: Windows",
- "Operating System :: POSIX",
- "Programming Language :: Python :: 3",
- "Programming Language :: Python :: 3 :: Only",
- "Programming Language :: Python :: Implementation :: CPython",
- "Programming Language :: Python :: Implementation :: PyPy",
- "Topic :: Software Development :: Libraries",
- "Topic :: Software Development :: Testing",
- "Topic :: Utilities",
-]
-dynamic = ["version"]
+urls.Documentation = "https://virtualenv.pypa.io"
+urls.Homepage = "https://github.com/pypa/virtualenv"
+urls.Source = "https://github.com/pypa/virtualenv"
+urls.Tracker = "https://github.com/pypa/virtualenv/issues"
+scripts.virtualenv = "virtualenv.__main__:run_with_catch"
[project.entry-points."virtualenv.activate"]
bash = "virtualenv.activation.bash:BashActivator"
@@ -137,4 +146,4 @@ ignore = [
markers = ["slow"]
timeout = 600
addopts = "--tb=auto -ra --showlocals --no-success-flaky-report"
-env = ["PYTHONWARNINGS=ignore:DEPRECATION::pip._internal.cli.base_command", "PYTHONIOENCODING=utf-8"]
+env = ["PYTHONIOENCODING=utf-8"]
diff --git a/src/virtualenv/config/cli/parser.py b/src/virtualenv/config/cli/parser.py
index 5ab4fbd..f68e56e 100644
--- a/src/virtualenv/config/cli/parser.py
+++ b/src/virtualenv/config/cli/parser.py
@@ -110,7 +110,6 @@ class HelpFormatter(ArgumentDefaultsHelpFormatter):
super().__init__(prog, max_help_position=32, width=240)
def _get_help_string(self, action):
-
text = super()._get_help_string(action)
if hasattr(action, "default_source"):
default = " (default: %(default)s)"
diff --git a/src/virtualenv/seed/wheels/embed/__init__.py b/src/virtualenv/seed/wheels/embed/__init__.py
index 5e87f75..f779e07 100644
--- a/src/virtualenv/seed/wheels/embed/__init__.py
+++ b/src/virtualenv/seed/wheels/embed/__init__.py
@@ -5,33 +5,33 @@ from virtualenv.seed.wheels.util import Wheel
BUNDLE_FOLDER = Path(__file__).absolute().parent
BUNDLE_SUPPORT = {
"3.12": {
- "pip": "pip-22.3.1-py3-none-any.whl",
- "setuptools": "setuptools-65.6.3-py3-none-any.whl",
+ "pip": "pip-23.0-py3-none-any.whl",
+ "setuptools": "setuptools-67.1.0-py3-none-any.whl",
"wheel": "wheel-0.38.4-py3-none-any.whl",
},
"3.11": {
- "pip": "pip-22.3.1-py3-none-any.whl",
- "setuptools": "setuptools-65.6.3-py3-none-any.whl",
+ "pip": "pip-23.0-py3-none-any.whl",
+ "setuptools": "setuptools-67.1.0-py3-none-any.whl",
"wheel": "wheel-0.38.4-py3-none-any.whl",
},
"3.10": {
- "pip": "pip-22.3.1-py3-none-any.whl",
- "setuptools": "setuptools-65.6.3-py3-none-any.whl",
+ "pip": "pip-23.0-py3-none-any.whl",
+ "setuptools": "setuptools-67.1.0-py3-none-any.whl",
"wheel": "wheel-0.38.4-py3-none-any.whl",
},
"3.9": {
- "pip": "pip-22.3.1-py3-none-any.whl",
- "setuptools": "setuptools-65.6.3-py3-none-any.whl",
+ "pip": "pip-23.0-py3-none-any.whl",
+ "setuptools": "setuptools-67.1.0-py3-none-any.whl",
"wheel": "wheel-0.38.4-py3-none-any.whl",
},
"3.8": {
- "pip": "pip-22.3.1-py3-none-any.whl",
- "setuptools": "setuptools-65.6.3-py3-none-any.whl",
+ "pip": "pip-23.0-py3-none-any.whl",
+ "setuptools": "setuptools-67.1.0-py3-none-any.whl",
"wheel": "wheel-0.38.4-py3-none-any.whl",
},
"3.7": {
- "pip": "pip-22.3.1-py3-none-any.whl",
- "setuptools": "setuptools-65.6.3-py3-none-any.whl",
+ "pip": "pip-23.0-py3-none-any.whl",
+ "setuptools": "setuptools-67.1.0-py3-none-any.whl",
"wheel": "wheel-0.38.4-py3-none-any.whl",
},
"3.6": {
diff --git a/src/virtualenv/seed/wheels/embed/pip-22.3.1-py3-none-any.whl b/src/virtualenv/seed/wheels/embed/pip-23.0-py3-none-any.whl
index c5b7753..bb9aebf 100644
--- a/src/virtualenv/seed/wheels/embed/pip-22.3.1-py3-none-any.whl
+++ b/src/virtualenv/seed/wheels/embed/pip-23.0-py3-none-any.whl
Binary files differ
diff --git a/src/virtualenv/seed/wheels/embed/setuptools-65.6.3-py3-none-any.whl b/src/virtualenv/seed/wheels/embed/setuptools-67.1.0-py3-none-any.whl
index b235baf..949c26b 100644
--- a/src/virtualenv/seed/wheels/embed/setuptools-65.6.3-py3-none-any.whl
+++ b/src/virtualenv/seed/wheels/embed/setuptools-67.1.0-py3-none-any.whl
Binary files differ
diff --git a/tests/integration/test_zipapp.py b/tests/integration/test_zipapp.py
index 4e2f289..2472daa 100644
--- a/tests/integration/test_zipapp.py
+++ b/tests/integration/test_zipapp.py
@@ -1,6 +1,5 @@
import shutil
import subprocess
-import sys
from pathlib import Path
import pytest
@@ -16,14 +15,14 @@ CURRENT = PythonInfo.current_system()
@pytest.fixture(scope="session")
def zipapp_build_env(tmp_path_factory):
create_env_path = None
- if sys.version_info[0:2] >= (3, 5) and CURRENT.implementation != "PyPy":
+ if CURRENT.implementation != "PyPy":
exe = CURRENT.executable # guaranteed to contain a recent enough pip (tox.ini)
else:
create_env_path = tmp_path_factory.mktemp("zipapp-create-env")
exe, found = None, False
# prefer CPython as builder as pypy is slow
for impl in ["cpython", ""]:
- for version in range(8, 4, -1):
+ for version in range(11, 6, -1):
try:
# create a virtual environment which is also guaranteed to contain a recent enough pip (bundled)
session = cli_run(
@@ -47,7 +46,7 @@ def zipapp_build_env(tmp_path_factory):
break
else:
raise RuntimeError("could not find a python to build zipapp")
- cmd = [str(Path(exe).parent / "pip"), "install", "pip>=19.3", "packaging>=20"]
+ cmd = [str(Path(exe).parent / "pip"), "install", "pip>=23", "packaging>=23"]
subprocess.check_call(cmd)
yield exe
if create_env_path is not None:
diff --git a/tox.ini b/tox.ini
index ddaf8ec..b7ff778 100644
--- a/tox.ini
+++ b/tox.ini
@@ -34,50 +34,21 @@ set_env =
_COVERAGE_SRC = {envsitepackagesdir}/virtualenv
COVERAGE_FILE = {toxworkdir}/.coverage.{envname}
COVERAGE_PROCESS_START = {toxinidir}/pyproject.toml
- {upgrade}: PYTHONWARNINGS = ignore:DEPRECATION::pip._internal.cli.base_command
wheel_build_env = .pkg
[testenv:fix]
description = format the code base to adhere to our styles, and complain about what we cannot do automatically
skip_install = true
deps =
- pre-commit>=2.21
+ pre-commit>=3.0.4
commands =
pre-commit run --all-files --show-diff-on-failure
-[testenv:coverage]
-description = [run locally after tests]: combine coverage data and create report;
- generates a diff coverage against origin/main (can be changed by setting DIFF_AGAINST env var)
-skip_install = true
-deps =
- covdefaults>=2.2.2
- coverage[toml]>=7.0.1
- diff_cover>=7.3
-extras =
-parallel_show_output = true
-commands =
- coverage combine
- coverage report --skip-covered --show-missing
- coverage xml -o {toxworkdir}/coverage.xml
- coverage html -d {toxworkdir}/htmlcov
- diff-cover --compare-branch {env:DIFF_AGAINST:origin/main} {toxworkdir}/coverage.xml
-depends =
- py311
- py310
- py39
- py38
- py37
- pypy3
-pass_env =
- DIFF_AGAINST
-set_env =
- COVERAGE_FILE = {toxworkdir}/.coverage
-
[testenv:readme]
description = check that the long description is valid (need for PyPI)
skip_install = true
deps =
- build>=0.9
+ build>=0.10
twine>=4.0.2
extras =
commands =
@@ -97,7 +68,7 @@ commands =
description = upgrade pip/wheels/setuptools to latest
skip_install = true
deps =
- black>=22.12
+ black>=23.1
commands =
python upgrade_wheels.py
change_dir = {toxinidir}/tasks
@@ -108,7 +79,7 @@ pass_env =
description = do a release, required posarg of the version number
deps =
gitpython>=3.1.30
- packaging>=22
+ packaging>=23
towncrier>=22.12
commands =
python release.py --version {posargs}
@@ -128,6 +99,6 @@ package = editable
description = generate a zipapp
skip_install = true
deps =
- packaging>=22
+ packaging>=23
commands =
python tasks/make_zipapp.py