Bug 2049093

Summary: python-apsw fails to build with Python 3.11: error: PyThreadState {aka struct _ts} has no member named frame
Product: [Fedora] Fedora Reporter: Tomáš Hrnčiar <thrnciar>
Component: python-apswAssignee: Denis Fateyev <denis>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: denis, i, maci, mhroncok, thrnciar
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 3.38.5.r1-1.fc37 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-06-07 22:11:57 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2016048    

Description Tomáš Hrnčiar 2022-02-01 14:33:33 UTC
python-apsw fails to build with Python 3.11.0a4.

src/traceback.c: In function ‘AddTraceBackHere’:
src/traceback.c:86:7: warning: passing argument 14 of ‘PyCode_New’ makes pointer from integer without a cast [-Wint-conversion]
   86 |       lineno,      /*int firstlineno,*/
      |       ^~~~~~
      |       |
      |       int
In file included from /usr/include/python3.11/code.h:13,
                 from /usr/include/python3.11/Python.h:69,
                 from src/apsw.c:75:
/usr/include/python3.11/cpython/code.h:156:33: note: expected ‘PyObject *’ {aka ‘struct _object *’} but argument is of type ‘int’
  156 |         PyObject *, PyObject *, PyObject *, int, PyObject *,
      |                                 ^~~~~~~~~~
src/traceback.c:87:7: warning: passing argument 15 of ‘PyCode_New’ makes integer from pointer without a cast [-Wint-conversion]
   87 |       empty_code   /*PyObject *lnotab*/
      |       ^~~~~~~~~~
      |       |
      |       PyObject * {aka struct _object *}
/usr/include/python3.11/cpython/code.h:156:45: note: expected ‘int’ but argument is of type ‘PyObject *’ {aka ‘struct _object *’}
  156 |         PyObject *, PyObject *, PyObject *, int, PyObject *,
      |                                             ^~~
