-
-
Notifications
You must be signed in to change notification settings - Fork 97
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
Supporting Python 3.13 #618
Comments
A test build for comtypes for Python 3.13 succeeds, but the test fails:
|
Hi, @nehaljwani Surprisingly, it seems that Python 3.13 (at least in the pre-release rc2) has introduced a breaking change (or a regression) in the resolution order for metaclass handling. I am not familiar with the conda build process, nor do I know if other projects have encountered similar issues with metaclasses in combination with Python 3.13. Also, the What’s New In Python 3.13 document does not mention anything about changes related to metaclass behavior. |
I made some modifications to the Even after changing the definition order of This might be a similar case to #212, where a bug fix on the CPython side is needed. |
I found pyglet/pyglet#1196 and pyglet/pyglet#1199. Like As mentioned in pyglet/pyglet#1196 (comment), I suspect that the error in Following the solution implemented in I'd like to hear the community's opinion on whether we should apply this to a new release. Aside from the metaclass issue, a new problem has emerged: tests using
Since I'm not very familiar with |
+1 for ruff over black Also, +1 to reporting this issue to CPython, especially if you can distill the issue to something that's not specific to comtypes or pyglet. It will be useful to have documented the breaking change somewhere. |
It appears that changes have occurred in Python 3.13 regarding the handling of constructors, such as When I modified the codebase of meta = type(_safearray.tagSAFEARRAY)
- sa_type = meta.__new__(
- meta, "SAFEARRAY_%s" % itemtype.__name__, (_safearray.tagSAFEARRAY,), {}
- )
+ sa_type = meta(f"SAFEARRAY_{itemtype.__name__}", (_safearray.tagSAFEARRAY,), {}) Unlike the changes made to To share the differences between the "working on Python 3.13" codebase and the previous one, as well as the CI pipeline results, I created a draft PR as #623. In my next free time, I plan to escalate these results to CPython and seek the opinions of the |
I reported the breaking of backward compatibility with I also received some advice, so I'm thinking of rewriting the version bridge as well. |
Great job hunting down where this issue came from. I read through python/cpython#124520 and your assessment seems spot on. I don't understand the |
I may have found a way to run Please see python/cpython#124520 (comment). |
I received advice from the
I will be busy next week and may not be able to respond adequately if there are any reports from the community. |
I get "NameError: name '_compointer_base' is not defined" in Python 3.13. A fix is very much appreciated. |
I am proposing to add tests to |
To prevent critical breakage of this project due to changes in
|
Python 3.13 is scheduled for release in October.
https://devguide.python.org/versions/#supported-versions
A version that explicitly supports Python 3.13 will likely be released after GitHub Actions begins supporting the stable version of Python 3.13, to ensure compatibility in the CI pipeline.
We may upgrade the version of
black
, or perhaps take this opportunity to adopt another formatter likeruff
.Feel free to share your thoughts with the community.
The text was updated successfully, but these errors were encountered: