-
-
Notifications
You must be signed in to change notification settings - Fork 30.9k
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-43478: Restrict use of Mock objects as specs #31090
Conversation
9b78450
to
12a86e5
Compare
When doing our internal codebase cleanups for this, how many issues did you uncover in third party open source projects? Were they turned into PRs? If so, noting that in the bug with links to some would be good. Otherwise if there were a meaningful number of those, I wonder if we shouldn't make this issue a warning for 3.11 and turn it into this error for 3.12. (The thing we're aiming to prevent is an inability to test major Python packages on 3.11 alphas and betas.) Going ahead with this as is probably makes sense. But if it blocks testing while upstream projects fix things, we should probably turn it into a warning for one release while Issues/PRs elsewhere get filed. |
Can you also add an entry to the 3.11 What's New doc? More people read that than the detailed NEWS. |
🤖 New build scheduled with the buildbot fleet by @gpshead for commit 12a86e5f83958cfe6d1bf6a018c6a8733454101d 🤖 If you want to schedule another build, you need to add the ":hammer: test-with-buildbots" label again. |
This last cleanup only had one true python hit: forseti-security/forseti-security#3875 The previous PR hit tensorflow, google-research, ocp-diag-core and a few other third-party repos but I don't have the associated PRs handy.
The more expansive version of this check shipped in 3.10 with this edge case not in it. I think this is a lot less likely that this addition trips people up and breaks tests so I'm inclined to leave it in as-is.
I will if you think it's worth it. Again, I think the part of this that shipped in 3.10 was more likely to break people. |
Alright, looking things over given the history I don't think we needs a What's New entry just for this. It seems pretty low surprise and doesn't appear to have a wide blast radius of lurking problem exposure. |
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase |
Follow-on to python#25326 This covers cases where mock objects are passed directly to spec.
https://bugs.python.org/issue43478