chrisjsewell / pytest-notebook

A pytest plugin for regression testing and regenerating Jupyter Notebooks
https://pytest-notebook.readthedocs.io
BSD 3-Clause "New" or "Revised" License
50 stars 10 forks source link

Replace `pkg_resources` with `importlib_metadata` #44

Closed ErikBjare closed 1 year ago

ErikBjare commented 1 year ago

The plugin caused my tests to not start, as pkg_resources was not available (no setuptools).

It's used for pkg_resources.iter_entry_points(): https://github.com/search?q=repo%3Achrisjsewell%2Fpytest-notebook%20pkg_resources&type=code

It's fair to say it is deprecated (and unavailable without setuptools), and replaced by importlib.

However, the importlib_metadata package is needed to backport it for Python <3.10 (importlib.metadata.entry_points was added in 3.10).

Here's a couple random issues describing why:

sphuber commented 1 year ago

I addressed this problem in this PR: https://github.com/chrisjsewell/pytest-notebook/pull/41/files Except the tests are failing for other reasons. I opened another PR to address those as well: https://github.com/chrisjsewell/pytest-notebook/pull/42 There are just a few outstanding failures that I do not know how to address and would need support from @chrisjsewell

chrisjsewell commented 1 year ago

closed in #41