As description, it appears the use of __int__ deprecated in python 3.8 is now dead. wxpython before 4.1.0 still had some use of __int__ in things like WindowIDRef. Some of it's own classes like the Crust shell trigger this. In particular this is an issue with KiCAD. Reproducible: Always Steps to Reproduce: 1. emerge wxpython 2. emerge python:3.10 3. Run the following code: import wx from wx.py import crust app = wx.App(redirect=False) frame = wx.Frame(parent=None, id=wx.ID_ANY, title='Hello World') crust_ = crust.Crust(parent=frame, intro="Hello") frame.Show() app.MainLoop() Actual Results: Get the following trace: Traceback (most recent call last): File "/home/alex/tmp/test_crust.py", line 5, in <module> crust_ = crust.Crust(parent=frame, intro="Hello") File "/usr/lib/python3.10/site-packages/wx/py/crust.py", line 43, in __init__ self.shell = Shell(parent=self, introText=intro, File "/usr/lib/python3.10/site-packages/wx/py/shell.py", line 332, in __init__ self.Bind(wx.EVT_MENU, lambda evt: self.CopyWithPrompts(), id=frame.ID_COPY_PLUS) File "/usr/lib/python3.10/site-packages/wx/core.py", line 1406, in _EvtHandler_Bind event.Bind(self, id, id2, handler) File "/usr/lib/python3.10/site-packages/wx/core.py", line 1477, in Bind target.Connect(id1, id2, et, function) TypeError: EvtHandler.Connect(): argument 1 has unexpected type 'WindowIDRef' Expected Results: Show a window with some sort of python command line thingy. Following needs to be done: Change wxpython-4.0.7* python_compat to: PYTHON_COMPAT=( python3_{8..9} ) Get an ebuild for wxpython-4.1.1 so that we can move on with python3.10.
Forgot to add these resources: https://discuss.wxpython.org/t/deprecation-warnings-with-python-3-8/34405/3 https://github.com/wxWidgets/Phoenix/issues/1525 4.0.7 missing __index__ https://github.com/wxWidgets/Phoenix/blob/wxPython-4.0.7/etg/windowid.py 4.1.0 has __index__ https://github.com/wxWidgets/Phoenix/blob/wxPython-4.1.0/etg/windowid.py
Given the depends that I just read, I should offer that another solution might be to see what kinds of issues like this exist and just backport some patches until whatever other versioning stuff gets worked out for the 4.1.x line.
Created attachment 799139 [details] Updated ebuild to handle my 3.10 problems. Ok, I've come up with a solution for my problems (2 patches, a BDEPEND on sip and running the sip phase of build). To be clear, I have **NOT** checked for any other possible python3.10 problems.
Created attachment 799141 [details, diff] Patch to make sip work. This was taken from debian.
Created attachment 799143 [details, diff] Backport to make a few things work in python3.10. Backport of wxpython fixes that exist in 4.1.0. I am **NOT** saying this is everything wrong for python3.10. It does fix my issue. There may be others.
*** This bug has been marked as a duplicate of bug 766914 ***