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 — gh-125783: Add tests to prevent regressions with the combination of `ctypes` and metaclasses. by junkmd · Pull Request #125881 · python/cpython Conversation
|
|
Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool. If this change has little impact on Python users, wait for a maintainer to apply the |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
This is an internal-only change, I don't think it needs a NEWS entry. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Such an implementation is used in `IUnknown` of `comtypes`.
Such an implementation is used in `CoClass` of `comtypes`.
1f4eecd to
cf81f03
Compare
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I would really rather not use _ in local names here, it makes it unclear that we're testing something public.
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.
Thank you! Take my review as provisional--I am concerned about the use of _pointer_type_cache, as that's private, but it looks like it's not terribly abused in this case (I think?)
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
This was also discussed in #125783, and it seems that these implementations were made with careful consideration, as the originator of both |
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.
Thank you for the test! I'd only like to change the names and add some comments.
The main thing we're testing here instantiation of a class in its own __new__, not the early return, that's there to avoid recursion.
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.
|
I plan to commit the suggestions and merge next week, if there are no objections. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Co-authored-by: Petr Viktorin <[email protected]>
|
Can we apply needs backport to 3.12 and needs backport to 3.13 labels to this PR? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I'm not sure if we backport increased test coverage. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
We generally do, mostly to make it easier to backport later changes that need tests. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
…n of `ctypes` and metaclasses. (pythonGH-125881) (cherry picked from commit 1384409) Co-authored-by: Jun Komoda <[email protected]>
…n of `ctypes` and metaclasses. (pythonGH-125881) (cherry picked from commit 1384409) Co-authored-by: Jun Komoda <[email protected]>
|
GH-125987 is a backport of this pull request to the 3.13 branch. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
GH-125988 is a backport of this pull request to the 3.12 branch. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
…on of `ctypes` and metaclasses. (GH-125881) (GH-125988) cherry picked from commit 1384409 by Jun Komoda Also: Add test_ctypes/_support.py from 3.13+ This partially backports be89ee5 (#113727) by AN Long Co-authored-by: Jun Komoda <[email protected]> Co-authored-by: AN Long <[email protected]> Co-authored-by: Erlend E. Aasland <[email protected]>
…n of `ctypes` and metaclasses. (pythonGH-125881)
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.