pganssle / zoneinfo

Reference implementation for the proposed standard library module zoneinfo
Other
51 stars 20 forks source link

Compilation fails on CPython 3.10 #120

Open morganwahl opened 2 years ago

morganwahl commented 2 years ago

I get the following error at compile time:

      x86_64-linux-gnu-gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -I/home/morgan/.virtualenvs/dev1/include -I/usr/include/python3.10 -c lib/zoneinfo_module.c -o build/temp.linux-x86_64-cpython-310/lib/zoneinfo_module.o -std=c99
      lib/zoneinfo_module.c: In function ‘zoneinfo_fromutc’:
      lib/zoneinfo_module.c:600:19: error: ‘_PyLong_One’ undeclared (first use in this function); did you mean ‘_PyLong_New’?
        600 |             one = _PyLong_One;
            |                   ^~~~~~~~~~~
            |                   _PyLong_New
      lib/zoneinfo_module.c:600:19: 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

I have a PR with what I think is a fix: #119

Fifee commented 2 years ago

i get the same error