Skip to content

Commit 76a6e2e

Browse files
authored
Merge branch 'main' into uv
2 parents ba9fc09 + 16c5a86 commit 76a6e2e

File tree

6 files changed

+12
-86
lines changed

6 files changed

+12
-86
lines changed

.github/dependabot.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
version: 2
22
updates:
3+
- package-ecosystem: "github-actions"
4+
directory: "/"
5+
schedule:
6+
interval: monthly
7+
open-pull-requests-limit: 10
8+
39
- package-ecosystem: "pip"
410
directory: "/"
511
exclude-paths:

azure-pipelines.yml

Lines changed: 0 additions & 29 deletions
This file was deleted.

pyperformance/_pip.py

Lines changed: 3 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,11 @@
22
import os.path
33
import sys
44

5-
from . import _pythoninfo, _utils
5+
from . import _utils
66

77
GET_PIP_URL = "https://bootstrap.pypa.io/get-pip.py"
88
# pip 6 is the first version supporting environment markers
99
MIN_PIP = "6.0"
10-
OLD_PIP = "7.1.2"
1110
OLD_SETUPTOOLS = "18.5"
1211

1312

@@ -21,21 +20,6 @@ def get_pkg_name(req):
2120
return req
2221

2322

24-
def get_best_pip_version(python):
25-
"""Return the pip to install for the given Python executable."""
26-
if not python or isinstance(python, str):
27-
info = _pythoninfo.get_info(python)
28-
else:
29-
info = python
30-
# On Python: 3.5a0 <= version < 3.5.0 (final), install pip 7.1.2,
31-
# the last version working on Python 3.5a0:
32-
# https://sourceforge.net/p/pyparsing/bugs/100/
33-
if 0x30500A0 <= info.sys.hexversion < 0x30500F0:
34-
return OLD_PIP
35-
else:
36-
return None
37-
38-
3923
def run_pip(cmd, *args, **kwargs):
4024
"""Return the result of running pip with the given args."""
4125
return _utils.run_python("-m", "pip", cmd, *args, **kwargs)
@@ -90,9 +74,6 @@ def install_pip(
9074

9175
# python get-pip.py
9276
argv = [python, "-u", filename]
93-
version = get_best_pip_version(info or python)
94-
if version:
95-
argv.append(version)
9677
res = _utils.run_cmd(argv, env=env)
9778
ec, _, _ = res
9879
if ec != 0:
@@ -113,14 +94,8 @@ def upgrade_pip(
11394
if not python:
11495
python = getattr(info, "executable", None) or sys.executable
11596

116-
version = get_best_pip_version(info or python)
117-
if version:
118-
reqs = [f"pip=={version}"]
119-
if installer:
120-
reqs.append(f"setuptools=={OLD_SETUPTOOLS}")
121-
else:
122-
# pip 6 is the first version supporting environment markers
123-
reqs = [f"pip>={MIN_PIP}"]
97+
# pip 6 is the first version supporting environment markers
98+
reqs = [f"pip>={MIN_PIP}"]
12499
res = install_requirements(*reqs, python=python, upgrade=True, **kwargs)
125100
ec, _, _ = res
126101
if ec != 0:

pyperformance/compile.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -373,11 +373,6 @@ def download(self, url, filename):
373373
_utils.download(url, filename)
374374

375375
def _install_pip(self):
376-
# On Python: 3.5a0 <= version < 3.5.0 (final), install pip 7.1.2,
377-
# the last version working on Python 3.5a0:
378-
# https://sourceforge.net/p/pyparsing/bugs/100/
379-
assert self.hexversion > 0x3060000, self.hexversion
380-
381376
# is pip already installed and working?
382377
exitcode = self.run_nocheck(self.program, "-u", "-m", "pip", "--version")
383378
if not exitcode:

pyperformance/requirements/requirements.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# This file was autogenerated by uv via the following command:
22
# uv pip compile -o requirements.txt requirements.in
3-
packaging==23.1
3+
packaging>=24.1
44
# via -r requirements.in
5-
psutil==5.9.5
5+
psutil==7.0.0
66
# via
77
# -r requirements.in
88
# pyperf

pyperformance/tests/__init__.py

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -150,27 +150,6 @@ def decorator(func):
150150
return func
151151

152152

153-
class Compat:
154-
"""A mixin that lets older Pythons use newer unittest features."""
155-
156-
if sys.version_info < (3, 8):
157-
158-
@classmethod
159-
def setUpClass(cls):
160-
super().setUpClass()
161-
cls._cleanups = []
162-
163-
@classmethod
164-
def tearDownClass(cls):
165-
super().tearDownClass()
166-
for cleanup in cls._cleanups:
167-
cleanup()
168-
169-
@classmethod
170-
def addClassCleanup(cls, cleanup):
171-
cls._cleanups.append(cleanup)
172-
173-
174153
#############################
175154
# functional tests
176155

@@ -186,7 +165,7 @@ def SLOW(f):
186165
return unittest.skip("way too slow")(mark("slow", f))
187166

188167

189-
class Functional(Compat):
168+
class Functional:
190169
"""A mixin for functional tests.
191170
192171
In this context, "functional" means the test touches the filesystem,

0 commit comments

Comments
 (0)