treebeardtech / nbmake

📝 Pytest plugin for testing notebooks
https://pypi.org/project/nbmake/
Apache License 2.0
179 stars 18 forks source link

pytest_plugin.py: replace deprecated pkg_resources with importlib.metadata #112

Closed lorddavidiii closed 10 months ago

lorddavidiii commented 11 months ago

This PR replaces the deprecated use of pkg_resources with importlib.metadata.

As importlib.metadata.version() is only availeable for python>=3.8 I add importlib-metadata as dependency for python<3.8 (not sure if I have done this right).

alex-treebeard commented 10 months ago

Hi @lorddavidiii thanks for the contribution.

We don't actually test on python <3.8 so as long as your happy with this on 3.7 my only requirements is the tests pass.

(If we get complaints though about breaking some older version I likely will revert)

codecov[bot] commented 10 months ago

Codecov Report

Merging #112 (ad775eb) into main (137a360) will decrease coverage by 0.96%. The diff coverage is 60.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #112      +/-   ##
==========================================
- Coverage   92.97%   92.02%   -0.96%     
==========================================
  Files           4        4              
  Lines         185      188       +3     
==========================================
+ Hits          172      173       +1     
- Misses         13       15       +2     
Files Coverage Δ
src/nbmake/pytest_plugin.py 85.18% <60.00%> (-6.49%) :arrow_down: