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

Add python 3.10 support #145

Closed
rakshith91 opened this issue Nov 2, 2021 · 1 comment · Fixed by #150
Closed

Add python 3.10 support #145

rakshith91 opened this issue Nov 2, 2021 · 1 comment · Fixed by #150

Comments

@rakshith91
Copy link

Expected Behavior

Python 3.10 must be supported and should be here in the classifiers https://github.com/cloudevents/sdk-python/blob/master/setup.py#L41

Actual Behavior

It's not there :)

Steps to Reproduce the Problem

smoke test using 3.10

Specifications

  • Platform: -
  • Python Version: 3.10

If it's okay - I can take a stab at this

@grant
Copy link
Member

grant commented Dec 10, 2021

It looks like out of the box there are issues with testing python 3.10.

I tried a quick PR above.

I'm not sure if the errors. Maybe @di can comment on this ST:

Run python -m tox -e py
py create: /home/runner/work/sdk-python/sdk-python/.tox/py
py installdeps: -r/home/runner/work/sdk-python/sdk-python/requirements/test.txt, -r/home/runner/work/sdk-python/sdk-python/requirements/docs.txt, -r/home/runner/work/sdk-python/sdk-python/requirements/publish.txt
ERROR: invocation failed (exit code 1), logfile: /home/runner/work/sdk-python/sdk-python/.tox/py/log/py-1.log
================================== log start ===================================
Collecting flake8
  Downloading flake8-4.0.1-py2.py3-none-any.whl (64 kB)
Collecting pep8-naming==0.5.0
  Downloading pep8_naming-0.5.0-py2.py3-none-any.whl (7.1 kB)
Collecting flake8-import-order
  Downloading flake8_import_order-0.18.1-py2.py3-none-any.whl (15 kB)
Collecting flake8-print
  Downloading flake8_print-4.0.0-py3-none-any.whl (4.9 kB)
Collecting flake8-strict
  Downloading flake8_strict-0.2.1-py2.py3-none-any.whl (5.8 kB)
Collecting pytest==4.0.0
  Downloading pytest-4.0.0-py2.py3-none-any.whl (217 kB)
Collecting pytest-cov==2.4.0
  Downloading pytest_cov-2.4.0-py2.py3-none-any.whl (20 kB)
Collecting sanic==20.12.3
  Downloading sanic-20.12.3-py3-none-any.whl (80 kB)
Collecting aiohttp
  Downloading aiohttp-3.8.1-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (1.2 MB)
Collecting Pillow
  Downloading Pillow-8.4.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.1 MB)
Collecting requests
  Downloading requests-2.26.0-py2.py3-none-any.whl (62 kB)
Collecting flask
  Downloading Flask-2.0.2-py3-none-any.whl (95 kB)
Collecting Sphinx==1.8.2
  Downloading Sphinx-1.8.2-py2.py3-none-any.whl (3.1 MB)
Collecting GitPython==3.1.7
  Downloading GitPython-3.1.7-py3-none-any.whl (158 kB)
Collecting cloudevents
  Downloading cloudevents-1.2.0-py3-none-any.whl (26 kB)
Collecting flake8-polyfill<2,>=1.0.2
  Downloading flake8_polyfill-1.0.2-py2.py3-none-any.whl (7.3 kB)
Collecting attrs>=17.4.0
  Downloading attrs-21.2.0-py2.py3-none-any.whl (53 kB)
Requirement already satisfied: setuptools in ./.tox/py/lib/python3.10/site-packages (from pytest==4.0.0->-r /home/runner/work/sdk-python/sdk-python/requirements/test.txt (line 6)) (58.3.0)
Collecting atomicwrites>=1.0
  Downloading atomicwrites-1.4.0-py2.py3-none-any.whl (6.8 kB)
Collecting more-itertools>=4.0.0
  Downloading more_itertools-8.12.0-py3-none-any.whl (54 kB)
