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

[ENH] Remove use of pkg_resources #289

Merged
merged 17 commits into from Dec 8, 2023

Conversation

ales-erjavec
Copy link
Collaborator

@ales-erjavec ales-erjavec commented Nov 2, 2023

Issue

pkg_resources is deprecated.

Changes

Remove/replace use of pkg_resources with importlib.metadata, importlib.resources, pkgutil and packaging.

This also bumps version to 0.2.* because it is backwards incompatible due to differences in exposed types in the discovery process. This should trigger the orange-canvas-core>=0.1.30,<0.2a condition in https://github.com/biolab/orange3/blob/78f7b30a89a7b78ef6442f0b828f41a6f5c27951/requirements-gui.txt#L1

@codecov-commenter
Copy link

codecov-commenter commented Nov 2, 2023

Codecov Report

Attention: 28 lines in your changes are missing coverage. Please review.

Comparison is base (cbf2e9a) 75.57% compared to head (8018377) 76.47%.
Report is 2 commits behind head on master.

Files Patch % Lines
orangecanvas/application/examples.py 50.00% 8 Missing ⚠️
orangecanvas/help/manager.py 64.70% 6 Missing ⚠️
orangecanvas/application/addons.py 37.50% 5 Missing ⚠️
orangecanvas/application/utils/addons.py 84.00% 4 Missing ⚠️
orangecanvas/registry/discovery.py 71.42% 2 Missing ⚠️
orangecanvas/styles/__init__.py 66.66% 2 Missing ⚠️
orangecanvas/document/interactions.py 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #289      +/-   ##
==========================================
+ Coverage   75.57%   76.47%   +0.90%     
==========================================
  Files          99       99              
  Lines       21047    21031      -16     
==========================================
+ Hits        15906    16084     +178     
+ Misses       5141     4947     -194     

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

@ales-erjavec ales-erjavec marked this pull request as draft November 2, 2023 13:06
@ales-erjavec ales-erjavec force-pushed the remove-pkg-resources branch 3 times, most recently from bc53001 to 0799ee5 Compare November 10, 2023 09:24
@ales-erjavec ales-erjavec force-pushed the remove-pkg-resources branch 2 times, most recently from f7c2ab1 to 97c6829 Compare November 17, 2023 09:23
Because we break api in discovery with the changing the type of
pkg_resources.Distribution with importlib.metadata.Distribution
@PrimozGodec
Copy link
Contributor

LGTM. It is a lot, so I hope I didn't miss anything. I tested all the functionalities that have been changed.

@PrimozGodec PrimozGodec merged commit af0fac5 into biolab:master Dec 8, 2023
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants