earwig / mwparserfromhell

A Python parser for MediaWiki wikicode
https://mwparserfromhell.readthedocs.io/
MIT License
750 stars 75 forks source link

C extension fails to build on Python 3.12 #312

Closed legoktm closed 11 months ago

legoktm commented 11 months ago

Forwarding from https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1055565

x86_64-linux-gnu-gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O2 
-Wall -g -fstack-protector-strong -fstack-clash-protection -Wformat 
-Werror=format-security -fcf-protection -g -fwrapv -O2 -g -O2 
-ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects 
-fstack-protector-strong -fstack-clash-protection -Wformat 
-Werror=format-security -fcf-protection 
-fdebug-prefix-map=/<<PKGBUILDDIR>>=/usr/src/mwparserfromhell-0.6.5-1build1 
-Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.12 -c 
src/mwparserfromhell/parser/ctokenizer/tokenizer.c -o 
build/temp.linux-x86_64-cpython-312/src/mwparserfromhell/parser/ctokenizer/tokenizer.o
src/mwparserfromhell/parser/ctokenizer/tokenizer.c: In function 
‘init_tokenizer_text’:
src/mwparserfromhell/parser/ctokenizer/tokenizer.c:91:18: error: 
‘PyUnicode_WCHAR_KIND’ undeclared (first use in this function); did you 
mean ‘PyUnicode_4BYTE_KIND’?
   91 |     text->kind = PyUnicode_WCHAR_KIND;
      |                  ^~~~~~~~~~~~~~~~~~~~
      |                  PyUnicode_4BYTE_KIND
src/mwparserfromhell/parser/ctokenizer/tokenizer.c:91:18: note: each 
undeclared identifier is reported only once for each function it appears in
error: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1