cpython icon indicating copy to clipboard operation
cpython copied to clipboard

gh-125783: Add tests to prevent regressions with the combination of `ctypes` and metaclasses.

Open junkmd opened this issue 1 year ago • 3 comments

I would like to backport this to 3.12 and 3.13 as well.

  • Issue: gh-125783

junkmd avatar Oct 23 '24 14:10 junkmd

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 skip news label instead.

bedevere-app[bot] avatar Oct 23 '24 14:10 bedevere-app[bot]

This is an internal-only change, I don't think it needs a NEWS entry.

ZeroIntensity avatar Oct 24 '24 12:10 ZeroIntensity

comtypes has been using _pointer_type_cache since the first commit (an impressive 18 years ago!). https://github.com/enthought/comtypes/blob/938fbd50d2077c6bd524790a9ed798c3990cdfc0/comtypes/init.py#L230-L231

This was also discussed in #125783, and it seems that these implementations were made with careful consideration, as the originator of both comtypes and ctypes is the same person.

junkmd avatar Oct 24 '24 13:10 junkmd

I plan to commit the suggestions and merge next week, if there are no objections.

encukou avatar Oct 25 '24 13:10 encukou

Can we apply needs backport to 3.12 and needs backport to 3.13 labels to this PR?

junkmd avatar Oct 25 '24 15:10 junkmd

I'm not sure if we backport increased test coverage.

ZeroIntensity avatar Oct 25 '24 16:10 ZeroIntensity

We generally do, mostly to make it easier to backport later changes that need tests.

encukou avatar Oct 25 '24 16:10 encukou

Thanks @junkmd for the PR, and @encukou for merging it 🌮🎉.. I'm working now to backport this PR to: 3.12, 3.13. 🐍🍒⛏🤖

miss-islington-app[bot] avatar Oct 25 '24 16:10 miss-islington-app[bot]

GH-125987 is a backport of this pull request to the 3.13 branch.

bedevere-app[bot] avatar Oct 25 '24 16:10 bedevere-app[bot]

GH-125988 is a backport of this pull request to the 3.12 branch.

bedevere-app[bot] avatar Oct 25 '24 16:10 bedevere-app[bot]