Repository navigation
Open
Description
Given this code:
from wikidataintegrator import wdi_core
... using the package in Python 3.13 fails to import the package, caused on a fail on a typing.io dependency in PyShEx:
$ python3.13 app.py
Traceback (most recent call last):
File "/home/egonw/var/Projects/vhp/platform/app.py", line 10, in <module>
from wikidataintegrator import wdi_core
File "/home/egonw/.venvs/vhp-platform/lib/python3.13/site-packages/wikidataintegrator/__init__.py", line 3, in <module>
import wikidataintegrator.wdi_core
File "/home/egonw/.venvs/vhp-platform/lib/python3.13/site-packages/wikidataintegrator/wdi_core.py", line 14, in <module>
from pyshex import ShExEvaluator
File "/home/egonw/.venvs/vhp-platform/lib/python3.13/site-packages/pyshex/__init__.py", line 1, in <module>
from pyshex.prefixlib import PrefixLibrary, standard_prefixes, known_prefixes
File "/home/egonw/.venvs/vhp-platform/lib/python3.13/site-packages/pyshex/prefixlib.py", line 4, in <module>
from pyshexc.parser_impl.generate_shexj import load_shex_file
File "/home/egonw/.venvs/vhp-platform/lib/python3.13/site-packages/pyshexc/parser_impl/generate_shexj.py", line 19, in <module>
from pyshexc.parser.ShExDocLexer import ShExDocLexer
File "/home/egonw/.venvs/vhp-platform/lib/python3.13/site-packages/pyshexc/parser/ShExDocLexer.py", line 4, in <module>
from typing.io import TextIO
ModuleNotFoundError: No module named 'typing.io'; 'typing' is not a package
Installed package versions:
$ pip list
Package Version
---------------------- -----------
antlr4-python3-runtime 4.9.3
backoff 2.2.1
blinker 1.9.0
certifi 2025.8.3
CFGraph 0.2.1
chardet 5.2.0
charset-normalizer 3.4.3
click 8.2.1
dnspython 1.16.0
eventlet 0.40.3
Flask 3.1.0
flask-cors 6.0.1
greenlet 3.2.4
httplib2 0.30.0
idna 3.10
itsdangerous 2.2.0
Jinja2 3.1.6
jsonasobj 1.3.1
MarkupSafe 3.0.2
mwoauth 0.4.0
numpy 2.3.2
oauthlib 3.3.1
pandas 2.3.2
pip 25.1.1
plantuml 0.3.0
PyJSG 0.11.10
PyJWT 2.10.1
pyparsing 3.2.3
PyShEx 0.8.1
PyShExC 0.9.1
python-dateutil 2.9.0.post0
python-xz 0.5.0
pytz 2025.2
rdflib 7.1.4
rdflib-jsonld 0.6.1
rdflib-shim 1.0.3
requests 2.32.3
requests-oauthlib 2.0.0
setuptools 75.8.0
shexer 2.6.5
ShExJSG 0.8.2
simplejson 3.20.1
six 1.17.0
sparql-client 3.8
sparqlslurper 0.5.1
SPARQLWrapper 2.0.0
tqdm 4.67.1
typing 3.7.4.3
tzdata 2025.2
urllib3 2.5.0
Werkzeug 3.1.3
wikidataintegrator 0.9.30
wlighter 1.0.1
Reacted by Pierre
Metadata
Metadata
Assignees
Labels
No labels
Activity
elhossary commentedon Nov 17, 2025
I am also having this issue, I had to stay with 3.12 which also has a depreciation warning
egonw commentedon Nov 18, 2025
ping @cthoyt, this was the issue I mentioned last week.
Improve compatibility of TextIO import
cthoyt commentedon Nov 18, 2025
@egonw it was easy enough to find the source code where this came from and send a fix shexSpec/grammar-python-antlr#17
however, the package doesn't have the hallmarks of a sustainable project. I'm hesitant to put any more effort into this. hopefully the PR is enough