Skip to content

Commit

Permalink
TST: install pip 24.1b1 or later when on Python 3.13t
Browse files Browse the repository at this point in the history
Earlier pip releases do not recognize the free-threading ABI flag.
  • Loading branch information
dnicolodi committed May 13, 2024
1 parent 17546a5 commit 2d934b6
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import shutil
import subprocess
import sys
import sysconfig
import tempfile
import warnings

Expand Down Expand Up @@ -77,13 +78,18 @@ def tmp_path_session(tmp_path_factory):
class VEnv(EnvBuilder):
def __init__(self, env_dir):
super().__init__(symlinks=True, with_pip=True)

# This warning is mistakenly generated by CPython 3.11.0
# https:/python/cpython/pull/98743
with warnings.catch_warnings():
if sys.version_info[:3] == (3, 11, 0):
warnings.filterwarnings('ignore', 'check_home argument is deprecated and ignored.', DeprecationWarning)
self.create(env_dir)

# Free-threaded Python 3.13 requires pip 24.1b1 or later.
if sysconfig.get_config_var('Py_GIL_DISABLED'):
self.pip('install', '--upgrade', 'pip >= 24.1b1')

Check warning on line 91 in tests/conftest.py

View check run for this annotation

Codecov / codecov/patch

tests/conftest.py#L91

Added line #L91 was not covered by tests

def ensure_directories(self, env_dir):
context = super().ensure_directories(env_dir)
# Store the path to the venv Python interpreter. There does
Expand Down

0 comments on commit 2d934b6

Please sign in to comment.