aio-libs / aioodbc

aioodbc - is a library for accessing a ODBC databases from the asyncio
Apache License 2.0
310 stars 60 forks source link

Test Python 3.12 in CI #450

Closed tonybaloney closed 1 year ago

tonybaloney commented 1 year ago

What do these changes do?

Checklist

Related #449

tonybaloney commented 1 year ago

Fails because of pyodbc support

  × Building wheel for pyodbc (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [43 lines of output]
      WARNING: '' not a valid package name; please use only .-separated package names in setup.py
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib.macosx-10.9-universal2-cpython-312
      copying src/pyodbc.pyi -> build/lib.macosx-10.9-universal2-cpython-312
      running build_ext
      building 'pyodbc' extension
      creating build/temp.macosx-10.9-universal2-cpython-312
      creating build/temp.macosx-10.9-universal2-cpython-312/src
      clang -fno-strict-overflow -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -O3 -Wall -arch arm64 -arch x86_64 -g -DPYODBC_VERSION=4.0.39 -I/Users/anthonyshaw/projects/aioodbc/.venv/include -I/Library/Frameworks/Python.framework/Versions/3.12/include/python3.12 -c src/buffer.cpp -o build/temp.macosx-10.9-universal2-cpython-312/src/buffer.o -Wno-write-strings -Wno-deprecated-declarations -DHAVE_UNISTD_H -DHAVE_PWD_H -DHAVE_SYS_TYPES_H -DHAVE_LONG_LONG -DSIZEOF_LONG_INT=8 -I/usr/local/Cellar/unixodbc/2.3.9_1/include
      In file included from src/buffer.cpp:12:
      In file included from src/pyodbc.h:172:
      src/pyodbccompat.h:75:12: error: use of undeclared identifier 'PyUnicode_FromUnicode'
          return PyUnicode_FromUnicode(0, length);
                 ^
      src/pyodbccompat.h:86:12: error: use of undeclared identifier 'PyUnicode_AS_UNICODE'
          return PyUnicode_AS_UNICODE(o);
                 ^
      src/pyodbccompat.h:126:40: error: use of undeclared identifier 'PyUnicode_GET_SIZE'; did you mean 'PyDict_GET_SIZE'?
          return (o && PyUnicode_Check(o)) ? PyUnicode_GET_SIZE(o) : 0;
                                             ^~~~~~~~~~~~~~~~~~
                                             PyDict_GET_SIZE
      /Library/Frameworks/Python.framework/Versions/3.12/include/python3.12/cpython/dictobject.h:53:26: note: 'PyDict_GET_SIZE' declared here
      static inline Py_ssize_t PyDict_GET_SIZE(PyObject *op) {
                               ^
      In file included from src/buffer.cpp:12:
      In file included from src/pyodbc.h:172:
      src/pyodbccompat.h:146:26: error: use of undeclared identifier 'PyUnicode_GET_SIZE'; did you mean 'PyDict_GET_SIZE'?
              Py_ssize_t cch = PyUnicode_GET_SIZE(o);
                               ^~~~~~~~~~~~~~~~~~
                               PyDict_GET_SIZE
      /Library/Frameworks/Python.framework/Versions/3.12/include/python3.12/cpython/dictobject.h:53:26: note: 'PyDict_GET_SIZE' declared here
      static inline Py_ssize_t PyDict_GET_SIZE(PyObject *op) {
                               ^
      In file included from src/buffer.cpp:12:
      In file included from src/pyodbc.h:172:
      src/pyodbccompat.h:147:24: error: use of undeclared identifier 'PyUnicode_AS_UNICODE'
              memcpy(buffer, PyUnicode_AS_UNICODE(o), cch * sizeof(Py_UNICODE));
                             ^
      5 errors generated.
      error: command '/usr/bin/clang' 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 pyodbc
Successfully built aioodbc
Failed to build pyodbc
ERROR: Could not build wheels for pyodbc, which is required to install pyproject.toml-based projects
tonybaloney commented 1 year ago

related https://github.com/mkleehammer/pyodbc/pull/1275

tonybaloney commented 1 year ago

The pyodbc compilation error is fixed in 5.0.0 beta releases of pyodbc, included the upgrade to this PR but it isn't GA yet.

tonybaloney commented 1 year ago

Will be blocked by https://github.com/MagicStack/uvloop/issues/567 as well.

aiodocker is depending on an old version of aiohttp so once that is updated, this dependency tree should work.

codecov[bot] commented 1 year ago

Codecov Report

Merging #450 (90009d1) into master (53fe8a6) will not change coverage. The diff coverage is n/a.

@@           Coverage Diff           @@
##           master     #450   +/-   ##
=======================================
  Coverage   87.01%   87.01%           
=======================================
  Files           6        6           
  Lines         493      493           
  Branches       73       73           
=======================================
  Hits          429      429           
  Misses         48       48           
  Partials       16       16           

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

jettify commented 1 year ago

I want to drop aiodocker dependency it causes more issues then expected.

jettify commented 1 year ago

Merged your changes with other minor fixes here https://github.com/aio-libs/aioodbc/pull/456

jettify commented 1 year ago

thanks!