Skip to content

Cannot build on python 3.7.2, ‘PyThreadState’ has no member named ‘exc_type’ and similar errors #3

@estein-de

Description

@estein-de

Environment:

CPython 3.7.2
Cython 0.29.13 installed from PyPI

Attempting to install gil_load 0.3.5 from PyPI fails. See errors below.

$ pip3 install gil_load
Collecting gil_load
  Using cached https://files.pythonhosted.org/packages/2e/32/be5dbb75fe4ec3308578f5e3164248bd5509ebe59591fa72d9adf244ba9f/gil_load-0.3.5.tar.gz
Building wheels for collected packages: gil-load
  Building wheel for gil-load (setup.py) ... error
  Complete output from command /home/vagrant/venvs/3.7.2/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-q2p2qbsg/gil-load/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/pip-wheel-0s_x6skj --python-tag cp37:
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.linux-x86_64-3.7
  creating build/lib.linux-x86_64-3.7/gil_load
  copying gil_load/__version__.py -> build/lib.linux-x86_64-3.7/gil_load
  copying gil_load/__init__.py -> build/lib.linux-x86_64-3.7/gil_load
  running build_ext
  building 'gil_load.gil_load' extension
  creating build/temp.linux-x86_64-3.7
  creating build/temp.linux-x86_64-3.7/gil_load
  gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/home/vagrant/.pyenv/versions/3.7.2/include/python3.7m -c gil_load/gil_load.c -o build/temp.linux-x86_64-3.7/gil_load/gil_load.o
  gil_load/gil_load.c: In function ‘__Pyx__ExceptionSave’:
  gil_load/gil_load.c:6848:19: error: ‘PyThreadState’ has no member named ‘exc_type’
       *type = tstate->exc_type;
                     ^
  gil_load/gil_load.c:6849:20: error: ‘PyThreadState’ has no member named ‘exc_value’
       *value = tstate->exc_value;
                      ^
  gil_load/gil_load.c:6850:17: error: ‘PyThreadState’ has no member named ‘exc_traceback’
       *tb = tstate->exc_traceback;
                   ^
  gil_load/gil_load.c: In function ‘__Pyx__ExceptionReset’:
  gil_load/gil_load.c:6857:22: error: ‘PyThreadState’ has no member named ‘exc_type’
       tmp_type = tstate->exc_type;
                        ^
  gil_load/gil_load.c:6858:23: error: ‘PyThreadState’ has no member named ‘exc_value’
       tmp_value = tstate->exc_value;
                         ^
  gil_load/gil_load.c:6859:20: error: ‘PyThreadState’ has no member named ‘exc_traceback’
       tmp_tb = tstate->exc_traceback;
                      ^
  gil_load/gil_load.c:6860:11: error: ‘PyThreadState’ has no member named ‘exc_type’
       tstate->exc_type = type;
             ^
  gil_load/gil_load.c:6861:11: error: ‘PyThreadState’ has no member named ‘exc_value’
       tstate->exc_value = value;
             ^
  gil_load/gil_load.c:6862:11: error: ‘PyThreadState’ has no member named ‘exc_traceback’
       tstate->exc_traceback = tb;
             ^
  gil_load/gil_load.c: In function ‘__Pyx__GetException’:
  gil_load/gil_load.c:6907:22: error: ‘PyThreadState’ has no member named ‘exc_type’
       tmp_type = tstate->exc_type;
                        ^
  gil_load/gil_load.c:6908:23: error: ‘PyThreadState’ has no member named ‘exc_value’
       tmp_value = tstate->exc_value;
                         ^
  gil_load/gil_load.c:6909:20: error: ‘PyThreadState’ has no member named ‘exc_traceback’
       tmp_tb = tstate->exc_traceback;
                      ^
  gil_load/gil_load.c:6910:11: error: ‘PyThreadState’ has no member named ‘exc_type’
       tstate->exc_type = local_type;
             ^
  gil_load/gil_load.c:6911:11: error: ‘PyThreadState’ has no member named ‘exc_value’
       tstate->exc_value = local_value;
             ^
  gil_load/gil_load.c:6912:11: error: ‘PyThreadState’ has no member named ‘exc_traceback’
       tstate->exc_traceback = local_tb;
             ^
  gil_load/gil_load.c: In function ‘__Pyx__ExceptionSwap’:
  gil_load/gil_load.c:8083:22: error: ‘PyThreadState’ has no member named ‘exc_type’
       tmp_type = tstate->exc_type;
                        ^
  gil_load/gil_load.c:8084:23: error: ‘PyThreadState’ has no member named ‘exc_value’
       tmp_value = tstate->exc_value;
                         ^
  gil_load/gil_load.c:8085:20: error: ‘PyThreadState’ has no member named ‘exc_traceback’
       tmp_tb = tstate->exc_traceback;
                      ^
  gil_load/gil_load.c:8086:11: error: ‘PyThreadState’ has no member named ‘exc_type’
       tstate->exc_type = *type;
             ^
  gil_load/gil_load.c:8087:11: error: ‘PyThreadState’ has no member named ‘exc_value’
       tstate->exc_value = *value;
             ^
  gil_load/gil_load.c:8088:11: error: ‘PyThreadState’ has no member named ‘exc_traceback’
       tstate->exc_traceback = *tb;
             ^
  error: command 'gcc' failed with exit status 1

  ----------------------------------------
  Failed building wheel for gil-load
  Running setup.py clean for gil-load