src/traceback.c:70:10: error: too few arguments to function ‘PyCode_New’
   70 |   code = PyCode_New(
      |          ^~~~~~~~~~
/usr/include/python3.11/cpython/code.h:153:28: note: declared here
  153 | PyAPI_FUNC(PyCodeObject *) PyCode_New(
      |                            ^~~~~~~~~~
In file included from src/apsw.c:137:
src/pyutil.c: In function ‘Call_PythonMethod’:
src/pyutil.c:177:3: warning: ‘PyEval_CallObjectWithKeywords’ is deprecated [-Wdeprecated-declarations]
  177 |   res = PyEval_CallObject(method, args);
      |   ^~~
In file included from /usr/include/python3.11/Python.h:93:
/usr/include/python3.11/ceval.h:27:43: note: declared here
   27 | Py_DEPRECATED(3.9) PyAPI_FUNC(PyObject *) PyEval_CallObjectWithKeywords(
      |                                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/apsw.c:143:
src/util.c: In function ‘apsw_write_unraiseable’:
src/util.c:123:32: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘frame’; did you mean ‘cframe’?
  123 |   frame = PyThreadState_GET()->frame;
      |                                ^~~~~
      |                                cframe
src/util.c:141:7: warning: ‘PyEval_CallFunction’ is deprecated [-Wdeprecated-declarations]
  141 |       result = PyEval_CallFunction(excepthook, "(OOO)", err_type ? err_type : Py_None, err_value ? err_value : Py_None, err_traceback ? err_traceback : Py_None);
      |       ^~~~~~
/usr/include/python3.11/ceval.h:36:43: note: declared here
   36 | Py_DEPRECATED(3.9) PyAPI_FUNC(PyObject *) PyEval_CallFunction(
      |                                           ^~~~~~~~~~~~~~~~~~~
src/util.c:153:5: warning: ‘PyEval_CallFunction’ is deprecated [-Wdeprecated-declarations]
  153 |     result = PyEval_CallFunction(excepthook, "(OOO)", err_type ? err_type : Py_None, err_value ? err_value : Py_None, err_traceback ? err_traceback : Py_None);
      |     ^~~~~~
/usr/include/python3.11/ceval.h:36:43: note: declared here
   36 | Py_DEPRECATED(3.9) PyAPI_FUNC(PyObject *) PyEval_CallFunction(
      |                                           ^~~~~~~~~~~~~~~~~~~
In file included from src/apsw.c:146:
src/apswbuffer.c: In function ‘APSWBuffer_hash’:
src/apswbuffer.c:132:12: warning: comparison of integer expressions of different signedness: ‘Py_uhash_t’ {aka ‘long unsigned int’} and ‘int’ [-Wsign-compare]
  132 |   if (hash == -1)
      |            ^~
In file included from src/apsw.c:149:
src/statementcache.c: In function ‘statementcache_prepare’:
src/statementcache.c:234:7: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
  234 |       if( sc->cache && sc->numentries && ((PyUnicode_CheckExact(query) && PyUnicode_GET_DATA_SIZE(query) < SC_MAXSIZE)
      |       ^~
In file included from /usr/include/python3.11/unicodeobject.h:1042,
                 from /usr/include/python3.11/Python.h:49:
/usr/include/python3.11/cpython/unicodeobject.h:437:26: note: declared here
  437 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
      |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
src/statementcache.c:234:7: warning: ‘PyUnicode_AsUnicode’ is deprecated [-Wdeprecated-declarations]
  234 |       if( sc->cache && sc->numentries && ((PyUnicode_CheckExact(query) && PyUnicode_GET_DATA_SIZE(query) < SC_MAXSIZE)
      |       ^~
/usr/include/python3.11/cpython/unicodeobject.h:571:45: note: declared here
  571 | Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode(
      |                                             ^~~~~~~~~~~~~~~~~~~
src/statementcache.c:234:7: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
  234 |       if( sc->cache && sc->numentries && ((PyUnicode_CheckExact(query) && PyUnicode_GET_DATA_SIZE(query) < SC_MAXSIZE)
      |       ^~
/usr/include/python3.11/cpython/unicodeobject.h:437:26: note: declared here
  437 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
      |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/apsw.c:152:
src/connection.c: In function ‘Connection_init’:
src/connection.c:433:5: warning: ‘PyEval_CallObjectWithKeywords’ is deprecated [-Wdeprecated-declarations]
  433 |     hookresult = PyEval_CallObject(hook, hookargs);
      |     ^~~~~~~~~~
/usr/include/python3.11/ceval.h:27:43: note: declared here
   27 | Py_DEPRECATED(3.9) PyAPI_FUNC(PyObject *) PyEval_CallObjectWithKeywords(
      |                                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/connection.c: In function ‘rollbackhookcb’:
src/connection.c:995:3: warning: ‘PyEval_CallObjectWithKeywords’ is deprecated [-Wdeprecated-declarations]
  995 |   retval = PyEval_CallObject(self->rollbackhook, NULL);
      |   ^~~~~~
/usr/include/python3.11/ceval.h:27:43: note: declared here
   27 | Py_DEPRECATED(3.9) PyAPI_FUNC(PyObject *) PyEval_CallObjectWithKeywords(
      |                                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/connection.c: In function ‘commithookcb’:
src/connection.c:1133:3: warning: ‘PyEval_CallObjectWithKeywords’ is deprecated [-Wdeprecated-declarations]
 1133 |   retval = PyEval_CallObject(self->commithook, NULL);
      |   ^~~~~~
/usr/include/python3.11/ceval.h:27:43: note: declared here
   27 | Py_DEPRECATED(3.9) PyAPI_FUNC(PyObject *) PyEval_CallObjectWithKeywords(
      |                                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/connection.c: In function ‘walhookcb’:
src/connection.c:1211:3: warning: ‘PyEval_CallFunction’ is deprecated [-Wdeprecated-declarations]
 1211 |   retval = PyEval_CallFunction(self->walhook, "(OO&i)", self, convertutf8string, dbname, npages);
      |   ^~~~~~
/usr/include/python3.11/ceval.h:36:43: note: declared here
   36 | Py_DEPRECATED(3.9) PyAPI_FUNC(PyObject *) PyEval_CallFunction(
      |                                           ^~~~~~~~~~~~~~~~~~~
src/connection.c: In function ‘progresshandlercb’:
src/connection.c:1299:3: warning: ‘PyEval_CallObjectWithKeywords’ is deprecated [-Wdeprecated-declarations]
 1299 |   retval = PyEval_CallObject(self->progresshandler, NULL);
      |   ^~~~~~
/usr/include/python3.11/ceval.h:27:43: note: declared here
   27 | Py_DEPRECATED(3.9) PyAPI_FUNC(PyObject *) PyEval_CallObjectWithKeywords(
      |                                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/connection.c: In function ‘collationneeded_cb’:
src/connection.c:1507:5: warning: ‘PyEval_CallFunction’ is deprecated [-Wdeprecated-declarations]
 1507 |     res = PyEval_CallFunction(self->collationneeded, "(OO)", self, pyname);
      |     ^~~
/usr/include/python3.11/ceval.h:36:43: note: declared here
   36 | Py_DEPRECATED(3.9) PyAPI_FUNC(PyObject *) PyEval_CallFunction(
      |                                           ^~~~~~~~~~~~~~~~~~~
src/connection.c: In function ‘Connection_serialize’:
src/connection.c:1728:28: warning: pointer targets in passing argument 1 of ‘PyBytes_FromStringAndSize’ differ in signedness [-Wpointer-sign]
 1728 |     pyres = converttobytes(serialization, size);
      |                            ^~~~~~~~~~~~~
      |                            |
      |                            unsigned char *
In file included from /usr/include/python3.11/Python.h:48:
/usr/include/python3.11/bytesobject.h:34:50: note: expected ‘const char *’ but argument is of type ‘unsigned char *’
   34 | PyAPI_FUNC(PyObject *) PyBytes_FromStringAndSize(const char *, Py_ssize_t);
      |                                                  ^~~~~~~~~~~~
src/connection.c:1710:7: warning: unused variable ‘res’ [-Wunused-variable]
 1710 |   int res = SQLITE_OK;
      |       ^~~
src/connection.c: In function ‘Connection_deserialize’:
src/connection.c:1795:67: warning: pointer targets in passing argument 3 of ‘sqlite3_deserialize’ differ in signedness [-Wpointer-sign]
 1795 |     PYSQLITE_CON_CALL(res = sqlite3_deserialize(self->db, dbname, newcontents, buflen, buflen, SQLITE_DESERIALIZE_RESIZEABLE | SQLITE_DESERIALIZE_FREEONCLOSE));
      |                                                                   ^~~~~~~~~~~
      |                                                                   |
      |                                                                   char *
src/util.c:62:7: note: in definition of macro ‘INUSE_CALL’
   62 |       x;                      \
      |       ^
src/util.c:72:41: note: in expansion of macro ‘_PYSQLITE_CALL_E’
   72 | #define PYSQLITE_CON_CALL(y) INUSE_CALL(_PYSQLITE_CALL_E(self->db, y))
      |                                         ^~~~~~~~~~~~~~~~
src/connection.c:1795:5: note: in expansion of macro ‘PYSQLITE_CON_CALL’
 1795 |     PYSQLITE_CON_CALL(res = sqlite3_deserialize(self->db, dbname, newcontents, buflen, buflen, SQLITE_DESERIALIZE_RESIZEABLE | SQLITE_DESERIALIZE_FREEONCLOSE));
      |     ^~~~~~~~~~~~~~~~~
In file included from src/apsw.c:59:
/usr/include/sqlite3.h:9891:18: note: expected ‘unsigned char *’ but argument is of type ‘char *’
 9891 |   unsigned char *pData,   /* The serialized database content */
      |   ~~~~~~~~~~~~~~~^~~~~
src/connection.c: In function ‘cbdispatch_func’:
src/connection.c:2169:3: warning: ‘PyEval_CallObjectWithKeywords’ is deprecated [-Wdeprecated-declarations]
 2169 |   retval = PyEval_CallObject(cbinfo->scalarfunc, pyargs);
      |   ^~~~~~
/usr/include/python3.11/ceval.h:27:43: note: declared here
   27 | Py_DEPRECATED(3.9) PyAPI_FUNC(PyObject *) PyEval_CallObjectWithKeywords(
      |                                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/connection.c: In function ‘getaggregatefunctioncontext’:
src/connection.c:2210:3: warning: ‘PyEval_CallObjectWithKeywords’ is deprecated [-Wdeprecated-declarations]
 2210 |   retval = PyEval_CallObject(cbinfo->aggregatefactory, NULL);
      |   ^~~~~~
/usr/include/python3.11/ceval.h:27:43: note: declared here
   27 | Py_DEPRECATED(3.9) PyAPI_FUNC(PyObject *) PyEval_CallObjectWithKeywords(
      |                                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/connection.c: In function ‘cbdispatch_step’:
src/connection.c:2289:3: warning: ‘PyEval_CallObjectWithKeywords’ is deprecated [-Wdeprecated-declarations]
 2289 |   retval = PyEval_CallObject(aggfc->stepfunc, pyargs);
      |   ^~~~~~
/usr/include/python3.11/ceval.h:27:43: note: declared here
   27 | Py_DEPRECATED(3.9) PyAPI_FUNC(PyObject *) PyEval_CallObjectWithKeywords(
      |                                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/apsw.c:167:
src/vfs.c: In function ‘apswvfs_excepthook’:
src/vfs.c:281:3: warning: ‘PyEval_CallObjectWithKeywords’ is deprecated [-Wdeprecated-declarations]
  281 |   return PyEval_CallObject(excepthook, args);
      |   ^~~~~~
/usr/include/python3.11/ceval.h:27:43: note: declared here
   27 | Py_DEPRECATED(3.9) PyAPI_FUNC(PyObject *) PyEval_CallObjectWithKeywords(
      |                                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/apsw.c: In function ‘apsw_logger’:
src/apsw.c:319:5: warning: ‘PyEval_CallFunction’ is deprecated [-Wdeprecated-declarations]
  319 |     res = PyEval_CallFunction(arg, "iO", errcode, msgaspystring);
      |     ^~~
/usr/include/python3.11/ceval.h:36:43: note: declared here
   36 | Py_DEPRECATED(3.9) PyAPI_FUNC(PyObject *) PyEval_CallFunction(
      |                                           ^~~~~~~~~~~~~~~~~~~
src/apsw.c: In function ‘formatsqlvalue’:
src/apsw.c:1081:5: warning: ‘PyUnicode_FromUnicode’ is deprecated [-Wdeprecated-declarations]
 1081 |     unires = PyUnicode_FromUnicode(NULL, PyUnicode_GET_SIZE(value) + 2);
      |     ^~~~~~
/usr/include/python3.11/cpython/unicodeobject.h:542:42: note: declared here
  542 | Py_DEPRECATED(3.3) PyAPI_FUNC(PyObject*) PyUnicode_FromUnicode(
      |                                          ^~~~~~~~~~~~~~~~~~~~~
src/apsw.c:1081:5: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
 1081 |     unires = PyUnicode_FromUnicode(NULL, PyUnicode_GET_SIZE(value) + 2);
      |     ^~~~~~
/usr/include/python3.11/cpython/unicodeobject.h:437:26: note: declared here
  437 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
      |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
src/apsw.c:1081:5: warning: ‘PyUnicode_AsUnicode’ is deprecated [-Wdeprecated-declarations]
 1081 |     unires = PyUnicode_FromUnicode(NULL, PyUnicode_GET_SIZE(value) + 2);
      |     ^~~~~~
/usr/include/python3.11/cpython/unicodeobject.h:571:45: note: declared here
  571 | Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode(
      |                                             ^~~~~~~~~~~~~~~~~~~
src/apsw.c:1081:5: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
 1081 |     unires = PyUnicode_FromUnicode(NULL, PyUnicode_GET_SIZE(value) + 2);
      |     ^~~~~~
/usr/include/python3.11/cpython/unicodeobject.h:437:26: note: declared here
  437 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
      |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
src/apsw.c:1084:5: warning: ‘PyUnicode_AsUnicode’ is deprecated [-Wdeprecated-declarations]
 1084 |     res = PyUnicode_AS_UNICODE(unires);
      |     ^~~
/usr/include/python3.11/cpython/unicodeobject.h:571:45: note: declared here
  571 | Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode(
      |                                             ^~~~~~~~~~~~~~~~~~~
src/apsw.c:1086:5: warning: ‘PyUnicode_AsUnicode’ is deprecated [-Wdeprecated-declarations]
 1086 |     memcpy(res, PyUnicode_AS_UNICODE(value), PyUnicode_GET_DATA_SIZE(value));
      |     ^~~~~~
/usr/include/python3.11/cpython/unicodeobject.h:571:45: note: declared here
  571 | Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode(
      |                                             ^~~~~~~~~~~~~~~~~~~
src/apsw.c:1086:5: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
 1086 |     memcpy(res, PyUnicode_AS_UNICODE(value), PyUnicode_GET_DATA_SIZE(value));
      |     ^~~~~~
/usr/include/python3.11/cpython/unicodeobject.h:437:26: note: declared here
  437 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
      |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
src/apsw.c:1086:5: warning: ‘PyUnicode_AsUnicode’ is deprecated [-Wdeprecated-declarations]
 1086 |     memcpy(res, PyUnicode_AS_UNICODE(value), PyUnicode_GET_DATA_SIZE(value));
      |     ^~~~~~
/usr/include/python3.11/cpython/unicodeobject.h:571:45: note: declared here
  571 | Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode(
      |                                             ^~~~~~~~~~~~~~~~~~~
src/apsw.c:1086:5: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
 1086 |     memcpy(res, PyUnicode_AS_UNICODE(value), PyUnicode_GET_DATA_SIZE(value));
      |     ^~~~~~
/usr/include/python3.11/cpython/unicodeobject.h:437:26: note: declared here
  437 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
      |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
src/apsw.c:1087:5: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
 1087 |     res += PyUnicode_GET_SIZE(value);
      |     ^~~
/usr/include/python3.11/cpython/unicodeobject.h:437:26: note: declared here
  437 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
      |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
src/apsw.c:1087:5: warning: ‘PyUnicode_AsUnicode’ is deprecated [-Wdeprecated-declarations]
 1087 |     res += PyUnicode_GET_SIZE(value);
      |     ^~~
/usr/include/python3.11/cpython/unicodeobject.h:571:45: note: declared here
  571 | Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode(
      |                                             ^~~~~~~~~~~~~~~~~~~
src/apsw.c:1087:5: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
 1087 |     res += PyUnicode_GET_SIZE(value);
      |     ^~~
/usr/include/python3.11/cpython/unicodeobject.h:437:26: note: declared here
  437 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
      |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
src/apsw.c:1090:5: warning: ‘PyUnicode_AsUnicode’ is deprecated [-Wdeprecated-declarations]
 1090 |     res = PyUnicode_AS_UNICODE(unires) + 1;
      |     ^~~
/usr/include/python3.11/cpython/unicodeobject.h:571:45: note: declared here
  571 | Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode(
      |                                             ^~~~~~~~~~~~~~~~~~~
src/apsw.c:1091:5: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
 1091 |     left = PyUnicode_GET_SIZE(value);
      |     ^~~~
/usr/include/python3.11/cpython/unicodeobject.h:437:26: note: declared here
  437 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
      |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
src/apsw.c:1091:5: warning: ‘PyUnicode_AsUnicode’ is deprecated [-Wdeprecated-declarations]
 1091 |     left = PyUnicode_GET_SIZE(value);
      |     ^~~~
/usr/include/python3.11/cpython/unicodeobject.h:571:45: note: declared here
  571 | Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode(
      |                                             ^~~~~~~~~~~~~~~~~~~
src/apsw.c:1091:5: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
 1091 |     left = PyUnicode_GET_SIZE(value);
      |     ^~~~
/usr/include/python3.11/cpython/unicodeobject.h:437:26: note: declared here
  437 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
      |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
src/apsw.c:1099:9: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
 1099 |         APSW_FAULT_INJECT(FormatSQLValueResizeFails,
      |         ^~~~~~~~~~~~~~~~~
/usr/include/python3.11/cpython/unicodeobject.h:437:26: note: declared here
  437 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
      |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
src/apsw.c:1099:9: warning: ‘PyUnicode_AsUnicode’ is deprecated [-Wdeprecated-declarations]
 1099 |         APSW_FAULT_INJECT(FormatSQLValueResizeFails,
      |         ^~~~~~~~~~~~~~~~~
/usr/include/python3.11/cpython/unicodeobject.h:571:45: note: declared here
  571 | Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode(
      |                                             ^~~~~~~~~~~~~~~~~~~
src/apsw.c:1099:9: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
 1099 |         APSW_FAULT_INJECT(FormatSQLValueResizeFails,
      |         ^~~~~~~~~~~~~~~~~
/usr/include/python3.11/cpython/unicodeobject.h:437:26: note: declared here
  437 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
      |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
src/apsw.c:1107:9: warning: ‘PyUnicode_AsUnicode’ is deprecated [-Wdeprecated-declarations]
 1107 |         res = PyUnicode_AS_UNICODE(unires) + (PyUnicode_GET_SIZE(unires) - left - moveamount - 1);
      |         ^~~
/usr/include/python3.11/cpython/unicodeobject.h:571:45: note: declared here
  571 | Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode(
      |                                             ^~~~~~~~~~~~~~~~~~~
src/apsw.c:1107:9: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
 1107 |         res = PyUnicode_AS_UNICODE(unires) + (PyUnicode_GET_SIZE(unires) - left - moveamount - 1);
      |         ^~~
/usr/include/python3.11/cpython/unicodeobject.h:437:26: note: declared here
  437 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
      |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
src/apsw.c:1107:9: warning: ‘PyUnicode_AsUnicode’ is deprecated [-Wdeprecated-declarations]
 1107 |         res = PyUnicode_AS_UNICODE(unires) + (PyUnicode_GET_SIZE(unires) - left - moveamount - 1);
      |         ^~~
/usr/include/python3.11/cpython/unicodeobject.h:571:45: note: declared here
  571 | Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode(
      |                                             ^~~~~~~~~~~~~~~~~~~
src/apsw.c:1107:9: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
 1107 |         res = PyUnicode_AS_UNICODE(unires) + (PyUnicode_GET_SIZE(unires) - left - moveamount - 1);
      |         ^~~
/usr/include/python3.11/cpython/unicodeobject.h:437:26: note: declared here
  437 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
      |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
src/apsw.c:1155:5: warning: ‘PyUnicode_FromUnicode’ is deprecated [-Wdeprecated-declarations]
 1155 |     APSW_FAULT_INJECT(FormatSQLValuePyUnicodeFromUnicodeFails,
      |     ^~~~~~~~~~~~~~~~~
/usr/include/python3.11/cpython/unicodeobject.h:542:42: note: declared here
  542 | Py_DEPRECATED(3.3) PyAPI_FUNC(PyObject*) PyUnicode_FromUnicode(
      |                                          ^~~~~~~~~~~~~~~~~~~~~
src/apsw.c:1164:5: warning: ‘PyUnicode_AsUnicode’ is deprecated [-Wdeprecated-declarations]
 1164 |     res = PyUnicode_AS_UNICODE(unires);
      |     ^~~
/usr/include/python3.11/cpython/unicodeobject.h:571:45: note: declared here
  571 | Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode(
      |                                             ^~~~~~~~~~~~~~~~~~~
src/apsw.c: In function ‘PyInit_apsw’:
src/apsw.c:1312:3: warning: ‘PyEval_InitThreads’ is deprecated [-Wdeprecated-declarations]
 1312 |   PyEval_InitThreads();
      |   ^~~~~~~~~~~~~~~~~~
/usr/include/python3.11/ceval.h:132:37: note: declared here
  132 | Py_DEPRECATED(3.9) PyAPI_FUNC(void) PyEval_InitThreads(void);
      |                                     ^~~~~~~~~~~~~~~~~~

Changes of the PyThreadState structure members:
    frame: removed, use PyThreadState_GetFrame() (function added to Python 3.9 by bpo-40429). Warning: the function returns a strong reference, need to call Py_XDECREF().

https://bugs.python.org/issue40429
https://docs.python.org/3.11/whatsnew/3.11.html

For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/@python/python3.11/fedora-rawhide-x86_64/03270011-python-apsw/

For all our attempts to build python-apsw with Python 3.11, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.11/package/python-apsw/

Testing and mass rebuild of packages is happening in copr. You can follow these instructions to test locally in mock if your package builds with Python 3.11:
https://copr.fedorainfracloud.org/coprs/g/python/python3.11/

Let us know here if you have any questions.

Python 3.11 is planned to be included in Fedora 37. To make that update smoother, we're building Fedora packages with all pre-releases of Python 3.11.
A build failure prevents us from testing all dependent packages (transitive [Build]Requires), so if this package is required a lot, it's important for us to get it fixed soon.
We'd appreciate help from the people who know this package best, but if you don't want to work on this now, let us know so we can try to work around it on our side.

Comment 1 Ben Cotton 2022-02-08 20:22:06 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 36 development cycle.
Changing version to 36.

Comment 2 Denis Fateyev 2022-06-07 22:11:57 UTC
Updated in rawhide: https://bodhi.fedoraproject.org/updates/FEDORA-2022-3ee23033a9