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

Drop usage of pkg_resources #553

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

edgarrmondragon
Copy link

@edgarrmondragon edgarrmondragon commented Sep 27, 2022

Type of changes

  • Bug fix

Checklist

  • I've run the latest black with default args on new code.
  • I've updated CHANGELOG.md and CONTRIBUTORS.md where appropriate.
  • I've added tests for new code.
  • I accept that @PyFilesystem/maintainers may be pedantic in the code review.

Description

Drop pkg_resources in favor of the importlib.metadata API.

Closes #356

@edgarrmondragon edgarrmondragon marked this pull request as ready for review September 28, 2022 01:25
@edgarrmondragon
Copy link
Author

@althonos the tests that fail seem to do so (rather randomly?) due to a DeprecationWarning in the Python 3.10 importlib.metadata API. There's a few options I can think of:

  • Kludgy solution that supports both the deprecated and new APIs
  • Require importlib_metadata==2.0.0 for all Python versions (even the newer ones) and use the legacy API
  • Drop support for Python 2.7 (EOL Jan 2021) and Python 3.5 (EOL Sept 2020) and require importlib_metadata>=3.6.0;<4.9.0 for Python 3.6 and 3.7.

@matrss
Copy link

matrss commented Aug 24, 2023

Is there any progress on this? The CI logs are not available anymore

@edgarrmondragon
Copy link
Author

@matrss tbh the project feels abandoned 😢

@lurch
Copy link
Contributor

lurch commented Sep 1, 2023

I occasionally review some of the PRs in this project, but I don't know anything about the code being modified here, so I won't be reviewing this one.

Drop support for Python 2.7

Yeah, see also #317

@anthrotype
Copy link

tbh the project feels abandoned 😢

oh.. @willmcgugan is it so?

@althonos
Copy link
Member

althonos commented Sep 4, 2023

@anthrotype : Well, technically @willmcgugan is not maintaining this anymore (see #422), so I would be the main maintainer, but with my PhD going on I don't have a lot of time to allocate to this, and I've been fine with the "if it's not broken don't fix it" for now. But we definitely need to sit down on a version 3 at some point because these sort of issues are piling up.

@anthrotype
Copy link

willmcgugan is not maintaining this anymore

oh, I somehow missed that, thanks for the clarification/reminder.

"if it's not broken don't fix it"

definitely makes sense. Good luck with the PhD!

@AbdealiLoKo
Copy link

@althonos would you like some help maintaining it ?
I use pyfilesystem actively and am happy to help maintain.
I was looking to fix the warnings from pyfilesystem related to pkg_resources and came across this PR

@eli-schwartz
Copy link

@althonos the tests that fail seem to do so (rather randomly?) due to a DeprecationWarning in the Python 3.10 importlib.metadata API. There's a few options I can think of:

I'm probably missing something since the CI logs are long gone...

Why would this fail at all? A DeprecationWarning should not cause CI failures since the pytest config doesn't appear to be catching it as an error. You just get:

2654 passed, 26 skipped, 1703 warnings in 38.20s

@eli-schwartz
Copy link

Either way I think the obviously correct approach is to handle a fallback to the legacy API if needed, since that means you don't have to block this PR on resolving the python2 question.

@anthrotype
Copy link

hello! what it would take to get this PR to the finish line?

@edgarrmondragon
Copy link
Author

The flaky 3.10 tests pass locally 🤔

@eli-schwartz
Copy link

That doesn't look like a flake to me -- it's running on python 3.7, not 3.10. And, as I said above:

Either way I think the obviously correct approach is to handle a fallback to the legacy API if needed, since that means you don't have to block this PR on resolving the python2 question.

But currently you're exclusively using the legacy API, which is broken.

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.

drop or relax dependency on pkg_resources?
7 participants