GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||
GeezerVison is showing github.com — bpo-43988: Add test.support.check_disallow_instantiation by erlend-aasland · Pull Request #25757 · python/cpython Conversation
|
|
cc. @vstinner |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
|
||
| See bpo-43916. | ||
| """ | ||
| msg = f"cannot create '{tp.__module__}\.{tp.__name__}' instances" |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
You should use f"xxx\.xxx" or fr"xxx.xxx". Or maybe use re.escape().
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Since these tests are decorated with cpython_only, it should be ok to match the exact string, as produced by Objects/typeobject.c? Just matching the type module/name could in theory generate wrong result; maybe not in practice though.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
What about setting the match pattern depending on what test.support.check_impl_detail() says?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Enough nitpicking, you can always enhance the code later ;-) I merged your PR, thanks. I guess that the next step is to modify existing tests to use it. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
It seems like more changes are coming. Once they all landed into main, maybe write a backport to 3.10 PR including all of them at once ( |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Lets leave 3.10 as it is. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
@pablogsal, should we backport this? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
I would prefer to backport it, yep |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
…thonGH-25757). (cherry picked from commit 4f72526) Co-authored-by: Erlend Egeberg Aasland <[email protected]>
@vstinner: I've opened GH-26885 which is a backport of this PR, GH-26394 (docs for this PR), and GH-26392 (apply this PR to |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.