Skip to content

migrate entrypoints handling to standard library importlib.metadata#589

Open
eli-schwartz wants to merge 1 commit intoPyFilesystem:masterfrom
eli-schwartz:pkg-resources-part-1
Open

migrate entrypoints handling to standard library importlib.metadata#589
eli-schwartz wants to merge 1 commit intoPyFilesystem:masterfrom
eli-schwartz:pkg-resources-part-1

Conversation

@eli-schwartz
Copy link
Copy Markdown

We wrap a couple different versions of the stdlib interface, and fall back to pkg_resources for compatibility with existing use cases on very old versions of python.

For python 3.8 and on, we make sure to completely avoid external dependencies, even backports.

Bug: #577

We wrap a couple different versions of the stdlib interface, and fall
back to pkg_resources for compatibility with existing use cases on very
old versions of python.

For python 3.8 and on, we make sure to completely avoid external
dependencies, even backports.

Bug: PyFilesystem#577
@eli-schwartz
Copy link
Copy Markdown
Author

@althonos I have resurrected #553 in spirit with what I hope is a universally satisfying and backwards-compatible change. What do you think? Please also see some of my other (recent) PRs which improve the testsuite. It would be great to have some of these merged so that we could have a reliable python 3.12 experience.

@MorningLightMountain713
Copy link
Copy Markdown

Can we please get these fixes merged...

@eli-schwartz
Copy link
Copy Markdown
Author

I haven't given up on this PR by the way -- I am not aware of any issues with it though, so I'm just waiting for someone with commit access to review...

wosc added a commit to ZeitOnline/pyfilesystem2 that referenced this pull request Dec 5, 2025
@feanil
Copy link
Copy Markdown

feanil commented Jan 16, 2026

@althonos would it be possible to get a review of this and #590 ?

@eli-schwartz
Copy link
Copy Markdown
Author

I remain committed to seeing this and other PRs go through. As a Linux distro maintainer I consider it my duty as a downstream repackager to do what I can to ensure upstream is healthy as well.

I do lack any ability to merge, release, or otherwise do anything to fix issues other than propose PRs, but I am happy to do that for whatever it's worth...

@eli-schwartz
Copy link
Copy Markdown
Author

@lurch @althonos @willmcgugan,

Today's setuptools release has deleted pkg_resources entirely, and pyfilesystem2 is (as a result) completely and utterly broken as it cannot be imported.

What can I do to help you merge my PRs? :)

@borisuu
Copy link
Copy Markdown

borisuu commented Feb 11, 2026

I was about to get working on a PR for the replacement of pkg_resources. I was pleasantly surprised someone else has already done the work, so let's get this merged and keep this project up-to-date.

@shayneoneill
Copy link
Copy Markdown

Any updates on this. Is there a verson of setuptools I can downgrade to in the interim as its blocking me pretty hard at work :(

@shayneoneill
Copy link
Copy Markdown

Ok. For anyone looking for this, there is a working version here: https://github.com/milahu/pyfilesystem2/tree/pkg-resources-part-1-and-2

You'll need to mangle your requirements.txt. / Pipfile / etc to point to that specifically.

Hopefully the maintainer of the official version will merge these fixes in.

@edgarrmondragon
Copy link
Copy Markdown

You'll need to mangle your requirements.txt. / Pipfile / etc to point to that specifically.

You could also just install it from this PR:

uv add git+https://github.com/PyFilesystem/pyfilesystem2@refs/pull/589/head

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.

6 participants