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

uWSGI 2.0.22 fails to build against Python 3.12 #2566

Closed
roehnan opened this issue Oct 3, 2023 · 6 comments
Closed

uWSGI 2.0.22 fails to build against Python 3.12 #2566

roehnan opened this issue Oct 3, 2023 · 6 comments

Comments

@roehnan
Copy link

roehnan commented Oct 3, 2023

uWSGI failed to build against Python 3.12, with the following errors:

#19 76.85   Building wheel for uWSGI (setup.py): finished with status 'error'
#19 76.87   error: subprocess-exited-with-error
#19 76.87
#19 76.87   × python setup.py bdist_wheel did not run successfully.
#19 76.87   │ exit code: 1
#19 76.87   ╰─> [168 lines of output]
#19 76.87       running bdist_wheel
#19 76.87       running build
#19 76.87       running build_py
#19 76.87       creating build
#19 76.87       creating build/lib
#19 76.87       copying uwsgidecorators.py -> build/lib
#19 76.87       warning: build_py: byte-compiling is disabled, skipping.
#19 76.87
#19 76.87       installing to build/bdist.linux-x86_64/wheel
#19 76.87       running install
#19 76.87       using profile: buildconf/default.ini
#19 76.87       detected include path: ['/usr/lib/gcc/x86_64-linux-gnu/10/include', '/usr/local/include', '/usr/include/x86_64-linux-gnu', '/usr/include']
#19 76.87       Patching "bin_name" to properly install_scripts dir
#19 76.87       detected CPU cores: 1
#19 76.87       configured CFLAGS: -O2 -I. -Wall -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -DUWSGI_HAS_IFADDRS -DUWSGI_ZLIB -DUWSGI_LOCK_USE_MUTEX -DUWSGI_EVENT_USE_EPOLL -DUWSGI_EVENT_TIMER_USE_TIMERFD -DUWSGI_EVENT_FILEMONITOR_USE_INOTIFY  -DUWSGI_PCRE -DUWSGI_ROUTING -DUWSGI_VERSION="\"2.0.22\"" -DUWSGI_VERSION_BASE="2" -DUWSGI_VERSION_MAJOR="0" -DUWSGI_VERSION_MINOR="22" -DUWSGI_VERSION_REVISION="0" -DUWSGI_VERSION_CUSTOM="\"\"" -DUWSGI_YAML -DUWSGI_PLUGIN_DIR="\".\"" -DUWSGI_DECLARE_EMBEDDED_PLUGINS="UDEP(python);UDEP(gevent);UDEP(ping);UDEP(cache);UDEP(nagios);UDEP(rrdtool);UDEP(carbon);UDEP(rpc);UDEP(corerouter);UDEP(fastrouter);UDEP(http);UDEP(ugreen);UDEP(signal);UDEP(syslog);UDEP(rsyslog);UDEP(logsocket);UDEP(router_uwsgi);UDEP(router_redirect);UDEP(router_basicauth);UDEP(zergpool);UDEP(redislog);UDEP(mongodblog);UDEP(router_rewrite);UDEP(router_http);UDEP(logfile);UDEP(router_cache);UDEP(rawrouter);UDEP(router_static);UDEP(sslrouter);UDEP(spooler);UDEP(cheaper_busyness);UDEP(symcall);UDEP(transformation_tofile);UDEP(transformation_gzip);UDEP(transformation_chunked);UDEP(transformation_offload);UDEP(router_memcached);UDEP(router_redis);UDEP(router_hash);UDEP(router_expires);UDEP(router_metrics);UDEP(transformation_template);UDEP(stats_pusher_socket);" -DUWSGI_LOAD_EMBEDDED_PLUGINS="ULEP(python);ULEP(gevent);ULEP(ping);ULEP(cache);ULEP(nagios);ULEP(rrdtool);ULEP(carbon);ULEP(rpc);ULEP(corerouter);ULEP(fastrouter);ULEP(http);ULEP(ugreen);ULEP(signal);ULEP(syslog);ULEP(rsyslog);ULEP(logsocket);ULEP(router_uwsgi);ULEP(router_redirect);ULEP(router_basicauth);ULEP(zergpool);ULEP(redislog);ULEP(mongodblog);ULEP(router_rewrite);ULEP(router_http);ULEP(logfile);ULEP(router_cache);ULEP(rawrouter);ULEP(router_static);ULEP(sslrouter);ULEP(spooler);ULEP(cheaper_busyness);ULEP(symcall);ULEP(transformation_tofile);ULEP(transformation_gzip);ULEP(transformation_chunked);ULEP(transformation_offload);ULEP(router_memcached);ULEP(router_redis);ULEP(router_hash);ULEP(router_expires);ULEP(router_metrics);ULEP(transformation_template);ULEP(stats_pusher_socket);"
#19 76.87       *** uWSGI compiling server core ***
#19 76.87       [gcc -pthread] core/utils.o
#19 76.87       [gcc -pthread] core/protocol.o
#19 76.87       [gcc -pthread] core/socket.o
#19 76.87       [gcc -pthread] core/logging.o
#19 76.87       [gcc -pthread] core/master.o
#19 76.87       [gcc -pthread] core/master_utils.o
#19 76.87       [gcc -pthread] core/emperor.o
#19 76.87       [gcc -pthread] core/notify.o
#19 76.87       [gcc -pthread] core/mule.o
#19 76.87       [gcc -pthread] core/subscription.o
#19 76.87       [gcc -pthread] core/stats.o
#19 76.87       [gcc -pthread] core/sendfile.o
#19 76.87       [gcc -pthread] core/async.o
#19 76.87       [gcc -pthread] core/master_checks.o
#19 76.87       [gcc -pthread] core/fifo.o
#19 76.87       [gcc -pthread] core/offload.o
#19 76.87       [gcc -pthread] core/io.o
#19 76.87       [gcc -pthread] core/static.o
#19 76.87       [gcc -pthread] core/websockets.o
#19 76.87       [gcc -pthread] core/spooler.o
#19 76.87       [gcc -pthread] core/snmp.o
#19 76.87       [gcc -pthread] core/exceptions.o
#19 76.87       [gcc -pthread] core/config.o
#19 76.87       [gcc -pthread] core/setup_utils.o
#19 76.87       [gcc -pthread] core/clock.o
#19 76.87       [gcc -pthread] core/init.o
#19 76.87       [gcc -pthread] core/buffer.o
#19 76.87       [gcc -pthread] core/reader.o
#19 76.87       [gcc -pthread] core/writer.o
#19 76.87       [gcc -pthread] core/alarm.o
#19 76.87       [gcc -pthread] core/cron.o
#19 76.87       [gcc -pthread] core/hooks.o
#19 76.87       [gcc -pthread] core/plugins.o
#19 76.87       [gcc -pthread] core/lock.o
#19 76.87       [gcc -pthread] core/cache.o
#19 76.87       [gcc -pthread] core/daemons.o
#19 76.87       [gcc -pthread] core/errors.o
#19 76.87       [gcc -pthread] core/hash.o
#19 76.87       [gcc -pthread] core/master_events.o
#19 76.87       [gcc -pthread] core/chunked.o
#19 76.87       [gcc -pthread] core/queue.o
#19 76.87       [gcc -pthread] core/event.o
#19 76.87       [gcc -pthread] core/signal.o
#19 76.87       [gcc -pthread] core/strings.o
#19 76.87       [gcc -pthread] core/progress.o
#19 76.87       [gcc -pthread] core/timebomb.o
#19 76.87       [gcc -pthread] core/ini.o
#19 76.87       [gcc -pthread] core/fsmon.o
#19 76.87       [gcc -pthread] core/mount.o
#19 76.87       [gcc -pthread] core/metrics.o
#19 76.87       [gcc -pthread] core/plugins_builder.o
#19 76.87       [gcc -pthread] core/sharedarea.o
#19 76.87       [gcc -pthread] core/rpc.o
#19 76.87       [gcc -pthread] core/gateway.o
#19 76.87       [gcc -pthread] core/loop.o
#19 76.87       [gcc -pthread] core/cookie.o
#19 76.87       [gcc -pthread] core/querystring.o
#19 76.87       [gcc -pthread] core/rb_timers.o
#19 76.87       [gcc -pthread] core/transformations.o
#19 76.87       [gcc -pthread] core/uwsgi.o
#19 76.87       [gcc -pthread] proto/base.o
#19 76.87       [gcc -pthread] proto/uwsgi.o
#19 76.87       [gcc -pthread] proto/http.o
#19 76.87       [gcc -pthread] proto/fastcgi.o
#19 76.87       [gcc -pthread] proto/scgi.o
#19 76.87       [gcc -pthread] proto/puwsgi.o
#19 76.87       [gcc -pthread] lib/linux_ns.o
#19 76.87       [gcc -pthread] core/zlib.o
#19 76.87       [gcc -pthread] core/regexp.o
#19 76.87       [gcc -pthread] core/routing.o
#19 76.87       [gcc -pthread] core/yaml.o
#19 76.87       [gcc -pthread] core/dot_h.o
#19 76.87       [gcc -pthread] core/config_py.o
#19 76.87       *** uWSGI compiling embedded plugins ***
#19 76.87       [gcc -pthread] plugins/python/python_plugin.o
#19 76.87       plugins/python/python_plugin.c:138:2: warning: ‘Py_NoSiteFlag’ is deprecated [-Wdeprecated-declarations]
#19 76.87         138 |  {"no-site", no_argument, 0, "do not import site module", uwsgi_opt_true, &Py_NoSiteFlag, 0},
#19 76.87             |  ^
#19 76.87       In file included from /usr/local/include/python3.12/Python.h:48,
#19 76.87                        from plugins/python/uwsgi_python.h:4,
#19 76.87                        from plugins/python/python_plugin.c:1:
#19 76.87       /usr/local/include/python3.12/cpython/pydebug.h:14:37: note: declared here
#19 76.87          14 | Py_DEPRECATED(3.12) PyAPI_DATA(int) Py_NoSiteFlag;
#19 76.87             |                                     ^~~~~~~~~~~~~
#19 76.87       plugins/python/python_plugin.c: In function ‘uwsgi_python_init’:
#19 76.87       plugins/python/python_plugin.c:239:3: warning: ‘Py_SetPythonHome’ is deprecated [-Wdeprecated-declarations]
#19 76.87         239 |   Py_SetPythonHome(wpyhome);
#19 76.87             |   ^~~~~~~~~~~~~~~~
#19 76.87       In file included from /usr/local/include/python3.12/Python.h:94,
#19 76.87                        from plugins/python/uwsgi_python.h:4,
#19 76.87                        from plugins/python/python_plugin.c:1:
#19 76.87       /usr/local/include/python3.12/pylifecycle.h:40:38: note: declared here
#19 76.87          40 | Py_DEPRECATED(3.11) PyAPI_FUNC(void) Py_SetPythonHome(const wchar_t *);
#19 76.87             |                                      ^~~~~~~~~~~~~~~~
#19 76.87       plugins/python/python_plugin.c:263:2: warning: ‘Py_SetProgramName’ is deprecated [-Wdeprecated-declarations]
#19 76.87         263 |  Py_SetProgramName(pname);
#19 76.87             |  ^~~~~~~~~~~~~~~~~
#19 76.87       In file included from /usr/local/include/python3.12/Python.h:94,
#19 76.87                        from plugins/python/uwsgi_python.h:4,
#19 76.87                        from plugins/python/python_plugin.c:1:
#19 76.87       /usr/local/include/python3.12/pylifecycle.h:37:38: note: declared here
#19 76.87          37 | Py_DEPRECATED(3.11) PyAPI_FUNC(void) Py_SetProgramName(const wchar_t *);
#19 76.87             |                                      ^~~~~~~~~~~~~~~~~
#19 76.87       plugins/python/python_plugin.c:269:2: warning: ‘Py_OptimizeFlag’ is deprecated [-Wdeprecated-declarations]
#19 76.87         269 |  Py_OptimizeFlag = up.optimize;
#19 76.87             |  ^~~~~~~~~~~~~~~
#19 76.87       In file included from /usr/local/include/python3.12/Python.h:48,
#19 76.87                        from plugins/python/uwsgi_python.h:4,
#19 76.87                        from plugins/python/python_plugin.c:1:
#19 76.87       /usr/local/include/python3.12/cpython/pydebug.h:13:37: note: declared here
#19 76.87          13 | Py_DEPRECATED(3.12) PyAPI_DATA(int) Py_OptimizeFlag;
#19 76.87             |                                     ^~~~~~~~~~~~~~~
#19 76.87       plugins/python/python_plugin.c: In function ‘uwsgi_python_pre_uwsgi_fork’:
#19 76.87       plugins/python/python_plugin.c:1327:3: error: too few arguments to function ‘_PyImport_AcquireLock’
#19 76.87        1327 |   _PyImport_AcquireLock();
#19 76.87             |   ^~~~~~~~~~~~~~~~~~~~~
#19 76.87       In file included from /usr/local/include/python3.12/import.h:91,
#19 76.87                        from /usr/local/include/python3.12/Python.h:99,
#19 76.87                        from plugins/python/uwsgi_python.h:4,
#19 76.87                        from plugins/python/python_plugin.c:1:
#19 76.87       /usr/local/include/python3.12/cpython/import.h:13:18: note: declared here
#19 76.87          13 | PyAPI_FUNC(void) _PyImport_AcquireLock(PyInterpreterState *interp);
#19 76.87             |                  ^~~~~~~~~~~~~~~~~~~~~
#19 76.87       plugins/python/python_plugin.c: In function ‘uwsgi_python_post_uwsgi_fork’:
#19 76.87       plugins/python/python_plugin.c:1339:4: error: too few arguments to function ‘_PyImport_ReleaseLock’
#19 76.87        1339 |    _PyImport_ReleaseLock();
#19 76.87             |    ^~~~~~~~~~~~~~~~~~~~~
#19 76.87       In file included from /usr/local/include/python3.12/import.h:91,
#19 76.87                        from /usr/local/include/python3.12/Python.h:99,
#19 76.87                        from plugins/python/uwsgi_python.h:4,
#19 76.87                        from plugins/python/python_plugin.c:1:
#19 76.87       /usr/local/include/python3.12/cpython/import.h:14:17: note: declared here
#19 76.87          14 | PyAPI_FUNC(int) _PyImport_ReleaseLock(PyInterpreterState *interp);
#19 76.87             |                 ^~~~~~~~~~~~~~~~~~~~~
#19 76.87       plugins/python/python_plugin.c: In function ‘uwsgi_python_suspend’:
#19 76.87       plugins/python/python_plugin.c:1596:64: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘recursion_remaining’; did you mean ‘c_recursion_remaining’?
#19 76.87        1596 |   up.current_recursion_remaining[wsgi_req->async_id] = tstate->recursion_remaining;
#19 76.87             |                                                                ^~~~~~~~~~~~~~~~~~~
#19 76.87             |                                                                c_recursion_remaining
#19 76.87       plugins/python/python_plugin.c:1605:49: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘recursion_remaining’; did you mean ‘c_recursion_remaining’?
#19 76.87        1605 |   up.current_main_recursion_remaining = tstate->recursion_remaining;
#19 76.87             |                                                 ^~~~~~~~~~~~~~~~~~~
#19 76.87             |                                                 c_recursion_remaining
#19 76.87       plugins/python/python_plugin.c: In function ‘uwsgi_python_resume’:
#19 76.87       plugins/python/python_plugin.c:1839:11: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘recursion_remaining’; did you mean ‘c_recursion_remaining’?
#19 76.87        1839 |   tstate->recursion_remaining = up.current_recursion_remaining[wsgi_req->async_id];
#19 76.87             |           ^~~~~~~~~~~~~~~~~~~
#19 76.87             |           c_recursion_remaining
#19 76.87       plugins/python/python_plugin.c:1848:11: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘recursion_remaining’; did you mean ‘c_recursion_remaining’?
#19 76.87        1848 |   tstate->recursion_remaining = up.current_main_recursion_remaining;
#19 76.87             |           ^~~~~~~~~~~~~~~~~~~
#19 76.87             |           c_recursion_remaining
#19 76.87       [end of output]
#19 76.87
#19 76.87   note: This error originates from a subprocess, and is likely not a problem with pip.
#19 76.87   ERROR: Failed building wheel for uWSGI

