FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-91181: restore support for bytes on sys.path in FileFinder by graingert · Pull Request #31897 · python/cpython · GitHub

/ cpython Public

gh-91181: restore support for bytes on sys.path in FileFinder - #31897

Closed
graingert wants to merge 7 commits into
python:mainfrom
graingert:support-bytes-on-sys-path
Closed

gh-91181: restore support for bytes on sys.path in FileFinder#31897
graingert wants to merge 7 commits into
python:mainfrom
graingert:support-bytes-on-sys-path

Conversation

graingert commented Mar 15, 2022
edited by brettcannon
Loading

Copy link
Copy Markdown
Contributor

Comment thread Lib/importlib/_bootstrap_external.py Outdated
graingert force-pushed the support-bytes-on-sys-path branch from 68b32ed to 6e553d8 Compare March 15, 2022 11:39
graingert force-pushed the support-bytes-on-sys-path branch from 6e553d8 to c1ee86e Compare March 15, 2022 11:45
graingert changed the title bpo-47025: support bytes on sys.path bpo-47025: restore support for bytes on sys.path in FileFinder Mar 15, 2022
path=new_path,
path_importer_cache=new_path_importer_cache,
path_hooks=new_path_hooks):
module = self.importlib.import_module('email')

graingert Mar 15, 2022
edited
Loading

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

this results in a BytesWarning: Comparison between bytes and string when bytes are added to the sys.path_importer_cache this is an existing problem for zipimport paths https://bugs.python.org/issue47026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Looks like that's causing CI to fail as BytesWarning is considered an error. Looks like I need to go to python-dev and ask what people want to do.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

https://discuss.python.org/t/drop-supporting-bytes-on-sys-path/17225

I'm now suggesting dropping bytes support in sys.path. We will see how that conversation goes.

graingert marked this pull request as ready for review March 15, 2022 13:36
brettcannon self-requested a review June 24, 2022 20:23
brettcannon changed the title bpo-47025: restore support for bytes on sys.path in FileFinder gh-91181: restore support for bytes on sys.path in FileFinder Jun 24, 2022
brettcannon linked an issue Jun 24, 2022 that may be closed by this pull request
graingert mannequin mentioned this pull request Jun 24, 2022
brettcannon self-assigned this Jul 8, 2022
brettcannon added needs backport to 3.10 only security fixes needs backport to 3.11 only security fixes labels Jul 8, 2022

Copy link
Copy Markdown
Contributor Author

Closing in favor of #31934

graingert closed this Jul 12, 2022
graingert deleted the support-bytes-on-sys-path branch July 12, 2022 18:46
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bytes do not work on sys.path

4 participants


Back | FazBrowse Home | New Git URL