[ https://issues.apache.org/jira/browse/ZOOKEEPER-4871?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Andor Molnar resolved ZOOKEEPER-4871. ------------------------------------- Fix Version/s: 3.10.0 3.9.5 Resolution: Fixed Issue resolved by pull request 2199 [https://github.com/apache/zookeeper/pull/2199] > ZooKeeper python module (zkpython) is incompatible with Python 3.12 > ------------------------------------------------------------------- > > Key: ZOOKEEPER-4871 > URL: https://issues.apache.org/jira/browse/ZOOKEEPER-4871 > Project: ZooKeeper > Issue Type: Bug > Components: contrib-bindings > Affects Versions: 3.10.0 > Reporter: Andor Molnar > Assignee: Andor Molnar > Priority: Major > Labels: pull-request-available > Fix For: 3.10.0, 3.9.5 > > Time Spent: 40m > Remaining Estimate: 0h > > I've tried to run zk-smoktest.py on latest Ubuntu 24.04 and with Python 3.12 > and run into the following issue: > {noformat} > $ python zk-smoketest.py -h > Traceback (most recent call last): > File "/home/andor/git/zk-smoketest/zk-smoketest.py", line 22, in <module> > import zkclient > File "/home/andor/git/zk-smoketest/zkclient.py", line 17, in <module> > import zookeeper, time, threading > ImportError: > /usr/local/lib/python3.12/dist-packages/ZooKeeper-0.4-py3.12-linux-x86_64.egg/zookeeper.cpython-312-x86_64-linux-gnu.so: > undefined symbol: PyIOBase_Type > {noformat} > It turned out that *PyIOBase_Type* is deprecated and not available in Python > 3.12. > Found the following workaround in a different project which might be useful > for *zkpython* too. > [https://github.com/inspired-solutions/pygraphviz/pull/1/files] > -- This message was sent by Atlassian Jira (v8.20.10#820010)