I am using the python:3.12.0-slim-bullseye docker image in my build process.

@Smart-SangGe
Copy link

Yes, I have encountered the same problem

@rafsaf
Copy link

rafsaf commented Oct 5, 2023

-> #2542 there is open PR

@mohitlamba2302
Copy link

The error might be related to uswgi using pyproject.toml for installation.
Below is the stack trace i have been struggling to solve.

Collecting uwsgi
Using cached uwsgi-2.0.22.tar.gz (809 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: uwsgi
Building wheel for uwsgi (pyproject.toml) ... error
error: subprocess-exited-with-error

× Building wheel for uwsgi (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [256 lines of output]
/tmp/pip-build-env-3emytl3c/overlay/lib/python3.12/site-packages/setuptools/_distutils/dist.py:265: UserWarning: Unknown distribution option: 'descriptions'
warnings.warn(msg)
running bdist_wheel
running build
running build_py
creating build
creating build/lib
copying uwsgidecorators.py -> build/lib
installing to build/bdist.linux-x86_64/wheel
running install
core/lock.c: In function ‘uwsgi_lock_fast_init’:
core/lock.c:114:17: warning: ‘pthread_mutexattr_setrobust_np’ is deprecated: pthread_mutexattr_setrobust_np is deprecated, use pthread_mutexattr_setrobust [-Wdeprecated-declarations]
114 | if (pthread_mutexattr_setrobust(&attr, PTHREAD_MUTEX_ROBUST)) {
| ^~
In file included from /usr/include/features.h:486,
from /usr/include/x86_64-linux-gnu/bits/libc-header-start.h:33,
from /usr/include/stdio.h:27,
from ./uwsgi.h:165,
from core/lock.c:1:
/usr/include/pthread.h:951:12: note: declared here
951 | extern int __REDIRECT_NTH (pthread_mutexattr_setrobust_np,
| ^~~~~~~~~~~~~~
core/lock.c: In function ‘uwsgi_lock_fast’:
core/lock.c:176:17: warning: ‘pthread_mutex_consistent_np’ is deprecated: pthread_mutex_consistent_np is deprecated, use pthread_mutex_consistent [-Wdeprecated-declarations]
176 | pthread_mutex_consistent((pthread_mutex_t *) uli->lock_ptr);
| ^~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/features.h:486,
from /usr/include/x86_64-linux-gnu/bits/libc-header-start.h:33,
from /usr/include/stdio.h:27,
from ./uwsgi.h:165,
from core/lock.c:1:
/usr/include/pthread.h:859:12: note: declared here
859 | extern int __REDIRECT_NTH (pthread_mutex_consistent_np, (pthread_mutex_t *),
| ^~~~~~~~~~~~~~
core/ssl.c: In function ‘uwsgi_ssl_new_server_context’:
core/ssl.c:268:17: warning: ‘PEM_read_bio_DHparams’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
268 | DH *dh = PEM_read_bio_DHparams(bio, NULL, NULL, NULL);
| ^~
In file included from /usr/include/openssl/ssl.h:36,
from ./uwsgi.h:357,
from core/ssl.c:1:
/usr/include/openssl/pem.h:469:1: note: declared here
469 | DECLARE_PEM_rw_attr(OSSL_DEPRECATEDIN_3_0, DHparams, DH)
| ^~~~~~~~~~~~~~~~~~~
core/ssl.c:273:25: warning: ‘DH_free’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
273 | DH_free(dh);
| ^~~~~~~
In file included from /usr/include/openssl/dsa.h:51,
from /usr/include/openssl/x509.h:37,
from /usr/include/openssl/ssl.h:31,
from ./uwsgi.h:357,
from core/ssl.c:1:
/usr/include/openssl/dh.h:200:28: note: declared here
200 | OSSL_DEPRECATEDIN_3_0 void DH_free(DH *dh);
| ^~~~~~~
core/ssl.c:279:9: warning: ‘EC_KEY_new_by_curve_name’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
279 | EC_KEY *ecdh = EC_KEY_new_by_curve_name(NID_X9_62_prime256v1);
| ^~~~~~
In file included from /usr/include/openssl/x509.h:33,
from /usr/include/openssl/ssl.h:31,
from ./uwsgi.h:357,
from core/ssl.c:1:
/usr/include/openssl/ec.h:998:31: note: declared here
998 | OSSL_DEPRECATEDIN_3_0 EC_KEY *EC_KEY_new_by_curve_name(int nid);
| ^~~~~~~~~~~~~~~~~~~~~~~~
core/ssl.c:283:17: warning: ‘EC_KEY_free’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
283 | EC_KEY_free(ecdh);
| ^~~~~~~~~~~
In file included from /usr/include/openssl/x509.h:33,
from /usr/include/openssl/ssl.h:31,
from ./uwsgi.h:357,
from core/ssl.c:1:
/usr/include/openssl/ec.h:1003:28: note: declared here
1003 | OSSL_DEPRECATEDIN_3_0 void EC_KEY_free(EC_KEY *key);
| ^~~~~~~~~~~
core/ssl.c: In function ‘uwsgi_sha1’:
core/ssl.c:563:9: warning: ‘SHA1_Init’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
563 | SHA1_Init(&sha);
| ^~~~~~~~~
In file included from /usr/include/openssl/x509.h:41,
from /usr/include/openssl/ssl.h:31,
from ./uwsgi.h:357,
from core/ssl.c:1:
/usr/include/openssl/sha.h:49:27: note: declared here
49 | OSSL_DEPRECATEDIN_3_0 int SHA1_Init(SHA_CTX *c);
| ^~~~~~~~~
core/ssl.c:564:9: warning: ‘SHA1_Update’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
564 | SHA1_Update(&sha, src, len);
| ^~~~~~~~~~~
In file included from /usr/include/openssl/x509.h:41,
from /usr/include/openssl/ssl.h:31,
from ./uwsgi.h:357,
from core/ssl.c:1:
/usr/include/openssl/sha.h:50:27: note: declared here
50 | OSSL_DEPRECATEDIN_3_0 int SHA1_Update(SHA_CTX *c, const void *data, size_t len);
| ^~~~~~~~~~~
core/ssl.c:565:9: warning: ‘SHA1_Final’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
565 | SHA1_Final((unsigned char *)dst, &sha);
| ^~~~~~~~~~
In file included from /usr/include/openssl/x509.h:41,
from /usr/include/openssl/ssl.h:31,
from ./uwsgi.h:357,
from core/ssl.c:1:
/usr/include/openssl/sha.h:51:27: note: declared here
51 | OSSL_DEPRECATEDIN_3_0 int SHA1_Final(unsigned char *md, SHA_CTX *c);
| ^~~~~~~~~~
core/ssl.c: In function ‘uwsgi_md5’:
core/ssl.c:571:9: warning: ‘MD5_Init’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
571 | MD5_Init(&md5);
| ^~~~~~~~
In file included from core/ssl.c:4:
/usr/include/openssl/md5.h:49:27: note: declared here
49 | OSSL_DEPRECATEDIN_3_0 int MD5_Init(MD5_CTX *c);
| ^~~~~~~~
core/ssl.c:572:9: warning: ‘MD5_Update’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
572 | MD5_Update(&md5, src, len);
| ^~~~~~~~~~
In file included from core/ssl.c:4:
/usr/include/openssl/md5.h:50:27: note: declared here
50 | OSSL_DEPRECATEDIN_3_0 int MD5_Update(MD5_CTX *c, const void *data, size_t len);
| ^~~~~~~~~~
core/ssl.c:573:9: warning: ‘MD5_Final’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
573 | MD5_Final((unsigned char *)dst, &md5);
| ^~~~~~~~~
In file included from core/ssl.c:4:
/usr/include/openssl/md5.h:51:27: note: declared here
51 | OSSL_DEPRECATEDIN_3_0 int MD5_Final(unsigned char *md, MD5_CTX *c);
| ^~~~~~~~~
core/ssl.c: In function ‘uwsgi_sha1_2n’:
core/ssl.c:579:9: warning: ‘SHA1_Init’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
579 | SHA1_Init(&sha);
| ^~~~~~~~~
In file included from /usr/include/openssl/x509.h:41,
from /usr/include/openssl/ssl.h:31,
from ./uwsgi.h:357,
from core/ssl.c:1:
/usr/include/openssl/sha.h:49:27: note: declared here
49 | OSSL_DEPRECATEDIN_3_0 int SHA1_Init(SHA_CTX *c);
| ^~~~~~~~~
core/ssl.c:580:9: warning: ‘SHA1_Update’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
580 | SHA1_Update(&sha, s1, len1);
| ^~~~~~~~~~~
In file included from /usr/include/openssl/x509.h:41,
from /usr/include/openssl/ssl.h:31,
from ./uwsgi.h:357,
from core/ssl.c:1:
/usr/include/openssl/sha.h:50:27: note: declared here
50 | OSSL_DEPRECATEDIN_3_0 int SHA1_Update(SHA_CTX *c, const void *data, size_t len);
| ^~~~~~~~~~~
core/ssl.c:581:9: warning: ‘SHA1_Update’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
581 | SHA1_Update(&sha, s2, len2);
| ^~~~~~~~~~~
In file included from /usr/include/openssl/x509.h:41,
from /usr/include/openssl/ssl.h:31,
from ./uwsgi.h:357,
from core/ssl.c:1:
/usr/include/openssl/sha.h:50:27: note: declared here
50 | OSSL_DEPRECATEDIN_3_0 int SHA1_Update(SHA_CTX *c, const void *data, size_t len);
| ^~~~~~~~~~~
core/ssl.c:582:9: warning: ‘SHA1_Final’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
582 | SHA1_Final((unsigned char *)dst, &sha);
| ^~~~~~~~~~
In file included from /usr/include/openssl/x509.h:41,
from /usr/include/openssl/ssl.h:31,
from ./uwsgi.h:357,
from core/ssl.c:1:
/usr/include/openssl/sha.h:51:27: note: declared here
51 | OSSL_DEPRECATEDIN_3_0 int SHA1_Final(unsigned char *md, SHA_CTX *c);
| ^~~~~~~~~~
plugins/python/pyutils.c: In function ‘init_pyargv’:
plugins/python/pyutils.c:391:9: warning: ‘PySys_SetArgv’ is deprecated [-Wdeprecated-declarations]
391 | PySys_SetArgv(up.argc, up.py_argv);
| ^~~~~~~~~~~~~
In file included from /usr/local/include/python3.12/Python.h:96,
from plugins/python/uwsgi_python.h:4,
from plugins/python/pyutils.c:1:
/usr/local/include/python3.12/sysmodule.h:13:38: note: declared here
13 | Py_DEPRECATED(3.11) PyAPI_FUNC(void) PySys_SetArgv(int, wchar_t **);
| ^~~~~~~~~~~~~
plugins/python/python_plugin.c:138:9: warning: ‘Py_NoSiteFlag’ is deprecated [-Wdeprecated-declarations]
138 | {"no-site", no_argument, 0, "do not import site module", uwsgi_opt_true, &Py_NoSiteFlag, 0},
| ^
In file included from /usr/local/include/python3.12/Python.h:48,
from plugins/python/uwsgi_python.h:4,
from plugins/python/python_plugin.c:1:
/usr/local/include/python3.12/cpython/pydebug.h:14:37: note: declared here
14 | Py_DEPRECATED(3.12) PyAPI_DATA(int) Py_NoSiteFlag;
| ^~~~~~~~~~~~~
plugins/python/python_plugin.c: In function ‘uwsgi_python_init’:
plugins/python/python_plugin.c:239:17: warning: ‘Py_SetPythonHome’ is deprecated [-Wdeprecated-declarations]
239 | Py_SetPythonHome(wpyhome);
| ^~~~~~~~~~~~~~~~
In file included from /usr/local/include/python3.12/Python.h:94,
from plugins/python/uwsgi_python.h:4,
from plugins/python/python_plugin.c:1:
/usr/local/include/python3.12/pylifecycle.h:40:38: note: declared here
40 | Py_DEPRECATED(3.11) PyAPI_FUNC(void) Py_SetPythonHome(const wchar_t *);
| ^~~~~~~~~~~~~~~~
plugins/python/python_plugin.c:263:9: warning: ‘Py_SetProgramName’ is deprecated [-Wdeprecated-declarations]
263 | Py_SetProgramName(pname);
| ^~~~~~~~~~~~~~~~~
In file included from /usr/local/include/python3.12/Python.h:94,
from plugins/python/uwsgi_python.h:4,
from plugins/python/python_plugin.c:1:
/usr/local/include/python3.12/pylifecycle.h:37:38: note: declared here
37 | Py_DEPRECATED(3.11) PyAPI_FUNC(void) Py_SetProgramName(const wchar_t *);
| ^~~~~~~~~~~~~~~~~
plugins/python/python_plugin.c:269:9: warning: ‘Py_OptimizeFlag’ is deprecated [-Wdeprecated-declarations]
269 | Py_OptimizeFlag = up.optimize;
| ^~~~~~~~~~~~~~~
In file included from /usr/local/include/python3.12/Python.h:48,
from plugins/python/uwsgi_python.h:4,
from plugins/python/python_plugin.c:1:
/usr/local/include/python3.12/cpython/pydebug.h:13:37: note: declared here
13 | Py_DEPRECATED(3.12) PyAPI_DATA(int) Py_OptimizeFlag;
| ^~~~~~~~~~~~~~~
plugins/python/python_plugin.c: In function ‘uwsgi_python_pre_uwsgi_fork’:
plugins/python/python_plugin.c:1327:17: error: too few arguments to function ‘_PyImport_AcquireLock’
1327 | _PyImport_AcquireLock();
| ^~~~~~~~~~~~~~~~~~~~~
In file included from /usr/local/include/python3.12/import.h:91,
from /usr/local/include/python3.12/Python.h:99,
from plugins/python/uwsgi_python.h:4,
from plugins/python/python_plugin.c:1:
/usr/local/include/python3.12/cpython/import.h:13:18: note: declared here
13 | PyAPI_FUNC(void) _PyImport_AcquireLock(PyInterpreterState *interp);
| ^~~~~~~~~~~~~~~~~~~~~
plugins/python/python_plugin.c: In function ‘uwsgi_python_post_uwsgi_fork’:
plugins/python/python_plugin.c:1339:25: error: too few arguments to function ‘_PyImport_ReleaseLock’
1339 | _PyImport_ReleaseLock();
| ^~~~~~~~~~~~~~~~~~~~~
In file included from /usr/local/include/python3.12/import.h:91,
from /usr/local/include/python3.12/Python.h:99,
from plugins/python/uwsgi_python.h:4,
from plugins/python/python_plugin.c:1:
/usr/local/include/python3.12/cpython/import.h:14:17: note: declared here
14 | PyAPI_FUNC(int) _PyImport_ReleaseLock(PyInterpreterState *interp);
| ^~~~~~~~~~~~~~~~~~~~~
plugins/python/python_plugin.c: In function ‘uwsgi_python_suspend’:
plugins/python/python_plugin.c:1596:78: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘recursion_remaining’; did you mean ‘c_recursion_remaining’?
1596 | up.current_recursion_remaining[wsgi_req->async_id] = tstate->recursion_remaining;
| ^~~~~~~~~~~~~~~~~~~
| c_recursion_remaining
plugins/python/python_plugin.c:1605:63: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘recursion_remaining’; did you mean ‘c_recursion_remaining’?
1605 | up.current_main_recursion_remaining = tstate->recursion_remaining;
| ^~~~~~~~~~~~~~~~~~~
| c_recursion_remaining
plugins/python/python_plugin.c: In function ‘uwsgi_python_resume’:
plugins/python/python_plugin.c:1839:25: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘recursion_remaining’; did you mean ‘c_recursion_remaining’?
1839 | tstate->recursion_remaining = up.current_recursion_remaining[wsgi_req->async_id];
| ^~~~~~~~~~~~~~~~~~~
| c_recursion_remaining
plugins/python/python_plugin.c:1848:25: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘recursion_remaining’; did you mean ‘c_recursion_remaining’?
1848 | tstate->recursion_remaining = up.current_main_recursion_remaining;
| ^~~~~~~~~~~~~~~~~~~
| c_recursion_remaining
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for uwsgi
Failed to build uwsgi
ERROR: Could not build wheels for uwsgi, which is required to install pyproject.toml-based projects

@roehnan
Copy link
Author

roehnan commented Oct 19, 2023

It looks like the Python API actually changed:
plugins/python/python_plugin.c:1848:25: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘recursion_remaining’; did you mean ‘c_recursion_remaining’?

@rr-tomas-henriquez
Copy link

It's there an ETA on when a fix would be released? Just curious so I can plan ahead on the python upgrade :)

sixcare added a commit to Turplanlegger/turplanlegger-api that referenced this issue Oct 31, 2023
sixcare added a commit to Turplanlegger/turplanlegger-api that referenced this issue Oct 31, 2023
* Upgrade Python from 3.11 to 3.12

* Revert unsupported target version

* Test python3.12

* Change target-version

* Replace pre-commit double-quote-string-fixer hook with ruff rule

* Lint

* Replace uwsgi with gunicorn because of unbit/uwsgi#2566
@xrmx
Copy link
Collaborator

xrmx commented Nov 4, 2023

This has been fixed in 2.0.23

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

No branches or pull requests

6 participants