-
-
Notifications
You must be signed in to change notification settings - Fork 30k
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-44914: Add tests for some invariants of tp_version_tag #27774
Conversation
Could you remove the changes to Now that #27773 is merged, the tests should pass. |
FYI: these tests are designed to run on normal debug builds. So they will fail the normal CI to save us the pain of having to catch this with buildbots. |
I think I preferred What might be worth having is a |
Sure. I threw it into |
@markshannon: "I think I preferred sys,_get_type_version_tag approach." Ah, you prefer to add a private function in the sys module? What would be the usage outside unit tests? If it's only for testing/debugging purpose, IMO _testcapi is more appropriate. |
Looks good. Thanks. |
When you close/reopen a PR, can you please mention which tests of which CI failed please? If some tests are failing randomly, they should be fixed. Everyone is annoyed by such annoying tests. |
On the merged commit, I see that test_tools_script_run_tests() of test_regrtest failed on Windows (x64). This CI is no longer mandatory? |
Got it, I'll do so in the future. I didn't open a bug on bpo this time because it's the first time I've seen this test fail like this
so I thought it's just a rare one-off event (unlike |
Sorry, could you please give me the link? I'm not sure which one you're referring to. I see the Windows buildbot is green, and so is the GH actions |
When I check on [Show details] on the merged commit line, I see that Windows (x64) failed: |
I created:
The test_asyncio failure is known: https://bugs.python.org/issue41682#msg399770 |
Summary: This is a backport of python/cpython#27773 and python/cpython#27774 from CPython 3.12. They allow us to perform lookups that assign a new valid version tag to a type in callbacks invoked by `PyType_Lookup()`, which I need to do in D42512608 (and probably others in the future). I moved the call to `_PyClassLoader_ClearCache()` from `_PyType_ClearCache()` to `type_cache_clear()` to ensure that it's called by both `_PyType_Fini()` and `PyType_ClearCache()` (the upstream changes made it so `_PyType_Fini()` no longer calls `_PyType_ClearCache()`, instead calling `type_cache_clear()` directly). Original Summaries: bpo-44914: Maintain invariants of type version tags. (GH-27773) * Do not invalidate type versions unnecessarily. ---- bpo-44914: Add tests for some invariants of tp_version_tag (GH-27774) Reviewed By: carljm Differential Revision: D42760412 fbshipit-source-id: 9d5f2a5
https://bugs.python.org/issue44914