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

Get this into Python #22

Open
encukou opened this issue Aug 19, 2019 · 6 comments
Open

Get this into Python #22

encukou opened this issue Aug 19, 2019 · 6 comments

Comments

@encukou
Copy link

encukou commented Aug 19, 2019

There's a (rather inactive right now) PEP that would need to get a list like this into Python itself: PEP 534

Do you want to help incorporate a list of modules into Python 3.9+? This would mean either building it automatically, or at least automatically checking if it is still valid (on all platforms)?

cc @torsava

@woodruffw
Copy link
Member

@encukou do you think any further action is required here? My understanding is that sys.stdlib_module_names + sys.builtin_module_names on 3.10+ effectively supplant this library for users who only need the module list for their specific running version 🙂

@encukou
Copy link
Author

encukou commented Jun 12, 2023

sys.stdlib_module_names should be enough. (IMO builtin_module_names is for things like importers, which care about built-in-ness rather than stdlib-ness. Custom builds of Python might have non-stdlib modules built in.)

Note that sys.stdlib_module_names doesn't list:

  • submodules, but I don't know of a use case where those would be useful;
  • test modules, including test, which does leave some use cases out IMO.

But any issues would be better handled in CPython rather than this repo.

@encukou encukou closed this as completed Jun 12, 2023
@thebjorn
Copy link

pydeps has a use case for submodules (I need to know which modules to exclude). Sure I could do a prefix match, but the current stdlib-list implementation is very convenient for my use-case. See also issue #58

@woodruffw
Copy link
Member

pydeps has a use case for submodules (I need to know which modules to exclude). Sure I could do a prefix match, but the current stdlib-list implementation is very convenient for my use-case. See also issue #58

Yep, I intend to maintain this behavior with the new Python version support.

@encukou
Copy link
Author

encukou commented Jun 12, 2023

Then, from my point of view (the suggester), this issue stands. It would be great to have this in stdlib. The issue is that curating the list of submodules by hand is too fragile, and scraping our own docs doesn't sound right.

Up to you if you want to keep the issue open -- it would need some design effort and discussion. I'd be happy to help but can't drive it.

@woodruffw
Copy link
Member

Sounds good! This isn't a priority for me immediately, but I'll reopen to keep it alive.

@woodruffw woodruffw reopened this Jun 12, 2023
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

No branches or pull requests

3 participants