◐ Shell
clean mode source ↗

bpo-43478: Restrict use of Mock objects as specs by msuozzo · Pull Request #31090 · python/cpython

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.

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.

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.

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.

Can you also add an entry to the 3.11 What's New doc? More people read that than the detailed NEWS.

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.