Skip to content

Commit

Permalink
Handle pip 23.1.2 @ Python 3.12 freeze exclusion
Browse files Browse the repository at this point in the history
  • Loading branch information
webknjaz committed Dec 16, 2024
1 parent 33b1011 commit 737a65c
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions tests/test_sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

from piptools.exceptions import IncompatibleRequirements
from piptools.sync import dependency_tree, diff, merge, sync
from piptools.utils import PIP_VERSION

from .constants import PACKAGES_PATH

Expand Down Expand Up @@ -168,13 +169,20 @@ def test_diff_should_not_uninstall(fake_dist):
"pip-tools==1.1.1",
"pip-review==1.1.1",
"pkg-resources==0.0.0",
"setuptools==34.0.0",
"wheel==0.29.0",
"python==3.0",
"distribute==0.1",
"wsgiref==0.1",
"argparse==0.1",
)
if PIP_VERSION[:3] < (23, 1, 2) or sys.version_info < (3, 12):
# github.com/jazzband/pip-tools/pull/2148#issuecomment-2545479219
# Python 3.12 removed vendored `setuptools` and pip 23.1.2 reacted
# with stopping special-casing excluding the following projects:
ignored += (
"setuptools==34.0.0",
"wheel==0.29.0",
"distribute==0.1",
)

installed = [fake_dist(pkg) for pkg in ignored]
reqs = []

Expand Down

0 comments on commit 737a65c

Please sign in to comment.