Skip to content
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

Modify the metaclasses to ensure compatibility with Python 3.13 and earlier versions. #636

Merged
merged 4 commits into from
Oct 20, 2024

Conversation

junkmd
Copy link
Collaborator

@junkmd junkmd commented Oct 9, 2024

Related to #618.

To support Python 3.13, changes are required in the codebase of the _coclass_meta, _cominterface_meta, and _make_safearray_type.

This is due to changes in the implementation of ctypes starting from Python 3.13, which introduced breaking changes to metaclass initialization.
I posted about this in python/cpython#124520 and arrived at this implementation after receiving advice from the ctypes maintainer.
Please see also https://docs.python.org/3.13/whatsnew/3.13.html#ctypes.

I would like to hear from the community and other maintainers whether the codebases are reasonable and the comments will be helpful for future readers.

Any feedback is welcome.

If there are no objections, I plan to merge this after October 21st and release it as comtypes==1.4.8.

@junkmd junkmd linked an issue Oct 9, 2024 that may be closed by this pull request
@junkmd junkmd added this to the 1.4.8 milestone Oct 9, 2024
@junkmd junkmd added enhancement New feature or request tests enhance or fix tests labels Oct 9, 2024
junkmd added a commit to junkmd/pywinauto that referenced this pull request Oct 19, 2024
junkmd added a commit to junkmd/pywinauto that referenced this pull request Oct 19, 2024
@junkmd junkmd merged commit 5153b3a into enthought:main Oct 20, 2024
49 checks passed
@junkmd junkmd deleted the py313_compatible_metacls branch October 20, 2024 15:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request tests enhance or fix tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Supporting Python 3.13
2 participants