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

Supporting path-like objects in sys.path #96482

Open
Jean-Abou-Samra opened this issue Sep 1, 2022 · 0 comments
Open

Supporting path-like objects in sys.path #96482

Jean-Abou-Samra opened this issue Sep 1, 2022 · 0 comments
Labels
type-feature A feature request or enhancement

Comments

@Jean-Abou-Samra
Copy link
Contributor

Jean-Abou-Samra commented Sep 1, 2022

A lot of Python now accept path-like objects (e.g., everything in os.path), but path-like entries in sys.path are not supported. Furthermore, against the principle “Errors should never pass silently”, they cause no error or warning but are entirely ignored. Since sys.path conceptually contains paths and has "path" in the name, I would like to suggest support for adding path-like objects to it.

@Jean-Abou-Samra Jean-Abou-Samra added the type-feature A feature request or enhancement label Sep 1, 2022
Jean-Abou-Samra added a commit to Jean-Abou-Samra/pygments that referenced this issue Sep 1, 2022
pathlib.Path entries in sys.path are actually ignored.  See
python/cpython#96482
Jean-Abou-Samra added a commit to pygments/pygments that referenced this issue Sep 1, 2022
pathlib.Path entries in sys.path are actually ignored.  See
python/cpython#96482
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-feature A feature request or enhancement
Projects
None yet
Development

No branches or pull requests

1 participant