Skip to content

gh-87115: catch exception #106501

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

Closed
wants to merge 6 commits into from

Conversation

DrStrangepork
Copy link

@DrStrangepork DrStrangepork commented Jul 7, 2023

@bedevere-bot
Copy link

Most changes to Python require a NEWS entry.

Please add it using the blurb_it web app or the blurb command-line tool.

@ghost
Copy link

ghost commented Jul 7, 2023

All commit authors signed the Contributor License Agreement.
CLA signed

Copy link
Contributor

@hauntsaninja hauntsaninja left a comment

Choose a reason for hiding this comment

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

Why do we need to catch BaseException? Can we just another try: except AttributeError around specifically the __spec__ attribute access?

@DrStrangepork
Copy link
Author

I can change it, but that leaves the issue for every other error type.

@DrStrangepork
Copy link
Author

What is the status of this pull request? Is anything else required of me?

@encukou
Copy link
Member

encukou commented Mar 4, 2024

The accepted fix is #116141: __spec__ should be available, even if it can be None.

@encukou encukou closed this Mar 4, 2024
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.

4 participants