miguelgrinberg / microblog

The microblogging application developed in my Flask Mega-Tutorial series. This version maps to the 2024 Edition of the tutorial.
http://blog.miguelgrinberg.com/post/the-flask-mega-tutorial-part-i-hello-world
MIT License
4.52k stars 1.62k forks source link

Issue with deployment on Heroko (Greenlet package) #336

Closed kotikschmotik closed 9 months ago

kotikschmotik commented 1 year ago

Hi, first of all, thanks for the amazing tutorial!

I have an issue when deploying on Heroko: I'm using your v0.18 code. When I deploy, I get the following error message connected to the greenlet package:

   error: legacy-install-failure

   × Encountered error while trying to install package.
   ╰─> greenlet

I would really appreciate your help - thank you!

Here is the entire log:

-----> Building on the Heroku-22 stack -----> Determining which buildpack to use for this app -----> Python app detected -----> No Python version was specified. Using the buildpack default: python-3.11.2 To use a different version, see: https://devcenter.heroku.com/articles/python-runtimes -----> Installing python-3.11.2 -----> Installing pip 23.0.1, setuptools 63.4.3 and wheel 0.38.4 -----> Installing SQLite3 -----> Installing requirements with pip Collecting alembic==1.6.5 Downloading alembic-1.6.5-py2.py3-none-any.whl (164 kB) Collecting Babel==2.9.1 Downloading Babel-2.9.1-py2.py3-none-any.whl (8.8 MB) Collecting blinker==1.4 Downloading blinker-1.4.tar.gz (111 kB) Preparing metadata (setup.py): started Preparing metadata (setup.py): finished with status 'done' Collecting certifi==2021.5.30 Downloading certifi-2021.5.30-py2.py3-none-any.whl (145 kB) Collecting chardet==4.0.0 Downloading chardet-4.0.0-py2.py3-none-any.whl (178 kB) Collecting click==8.0.1 Downloading click-8.0.1-py3-none-any.whl (97 kB) Collecting dnspython==2.1.0 Downloading dnspython-2.1.0-py3-none-any.whl (241 kB) Collecting dominate==2.6.0 Downloading dominate-2.6.0-py2.py3-none-any.whl (29 kB) Collecting elasticsearch==7.13.3 Downloading elasticsearch-7.13.3-py2.py3-none-any.whl (356 kB) Collecting email-validator==1.1.3 Downloading email_validator-1.1.3-py2.py3-none-any.whl (18 kB) Collecting Flask==2.0.1 Downloading Flask-2.0.1-py3-none-any.whl (94 kB) Collecting Flask-Babel==2.0.0 Downloading Flask_Babel-2.0.0-py3-none-any.whl (9.3 kB) Collecting Flask-Bootstrap==3.3.7.1 Downloading Flask-Bootstrap-3.3.7.1.tar.gz (456 kB) Preparing metadata (setup.py): started Preparing metadata (setup.py): finished with status 'done' Collecting Flask-Login==0.5.0 Downloading Flask_Login-0.5.0-py2.py3-none-any.whl (16 kB) Collecting Flask-Mail==0.9.1 Downloading Flask-Mail-0.9.1.tar.gz (45 kB) Preparing metadata (setup.py): started Preparing metadata (setup.py): finished with status 'done' Collecting Flask-Migrate==3.0.1 Downloading Flask_Migrate-3.0.1-py2.py3-none-any.whl (12 kB) Collecting Flask-Moment==1.0.1 Downloading Flask_Moment-1.0.1-py3-none-any.whl (5.7 kB) Collecting Flask-SQLAlchemy==2.5.1 Downloading Flask_SQLAlchemy-2.5.1-py2.py3-none-any.whl (17 kB) Collecting Flask-WTF==0.15.1 Downloading Flask_WTF-0.15.1-py2.py3-none-any.whl (13 kB) Collecting greenlet==1.1.0 Downloading greenlet-1.1.0.tar.gz (85 kB) Preparing metadata (setup.py): started Preparing metadata (setup.py): finished with status 'done' Collecting idna==2.10 Downloading idna-2.10-py2.py3-none-any.whl (58 kB) Collecting itsdangerous==2.0.1 Downloading itsdangerous-2.0.1-py3-none-any.whl (18 kB) Collecting Jinja2==3.0.1 Downloading Jinja2-3.0.1-py3-none-any.whl (133 kB) Collecting langdetect==1.0.9 Downloading langdetect-1.0.9.tar.gz (981 kB) Preparing metadata (setup.py): started Preparing metadata (setup.py): finished with status 'done' Collecting Mako==1.1.4 Downloading Mako-1.1.4-py2.py3-none-any.whl (75 kB) Collecting MarkupSafe==2.0.1 Downloading MarkupSafe-2.0.1.tar.gz (18 kB) Preparing metadata (setup.py): started Preparing metadata (setup.py): finished with status 'done' Collecting PyJWT==2.1.0 Downloading PyJWT-2.1.0-py3-none-any.whl (16 kB) Collecting python-dateutil==2.8.1 Downloading python_dateutil-2.8.1-py2.py3-none-any.whl (227 kB) Collecting python-dotenv==0.18.0 Downloading python_dotenv-0.18.0-py2.py3-none-any.whl (18 kB) Collecting python-editor==1.0.4 Downloading python_editor-1.0.4-py3-none-any.whl (4.9 kB) Collecting pytz==2021.1 Downloading pytz-2021.1-py2.py3-none-any.whl (510 kB) Collecting requests==2.25.1 Downloading requests-2.25.1-py2.py3-none-any.whl (61 kB) Collecting six==1.16.0 Downloading six-1.16.0-py2.py3-none-any.whl (11 kB) Collecting SQLAlchemy==1.4.20 Downloading SQLAlchemy-1.4.20.tar.gz (7.7 MB) Preparing metadata (setup.py): started Preparing metadata (setup.py): finished with status 'done' Collecting urllib3==1.26.6 Downloading urllib3-1.26.6-py2.py3-none-any.whl (138 kB) Collecting visitor==0.1.3 Downloading visitor-0.1.3.tar.gz (3.3 kB) Preparing metadata (setup.py): started Preparing metadata (setup.py): finished with status 'done' Collecting Werkzeug==2.0.1 Downloading Werkzeug-2.0.1-py3-none-any.whl (288 kB) Collecting WTForms==2.3.3 Downloading WTForms-2.3.3-py2.py3-none-any.whl (169 kB) Collecting psycopg2==2.9.1 Downloading psycopg2-2.9.1.tar.gz (379 kB) Preparing metadata (setup.py): started Preparing metadata (setup.py): finished with status 'done' Collecting gunicorn==20.1.0 Downloading gunicorn-20.1.0-py3-none-any.whl (79 kB) Building wheels for collected packages: blinker, Flask-Bootstrap, Flask-Mail, greenlet, langdetect, MarkupSafe, SQLAlchemy, visitor, psycopg2 Building wheel for blinker (setup.py): started Building wheel for blinker (setup.py): finished with status 'done' Created wheel for blinker: filename=blinker-1.4-py3-none-any.whl size=13458 sha256=6f61d2ef6022e0b39bdb695d1f1cbd16c2f2e881a11516c5af04aef92b2d654a Stored in directory: /tmp/pip-ephem-wheel-cache-doghuvev/wheels/b7/41/21/a7ebaaf2b82cf18d33ae217e6bbafd3fc82ca8b469f9f71d2a Building wheel for Flask-Bootstrap (setup.py): started Building wheel for Flask-Bootstrap (setup.py): finished with status 'done' Created wheel for Flask-Bootstrap: filename=Flask_Bootstrap-3.3.7.1-py3-none-any.whl size=460122 sha256=bca65a3f4886176942a70571279b1f7af7a5acbd772593987fdf00b870100560 Stored in directory: /tmp/pip-ephem-wheel-cache-doghuvev/wheels/3a/a2/90/8d658b1e875f36bdad71cdece9598b08c465d44bea13b9f74c Building wheel for Flask-Mail (setup.py): started Building wheel for Flask-Mail (setup.py): finished with status 'done' Created wheel for Flask-Mail: filename=Flask_Mail-0.9.1-py3-none-any.whl size=7579 sha256=aaa0a15963d29751f73120e54cb556d63d4f4bc02511f10c959b52d0ea1b7f84 Stored in directory: /tmp/pip-ephem-wheel-cache-doghuvev/wheels/f6/38/ab/b955b60e85ca451344be85d42bd267ef32311bd61cb21e5a1c Building wheel for greenlet (setup.py): started Building wheel for greenlet (setup.py): finished with status 'error' error: subprocess-exited-with-error

     × python setup.py bdist_wheel did not run successfully.
     │ exit code: 1
     ╰─> [293 lines of output]
         running bdist_wheel
         running build
         running build_py
         creating build
         creating build/lib.linux-x86_64-cpython-311
         creating build/lib.linux-x86_64-cpython-311/greenlet
         copying src/greenlet/__init__.py -> build/lib.linux-x86_64-cpython-311/greenlet
         creating build/lib.linux-x86_64-cpython-311/greenlet/tests
         copying src/greenlet/tests/test_version.py -> build/lib.linux-x86_64-cpython-311/greenlet/tests
         copying src/greenlet/tests/test_gc.py -> build/lib.linux-x86_64-cpython-311/greenlet/tests
         copying src/greenlet/tests/test_weakref.py -> build/lib.linux-x86_64-cpython-311/greenlet/tests
         copying src/greenlet/tests/__init__.py -> build/lib.linux-x86_64-cpython-311/greenlet/tests
         copying src/greenlet/tests/test_leaks.py -> build/lib.linux-x86_64-cpython-311/greenlet/tests
         copying src/greenlet/tests/test_generator.py -> build/lib.linux-x86_64-cpython-311/greenlet/tests
         copying src/greenlet/tests/test_tracing.py -> build/lib.linux-x86_64-cpython-311/greenlet/tests
         copying src/greenlet/tests/test_stack_saved.py -> build/lib.linux-x86_64-cpython-311/greenlet/tests
         copying src/greenlet/tests/test_cpp.py -> build/lib.linux-x86_64-cpython-311/greenlet/tests
         copying src/greenlet/tests/test_greenlet.py -> build/lib.linux-x86_64-cpython-311/greenlet/tests
         copying src/greenlet/tests/test_generator_nested.py -> build/lib.linux-x86_64-cpython-311/greenlet/tests
         copying src/greenlet/tests/test_extension_interface.py -> build/lib.linux-x86_64-cpython-311/greenlet/tests
         copying src/greenlet/tests/test_throw.py -> build/lib.linux-x86_64-cpython-311/greenlet/tests
         copying src/greenlet/tests/test_contextvars.py -> build/lib.linux-x86_64-cpython-311/greenlet/tests
         running egg_info
         writing src/greenlet.egg-info/PKG-INFO
         writing dependency_links to src/greenlet.egg-info/dependency_links.txt
         writing requirements to src/greenlet.egg-info/requires.txt
         writing top-level names to src/greenlet.egg-info/top_level.txt
         reading manifest file 'src/greenlet.egg-info/SOURCES.txt'
         reading manifest template 'MANIFEST.in'
         no previously-included directories found matching 'docs/_build'
         warning: no files found matching '*.py' under directory 'appveyor'
         adding license file 'LICENSE'
         adding license file 'LICENSE.PSF'
         adding license file 'AUTHORS'
         writing manifest file 'src/greenlet.egg-info/SOURCES.txt'
         /app/.heroku/python/lib/python3.11/site-packages/setuptools/command/build_py.py:153: SetuptoolsDeprecationWarning:     Installing 'greenlet.platform' as data is deprecated, please list it in `packages`.
             !!

             ############################
             # Package would be ignored #
             ############################
             Python recognizes 'greenlet.platform' as an importable package,
             but it is not listed in the `packages` configuration of setuptools.

             'greenlet.platform' has been automatically added to the distribution only
             because it may contain data files, but this behavior is likely to change
             in future versions of setuptools (and therefore is considered deprecated).

             Please make sure that 'greenlet.platform' is included as a package by using
             the `packages` configuration field or the proper discovery methods
             (for example by using `find_namespace_packages(...)`/`find_namespace:`
             instead of `find_packages(...)`/`find:`).

             You can read more about "package discovery" and "data files" on setuptools
             documentation page.

         !!

           check.warn(importable)
         copying src/greenlet/greenlet.c -> build/lib.linux-x86_64-cpython-311/greenlet
         copying src/greenlet/greenlet.h -> build/lib.linux-x86_64-cpython-311/greenlet
         copying src/greenlet/slp_platformselect.h -> build/lib.linux-x86_64-cpython-311/greenlet
         creating build/lib.linux-x86_64-cpython-311/greenlet/platform
         copying src/greenlet/platform/setup_switch_x64_masm.cmd -> build/lib.linux-x86_64-cpython-311/greenlet/platform
         copying src/greenlet/platform/switch_aarch64_gcc.h -> build/lib.linux-x86_64-cpython-311/greenlet/platform
         copying src/greenlet/platform/switch_alpha_unix.h -> build/lib.linux-x86_64-cpython-311/greenlet/platform
         copying src/greenlet/platform/switch_amd64_unix.h -> build/lib.linux-x86_64-cpython-311/greenlet/platform
         copying src/greenlet/platform/switch_arm32_gcc.h -> build/lib.linux-x86_64-cpython-311/greenlet/platform
         copying src/greenlet/platform/switch_arm32_ios.h -> build/lib.linux-x86_64-cpython-311/greenlet/platform
         copying src/greenlet/platform/switch_csky_gcc.h -> build/lib.linux-x86_64-cpython-311/greenlet/platform
         copying src/greenlet/platform/switch_m68k_gcc.h -> build/lib.linux-x86_64-cpython-311/greenlet/platform
         copying src/greenlet/platform/switch_mips_unix.h -> build/lib.linux-x86_64-cpython-311/greenlet/platform
         copying src/greenlet/platform/switch_ppc64_aix.h -> build/lib.linux-x86_64-cpython-311/greenlet/platform
         copying src/greenlet/platform/switch_ppc64_linux.h -> build/lib.linux-x86_64-cpython-311/greenlet/platform
         copying src/greenlet/platform/switch_ppc_aix.h -> build/lib.linux-x86_64-cpython-311/greenlet/platform
         copying src/greenlet/platform/switch_ppc_linux.h -> build/lib.linux-x86_64-cpython-311/greenlet/platform
         copying src/greenlet/platform/switch_ppc_macosx.h -> build/lib.linux-x86_64-cpython-311/greenlet/platform
         copying src/greenlet/platform/switch_ppc_unix.h -> build/lib.linux-x86_64-cpython-311/greenlet/platform
         copying src/greenlet/platform/switch_riscv_unix.h -> build/lib.linux-x86_64-cpython-311/greenlet/platform
         copying src/greenlet/platform/switch_s390_unix.h -> build/lib.linux-x86_64-cpython-311/greenlet/platform
         copying src/greenlet/platform/switch_sparc_sun_gcc.h -> build/lib.linux-x86_64-cpython-311/greenlet/platform
         copying src/greenlet/platform/switch_x32_unix.h -> build/lib.linux-x86_64-cpython-311/greenlet/platform
         copying src/greenlet/platform/switch_x64_masm.asm -> build/lib.linux-x86_64-cpython-311/greenlet/platform
         copying src/greenlet/platform/switch_x64_masm.obj -> build/lib.linux-x86_64-cpython-311/greenlet/platform
         copying src/greenlet/platform/switch_x64_msvc.h -> build/lib.linux-x86_64-cpython-311/greenlet/platform
         copying src/greenlet/platform/switch_x86_msvc.h -> build/lib.linux-x86_64-cpython-311/greenlet/platform
         copying src/greenlet/platform/switch_x86_unix.h -> build/lib.linux-x86_64-cpython-311/greenlet/platform
         copying src/greenlet/tests/_test_extension.c -> build/lib.linux-x86_64-cpython-311/greenlet/tests
         copying src/greenlet/tests/_test_extension_cpp.cpp -> build/lib.linux-x86_64-cpython-311/greenlet/tests
         running build_ext
         building 'greenlet._greenlet' extension
         creating build/temp.linux-x86_64-cpython-311
         creating build/temp.linux-x86_64-cpython-311/src
         creating build/temp.linux-x86_64-cpython-311/src/greenlet
         gcc -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/app/.heroku/python/include/python3.11 -c src/greenlet/greenlet.c -o build/temp.linux-x86_64-cpython-311/src/greenlet/greenlet.o
         In file included from src/greenlet/greenlet.c:11:
         src/greenlet/greenlet.h:42:5: error: unknown type name ‘CFrame’
            42 |     CFrame* cframe;
               |     ^~~~~~
         src/greenlet/greenlet.c: In function ‘green_clear_exc’:
         src/greenlet/greenlet.c:168:17: error: ‘_PyErr_StackItem’ {aka ‘struct _err_stackitem’} has no member named ‘exc_type’
           168 |     g->exc_state.exc_type = NULL;
               |                 ^
         src/greenlet/greenlet.c:170:17: error: ‘_PyErr_StackItem’ {aka ‘struct _err_stackitem’} has no member named ‘exc_traceback’
           170 |     g->exc_state.exc_traceback = NULL;
               |                 ^
         src/greenlet/greenlet.c: In function ‘g_switchstack’:
         src/greenlet/greenlet.c:508:44: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘recursion_depth’; did you mean ‘recursion_limit’?
           508 |         current->recursion_depth = tstate->recursion_depth;
               |                                            ^~~~~~~~~~~~~~~
               |                                            recursion_limit
         src/greenlet/greenlet.c:509:38: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘frame’; did you mean ‘cframe’?
           509 |         current->top_frame = tstate->frame;
               |                                      ^~~~~
               |                                      cframe
         src/greenlet/greenlet.c:522:25: warning: assignment to ‘int *’ from incompatible pointer type ‘_PyCFrame *’ [-Wincompatible-pointer-types]
           522 |         current->cframe = tstate->cframe;
               |                         ^
         src/greenlet/greenlet.c:544:17: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘recursion_depth’; did you mean ‘recursion_limit’?
           544 |         tstate->recursion_depth = target->recursion_depth;
               |                 ^~~~~~~~~~~~~~~
               |                 recursion_limit
         src/greenlet/greenlet.c:545:17: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘frame’; did you mean ‘cframe’?
           545 |         tstate->frame = target->top_frame;
               |                 ^~~~~
               |                 cframe
         src/greenlet/greenlet.c:568:24: warning: assignment to ‘_PyCFrame *’ from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types]
           568 |         tstate->cframe = target->cframe;
               |                        ^
         src/greenlet/greenlet.c: In function ‘g_initialstub’:
         src/greenlet/greenlet.c:821:50: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘recursion_depth’; did you mean ‘recursion_limit’?
           821 |     self->recursion_depth = PyThreadState_GET()->recursion_depth;
               |                                                  ^~~~~~~~~~~~~~~
               |                                                  recursion_limit
         src/greenlet/greenlet.c: In function ‘green_new’:
         src/greenlet/greenlet.c:921:34: warning: assignment to ‘int *’ from incompatible pointer type ‘_PyCFrame *’ [-Wincompatible-pointer-types]
           921 |         ((PyGreenlet*)o)->cframe = &PyThreadState_GET()->root_cframe;
               |                                  ^
         In file included from /app/.heroku/python/include/python3.11/Python.h:45,
                          from src/greenlet/greenlet.h:8,
                          from src/greenlet/greenlet.c:11:
         src/greenlet/greenlet.c: In function ‘green_traverse’:
         src/greenlet/greenlet.c:1021:29: error: ‘_PyErr_StackItem’ {aka ‘struct _err_stackitem’} has no member named ‘exc_type’
          1021 |     Py_VISIT(self->exc_state.exc_type);
               |                             ^
         /app/.heroku/python/include/python3.11/objimpl.h:199:13: note: in definition of macro ‘Py_VISIT’
           199 |         if (op) {                                                       \
               |             ^~
         In file included from /app/.heroku/python/include/python3.11/Python.h:38,
                          from src/greenlet/greenlet.h:8,
                          from src/greenlet/greenlet.c:11:
         src/greenlet/greenlet.c:1021:29: error: ‘_PyErr_StackItem’ {aka ‘struct _err_stackitem’} has no member named ‘exc_type’
          1021 |     Py_VISIT(self->exc_state.exc_type);
               |                             ^
         /app/.heroku/python/include/python3.11/pyport.h:24:38: note: in definition of macro ‘_Py_CAST’
            24 | #define _Py_CAST(type, expr) ((type)(expr))
               |                                      ^~~~
         /app/.heroku/python/include/python3.11/objimpl.h:200:30: note: in expansion of macro ‘_PyObject_CAST’
           200 |             int vret = visit(_PyObject_CAST(op), arg);                  \
               |                              ^~~~~~~~~~~~~~
         src/greenlet/greenlet.c:1021:5: note: in expansion of macro ‘Py_VISIT’
          1021 |     Py_VISIT(self->exc_state.exc_type);
               |     ^~~~~~~~
         In file included from /app/.heroku/python/include/python3.11/Python.h:45,
                          from src/greenlet/greenlet.h:8,
                          from src/greenlet/greenlet.c:11:
         src/greenlet/greenlet.c:1023:29: error: ‘_PyErr_StackItem’ {aka ‘struct _err_stackitem’} has no member named ‘exc_traceback’
          1023 |     Py_VISIT(self->exc_state.exc_traceback);
               |                             ^
         /app/.heroku/python/include/python3.11/objimpl.h:199:13: note: in definition of macro ‘Py_VISIT’
           199 |         if (op) {                                                       \
               |             ^~
         In file included from /app/.heroku/python/include/python3.11/Python.h:38,
                          from src/greenlet/greenlet.h:8,
                          from src/greenlet/greenlet.c:11:
         src/greenlet/greenlet.c:1023:29: error: ‘_PyErr_StackItem’ {aka ‘struct _err_stackitem’} has no member named ‘exc_traceback’
          1023 |     Py_VISIT(self->exc_state.exc_traceback);
               |                             ^
         /app/.heroku/python/include/python3.11/pyport.h:24:38: note: in definition of macro ‘_Py_CAST’
            24 | #define _Py_CAST(type, expr) ((type)(expr))
               |                                      ^~~~
         /app/.heroku/python/include/python3.11/objimpl.h:200:30: note: in expansion of macro ‘_PyObject_CAST’
           200 |             int vret = visit(_PyObject_CAST(op), arg);                  \
               |                              ^~~~~~~~~~~~~~
         src/greenlet/greenlet.c:1023:5: note: in expansion of macro ‘Py_VISIT’
          1023 |     Py_VISIT(self->exc_state.exc_traceback);
               |     ^~~~~~~~
         src/greenlet/greenlet.c: In function ‘green_clear’:
         src/greenlet/greenlet.c:1059:29: error: ‘_PyErr_StackItem’ {aka ‘struct _err_stackitem’} has no member named ‘exc_type’
          1059 |     Py_CLEAR(self->exc_state.exc_type);
               |                             ^
         /app/.heroku/python/include/python3.11/pyport.h:24:38: note: in definition of macro ‘_Py_CAST’
            24 | #define _Py_CAST(type, expr) ((type)(expr))
               |                                      ^~~~
         /app/.heroku/python/include/python3.11/object.h:581:29: note: in expansion of macro ‘_PyObject_CAST’
           581 |         PyObject *_py_tmp = _PyObject_CAST(op); \
               |                             ^~~~~~~~~~~~~~
         src/greenlet/greenlet.c:1059:5: note: in expansion of macro ‘Py_CLEAR’
          1059 |     Py_CLEAR(self->exc_state.exc_type);
               |     ^~~~~~~~
         In file included from /app/.heroku/python/include/python3.11/Python.h:44,
                          from src/greenlet/greenlet.h:8,
                          from src/greenlet/greenlet.c:11:
         src/greenlet/greenlet.c:1059:29: error: ‘_PyErr_StackItem’ {aka ‘struct _err_stackitem’} has no member named ‘exc_type’
          1059 |     Py_CLEAR(self->exc_state.exc_type);
               |                             ^
         /app/.heroku/python/include/python3.11/object.h:583:14: note: in definition of macro ‘Py_CLEAR’
           583 |             (op) = NULL;                        \
               |              ^~
         In file included from /app/.heroku/python/include/python3.11/Python.h:38,
                          from src/greenlet/greenlet.h:8,
                          from src/greenlet/greenlet.c:11:
         src/greenlet/greenlet.c:1061:29: error: ‘_PyErr_StackItem’ {aka ‘struct _err_stackitem’} has no member named ‘exc_traceback’
          1061 |     Py_CLEAR(self->exc_state.exc_traceback);
               |                             ^
         /app/.heroku/python/include/python3.11/pyport.h:24:38: note: in definition of macro ‘_Py_CAST’
            24 | #define _Py_CAST(type, expr) ((type)(expr))
               |                                      ^~~~
         /app/.heroku/python/include/python3.11/object.h:581:29: note: in expansion of macro ‘_PyObject_CAST’
           581 |         PyObject *_py_tmp = _PyObject_CAST(op); \
               |                             ^~~~~~~~~~~~~~
         src/greenlet/greenlet.c:1061:5: note: in expansion of macro ‘Py_CLEAR’
          1061 |     Py_CLEAR(self->exc_state.exc_traceback);
               |     ^~~~~~~~
         In file included from /app/.heroku/python/include/python3.11/Python.h:44,
                          from src/greenlet/greenlet.h:8,
                          from src/greenlet/greenlet.c:11:
         src/greenlet/greenlet.c:1061:29: error: ‘_PyErr_StackItem’ {aka ‘struct _err_stackitem’} has no member named ‘exc_traceback’
          1061 |     Py_CLEAR(self->exc_state.exc_traceback);
               |                             ^
         /app/.heroku/python/include/python3.11/object.h:583:14: note: in definition of macro ‘Py_CLEAR’
           583 |             (op) = NULL;                        \
               |              ^~
         In file included from /app/.heroku/python/include/python3.11/Python.h:38,
                          from src/greenlet/greenlet.h:8,
                          from src/greenlet/greenlet.c:11:
         src/greenlet/greenlet.c: In function ‘green_dealloc’:
         src/greenlet/greenlet.c:1139:29: error: ‘_PyErr_StackItem’ {aka ‘struct _err_stackitem’} has no member named ‘exc_type’
          1139 |     Py_CLEAR(self->exc_state.exc_type);
               |                             ^
         /app/.heroku/python/include/python3.11/pyport.h:24:38: note: in definition of macro ‘_Py_CAST’
            24 | #define _Py_CAST(type, expr) ((type)(expr))
               |                                      ^~~~
         /app/.heroku/python/include/python3.11/object.h:581:29: note: in expansion of macro ‘_PyObject_CAST’
           581 |         PyObject *_py_tmp = _PyObject_CAST(op); \
               |                             ^~~~~~~~~~~~~~
         src/greenlet/greenlet.c:1139:5: note: in expansion of macro ‘Py_CLEAR’
          1139 |     Py_CLEAR(self->exc_state.exc_type);
               |     ^~~~~~~~
         In file included from /app/.heroku/python/include/python3.11/Python.h:44,
                          from src/greenlet/greenlet.h:8,
                          from src/greenlet/greenlet.c:11:
         src/greenlet/greenlet.c:1139:29: error: ‘_PyErr_StackItem’ {aka ‘struct _err_stackitem’} has no member named ‘exc_type’
          1139 |     Py_CLEAR(self->exc_state.exc_type);
               |                             ^
         /app/.heroku/python/include/python3.11/object.h:583:14: note: in definition of macro ‘Py_CLEAR’
           583 |             (op) = NULL;                        \
               |              ^~
         In file included from /app/.heroku/python/include/python3.11/Python.h:38,
                          from src/greenlet/greenlet.h:8,
                          from src/greenlet/greenlet.c:11:
         src/greenlet/greenlet.c:1141:29: error: ‘_PyErr_StackItem’ {aka ‘struct _err_stackitem’} has no member named ‘exc_traceback’
          1141 |     Py_CLEAR(self->exc_state.exc_traceback);
               |                             ^
         /app/.heroku/python/include/python3.11/pyport.h:24:38: note: in definition of macro ‘_Py_CAST’
            24 | #define _Py_CAST(type, expr) ((type)(expr))
               |                                      ^~~~
         /app/.heroku/python/include/python3.11/object.h:581:29: note: in expansion of macro ‘_PyObject_CAST’
           581 |         PyObject *_py_tmp = _PyObject_CAST(op); \
               |                             ^~~~~~~~~~~~~~
         src/greenlet/greenlet.c:1141:5: note: in expansion of macro ‘Py_CLEAR’
          1141 |     Py_CLEAR(self->exc_state.exc_traceback);
               |     ^~~~~~~~
         In file included from /app/.heroku/python/include/python3.11/Python.h:44,
                          from src/greenlet/greenlet.h:8,
                          from src/greenlet/greenlet.c:11:
         src/greenlet/greenlet.c:1141:29: error: ‘_PyErr_StackItem’ {aka ‘struct _err_stackitem’} has no member named ‘exc_traceback’
          1141 |     Py_CLEAR(self->exc_state.exc_traceback);
               |                             ^
         /app/.heroku/python/include/python3.11/object.h:583:14: note: in definition of macro ‘Py_CLEAR’
           583 |             (op) = NULL;                        \
               |              ^~
         src/greenlet/greenlet.c: In function ‘PyGreenlet_New’:
         src/greenlet/greenlet.c:1653:15: warning: assignment to ‘int *’ from incompatible pointer type ‘_PyCFrame *’ [-Wincompatible-pointer-types]
          1653 |     g->cframe = &PyThreadState_GET()->root_cframe;
               |               ^
         error: command '/usr/bin/gcc' 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 greenlet
     Running setup.py clean for greenlet
     Building wheel for langdetect (setup.py): started
     Building wheel for langdetect (setup.py): finished with status 'done'
     Created wheel for langdetect: filename=langdetect-1.0.9-py3-none-any.whl size=993225 sha256=3bc41d6dbeeb56703359dfcb1272a4c876030cf4d6e90690862b6210838e8b3a
     Stored in directory: /tmp/pip-ephem-wheel-cache-doghuvev/wheels/0a/f2/b2/e5ca405801e05eb7c8ed5b3b4bcf1fcabcd6272c167640072e
     Building wheel for MarkupSafe (setup.py): started
     Building wheel for MarkupSafe (setup.py): finished with status 'done'
     Created wheel for MarkupSafe: filename=MarkupSafe-2.0.1-cp311-cp311-linux_x86_64.whl size=14750 sha256=288f2b511688fee003e4db0a8d86f1af54030b8081e359e4ba4e697243520b6b
     Stored in directory: /tmp/pip-ephem-wheel-cache-doghuvev/wheels/ea/18/79/6266ea508b8164a77b95aa19534c77eb805f2878612c37efca
     Building wheel for SQLAlchemy (setup.py): started
     Building wheel for SQLAlchemy (setup.py): finished with status 'done'
     Created wheel for SQLAlchemy: filename=SQLAlchemy-1.4.20-cp311-cp311-linux_x86_64.whl size=1488348 sha256=4c3aed5e14895830039ee4433b62d61a4472677c544001d179e667458b085b3e
     Stored in directory: /tmp/pip-ephem-wheel-cache-doghuvev/wheels/75/a2/a2/9290912f40321acfd65cf7a741d2e0882e9a1f9464f60e2e9b
     Building wheel for visitor (setup.py): started
     Building wheel for visitor (setup.py): finished with status 'done'
     Created wheel for visitor: filename=visitor-0.1.3-py3-none-any.whl size=3926 sha256=5c5f02bd704b14deb384ac0bbde1dab837c1fbc24e788a648a33e531fe3c34b9
     Stored in directory: /tmp/pip-ephem-wheel-cache-doghuvev/wheels/a6/7c/bb/66bee1b6af18bb643ec4e26a58e932c6373849f1f1918592fd
     Building wheel for psycopg2 (setup.py): started
     Building wheel for psycopg2 (setup.py): finished with status 'done'
     Created wheel for psycopg2: filename=psycopg2-2.9.1-cp311-cp311-linux_x86_64.whl size=159177 sha256=91453b433f2f611685217676179814e3f52cd905a1f7ef95732ff093504ff9c7
     Stored in directory: /tmp/pip-ephem-wheel-cache-doghuvev/wheels/16/15/95/9d3fc2f4ee570415fce4878d47c9e104a54f69bd563067b8ff
   Successfully built blinker Flask-Bootstrap Flask-Mail langdetect MarkupSafe SQLAlchemy visitor psycopg2
   Failed to build greenlet
   Installing collected packages: visitor, pytz, python-editor, python-dotenv, certifi, blinker, Werkzeug, urllib3, six, PyJWT, psycopg2, MarkupSafe, itsdangerous, idna, gunicorn, greenlet, dominate, dnspython, click, chardet, Babel, WTForms, SQLAlchemy, requests, python-dateutil, Mako, langdetect, Jinja2, email-validator, elasticsearch, Flask, alembic, Flask-WTF, Flask-SQLAlchemy, Flask-Moment, Flask-Mail, Flask-Login, Flask-Bootstrap, Flask-Babel, Flask-Migrate
     Running setup.py install for greenlet: started
     Running setup.py install for greenlet: finished with status 'error'
     error: subprocess-exited-with-error

     × Running setup.py install for greenlet did not run successfully.
     │ exit code: 1
     ╰─> [295 lines of output]
         running install
         /app/.heroku/python/lib/python3.11/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
           warnings.warn(
         running build
         running build_py
         creating build
         creating build/lib.linux-x86_64-cpython-311
         creating build/lib.linux-x86_64-cpython-311/greenlet
         copying src/greenlet/__init__.py -> build/lib.linux-x86_64-cpython-311/greenlet
         creating build/lib.linux-x86_64-cpython-311/greenlet/tests
         copying src/greenlet/tests/test_version.py -> build/lib.linux-x86_64-cpython-311/greenlet/tests
         copying src/greenlet/tests/test_gc.py -> build/lib.linux-x86_64-cpython-311/greenlet/tests
         copying src/greenlet/tests/test_weakref.py -> build/lib.linux-x86_64-cpython-311/greenlet/tests
         copying src/greenlet/tests/__init__.py -> build/lib.linux-x86_64-cpython-311/greenlet/tests
         copying src/greenlet/tests/test_leaks.py -> build/lib.linux-x86_64-cpython-311/greenlet/tests
         copying src/greenlet/tests/test_generator.py -> build/lib.linux-x86_64-cpython-311/greenlet/tests
         copying src/greenlet/tests/test_tracing.py -> build/lib.linux-x86_64-cpython-311/greenlet/tests
         copying src/greenlet/tests/test_stack_saved.py -> build/lib.linux-x86_64-cpython-311/greenlet/tests
         copying src/greenlet/tests/test_cpp.py -> build/lib.linux-x86_64-cpython-311/greenlet/tests
         copying src/greenlet/tests/test_greenlet.py -> build/lib.linux-x86_64-cpython-311/greenlet/tests
         copying src/greenlet/tests/test_generator_nested.py -> build/lib.linux-x86_64-cpython-311/greenlet/tests
         copying src/greenlet/tests/test_extension_interface.py -> build/lib.linux-x86_64-cpython-311/greenlet/tests
         copying src/greenlet/tests/test_throw.py -> build/lib.linux-x86_64-cpython-311/greenlet/tests
         copying src/greenlet/tests/test_contextvars.py -> build/lib.linux-x86_64-cpython-311/greenlet/tests
         running egg_info
         writing src/greenlet.egg-info/PKG-INFO
         writing dependency_links to src/greenlet.egg-info/dependency_links.txt
         writing requirements to src/greenlet.egg-info/requires.txt
         writing top-level names to src/greenlet.egg-info/top_level.txt
         reading manifest file 'src/greenlet.egg-info/SOURCES.txt'
         reading manifest template 'MANIFEST.in'
         no previously-included directories found matching 'docs/_build'
         warning: no files found matching '*.py' under directory 'appveyor'
         adding license file 'LICENSE'
         adding license file 'LICENSE.PSF'
         adding license file 'AUTHORS'
         writing manifest file 'src/greenlet.egg-info/SOURCES.txt'
         /app/.heroku/python/lib/python3.11/site-packages/setuptools/command/build_py.py:153: SetuptoolsDeprecationWarning:     Installing 'greenlet.platform' as data is deprecated, please list it in `packages`.
             !!

             ############################
             # Package would be ignored #
             ############################
             Python recognizes 'greenlet.platform' as an importable package,
             but it is not listed in the `packages` configuration of setuptools.

             'greenlet.platform' has been automatically added to the distribution only
             because it may contain data files, but this behavior is likely to change
             in future versions of setuptools (and therefore is considered deprecated).

             Please make sure that 'greenlet.platform' is included as a package by using
             the `packages` configuration field or the proper discovery methods
             (for example by using `find_namespace_packages(...)`/`find_namespace:`
             instead of `find_packages(...)`/`find:`).

             You can read more about "package discovery" and "data files" on setuptools
             documentation page.

         !!

           check.warn(importable)
         copying src/greenlet/greenlet.c -> build/lib.linux-x86_64-cpython-311/greenlet
         copying src/greenlet/greenlet.h -> build/lib.linux-x86_64-cpython-311/greenlet
         copying src/greenlet/slp_platformselect.h -> build/lib.linux-x86_64-cpython-311/greenlet
         creating build/lib.linux-x86_64-cpython-311/greenlet/platform
         copying src/greenlet/platform/setup_switch_x64_masm.cmd -> build/lib.linux-x86_64-cpython-311/greenlet/platform
         copying src/greenlet/platform/switch_aarch64_gcc.h -> build/lib.linux-x86_64-cpython-311/greenlet/platform
         copying src/greenlet/platform/switch_alpha_unix.h -> build/lib.linux-x86_64-cpython-311/greenlet/platform
         copying src/greenlet/platform/switch_amd64_unix.h -> build/lib.linux-x86_64-cpython-311/greenlet/platform
         copying src/greenlet/platform/switch_arm32_gcc.h -> build/lib.linux-x86_64-cpython-311/greenlet/platform
         copying src/greenlet/platform/switch_arm32_ios.h -> build/lib.linux-x86_64-cpython-311/greenlet/platform
         copying src/greenlet/platform/switch_csky_gcc.h -> build/lib.linux-x86_64-cpython-311/greenlet/platform
         copying src/greenlet/platform/switch_m68k_gcc.h -> build/lib.linux-x86_64-cpython-311/greenlet/platform
         copying src/greenlet/platform/switch_mips_unix.h -> build/lib.linux-x86_64-cpython-311/greenlet/platform
         copying src/greenlet/platform/switch_ppc64_aix.h -> build/lib.linux-x86_64-cpython-311/greenlet/platform
         copying src/greenlet/platform/switch_ppc64_linux.h -> build/lib.linux-x86_64-cpython-311/greenlet/platform
         copying src/greenlet/platform/switch_ppc_aix.h -> build/lib.linux-x86_64-cpython-311/greenlet/platform
         copying src/greenlet/platform/switch_ppc_linux.h -> build/lib.linux-x86_64-cpython-311/greenlet/platform
         copying src/greenlet/platform/switch_ppc_macosx.h -> build/lib.linux-x86_64-cpython-311/greenlet/platform
         copying src/greenlet/platform/switch_ppc_unix.h -> build/lib.linux-x86_64-cpython-311/greenlet/platform
         copying src/greenlet/platform/switch_riscv_unix.h -> build/lib.linux-x86_64-cpython-311/greenlet/platform
         copying src/greenlet/platform/switch_s390_unix.h -> build/lib.linux-x86_64-cpython-311/greenlet/platform
         copying src/greenlet/platform/switch_sparc_sun_gcc.h -> build/lib.linux-x86_64-cpython-311/greenlet/platform
         copying src/greenlet/platform/switch_x32_unix.h -> build/lib.linux-x86_64-cpython-311/greenlet/platform
         copying src/greenlet/platform/switch_x64_masm.asm -> build/lib.linux-x86_64-cpython-311/greenlet/platform
         copying src/greenlet/platform/switch_x64_masm.obj -> build/lib.linux-x86_64-cpython-311/greenlet/platform
         copying src/greenlet/platform/switch_x64_msvc.h -> build/lib.linux-x86_64-cpython-311/greenlet/platform
         copying src/greenlet/platform/switch_x86_msvc.h -> build/lib.linux-x86_64-cpython-311/greenlet/platform
         copying src/greenlet/platform/switch_x86_unix.h -> build/lib.linux-x86_64-cpython-311/greenlet/platform
         copying src/greenlet/tests/_test_extension.c -> build/lib.linux-x86_64-cpython-311/greenlet/tests
         copying src/greenlet/tests/_test_extension_cpp.cpp -> build/lib.linux-x86_64-cpython-311/greenlet/tests
         running build_ext
         building 'greenlet._greenlet' extension
         creating build/temp.linux-x86_64-cpython-311
         creating build/temp.linux-x86_64-cpython-311/src
         creating build/temp.linux-x86_64-cpython-311/src/greenlet
         gcc -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/app/.heroku/python/include/python3.11 -c src/greenlet/greenlet.c -o build/temp.linux-x86_64-cpython-311/src/greenlet/greenlet.o
         In file included from src/greenlet/greenlet.c:11:
         src/greenlet/greenlet.h:42:5: error: unknown type name ‘CFrame’
            42 |     CFrame* cframe;
               |     ^~~~~~
         src/greenlet/greenlet.c: In function ‘green_clear_exc’:
         src/greenlet/greenlet.c:168:17: error: ‘_PyErr_StackItem’ {aka ‘struct _err_stackitem’} has no member named ‘exc_type’
           168 |     g->exc_state.exc_type = NULL;
               |                 ^
         src/greenlet/greenlet.c:170:17: error: ‘_PyErr_StackItem’ {aka ‘struct _err_stackitem’} has no member named ‘exc_traceback’
           170 |     g->exc_state.exc_traceback = NULL;
               |                 ^
         src/greenlet/greenlet.c: In function ‘g_switchstack’:
         src/greenlet/greenlet.c:508:44: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘recursion_depth’; did you mean ‘recursion_limit’?
           508 |         current->recursion_depth = tstate->recursion_depth;
               |                                            ^~~~~~~~~~~~~~~
               |                                            recursion_limit
         src/greenlet/greenlet.c:509:38: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘frame’; did you mean ‘cframe’?
           509 |         current->top_frame = tstate->frame;
               |                                      ^~~~~
               |                                      cframe
         src/greenlet/greenlet.c:522:25: warning: assignment to ‘int *’ from incompatible pointer type ‘_PyCFrame *’ [-Wincompatible-pointer-types]
           522 |         current->cframe = tstate->cframe;
               |                         ^
         src/greenlet/greenlet.c:544:17: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘recursion_depth’; did you mean ‘recursion_limit’?
           544 |         tstate->recursion_depth = target->recursion_depth;
               |                 ^~~~~~~~~~~~~~~
               |                 recursion_limit
         src/greenlet/greenlet.c:545:17: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘frame’; did you mean ‘cframe’?
           545 |         tstate->frame = target->top_frame;
               |                 ^~~~~
               |                 cframe
         src/greenlet/greenlet.c:568:24: warning: assignment to ‘_PyCFrame *’ from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types]
           568 |         tstate->cframe = target->cframe;
               |                        ^
         src/greenlet/greenlet.c: In function ‘g_initialstub’:
         src/greenlet/greenlet.c:821:50: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘recursion_depth’; did you mean ‘recursion_limit’?
           821 |     self->recursion_depth = PyThreadState_GET()->recursion_depth;
               |                                                  ^~~~~~~~~~~~~~~
               |                                                  recursion_limit
         src/greenlet/greenlet.c: In function ‘green_new’:
         src/greenlet/greenlet.c:921:34: warning: assignment to ‘int *’ from incompatible pointer type ‘_PyCFrame *’ [-Wincompatible-pointer-types]
           921 |         ((PyGreenlet*)o)->cframe = &PyThreadState_GET()->root_cframe;
               |                                  ^
         In file included from /app/.heroku/python/include/python3.11/Python.h:45,
                          from src/greenlet/greenlet.h:8,
                          from src/greenlet/greenlet.c:11:
         src/greenlet/greenlet.c: In function ‘green_traverse’:
         src/greenlet/greenlet.c:1021:29: error: ‘_PyErr_StackItem’ {aka ‘struct _err_stackitem’} has no member named ‘exc_type’
          1021 |     Py_VISIT(self->exc_state.exc_type);
               |                             ^
         /app/.heroku/python/include/python3.11/objimpl.h:199:13: note: in definition of macro ‘Py_VISIT’
           199 |         if (op) {                                                       \
               |             ^~
         In file included from /app/.heroku/python/include/python3.11/Python.h:38,
                          from src/greenlet/greenlet.h:8,
                          from src/greenlet/greenlet.c:11:
         src/greenlet/greenlet.c:1021:29: error: ‘_PyErr_StackItem’ {aka ‘struct _err_stackitem’} has no member named ‘exc_type’
          1021 |     Py_VISIT(self->exc_state.exc_type);
               |                             ^
         /app/.heroku/python/include/python3.11/pyport.h:24:38: note: in definition of macro ‘_Py_CAST’
            24 | #define _Py_CAST(type, expr) ((type)(expr))
               |                                      ^~~~
         /app/.heroku/python/include/python3.11/objimpl.h:200:30: note: in expansion of macro ‘_PyObject_CAST’
           200 |             int vret = visit(_PyObject_CAST(op), arg);                  \
               |                              ^~~~~~~~~~~~~~
         src/greenlet/greenlet.c:1021:5: note: in expansion of macro ‘Py_VISIT’
          1021 |     Py_VISIT(self->exc_state.exc_type);
               |     ^~~~~~~~
         In file included from /app/.heroku/python/include/python3.11/Python.h:45,
                          from src/greenlet/greenlet.h:8,
                          from src/greenlet/greenlet.c:11:
         src/greenlet/greenlet.c:1023:29: error: ‘_PyErr_StackItem’ {aka ‘struct _err_stackitem’} has no member named ‘exc_traceback’
          1023 |     Py_VISIT(self->exc_state.exc_traceback);
               |                             ^
         /app/.heroku/python/include/python3.11/objimpl.h:199:13: note: in definition of macro ‘Py_VISIT’
           199 |         if (op) {                                                       \
               |             ^~
         In file included from /app/.heroku/python/include/python3.11/Python.h:38,
                          from src/greenlet/greenlet.h:8,
                          from src/greenlet/greenlet.c:11:
         src/greenlet/greenlet.c:1023:29: error: ‘_PyErr_StackItem’ {aka ‘struct _err_stackitem’} has no member named ‘exc_traceback’
          1023 |     Py_VISIT(self->exc_state.exc_traceback);
               |                             ^
         /app/.heroku/python/include/python3.11/pyport.h:24:38: note: in definition of macro ‘_Py_CAST’
            24 | #define _Py_CAST(type, expr) ((type)(expr))
               |                                      ^~~~
         /app/.heroku/python/include/python3.11/objimpl.h:200:30: note: in expansion of macro ‘_PyObject_CAST’
           200 |             int vret = visit(_PyObject_CAST(op), arg);                  \
               |                              ^~~~~~~~~~~~~~
         src/greenlet/greenlet.c:1023:5: note: in expansion of macro ‘Py_VISIT’
          1023 |     Py_VISIT(self->exc_state.exc_traceback);
               |     ^~~~~~~~
         src/greenlet/greenlet.c: In function ‘green_clear’:
         src/greenlet/greenlet.c:1059:29: error: ‘_PyErr_StackItem’ {aka ‘struct _err_stackitem’} has no member named ‘exc_type’
          1059 |     Py_CLEAR(self->exc_state.exc_type);
               |                             ^
         /app/.heroku/python/include/python3.11/pyport.h:24:38: note: in definition of macro ‘_Py_CAST’
            24 | #define _Py_CAST(type, expr) ((type)(expr))
               |                                      ^~~~
         /app/.heroku/python/include/python3.11/object.h:581:29: note: in expansion of macro ‘_PyObject_CAST’
           581 |         PyObject *_py_tmp = _PyObject_CAST(op); \
               |                             ^~~~~~~~~~~~~~
         src/greenlet/greenlet.c:1059:5: note: in expansion of macro ‘Py_CLEAR’
          1059 |     Py_CLEAR(self->exc_state.exc_type);
               |     ^~~~~~~~
         In file included from /app/.heroku/python/include/python3.11/Python.h:44,
                          from src/greenlet/greenlet.h:8,
                          from src/greenlet/greenlet.c:11:
         src/greenlet/greenlet.c:1059:29: error: ‘_PyErr_StackItem’ {aka ‘struct _err_stackitem’} has no member named ‘exc_type’
          1059 |     Py_CLEAR(self->exc_state.exc_type);
               |                             ^
         /app/.heroku/python/include/python3.11/object.h:583:14: note: in definition of macro ‘Py_CLEAR’
           583 |             (op) = NULL;                        \
               |              ^~
         In file included from /app/.heroku/python/include/python3.11/Python.h:38,
                          from src/greenlet/greenlet.h:8,
                          from src/greenlet/greenlet.c:11:
         src/greenlet/greenlet.c:1061:29: error: ‘_PyErr_StackItem’ {aka ‘struct _err_stackitem’} has no member named ‘exc_traceback’
          1061 |     Py_CLEAR(self->exc_state.exc_traceback);
               |                             ^
         /app/.heroku/python/include/python3.11/pyport.h:24:38: note: in definition of macro ‘_Py_CAST’
            24 | #define _Py_CAST(type, expr) ((type)(expr))
               |                                      ^~~~
         /app/.heroku/python/include/python3.11/object.h:581:29: note: in expansion of macro ‘_PyObject_CAST’
           581 |         PyObject *_py_tmp = _PyObject_CAST(op); \
               |                             ^~~~~~~~~~~~~~
         src/greenlet/greenlet.c:1061:5: note: in expansion of macro ‘Py_CLEAR’
          1061 |     Py_CLEAR(self->exc_state.exc_traceback);
               |     ^~~~~~~~
         In file included from /app/.heroku/python/include/python3.11/Python.h:44,
                          from src/greenlet/greenlet.h:8,
                          from src/greenlet/greenlet.c:11:
         src/greenlet/greenlet.c:1061:29: error: ‘_PyErr_StackItem’ {aka ‘struct _err_stackitem’} has no member named ‘exc_traceback’
          1061 |     Py_CLEAR(self->exc_state.exc_traceback);
               |                             ^
         /app/.heroku/python/include/python3.11/object.h:583:14: note: in definition of macro ‘Py_CLEAR’
           583 |             (op) = NULL;                        \
               |              ^~
         In file included from /app/.heroku/python/include/python3.11/Python.h:38,
                          from src/greenlet/greenlet.h:8,
                          from src/greenlet/greenlet.c:11:
         src/greenlet/greenlet.c: In function ‘green_dealloc’:
         src/greenlet/greenlet.c:1139:29: error: ‘_PyErr_StackItem’ {aka ‘struct _err_stackitem’} has no member named ‘exc_type’
          1139 |     Py_CLEAR(self->exc_state.exc_type);
               |                             ^
         /app/.heroku/python/include/python3.11/pyport.h:24:38: note: in definition of macro ‘_Py_CAST’
            24 | #define _Py_CAST(type, expr) ((type)(expr))
               |                                      ^~~~
         /app/.heroku/python/include/python3.11/object.h:581:29: note: in expansion of macro ‘_PyObject_CAST’
           581 |         PyObject *_py_tmp = _PyObject_CAST(op); \
               |                             ^~~~~~~~~~~~~~
         src/greenlet/greenlet.c:1139:5: note: in expansion of macro ‘Py_CLEAR’
          1139 |     Py_CLEAR(self->exc_state.exc_type);
               |     ^~~~~~~~
         In file included from /app/.heroku/python/include/python3.11/Python.h:44,
                          from src/greenlet/greenlet.h:8,
                          from src/greenlet/greenlet.c:11:
         src/greenlet/greenlet.c:1139:29: error: ‘_PyErr_StackItem’ {aka ‘struct _err_stackitem’} has no member named ‘exc_type’
          1139 |     Py_CLEAR(self->exc_state.exc_type);
               |                             ^
         /app/.heroku/python/include/python3.11/object.h:583:14: note: in definition of macro ‘Py_CLEAR’
           583 |             (op) = NULL;                        \
               |              ^~
         In file included from /app/.heroku/python/include/python3.11/Python.h:38,
                          from src/greenlet/greenlet.h:8,
                          from src/greenlet/greenlet.c:11:
         src/greenlet/greenlet.c:1141:29: error: ‘_PyErr_StackItem’ {aka ‘struct _err_stackitem’} has no member named ‘exc_traceback’
          1141 |     Py_CLEAR(self->exc_state.exc_traceback);
               |                             ^
         /app/.heroku/python/include/python3.11/pyport.h:24:38: note: in definition of macro ‘_Py_CAST’
            24 | #define _Py_CAST(type, expr) ((type)(expr))
               |                                      ^~~~
         /app/.heroku/python/include/python3.11/object.h:581:29: note: in expansion of macro ‘_PyObject_CAST’
           581 |         PyObject *_py_tmp = _PyObject_CAST(op); \
               |                             ^~~~~~~~~~~~~~
         src/greenlet/greenlet.c:1141:5: note: in expansion of macro ‘Py_CLEAR’
          1141 |     Py_CLEAR(self->exc_state.exc_traceback);
               |     ^~~~~~~~
         In file included from /app/.heroku/python/include/python3.11/Python.h:44,
                          from src/greenlet/greenlet.h:8,
                          from src/greenlet/greenlet.c:11:
         src/greenlet/greenlet.c:1141:29: error: ‘_PyErr_StackItem’ {aka ‘struct _err_stackitem’} has no member named ‘exc_traceback’
          1141 |     Py_CLEAR(self->exc_state.exc_traceback);
               |                             ^
         /app/.heroku/python/include/python3.11/object.h:583:14: note: in definition of macro ‘Py_CLEAR’
           583 |             (op) = NULL;                        \
               |              ^~
         src/greenlet/greenlet.c: In function ‘PyGreenlet_New’:
         src/greenlet/greenlet.c:1653:15: warning: assignment to ‘int *’ from incompatible pointer type ‘_PyCFrame *’ [-Wincompatible-pointer-types]
          1653 |     g->cframe = &PyThreadState_GET()->root_cframe;
               |               ^
         error: command '/usr/bin/gcc' failed with exit code 1
         [end of output]

     note: This error originates from a subprocess, and is likely not a problem with pip.
   error: legacy-install-failure

   × Encountered error while trying to install package.
   ╰─> greenlet

   note: This is an issue with the package mentioned above, not pip.
   hint: See above for output from the failure.

! Push rejected, failed to compile Python app. ! Push failed

miguelgrinberg commented 1 year ago

You are using a version of greenlet that is too old and incompatible with Python 3.11. Either use a recent version of greenlet, or else downgrade your Python.

kotikschmotik commented 1 year ago

Thanks so much for the quick response - really appreciate it!

dcsndevs commented 8 months ago

I added a runtime.txt file to the document root folder and added one of the compatible python versions from Heroku and it worked. I also increased the version of "greenlet" to a newer version.