Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

bpo-38735: Don't fail when importing from / with sys.pycache_prefix set#30456

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
encukou wants to merge3 commits intopython:main
base:main
Choose a base branch
Loading
fromencukou:cacheprefix-slash

Conversation

encukou
Copy link
Member

@encukouencukou commentedJan 7, 2022
edited by bedevere-bot
Loading

This fixes the issue, but testing it would require putting a file in the root directory.

https://bugs.python.org/issue38735

@github-actions
Copy link

This PR is stale because it has been open for 30 days with no activity.

@github-actionsgithub-actionsbot added the staleStale PR or inactive for long period of time. labelFeb 7, 2022
@serhiy-storchaka
Copy link
Member

You can test it without writing a file.

>>>from importlib.utilimport cache_from_source>>>import os>>> os.chdir('/')>>> cache_from_source('spam.py')Traceback (most recent call last):  File "<stdin>", line 1, in <module>    cache_from_source('spam.py')    ~~~~~~~~~~~~~~~~~^^^^^^^^^^^  File "<frozen importlib._bootstrap_external>", line 558, in cache_from_sourceIndexError: string index out of range

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@brettcannonbrettcannonbrettcannon approved these changes

@ericsnowcurrentlyericsnowcurrentlyAwaiting requested review from ericsnowcurrentlyericsnowcurrently is a code owner

@ncoghlanncoghlanAwaiting requested review from ncoghlanncoghlan is a code owner

@warsawwarsawAwaiting requested review from warsawwarsaw is a code owner

Assignees
No one assigned
Labels
awaiting mergestaleStale PR or inactive for long period of time.
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

6 participants
@encukou@serhiy-storchaka@brettcannon@the-knights-who-say-ni@ezio-melotti@bedevere-bot

[8]ページ先頭

©2009-2025 Movatter.jp