Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade vendored packaging lib #12300

Merged
merged 43 commits into from
May 4, 2024
Merged
Changes from 1 commit
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
47a8480
Upgrade vendored packaging lib
sbidoul Sep 29, 2023
335f01c
Fix test?
sbidoul Sep 29, 2023
87bda4b
Rename invalid sdists in our test data
sbidoul Sep 29, 2023
3b01221
Fix test following stricter version specifiers parsing
sbidoul Sep 29, 2023
62215ca
Don't use legacy version numbers in tests
sbidoul Sep 29, 2023
9dcd269
Remove now redundant error detection
sbidoul Sep 30, 2023
4d70566
Remove various extras normalization workarounds
sbidoul Sep 29, 2023
5463bba
Fix obvious typo in test wheel generator
sbidoul Oct 1, 2023
92cb9c9
Strip Requires-Dist metadata parsed from METADATA files
sbidoul Oct 1, 2023
04ea0da
Remove vendored pyparsing
sbidoul Oct 1, 2023
372c616
Explicitly keep track of canonical extra names with `pkg_resources`
pradyunsg Oct 6, 2023
e38c2b9
Compare `Requirement` objects rather than requirement strings
pradyunsg Oct 6, 2023
908e913
Do not normalise `iter_provided_extras` from pkg_resources
pradyunsg Oct 6, 2023
5cc540b
Use extras directly from metadata when using `pkg_resources`
pradyunsg Oct 6, 2023
8d22e80
Implement PEP 685 on distribution objects directly
pradyunsg Oct 6, 2023
cec49ea
Add failing test for index with legacy versions
sbidoul Mar 30, 2024
b63e279
Ignore legacy versions in the package finder
sbidoul Mar 30, 2024
587854a
Add failing test for package with invalid specifier in dependencies
sbidoul Mar 30, 2024
bf8b887
Discard candidates with invalid dependencies
sbidoul Apr 6, 2024
c44c6a4
Add failing test for uninstallation of dist with legacy version
sbidoul Apr 7, 2024
73f6744
Allow uninstallation of dist with legacy version
sbidoul Apr 7, 2024
0563132
Refactor test
sbidoul Apr 7, 2024
27807fb
Add failing test for pip list in presence of legacy version
sbidoul Apr 7, 2024
0529c04
Fix pip list in presence of installed legacy versions
sbidoul Apr 7, 2024
93e52cf
Add failing test for pip freeze in presence of legacy version
sbidoul Apr 7, 2024
a28d13a
Fix pip freeze in presence of legacy version
sbidoul Apr 7, 2024
be652aa
Add failing test for pip show of legacy version
sbidoul Apr 7, 2024
8f97eb5
Fix pip show of legacy version
sbidoul Apr 7, 2024
08ae751
Upgrade packaging to 24.0
sbidoul Apr 7, 2024
196d536
Add news
sbidoul Apr 7, 2024
83e77bf
Add test sdist that requires invalid version
sbidoul Apr 13, 2024
b458d3e
Ignore all candidates of a version when one has invalid metadata
sbidoul Apr 13, 2024
350c980
Simplify
sbidoul Apr 13, 2024
f4b821c
Don't create a list when an iterator is sufficient
sbidoul Apr 13, 2024
c50290e
Rename version_str to raw_version for consistency with raw_name
sbidoul Apr 14, 2024
00edcf4
Add failing test for pip show of dist with legacy specifier
sbidoul Apr 21, 2024
f24fa66
Add iterator of raw dependencie (Requires-Dist) to BaseDistribution
sbidoul Apr 21, 2024
d85efce
Fix pip show of dist with legacy dependency specifiers
sbidoul Apr 21, 2024
4052f6a
Clarify warning messages
sbidoul Apr 22, 2024
edc98cd
Clarify test packages README
sbidoul Apr 28, 2024
4bb5085
Add a failing test for upgrading a distribution with an invalid version
sbidoul Apr 28, 2024
c51fb4f
Add a failing test for upgrading a distribution with invalid metadata
sbidoul May 2, 2024
84ad55a
Fix test_show_require_invalid_version with pkg_resources backend
sbidoul May 2, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Refactor test
sbidoul authored and pradyunsg committed May 4, 2024

Verified

This commit was signed with the committer’s verified signature.
pradyunsg Pradyun Gedam
commit 056313220538a422808138882024f738000c83f6
12 changes: 9 additions & 3 deletions tests/functional/test_invalid_versions_and_specifiers.py
Original file line number Diff line number Diff line change
@@ -31,13 +31,19 @@ def test_install_from_index_with_invalid_specifier(
assert "Would install require-invalid-version-0.1" in result.stdout


def test_uninstall_invalid_version(script: PipTestEnvironment, data: TestData) -> None:
def _install_invalid_version(script: PipTestEnvironment, data: TestData) -> None:
"""
Test that it is possible to uninstall a package with an invalid version.
Install a package with an invalid version.
"""
# install package with legacy version in site packages
with zipfile.ZipFile(
data.packages.joinpath("invalid_version-2010i-py3-none-any.whl")
) as zf:
zf.extractall(script.site_packages_path)


def test_uninstall_invalid_version(script: PipTestEnvironment, data: TestData) -> None:
"""
Test that it is possible to uninstall a package with an invalid version.
"""
_install_invalid_version(script, data)
script.pip("uninstall", "-y", "invalid-version")