Skip to content
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

bpo-40417: Fix deprecation warning in PyImport_ReloadModule #19750

Merged
merged 4 commits into from
May 1, 2020

Conversation

Robmaister
Copy link
Contributor

@Robmaister Robmaister commented Apr 28, 2020

I can add another commit with the new test case I wrote to verify that the warning was being printed before my change, stopped printing after my change, and that the function does not return null after my change.

https://bugs.python.org/issue40417

https://bugs.python.org/issue40417

Automerge-Triggered-By: @brettcannon

@the-knights-who-say-ni
Copy link

Hello, and thanks for your contribution!

I'm a bot set up to make sure that the project can legally accept this contribution by verifying everyone involved has signed the PSF contributor agreement (CLA).

Recognized GitHub username

We couldn't find a bugs.python.org (b.p.o) account corresponding to the following GitHub usernames:

@Robmaister

This might be simply due to a missing "GitHub Name" entry in one's b.p.o account settings. This is necessary for legal reasons before we can look at this contribution. Please follow the steps outlined in the CPython devguide to rectify this issue.

You can check yourself to see if the CLA has been received.

Thanks again for the contribution, we look forward to reviewing it!

@Robmaister
Copy link
Contributor Author

After a little bit of confusion, I was able to figure out what was going on with an error message I got when trying to set some of my info in BPO.

Github account linked, CLA was signed about an hour ago so everything should be good in about a day 😄

Copy link
Member

@ericsnowcurrently ericsnowcurrently left a comment

Choose a reason for hiding this comment

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

Mostly LGTM. Renaming the variable to "importlib" would be better for readers. I'll approve the PR but please consider making that change anyway. 😄

I wouldn't worry about adding a test. We don't really have a pattern (of which I'm aware at least) of verifying that the C-API does not emit deprecation warnings.

Python/import.c Outdated Show resolved Hide resolved
@brettcannon
Copy link
Member

@Robmaister mind adding a news entry? If you want to use a web form you can follow the "Details" link for the failing bedevere/news status check.

@brettcannon
Copy link
Member

@Robmaister I made sure to thank you in the news entry. Once CI passes this should get auto-merged.

@miss-islington
Copy link
Contributor

@Robmaister: Status check is done, and it's a success ✅ .

@miss-islington
Copy link
Contributor

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

@miss-islington
Copy link
Contributor

Thanks @Robmaister for the PR 🌮🎉.. I'm working now to backport this PR to: 3.8.
🐍🍒⛏🤖

@miss-islington
Copy link
Contributor

Sorry, @Robmaister, I could not cleanly backport this to 3.7 due to a conflict.
Please backport using cherry_picker on command line.
cherry_picker f40bd466bf14029e2687e36e965875adf9d4be1a 3.7

@miss-islington miss-islington self-assigned this May 4, 2020
@miss-islington
Copy link
Contributor

Sorry @Robmaister, I had trouble checking out the 3.8 backport branch.
Please backport using cherry_picker on command line.
cherry_picker f40bd466bf14029e2687e36e965875adf9d4be1a 3.8

Robmaister added a commit to Robmaister/cpython that referenced this pull request May 5, 2020
…thonGH-19750)

I can add another commit with the new test case I wrote to verify that the warning was being printed before my change, stopped printing after my change, and that the function does not return null after my change.

Automerge-Triggered-By: @brettcannon.
(cherry picked from commit f40bd46)

Co-authored-by: Robert Rouhani <robert.rouhani@gmail.com>
@bedevere-bot
Copy link

GH-19934 is a backport of this pull request to the 3.8 branch.

Robmaister added a commit to Robmaister/cpython that referenced this pull request May 5, 2020
…thonGH-19750)

I can add another commit with the new test case I wrote to verify that the warning was being printed before my change, stopped printing after my change, and that the function does not return null after my change.

Automerge-Triggered-By: @brettcannon.
(cherry picked from commit f40bd46)

Co-authored-by: Robert Rouhani <robert.rouhani@gmail.com>
@bedevere-bot
Copy link

GH-19935 is a backport of this pull request to the 3.7 branch.

miss-islington pushed a commit that referenced this pull request May 6, 2020
…-19750) (GH-19934)

Automerge-Triggered-By: @brettcannon.
(cherry picked from commit f40bd46)

Co-authored-by: Robert Rouhani <robert.rouhani@gmail.com>
miss-islington pushed a commit that referenced this pull request May 6, 2020
…-19750) (GH-19935)

Use importlib instead of imp.

Automerge-Triggered-By: @brettcannon.
(cherry picked from commit f40bd46)

Co-authored-by: Robert Rouhani robert.rouhani@gmail.com
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.

6 participants