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

gh-90991: Include path to pyc file in pyc-related ImportErrors #31534

Closed
wants to merge 3 commits into from

Conversation

hroncok
Copy link
Contributor

@hroncok hroncok commented Feb 23, 2022

@encukou
Copy link
Member

encukou commented Feb 24, 2022

@brettcannon, as the importlib expert, does this make sense?

@brettcannon brettcannon reopened this Apr 25, 2022
@brettcannon brettcannon changed the title bpo-46835: Include path to pyc file in pyc-related ImportErrors gh-90991: Include path to pyc file in pyc-related ImportErrors Apr 25, 2022
@brettcannon
Copy link
Member

I'm a bit torn on this one. On the one hand the exceptions being changed are rather low-level, so pointing just at the file is probably fine and a bit helpful to find the bytecode file that is incorrect. But if the file path is really long, is that going to be annoying? And is anything lost by not having the module name?

@hroncok
Copy link
Contributor Author

hroncok commented Apr 26, 2022

If I understand things correctly, the module name is a derivative of the path, isn't it?

Co-authored-by: Brett Cannon <brett@python.org>
@brettcannon
Copy link
Member

If I understand things correctly, the module name is a derivative of the path, isn't it?

Yes, but e.g. spotting aggregate in /home/brettcannon/Repositories/brettcannon/stdlib-stats/__pycache__/aggregate.cpython-39.pyc is not the easiest thing. But as I said earlier, maybe it doesn't matter since the module itself doesn't influence the exceptions being changed by this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants