splitgraph / sgr

sgr (command line client for Splitgraph) and the splitgraph Python library
https://www.splitgraph.com
Other
325 stars 17 forks source link

deps: loosen `pglast` constraint for python 3.11 support #814

Closed branchvincent closed 11 months ago

branchvincent commented 1 year ago

This adds support for python 3.11 by loosening the pglast constraint, which fails to build due to a C header longintrepr.h being moved (see https://github.com/python/cpython/issues/79315). To reproduce:

$ poetry env use python3.11
$ poetry install
# ...
clang -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk -I/opt/homebrew/include -I/opt/homebrew/include -I/private/var/folders/1r/p5nhsx151fd7j63p9r1zz4kw0000gn/T/pip-req-build-58dwok55/libpg_query -I/private/var/folders/1r/p5nhsx151fd7j63p9r1zz4kw0000gn/T/pip-req-build-58dwok55/libpg_query/src/postgres/include -I/private/var/folders/1r/p5nhsx151fd7j63p9r1zz4kw0000gn/T/pip-req-build-58dwok55/libpg_query/vendor -I/private/var/folders/1r/p5nhsx151fd7j63p9r1zz4kw0000gn/T/tmp.qP2MtS8D/sgr/.venv/include -I/opt/homebrew/opt/python@3.11/Frameworks/Python.framework/Versions/3.11/include/python3.11 -c pglast/parser.c -o build/temp.macosx-13-arm64-cpython-311/pglast/parser.o
        pglast/parser.c:282:12: fatal error: 'longintrepr.h' file not found
          #include "longintrepr.h"
                   ^~~~~~~~~~~~~~~
        1 error generated.
        error: command '/usr/bin/clang' failed with exit code 1
        [end of output]

    note: This error originates from a subprocess, and is likely not a problem with pip.
    ERROR: Failed building wheel for pglast
  Failed to build pglast

Note that 3.15 was the first pglast version that officially supported 3.11, but I've left the lower bound untouched (let me know if you'd like something different)

chenrui333 commented 11 months ago

cc @neumark

mildbyte commented 11 months ago

Thanks! We'll merge this to trigger the build.