Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build fails on pypy3/7.3.7 with undeclared PyDateTime_TimeZone_UTC #1398

Closed
5 tasks done
jayvdb opened this issue Dec 3, 2021 · 1 comment · Fixed by #1400
Closed
5 tasks done

Build fails on pypy3/7.3.7 with undeclared PyDateTime_TimeZone_UTC #1398

jayvdb opened this issue Dec 3, 2021 · 1 comment · Fixed by #1400

Comments

@jayvdb
Copy link
Contributor

jayvdb commented Dec 3, 2021

Before opening this ticket, please confirm that:

Please complete the following information:

  • OS: Darwin 21.1.0 Darwin Kernel Version 21.1.0: Wed Oct 13 17:33:23 PDT 2021; root:xnu-8019.41.5~1/RELEASE_X86_64 x86_64
  • Psycopg version: 2.9.2
  • Python version: 3.7 (pypy3/7.3.7)
  • PostgreSQL version: 14.1
  • pip version: 21.3.1
gcc --version
Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/4.2.1
Apple clang version 13.0.0 (clang-1300.0.29.3)
Target: x86_64-apple-darwin21.1.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
[pipenv.exceptions.InstallError]:     gcc -pthread -arch x86_64 -DNDEBUG -O2 -fPIC -DPSYCOPG_VERSION=2.9.2 (dt dec pq3 ext lo64 lo64) -DPSYCOPG_DEBUG=1 -DPG_VERSION_NUM=140001 -DHAVE_LO64=1 -DPG_VERSION_NUM=140001 -DHAVE_LO64=1 -I/Users/jayvdb/.local/share/virtualenvs/hindsight-backend-jwlq0EAt/include -I/usr/local/Cellar/pypy3/7.3.7/libexec/include -I. -I/usr/local/include -I/usr/local/include/postgresql/server -I/usr/local/Cellar/icu4c/69.1/include -I/usr/local/opt/openssl@1.1/include -I/usr/local/opt/readline/include -c psycopg/typecast.c -o build/temp.macosx-10.7-x86_64-3.7/psycopg/typecast.o
[pipenv.exceptions.InstallError]:     In file included from psycopg/typecast.c:168:
[pipenv.exceptions.InstallError]:     ./psycopg/typecast_datetime.c:115:14: error: use of undeclared identifier 'PyDateTime_TimeZone_UTC'
[pipenv.exceptions.InstallError]:         tzinfo = PyDateTime_TimeZone_UTC;
[pipenv.exceptions.InstallError]:                  ^
[pipenv.exceptions.InstallError]:     1 error generated.

The macro in psycopg/typecast_datetime.c introduced in f285026 looks like it needs to be tweaked to allow for this being missing in pypy3/7.3.7

@mattip
Copy link

mattip commented Jan 20, 2022

Just noticed this now. I added PyDateTime_TimeZone_UTC to PyPy so it will be part of the next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants