Skip to content

Avoid exceptions when loading importlib#1594

Merged
slozier merged 4 commits intoIronLanguages:masterfrom
slozier:importlib
Nov 22, 2022
Merged

Avoid exceptions when loading importlib#1594
slozier merged 4 commits intoIronLanguages:masterfrom
slozier:importlib

Conversation

@slozier
Copy link
Copy Markdown
Contributor

@slozier slozier commented Nov 16, 2022

Avoid exceptions when loading importlib. While the exceptions are normally caught, not having them occur in the first place makes for a more pleasant debugging experience. Related to #1590

@BCSharp
Copy link
Copy Markdown
Member

BCSharp commented Nov 16, 2022

This is fantastic! It was long on my wish list, but I never got time to look into it.

@slozier
Copy link
Copy Markdown
Contributor Author

slozier commented Nov 18, 2022

This is fantastic! It was long on my wish list, but I never got time to look into it.

Wish I could somehow avoid more of them. Maybe something could be done to make zipimport.zipimporter light throwing, but unfortunately it's a class and not a function... I guess I diverge from Python and put a light throwing function in sys.path_hooks, but I'm not sure it it helps long term (zipimport got moved to the stdlib in 3.8).

@slozier slozier merged commit 894242f into IronLanguages:master Nov 22, 2022
@slozier slozier deleted the importlib branch November 22, 2022 21:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants