pypi / pypi/stdlib-list

New API: `in_stdlib_namespace`

Open
#120 0 comments 1 reaction 1 assignee View on GitHub

@woodruffw is already working on this.

Since Apr 30, 2024.

enhancement
Dominant language
Python
Stars
141
Forks
41
Avg merge
2d 16h
Merged PRs (30d)
3

Description

Following discussion in #119: we should add a new API, in_stdlib_namespace, that behaves like in_stdlib except that it (1) does not check that the identifier actually exists, and (2) therefore does not require the identifier to be a "true" module. This API will be useful to consumers who just need to answer questions like "does this path fall under a stdlib namespace?" without knowing whether their path's "leaf" is a module or not.

As part of this, we should also update the in_stdlib docstring to emphasize that it checks whether the given path is importable.

CC @miketheman

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.