Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 863494 - dev-python/wxpython: incompatible with python3.10 (needs bump to 4.1.1)
Summary: dev-python/wxpython: incompatible with python3.10 (needs bump to 4.1.1)
Status: RESOLVED DUPLICATE of bug 766914
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo wxWidgets project
Depends on:
Blocks: py310, python3.10-compat
  Show dependency tree
Reported: 2022-08-03 23:02 UTC by Alex Orange
Modified: 2023-03-20 07:59 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---

Updated ebuild to handle my 3.10 problems. (wxpython-4.0.7-r2.ebuild,2.54 KB, text/plain)
2022-08-10 17:03 UTC, Alex Orange
Patch to make sip work. (fix-ftbfs-sip-4.19.23.patch,1.31 KB, patch)
2022-08-10 17:03 UTC, Alex Orange
Details | Diff
Backport to make a few things work in python3.10. (wxpython-4.1.0-python3.10-backport-partial.patch,5.30 KB, patch)
2022-08-10 17:04 UTC, Alex Orange
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Orange 2022-08-03 23:02:04 UTC
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 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")

Actual Results:  
Get the following trace:

Traceback (most recent call last):
  File "/home/alex/tmp/", line 5, in <module>
    crust_ = crust.Crust(parent=frame, intro="Hello")
  File "/usr/lib/python3.10/site-packages/wx/py/", line 43, in __init__ = Shell(parent=self, introText=intro,
  File "/usr/lib/python3.10/site-packages/wx/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/", line 1406, in _EvtHandler_Bind
    event.Bind(self, id, id2, handler)
  File "/usr/lib/python3.10/site-packages/wx/", 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.
Comment 2 Alex Orange 2022-08-03 23:07:21 UTC
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.
Comment 3 Alex Orange 2022-08-10 17:03:21 UTC
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.
Comment 4 Alex Orange 2022-08-10 17:03:48 UTC
Created attachment 799141 [details, diff]
Patch to make sip work.

This was taken from debian.
Comment 5 Alex Orange 2022-08-10 17:04:42 UTC
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.
Comment 6 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-11-13 17:11:15 UTC

*** This bug has been marked as a duplicate of bug 766914 ***