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

Add compatibility for PathDistributions implemented with stdlib objects in Python 3.8/3.9 #397

Merged
merged 15 commits into from Oct 1, 2022

Conversation

abravalheri
Copy link
Contributor

This is an attempt to solve #396.

Changes:

  • Added tests in 3.8/3.9 capturing expectations about custom MetaPathFinders returning PathDistribution objects directly from stdlib.
  • Added compatibility shim for _normalized_name during entry-point fetching
  • Added compatibility shim from EntryPoint.matches during entry-point fetching

@jaraco
Copy link
Member

jaraco commented Aug 28, 2022

This looks good. I think I'd like to extract the compatibility shims into a module like py39compat or similar and make that behavior degenerate on Python 3.10+ so that when the future arrives, it's obvious what functionality needs to be removed... and so that functionality can be removed from the stdlib port right away. Similar for the tests. Let me know if that's something you wish to work on or something you'd like me to tackle.

@abravalheri
Copy link
Contributor Author

Thank you very much for the review Jason.

I tried to separate the files as you suggested1. Please let me know if you had something different in mind.

Footnotes

  1. I had to use some tricks to avoid circular imports, please let me know if you have a different strategy that you would prefer.

@jaraco
Copy link
Member

jaraco commented Oct 1, 2022

1. I had to use some tricks to avoid circular imports, please let me know if you have a different strategy that you would prefer. [↩](#user-content-fnref-1-d69472787ca512b8674691a1b0baa186)

Oh, geez. I can see these issues must have been annoying. Thanks for tackling this concern - it will help future maintainers and ease integration into CPython.

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.

None yet

2 participants