Skip to content

Conversation

serhiy-storchaka
Copy link
Member

@serhiy-storchaka serhiy-storchaka commented Apr 23, 2024

Add tests for "import", pkgutil.resolve_name() and unittest.mock.path() for cases when "import a.b as x" and "from a import b as x" give different results.

Add tests for "import", pkgutil.resolve_name() and unittest.mock.path()
for cases when "import a.b as x" and "from a import b as x" give
different results.
Copy link
Member

@carljm carljm left a comment

Choose a reason for hiding this comment

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

Thanks for adding these tests!

@serhiy-storchaka serhiy-storchaka merged commit c0eaa23 into python:main Apr 30, 2024
@miss-islington-app
Copy link

Thanks @serhiy-storchaka for the PR 🌮🎉.. I'm working now to backport this PR to: 3.12.
🐍🍒⛏🤖 I'm not a witch! I'm not a witch!

@serhiy-storchaka serhiy-storchaka deleted the test-import-rebinding branch April 30, 2024 14:23
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Apr 30, 2024
…es (pythonGH-118176)

Add tests for "import", pkgutil.resolve_name() and unittest.mock.path()
for cases when "import a.b as x" and "from a import b as x" give
different results.
(cherry picked from commit c0eaa23)

Co-authored-by: Serhiy Storchaka <[email protected]>
@bedevere-app
Copy link

bedevere-app bot commented Apr 30, 2024

GH-118432 is a backport of this pull request to the 3.12 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.12 only security fixes label Apr 30, 2024
@serhiy-storchaka
Copy link
Member Author

Thank you for your review @carljm.

serhiy-storchaka added a commit that referenced this pull request Apr 30, 2024
…mes (GH-118176) (GH-118432)

Add tests for "import", pkgutil.resolve_name() and unittest.mock.path()
for cases when "import a.b as x" and "from a import b as x" give
different results.
(cherry picked from commit c0eaa23)

Co-authored-by: Serhiy Storchaka <[email protected]>
SonicField pushed a commit to SonicField/cpython that referenced this pull request May 8, 2024
…es (pythonGH-118176)

Add tests for "import", pkgutil.resolve_name() and unittest.mock.path()
for cases when "import a.b as x" and "from a import b as x" give
different results.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip news tests Tests in the Lib/test dir topic-importlib
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants