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

Test Python 3.12 in CI #450

Closed
wants to merge 4 commits into from
Closed

Conversation

tonybaloney
Copy link
Contributor

@tonybaloney tonybaloney commented Oct 5, 2023

What do these changes do?

  • Tests Python 3.12 support in CI
  • Updates package for PyPi labels to indicate support

Checklist

  • I think the code is well written
  • Unit tests for the changes exist
  • Documentation reflects the changes
  • Add a new news fragment into the CHANGES folder
    • name it <issue_id>.<type> (e.g. 588.bugfix)
    • if you don't have an issue_id change it to the pr id after creating the PR
    • ensure type is one of the following:
      • .feature: Signifying a new feature.
      • .bugfix: Signifying a bug fix.
      • .doc: Signifying a documentation improvement.
      • .removal: Signifying a deprecation or removal of public API.
      • .misc: A ticket has been closed, but it is not of interest to users.
    • Make sure to use full sentences with correct case and punctuation, for example: Fix issue with non-ascii contents in doctest text files.

Related #449

@tonybaloney
Copy link
Contributor Author

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
Copy link
Contributor Author

related mkleehammer/pyodbc#1275

@tonybaloney
Copy link
Contributor Author

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
Copy link
Contributor Author

Will be blocked by MagicStack/uvloop#567 as well.

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

@codecov
Copy link

codecov bot commented Oct 28, 2023

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           

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

@jettify
Copy link
Member

jettify commented Oct 28, 2023

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

@jettify
Copy link
Member

jettify commented Oct 28, 2023

Merged your changes with other minor fixes here #456

@jettify jettify closed this Oct 28, 2023
@jettify
Copy link
Member

jettify commented Oct 28, 2023

thanks!

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

Successfully merging this pull request may close these issues.

2 participants