Closed Mause closed 3 days ago
Thanks for the report.
It turns out that ABCMeta
isn't technically part of collections.abc
; it's abc.ABCMeta
. It is importable as collections.abc.ABCMeta
on Python3.13, as a result of some changes to how the collections.abc module is defined - but that effectively relies on an import side effect (the sort of thing that __all__
exists to override)
So - the question then becomes "how did this manifest?" An error generated by from collections.abc import ABCMeta
is correct - that's not where it should be imported from... but I can't find any instance of this in the existing code. How did this manifest in practice for you?
Specifically, this error happens on Python 3.12 but not Python 3.13:
% python3.12 -c 'from collections.abc import abstractmethod'
Traceback (most recent call last):
File "<string>", line 1, in <module>
ImportError: cannot import name 'abstractmethod' from 'collections.abc' (/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/collections/abc.py)
% python3.13 -c 'from collections.abc import abstractmethod'
%
But CI runs the testbed on Python 3.12, so if there was such an import, we should already have discovered it.
@Mause: I think you must have modified the code to add this invalid import. The fix is to change collections.abc
to simply abc
.
If that's not the case, please explain what you did in more detail, and we'll reopen the issue.
Ah, this was definitely user error on my part then, I was looking to add an abstract class as part of the probe/location implementation I was writing, and my memory conflated collections.abc
and abc
Sorry 'bout the confusion Russ!
Describe the bug
Steps to reproduce
Try to import
collections.abc.ABCMeta
on Winforms in the briefcase toga testbedExpected behavior
The import is successful
Screenshots
No response
Environment
Logs
Additional context
No response