Collecting pluggy>=0.7
  Using cached pluggy-1.0.0-py2.py3-none-any.whl (13 kB)
    163249 |                         (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
           |                         ^
    In file included from /opt/hostedtoolcache/Python/3.10.0/x64/include/python3.10/unicodeobject.h:1046,
                     from /opt/hostedtoolcache/Python/3.10.0/x64/include/python3.10/Python.h:96,
                     from uvloop/loop.c:20:
    /opt/hostedtoolcache/Python/3.10.0/x64/include/python3.10/cpython/unicodeobject.h:446:26: note: declared here
      446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
          |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
    uvloop/loop.c:163249:25: warning: ‘PyUnicode_AsUnicode’ is deprecated [-Wdeprecated-declarations]
    163249 |                         (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
           |                         ^
    In file included from /opt/hostedtoolcache/Python/3.10.0/x64/include/python3.10/unicodeobject.h:1046,
                     from /opt/hostedtoolcache/Python/3.10.0/x64/include/python3.10/Python.h:96,
                     from uvloop/loop.c:20:
    /opt/hostedtoolcache/Python/3.10.0/x64/include/python3.10/cpython/unicodeobject.h:580:45: note: declared here
      580 | Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode(
          |                                             ^~~~~~~~~~~~~~~~~~~
    uvloop/loop.c:163249:25: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
    163249 |                         (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
           |                         ^
    In file included from /opt/hostedtoolcache/Python/3.10.0/x64/include/python3.10/unicodeobject.h:1046,
                     from /opt/hostedtoolcache/Python/3.10.0/x64/include/python3.10/Python.h:96,
                     from uvloop/loop.c:20:
    /opt/hostedtoolcache/Python/3.10.0/x64/include/python3.10/cpython/unicodeobject.h:446:26: note: declared here
      446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
          |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
    uvloop/loop.c:163249:25: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
    163249 |                         (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
           |                         ^
    In file included from /opt/hostedtoolcache/Python/3.10.0/x64/include/python3.10/unicodeobject.h:1046,
                     from /opt/hostedtoolcache/Python/3.10.0/x64/include/python3.10/Python.h:96,
                     from uvloop/loop.c:20:
    /opt/hostedtoolcache/Python/3.10.0/x64/include/python3.10/cpython/unicodeobject.h:446:26: note: declared here
      446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
          |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
    uvloop/loop.c:163249:25: warning: ‘PyUnicode_AsUnicode’ is deprecated [-Wdeprecated-declarations]
    163249 |                         (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
           |                         ^
    In file included from /opt/hostedtoolcache/Python/3.10.0/x64/include/python3.10/unicodeobject.h:1046,
                     from /opt/hostedtoolcache/Python/3.10.0/x64/include/python3.10/Python.h:96,
                     from uvloop/loop.c:20:
    /opt/hostedtoolcache/Python/3.10.0/x64/include/python3.10/cpython/unicodeobject.h:580:45: note: declared here
      580 | Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode(
          |                                             ^~~~~~~~~~~~~~~~~~~
    uvloop/loop.c:163249:25: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
    163249 |                         (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
           |                         ^
    In file included from /opt/hostedtoolcache/Python/3.10.0/x64/include/python3.10/unicodeobject.h:1046,
                     from /opt/hostedtoolcache/Python/3.10.0/x64/include/python3.10/Python.h:96,
                     from uvloop/loop.c:20:
    /opt/hostedtoolcache/Python/3.10.0/x64/include/python3.10/cpython/unicodeobject.h:446:26: note: declared here
      446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
          |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
    uvloop/loop.c: In function ‘__Pyx_Coroutine_Send’:
    uvloop/loop.c:165292:19: warning: implicit declaration of function ‘_PyGen_Send’; did you mean ‘_PyGen_yf’? [-Wimplicit-function-declaration]
    165292 |             ret = _PyGen_Send((PyGenObject*)yf, value == Py_None ? NULL : value);
           |                   ^~~~~~~~~~~
           |                   _PyGen_yf
    uvloop/loop.c:165292:17: warning: assignment to ‘PyObject *’ {aka ‘struct _object *’} from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
    165292 |             ret = _PyGen_Send((PyGenObject*)yf, value == Py_None ? NULL : value);
           |                 ^
    uvloop/loop.c:165297:17: warning: assignment to ‘PyObject *’ {aka ‘struct _object *’} from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
    165297 |             ret = _PyGen_Send((PyGenObject*)yf, value == Py_None ? NULL : value);
           |                 ^
    uvloop/loop.c: In function ‘__Pyx_Generator_Next’:
    uvloop/loop.c:165381:17: warning: assignment to ‘PyObject *’ {aka ‘struct _object *’} from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
    165381 |             ret = _PyGen_Send((PyGenObject*)yf, NULL);
           |                 ^
    uvloop/loop.c: In function ‘__Pyx_decode_c_bytes’:
    uvloop/loop.c:167057:9: warning: ‘PyUnicode_FromUnicode’ is deprecated [-Wdeprecated-declarations]
    167057 |         return PyUnicode_FromUnicode(NULL, 0);
           |         ^~~~~~
    In file included from /opt/hostedtoolcache/Python/3.10.0/x64/include/python3.10/unicodeobject.h:1046,
                     from /opt/hostedtoolcache/Python/3.10.0/x64/include/python3.10/Python.h:96,
                     from uvloop/loop.c:20:
    /opt/hostedtoolcache/Python/3.10.0/x64/include/python3.10/cpython/unicodeobject.h:551:42: note: declared here
      551 | Py_DEPRECATED(3.3) PyAPI_FUNC(PyObject*) PyUnicode_FromUnicode(
          |                                          ^~~~~~~~~~~~~~~~~~~~~
    error: command '/usr/bin/gcc' failed with exit code 1
    ----------------------------------------
ERROR: Command errored out with exit status 1: /home/runner/work/sdk-python/sdk-python/.tox/py/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-sta_p20p/uvloop_962951064b7d435c8805f7364d54ec84/setup.py'"'"'; __file__='"'"'/tmp/pip-install-sta_p20p/uvloop_962951064b7d435c8805f7364d54ec84/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-u76o7oj8/install-record.txt --single-version-externally-managed --compile --install-headers /home/runner/work/sdk-python/sdk-python/.tox/py/include/site/python3.10/uvloop Check the logs for full command output.

=================================== log end ====================================
ERROR: could not install deps [-r/home/runner/work/sdk-python/sdk-python/requirements/test.txt, -r/home/runner/work/sdk-python/sdk-python/requirements/docs.txt, -r/home/runner/work/sdk-python/sdk-python/requirements/publish.txt]; v = InvocationError('/home/runner/work/sdk-python/sdk-python/.tox/py/bin/python -m pip install -r/home/runner/work/sdk-python/sdk-python/requirements/test.txt -r/home/runner/work/sdk-python/sdk-python/requirements/docs.txt -r/home/runner/work/sdk-python/sdk-python/requirements/publish.txt', 1)
___________________________________ summary ____________________________________
ERROR:   py: could not install deps [-r/home/runner/work/sdk-python/sdk-python/requirements/test.txt, -r/home/runner/work/sdk-python/sdk-python/requirements/docs.txt, -r/home/runner/work/sdk-python/sdk-python/requirements/publish.txt]; v = InvocationError('/home/runner/work/sdk-python/sdk-python/.tox/py/bin/python -m pip install -r/home/runner/work/sdk-python/sdk-python/requirements/test.txt -r/home/runner/work/sdk-python/sdk-python/requirements/docs.txt -r/home/runner/work/sdk-python/sdk-python/requirements/publish.txt', 1)
Error: Process completed with exit code 1.

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 a pull request may close this issue.

2 participants