From 69305e2f93982cbca2174fbfb63d79453b074f08 Mon Sep 17 00:00:00 2001 From: Arun Babu Neelicattu Date: Fri, 8 Mar 2024 14:55:04 +0100 Subject: [PATCH 1/2] deps: upgrade minimum pkginfo dependency This change ensures that Poetry can handle metadata version 2.3 when interrogating distributions. --- poetry.lock | 12 ++++++------ pyproject.toml | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/poetry.lock b/poetry.lock index 8506a0aeb17..f32658c39d1 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 1.8.2 and should not be changed by hand. +# This file is automatically @generated by Poetry 1.9.0.dev0 and should not be changed by hand. [[package]] name = "build" @@ -902,17 +902,17 @@ ptyprocess = ">=0.5" [[package]] name = "pkginfo" -version = "1.9.6" +version = "1.10.0" description = "Query metadata from sdists / bdists / installed packages." optional = false python-versions = ">=3.6" files = [ - {file = "pkginfo-1.9.6-py3-none-any.whl", hash = "sha256:4b7a555a6d5a22169fcc9cf7bfd78d296b0361adad412a346c1226849af5e546"}, - {file = "pkginfo-1.9.6.tar.gz", hash = "sha256:8fd5896e8718a4372f0ea9cc9d96f6417c9b986e23a4d116dda26b62cc29d046"}, + {file = "pkginfo-1.10.0-py3-none-any.whl", hash = "sha256:889a6da2ed7ffc58ab5b900d888ddce90bce912f2d2de1dc1c26f4cb9fe65097"}, + {file = "pkginfo-1.10.0.tar.gz", hash = "sha256:5df73835398d10db79f8eecd5cd86b1f6d29317589ea70796994d49399af6297"}, ] [package.extras] -testing = ["pytest", "pytest-cov"] +testing = ["pytest", "pytest-cov", "wheel"] [[package]] name = "platformdirs" @@ -1595,4 +1595,4 @@ testing = ["big-O", "jaraco.functools", "jaraco.itertools", "more-itertools", "p [metadata] lock-version = "2.0" python-versions = "^3.8" -content-hash = "f1a7e48d5159bf5194d129c4f536aea468509ad55b178090290ce4da7bdac125" +content-hash = "4dcace57c7bc2c7ff2cccb8647530d2e86862d2e21993a79198ff1c0546a880b" diff --git a/pyproject.toml b/pyproject.toml index 60cde576e23..10f1bf89a3f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -44,7 +44,7 @@ keyring = "^24.0.0" # packaging uses calver, so version is unclamped packaging = ">=23.1" pexpect = "^4.7.0" -pkginfo = "^1.9.4" +pkginfo = "^1.10" platformdirs = ">=3.0.0,<5" pyproject-hooks = "^1.0.0" requests = "^2.26" From 539a22d983bf5d98017ac8b10db5442f4bf784ee Mon Sep 17 00:00:00 2001 From: Arun Babu Neelicattu Date: Fri, 8 Mar 2024 15:53:18 +0100 Subject: [PATCH 2/2] tests: pkginfo w/ metadata version 2.3 --- ...etadata_version_23-0.1.0-py2.py3-none-any.whl | Bin 0 -> 1151 bytes tests/inspection/test_info.py | 11 +++++++++++ 2 files changed, 11 insertions(+) create mode 100644 tests/fixtures/distributions/demo_metadata_version_23-0.1.0-py2.py3-none-any.whl diff --git a/tests/fixtures/distributions/demo_metadata_version_23-0.1.0-py2.py3-none-any.whl b/tests/fixtures/distributions/demo_metadata_version_23-0.1.0-py2.py3-none-any.whl new file mode 100644 index 0000000000000000000000000000000000000000..91691fd70285317ef5aee2c4013c35a285e07001 GIT binary patch literal 1151 zcmWIWW@Zs#W?UGrF6rlI%j5N>VFE-{vD9kH)fvwR*WnMHqhf1~_U zX5WnHOI{i4i^?sYTN^Wf_Tb|#k=Q$FW6*V`q|<_q~G7$D!Adt-^fL!ld@)1y*5}LD>Bh3l5@kB)9Y8B z+IS=mN^Y%aRb9u8dsPGxjOp?x#XVNUDjm4z;NMizNf*2PX#X=dnNQY0F#-?|FW_1#@Qp$yeBv!yOsq%eJa``E#3PQ|=zRp;!I%_>y<- zbE-qdKYBj;^?>c-s#blGh3m4Pex8*Y)2y&Ve%Tft&xp3|!td-OO3qAf?&JRC@Z(a4 znxwhuyj9*`z6SG)X5Z13JG+j3U+=r+tg&gVj0t6|sA1qRm4`hX==TU9mckVV;U2E8 zKD?(Kxf&D%STF2d{((t3?ZP2$m)#vJwjNyGGNaQ|{NBEMzut-$TxP4?T(D*C=QI}Q zV8PyRf+D%scI)jpsH4=nZ2GfRJ3b5MUgX-m>~p{Fj^$sE99nSXYz@pgK)V?f8Jf5X zUy1=)AS?jHpk%HeAD@|*SrQ+wS5O%rUzS=_oSB~&AFp7mpbpLe>RbWdj7;{-xH5|h z&>Rp@Xjsw+qVZ-OE(QgV8U{uN35EvY8CO#aZ!x0NAnQb!ai=4&0YIXGF$9>huv!O6 zRphoF$FVq2?fmX@EB?8%PBU5ZVD9tPL!57#INC C>Y7vl literal 0 HcmV?d00001 diff --git a/tests/inspection/test_info.py b/tests/inspection/test_info.py index ef94aee43db..b986043924e 100644 --- a/tests/inspection/test_info.py +++ b/tests/inspection/test_info.py @@ -179,6 +179,17 @@ def test_info_from_wheel(demo_wheel: Path) -> None: assert info._source_url == demo_wheel.resolve().as_posix() +def test_info_from_wheel_metadata_version_23(fixture_dir: FixtureDirGetter) -> None: + path = ( + fixture_dir("distributions") + / "demo_metadata_version_23-0.1.0-py2.py3-none-any.whl" + ) + info = PackageInfo.from_wheel(path) + demo_check_info(info) + assert info._source_type == "file" + assert info._source_url == path.resolve().as_posix() + + def test_info_from_wheel_metadata(demo_wheel_metadata: RawMetadata) -> None: info = PackageInfo.from_metadata(demo_wheel_metadata) demo_check_info(info)