Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork32k
gh-74185: repr() of ImportError now contains attributes name and path.#1011
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
base:main
Are you sure you want to change the base?
Conversation
auvipy left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
re base plz
This PR is stale because it has been open for 30 days with no activity. |
This PR is stale because it has been open for 30 days with no activity. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
This has merge conflicts now.
bedevere-bot commentedNov 29, 2022
When you're done making the requested changes, leave the comment: |
This PR is stale because it has been open for 30 days with no activity. |
LGTM@arhadthedev. I think PR is ready to merge. |
exc = ImportError('test', name='somename', path='somepath') | ||
self.assertEqual(repr(exc), | ||
"ImportError('test', name='somename', path='somepath')") | ||
ezio-melottiMar 5, 2023 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Are there any tests that ensure that the name of the module and the path are set correctly?
I would add a test tries to import a non-existing module and check those attributes (and/or theyrepr
).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Also, a test with theModuleNotFoundError
subclass would be nice.
This PR is stale because it has been open for 30 days with no activity. |
This PR is stale because it has been open for 30 days with no activity. |
This PR is stale because it has been open for 30 days with no activity. |
MuhammadTausif commentedAug 9, 2024
Why this PR is still open? |
This PR is stale because it has been open for 30 days with no activity. |
@serhiy-storchaka, do you want to finish this PR? Should I take over? |
This PR is stale because it has been open for 30 days with no activity. |
auvipy commentedFeb 13, 2025
I think you should take it over now |
This PR is stale because it has been open for 30 days with no activity. |
This comment was marked as abuse.
This comment was marked as abuse.
exc = ImportError('test', name='somename', path='somepath') | ||
self.assertEqual(repr(exc), | ||
"ImportError('test', name='somename', path='somepath')") | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
I'm not sure, but we might want a test that actually tries importing some nonexistent module and see if its__repr__
has those required attributes.
Uh oh!
There was an error while loading.Please reload this page.