Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Open
serhiy-storchaka wants to merge9 commits intopython:main
base:main
Choose a base branch
Loading
fromserhiy-storchaka:importerror-repr

Conversation

serhiy-storchaka
Copy link
Member

@serhiy-storchakaserhiy-storchaka commentedApr 5, 2017
edited by bedevere-bot
Loading

@serhiy-storchakaserhiy-storchaka added the type-featureA feature request or enhancement labelApr 7, 2017
Copy link

@auvipyauvipy left a comment

Choose a reason for hiding this comment

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

re base plz

@github-actions
Copy link

This PR is stale because it has been open for 30 days with no activity.

@github-actionsgithub-actionsbot added the staleStale PR or inactive for long period of time. labelFeb 19, 2022
@github-actionsgithub-actionsbot removed the staleStale PR or inactive for long period of time. labelJul 28, 2022
@github-actions
Copy link

This PR is stale because it has been open for 30 days with no activity.

@github-actionsgithub-actionsbot added the staleStale PR or inactive for long period of time. labelAug 28, 2022
Copy link
Member

@iritkatrieliritkatriel left a 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
Copy link

When you're done making the requested changes, leave the comment:I have made the requested changes; please review again.

@github-actionsgithub-actionsbot removed the staleStale PR or inactive for long period of time. labelNov 30, 2022
@github-actions
Copy link

This PR is stale because it has been open for 30 days with no activity.

@github-actionsgithub-actionsbot added the staleStale PR or inactive for long period of time. labelDec 31, 2022
@arhadthedevarhadthedev changed the titlebpo-29999: repr() of ImportError now contains attributes name and path.gh-74185: repr() of ImportError now contains attributes name and path.Feb 13, 2023
@furkanonder
Copy link
Contributor

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')")

Copy link
Member

@ezio-melottiezio-melottiMar 5, 2023
edited
Loading

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).

Copy link
Member

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.

@github-actions
Copy link

This PR is stale because it has been open for 30 days with no activity.

@github-actionsgithub-actionsbot added the staleStale PR or inactive for long period of time. labelApr 5, 2023
@github-actionsgithub-actionsbot removed the staleStale PR or inactive for long period of time. labelApr 6, 2023
@github-actions
Copy link

This PR is stale because it has been open for 30 days with no activity.

@github-actionsgithub-actionsbot added the staleStale PR or inactive for long period of time. labelMay 11, 2023
@github-actionsgithub-actionsbot removed the staleStale PR or inactive for long period of time. labelJan 6, 2024
@github-actionsGitHub Actions
Copy link

This PR is stale because it has been open for 30 days with no activity.

@github-actionsgithub-actionsbot added the staleStale PR or inactive for long period of time. labelFeb 5, 2024
@MuhammadTausif
Copy link

Why this PR is still open?

@github-actionsgithub-actionsbot removed the staleStale PR or inactive for long period of time. labelAug 9, 2024
@github-actionsGitHub Actions
Copy link

This PR is stale because it has been open for 30 days with no activity.

@github-actionsgithub-actionsbot added the staleStale PR or inactive for long period of time. labelSep 8, 2024
@encukou
Copy link
Member

@serhiy-storchaka, do you want to finish this PR? Should I take over?

@github-actionsgithub-actionsbot removed the staleStale PR or inactive for long period of time. labelDec 19, 2024
@github-actionsGitHub Actions
Copy link

This PR is stale because it has been open for 30 days with no activity.

@github-actionsgithub-actionsbot added the staleStale PR or inactive for long period of time. labelJan 19, 2025
@auvipy
Copy link

@serhiy-storchaka, do you want to finish this PR? Should I take over?

I think you should take it over now

@github-actionsgithub-actionsbot removed the staleStale PR or inactive for long period of time. labelFeb 13, 2025
@github-actionsGitHub Actions
Copy link

This PR is stale because it has been open for 30 days with no activity.

@github-actionsgithub-actionsbot added the staleStale PR or inactive for long period of time. labelMar 15, 2025
@vivodi

This comment was marked as abuse.

@github-actionsgithub-actionsbot removed the staleStale PR or inactive for long period of time. labelApr 23, 2025
exc = ImportError('test', name='somename', path='somepath')
self.assertEqual(repr(exc),
"ImportError('test', name='somename', path='somepath')")

Copy link
Contributor

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.

auvipy reacted with thumbs up emoji
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@encukouencukouencukou left review comments

@ezio-melottiezio-melottiezio-melotti left review comments

@auvipyauvipyauvipy requested changes

@furkanonderfurkanonderfurkanonder approved these changes

@johnzhou721johnzhou721johnzhou721 approved these changes

@iritkatrieliritkatrieliritkatriel left review comments

Assignees
No one assigned
Labels
awaiting core reviewtype-featureA feature request or enhancement
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

15 participants
@serhiy-storchaka@bedevere-bot@arhadthedev@furkanonder@MuhammadTausif@encukou@auvipy@vivodi@iritkatriel@ezio-melotti@johnzhou721@brettcannon@Mariatta@the-knights-who-say-ni@erlend-aasland

[8]ページ先頭

©2009-2025 Movatter.jp