About a week ago, I noticed that my build that uses Python 3.8-dev was erroring out when attempting to “pip install psycopg2-binary”. Here is a link to the relevant build:
psycopg/psycopgmodule.c: In function ‘psyco_is_main_interp’:
psycopg/psycopgmodule.c:689:18: error: dereferencing pointer to incomplete type ‘PyInterpreterState {aka struct _is}’
while (interp->next)
^
It appears you are missing some prerequisite to build the package from source.
You may install a binary package by installing 'psycopg2-binary' from PyPI.
If you want to install psycopg2 from source, please install the packages
required for the build and try again.
For further information please check the 'doc/src/install.rst' file (also at
<http://initd.org/psycopg/docs/install.html>).
error: command 'gcc' failed with exit status 1
----------------------------------------
Failed building wheel for psycopg2-binary
If it was passing in the past, a likely explanation is that recent development in the 3.8 branch is causing issues. I suggest reporting issues upstream (probably psycopg). I don’t think this is a Travis CI issue.
I do not think it is a psycopg2 issue because, as you can see in the passing and failing builds, the exact same version of psycopg2 is being installed (2.7.7), with the same checksum.
I believe this is either a travis issue, or an issue in the way travis packages/installs Python 3.8.
As I said, 3.8-dev branch is in active development, and there appears to be a discrepancy between it and the module you are trying to use. The code that used to work no longer does. Please report it upstream, so that the developer can adapt to the upcoming 3.8 changes.
3.8-dev is a binary compiled from Python’s tip-of-development code https://github.com/python/cpython/tree/master that is refreshed daily. This is for brave souls like you and module developers so that they can understand what is coming down the pipeline and make changes to be 3.8-ready when it is released. If this is not your use case, I strongly suggest not using 3.8-dev.
The change that affects your builds is in the CPython code. And it is not accounted for by psycopg2. The module developer needs to resolve the problem.