LITE-34447: Drop spurious importlib-metadata dependency#85
Open
pcaro wants to merge 1 commit into
Open
Conversation
importlib-metadata was declared as a direct dependency (^6.6) solely as a fallback for the stdlib importlib.metadata import in connect/client/version.py. Since the project requires Python >=3.9 and importlib.metadata has been in the standard library since 3.8, the except branch never executed and the <7 ceiling imposed by the caret was entirely artificial. Remove the dependency from pyproject.toml and the try/except fallback in version.py (now importing directly from importlib.metadata). importlib-metadata remains in the lock at 6.11.0 as a transitive dependency of mkdocs (python<3.10), so requirements/docs.txt is unaffected. LITE-34447
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
importlib-metadatawas declared as a direct dependency (^6.6) solely as a fallback for the stdlibimportlib.metadataimport inconnect/client/version.py.Since the project requires Python >=3.9 and
importlib.metadatahas been in the standard library since 3.8, theexceptbranch never executed and the<7ceiling imposed by the caret (^6.6→>=6.6,<7) was entirely artificial.Changes
importlib-metadata = "^6.6"frompyproject.toml.try/exceptfallback inconnect/client/version.py; import directly fromimportlib.metadata.poetry.lock.Notes
importlib-metadata, neither direct nor transitive. It only remains in the lock at6.11.0as a transitive dependency of the docs toolchain (mkdocs / mkdocstrings,python_version < "3.10"), which lives in the dev-only[tool.poetry.group.docs.dependencies]group and never ships to consumers of the package.requirements/docs.txtis therefore unchanged: it is the Read the Docs build environment, where the mkdocs toolchain legitimately keeps pulling it in.poetry.lockdiff also reflects alock-version 2.0 → 2.1reformat from the local Poetry 2.4.1; CI installs Poetry unpinned, so it's compatible.Verification
pytest tests/client/test_version.py→ 2 passedflake8 connect/client/version.py→ clean