Failed to build gil-load
Installing collected packages: gil-load
  Running setup.py install for gil-load ... error
    Complete output from command /home/vagrant/venvs/3.7.2/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-q2p2qbsg/gil-load/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-cs0rw4he/install-record.txt --single-version-externally-managed --compile --install-headers /home/vagrant/venvs/3.7.2/include/site/python3.7/gil-load:
    running install
    running build
    running build_py
    creating build
    creating build/lib.linux-x86_64-3.7
    creating build/lib.linux-x86_64-3.7/gil_load
    copying gil_load/__version__.py -> build/lib.linux-x86_64-3.7/gil_load
    copying gil_load/__init__.py -> build/lib.linux-x86_64-3.7/gil_load
    running build_ext
    building 'gil_load.gil_load' extension
    creating build/temp.linux-x86_64-3.7
    creating build/temp.linux-x86_64-3.7/gil_load
    gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/home/vagrant/.pyenv/versions/3.7.2/include/python3.7m -c gil_load/gil_load.c -o build/temp.linux-x86_64-3.7/gil_load/gil_load.o
    gil_load/gil_load.c: In function ‘__Pyx__ExceptionSave’:
    gil_load/gil_load.c:6848:19: error: ‘PyThreadState’ has no member named ‘exc_type’
         *type = tstate->exc_type;
                       ^
    gil_load/gil_load.c:6849:20: error: ‘PyThreadState’ has no member named ‘exc_value’
         *value = tstate->exc_value;
                        ^
    gil_load/gil_load.c:6850:17: error: ‘PyThreadState’ has no member named ‘exc_traceback’
         *tb = tstate->exc_traceback;
                     ^
    gil_load/gil_load.c: In function ‘__Pyx__ExceptionReset’:
    gil_load/gil_load.c:6857:22: error: ‘PyThreadState’ has no member named ‘exc_type’
         tmp_type = tstate->exc_type;
                          ^
    gil_load/gil_load.c:6858:23: error: ‘PyThreadState’ has no member named ‘exc_value’
         tmp_value = tstate->exc_value;
                           ^
    gil_load/gil_load.c:6859:20: error: ‘PyThreadState’ has no member named ‘exc_traceback’
         tmp_tb = tstate->exc_traceback;
                        ^
    gil_load/gil_load.c:6860:11: error: ‘PyThreadState’ has no member named ‘exc_type’
         tstate->exc_type = type;
               ^
    gil_load/gil_load.c:6861:11: error: ‘PyThreadState’ has no member named ‘exc_value’
         tstate->exc_value = value;
               ^
    gil_load/gil_load.c:6862:11: error: ‘PyThreadState’ has no member named ‘exc_traceback’
         tstate->exc_traceback = tb;
               ^
    gil_load/gil_load.c: In function ‘__Pyx__GetException’:
    gil_load/gil_load.c:6907:22: error: ‘PyThreadState’ has no member named ‘exc_type’
         tmp_type = tstate->exc_type;
                          ^
    gil_load/gil_load.c:6908:23: error: ‘PyThreadState’ has no member named ‘exc_value’
         tmp_value = tstate->exc_value;
                           ^
    gil_load/gil_load.c:6909:20: error: ‘PyThreadState’ has no member named ‘exc_traceback’
         tmp_tb = tstate->exc_traceback;
                        ^
    gil_load/gil_load.c:6910:11: error: ‘PyThreadState’ has no member named ‘exc_type’
         tstate->exc_type = local_type;
               ^
    gil_load/gil_load.c:6911:11: error: ‘PyThreadState’ has no member named ‘exc_value’
         tstate->exc_value = local_value;
               ^
    gil_load/gil_load.c:6912:11: error: ‘PyThreadState’ has no member named ‘exc_traceback’
         tstate->exc_traceback = local_tb;
               ^
    gil_load/gil_load.c: In function ‘__Pyx__ExceptionSwap’:
    gil_load/gil_load.c:8083:22: error: ‘PyThreadState’ has no member named ‘exc_type’
         tmp_type = tstate->exc_type;
                          ^
    gil_load/gil_load.c:8084:23: error: ‘PyThreadState’ has no member named ‘exc_value’
         tmp_value = tstate->exc_value;
                           ^
    gil_load/gil_load.c:8085:20: error: ‘PyThreadState’ has no member named ‘exc_traceback’
         tmp_tb = tstate->exc_traceback;
                        ^
    gil_load/gil_load.c:8086:11: error: ‘PyThreadState’ has no member named ‘exc_type’
         tstate->exc_type = *type;
               ^
    gil_load/gil_load.c:8087:11: error: ‘PyThreadState’ has no member named ‘exc_value’
         tstate->exc_value = *value;
               ^
    gil_load/gil_load.c:8088:11: error: ‘PyThreadState’ has no member named ‘exc_traceback’
         tstate->exc_traceback = *tb;
               ^
    error: command 'gcc' failed with exit status 1

    ----------------------------------------
Command "/home/vagrant/venvs/3.7.2/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-q2p2qbsg/gil-load/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-cs0rw4he/install-record.txt --single-version-externally-managed --compile --install-headers /home/vagrant/venvs/3.7.2/include/site/python3.7/gil-load" failed with error code 1 in /tmp/pip-install-q2p2qbsg/gil-load/
You are using pip version 19.0.1, however version 19.2.3 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
$

I know that gil_load is not been tested on Python 3.7, so this isn't a regression bug - just missing support.

It looks like other cython based modules are having similar issues:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions