8000 gh-127651: Use __file__ in diagnostics if origin is missing by hauntsaninja · Pull Request #127660 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-127651: Use __file__ in diagnostics if origin is missing #127660

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

Merged
merged 15 commits into from
Dec 10, 2024
Merged
Prev Previous commit
more origin test
  • Loading branch information
hauntsaninja committed Dec 9, 2024
commit 560a23c7082e2cbeb2ab0f51dbc155a0a126670c
6 changes: 6 additions & 0 deletions Lib/test/test_import/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -833,6 +833,12 @@ def test_frozen_module_from_import_error(self):
os.__spec__.has_location = False
del os.__file__
from os import this_will_never_exist
""",
"""
import os
os.__spec__.origin = []
os.__file__ = []
from os import this_will_never_exist
"""
]
for script in scripts:
Expand Down
Loading
0