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

pkg_resources deprecation warning #19

Open
r-leyshon opened this issue Jul 4, 2023 · 3 comments · May be fixed by #165
Open

pkg_resources deprecation warning #19

r-leyshon opened this issue Jul 4, 2023 · 3 comments · May be fixed by #165
Assignees
Labels
GTFS technical debt A better way is available. Fix later approach has been adopted. warnings Issue relates to warnings being raised wontfix This will not be worked on

Comments

@r-leyshon
Copy link
Contributor

r-leyshon commented Jul 4, 2023

Currently, running test suite with pytest results in:

../../../../opt/anaconda3/envs/r5py/lib/python3.9/site-packages/pkg_resources/__init__.py:121
  /opt/anaconda3/envs/r5py/lib/python3.9/site-packages/pkg_resources/__init__.py:121: DeprecationWarning: pkg_resources is deprecated as an API
    warnings.warn("pkg_resources is deprecated as an API", DeprecationWarning)

../../../../opt/anaconda3/envs/r5py/lib/python3.9/site-packages/pkg_resources/__init__.py:2870
  /opt/anaconda3/envs/r5py/lib/python3.9/site-packages/pkg_resources/__init__.py:2870: DeprecationWarning: Deprecated call to `pkg_resources.declare_namespace('mpl_toolkits')`.
  Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
    declare_namespace(pkg)

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html

Potential fix here

Upgrading pip from the version where the warning was introduced (23.1) to 23.1.1 / 23.1.2 did not resolve. Looks like this may be a warning propagating through pip via a dependency in setuptools. Seems to be the method used for detecting eggs in a package.

@r-leyshon r-leyshon added the bug Something isn't working label Jul 4, 2023
@r-leyshon r-leyshon added this to the prep work milestone Jul 4, 2023
@ethan-moss
Copy link
Collaborator

Can no longer reproduce. Will close the issue and re-open if needed.

@r-leyshon r-leyshon mentioned this issue Jul 26, 2023
11 tasks
@r-leyshon r-leyshon reopened this Jul 26, 2023
@ethan-moss ethan-moss added GTFS warnings Issue relates to warnings being raised labels Aug 16, 2023
@ethan-moss
Copy link
Collaborator

After reviewing PR #20, this seems to be coming from the gtfs module - especially when the unit tests are run separetly.

Running tests/gtfs/test_utils.py or tests/gtfs/test_validation.py in isolation triggers the pkg_resources warnings. Unhelpfully, when the test suite is run as a whole, these warnings do no appear! This is probably why we thought the warnings disappeared.

I've done some experimenting which confirms it's isolated to the gtfs module, but I don't know the root cause right now - further investigation is needed.

@ethan-moss ethan-moss added technical debt A better way is available. Fix later approach has been adopted. and removed bug Something isn't working labels Aug 17, 2023
@r-leyshon r-leyshon self-assigned this Sep 29, 2023
@r-leyshon r-leyshon modified the milestones: prep work, sprint 4 End Sep 29, 2023
@r-leyshon r-leyshon linked a pull request Oct 5, 2023 that will close this issue
12 tasks
@r-leyshon r-leyshon added the wontfix This will not be worked on label Oct 5, 2023
@r-leyshon r-leyshon removed this from the sprint 4 End milestone Oct 5, 2023
@r-leyshon
Copy link
Contributor Author

Not closing as one day we may get to fix this. But currently a wontfix. Arising from this, see #165 regarding environment management.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
GTFS technical debt A better way is available. Fix later approach has been adopted. warnings Issue relates to warnings being raised wontfix This will not be worked on
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants