Skip to content

build(deps): remove importlib_metadata for Python >=3.10 #1171

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

Merged
merged 1 commit into from
Jun 28, 2024
Merged

build(deps): remove importlib_metadata for Python >=3.10 #1171

merged 1 commit into from
Jun 28, 2024

Conversation

jakob-keller
Copy link
Contributor

@jakob-keller jakob-keller commented Jun 26, 2024

Description

importlib.metadata as used by commitizen was first shipped with Python 3.10. The backport from importlib_metadata is only required for Python <3.10.

Checklist

  • Add test cases to all the changes you introduce
  • Run ./scripts/format and ./scripts/test locally to ensure this change passes linter check and test
  • Test the changes on the local machine manually
  • Update the documentation for the changes

Expected behavior

commitizen no longer has a direct "runtime" dependency on the importlib_metadata backport for Python >=3.10, while using the backport for Python <3.10.

Steps to Test This Pull Request

Additional context

Copy link

codecov bot commented Jun 26, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.55%. Comparing base (120d514) to head (b691122).
Report is 364 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1171      +/-   ##
==========================================
+ Coverage   97.33%   97.55%   +0.21%     
==========================================
  Files          42       55      +13     
  Lines        2104     2497     +393     
==========================================
+ Hits         2048     2436     +388     
- Misses         56       61       +5     
Flag Coverage Δ
unittests 97.55% <100.00%> (+0.21%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jakob-keller jakob-keller marked this pull request as ready for review June 26, 2024 20:58
@jakob-keller jakob-keller changed the title build(deps): remove importlib_metadata build(deps): remove importlib_metadata for Python >=3.10 Jun 26, 2024
@Lee-W Lee-W added pr-status: ready-to-merge almost ready to merge. just keep it for a few days for others to check and removed pr-status: wait-for-review labels Jun 27, 2024
@Lee-W
Copy link
Member

Lee-W commented Jun 27, 2024

This is great! I think we're good to merge but I will keep it for a few days so that others can take a look

@Lee-W
Copy link
Member

Lee-W commented Jun 27, 2024

hi @jakob-keller , could ou please help us relock the poetry.lock and then I'll merge it

@jakob-keller jakob-keller requested a review from Lee-W June 27, 2024 18:22
@Lee-W Lee-W merged commit 927cbcb into commitizen-tools:master Jun 28, 2024
18 checks passed
@Lee-W
Copy link
Member

Lee-W commented Jun 28, 2024

@jakob-keller Many thanks for your prompt help!

@jakob-keller jakob-keller deleted the remove-importlib-metadata-backport branch June 28, 2024 05:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr-status: ready-to-merge almost ready to merge. just keep it for a few days for others to check pr-status: wait-for-review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants