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 with Python 3.13 #610

Merged
merged 5 commits into from
Sep 2, 2024
Merged

Conversation

edgarrmondragon
Copy link
Contributor

@edgarrmondragon edgarrmondragon commented Jul 5, 2024

Related:

@edgarrmondragon
Copy link
Contributor Author

I cherry-picked the patch from #604

@fantix fantix mentioned this pull request Aug 15, 2024
@edgarrmondragon
Copy link
Contributor Author

Ok, so the build for 3.13 fails.

Detailed error

  Building editable for uvloop (pyproject.toml): started
  Building editable for uvloop (pyproject.toml): finished with status 'error'
  error: subprocess-exited-with-error
  
  × Building editable for uvloop (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [447 lines of output]
      running editable_wheel
      creating /private/var/folders/hw/1f0gcr8d6kn9ms0_wn0_57qc0000gn/T/pip-wheel-nq8oabt8/.tmp-tl5qt4xu/uvloop.egg-info
      writing /private/var/folders/hw/1f0gcr8d6kn9ms0_wn0_57qc0000gn/T/pip-wheel-nq8oabt8/.tmp-tl5qt4xu/uvloop.egg-info/PKG-INFO
      writing dependency_links to /private/var/folders/hw/1f0gcr8d6kn9ms0_wn0_57qc0000gn/T/pip-wheel-nq8oabt8/.tmp-tl5qt4xu/uvloop.egg-info/dependency_links.txt
      writing requirements to /private/var/folders/hw/1f0gcr8d6kn9ms0_wn0_57qc0000gn/T/pip-wheel-nq8oabt8/.tmp-tl5qt4xu/uvloop.egg-info/requires.txt
      writing top-level names to /private/var/folders/hw/1f0gcr8d6kn9ms0_wn0_57qc0000gn/T/pip-wheel-nq8oabt8/.tmp-tl5qt4xu/uvloop.egg-info/top_level.txt
      writing manifest file '/private/var/folders/hw/1f0gcr8d6kn9ms0_wn0_57qc0000gn/T/pip-wheel-nq8oabt8/.tmp-tl5qt4xu/uvloop.egg-info/SOURCES.txt'
      reading manifest file '/private/var/folders/hw/1f0gcr8d6kn9ms0_wn0_57qc0000gn/T/pip-wheel-nq8oabt8/.tmp-tl5qt4xu/uvloop.egg-info/SOURCES.txt'
      reading manifest template 'MANIFEST.in'
      warning: no previously-included files matching '*' found under directory 'vendor/libuv/.git'
      adding license file 'LICENSE-APACHE'
      adding license file 'LICENSE-MIT'
      writing manifest file '/private/var/folders/hw/1f0gcr8d6kn9ms0_wn0_57qc0000gn/T/pip-wheel-nq8oabt8/.tmp-tl5qt4xu/uvloop.egg-info/SOURCES.txt'
      creating '/private/var/folders/hw/1f0gcr8d6kn9ms0_wn0_57qc0000gn/T/pip-wheel-nq8oabt8/.tmp-tl5qt4xu/uvloop-0.20.0.dist-info'
      creating /private/var/folders/hw/1f0gcr8d6kn9ms0_wn0_57qc0000gn/T/pip-wheel-nq8oabt8/.tmp-tl5qt4xu/uvloop-0.20.0.dist-info/WHEEL
      running build_py
      running build_ext
      + glibtoolize --copy --force
      glibtoolize: putting auxiliary files in '.'.
      glibtoolize: copying file './ltmain.sh'
      glibtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'.
      glibtoolize: copying file 'm4/libtool.m4'
      glibtoolize: copying file 'm4/ltoptions.m4'
      glibtoolize: copying file 'm4/ltsugar.m4'
      glibtoolize: copying file 'm4/ltversion.m4'
      glibtoolize: copying file 'm4/lt~obsolete.m4'
      + aclocal -I m4
      + autoconf
      configure.ac:45: warning: The macro 'AC_PROG_LIBTOOL' is obsolete.
      configure.ac:45: You should run autoupdate.
      m4/libtool.m4:100: AC_PROG_LIBTOOL is expanded from...
      configure.ac:45: the top level
      configure.ac:48: warning: $as_echo is obsolete; use AS_ECHO(["message"]) instead
      lib/m4sugar/m4sh.m4:690: _AS_IF_ELSE is expanded from...
      lib/m4sugar/m4sh.m4:697: AS_IF is expanded from...
      ./lib/autoconf/general.m4:2249: AC_CACHE_VAL is expanded from...
      ./lib/autoconf/general.m4:2270: AC_CACHE_CHECK is expanded from...
      m4/ax_pthread.m4:88: AX_PTHREAD is expanded from...
      configure.ac:48: the top level
      + automake --add-missing --copy
      configure.ac:43: installing './ar-lib'
      configure.ac:26: installing './compile'
      configure.ac:23: installing './config.guess'
      configure.ac:23: installing './config.sub'
      configure.ac:21: installing './install-sh'
      configure.ac:21: installing './missing'
      Makefile.am: installing './depcomp'
      checking for a BSD-compatible install... /usr/bin/install -c
      checking whether sleep supports fractional seconds... yes
      checking filesystem timestamp resolution... 2
      checking whether build environment is sane... yes
      checking for a race-free mkdir -p... mkdir -p
      checking for gawk... no
          _build_ext.build_extension(self, ext)
          ~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^
        File "/private/var/folders/hw/1f0gcr8d6kn9ms0_wn0_57qc0000gn/T/pip-build-env-h3ro7__u/overlay/lib/python3.13/site-packages/setuptools/_distutils/command/build_ext.py", line 557, in build_extension
          objects = self.compiler.compile(
              sources,
          ...<5 lines>...
              depends=ext.depends,
          )
        File "/private/var/folders/hw/1f0gcr8d6kn9ms0_wn0_57qc0000gn/T/pip-build-env-h3ro7__u/overlay/lib/python3.13/site-packages/setuptools/_distutils/ccompiler.py", line 605, in compile
          self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts)
          ~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/private/var/folders/hw/1f0gcr8d6kn9ms0_wn0_57qc0000gn/T/pip-build-env-h3ro7__u/overlay/lib/python3.13/site-packages/setuptools/_distutils/unixccompiler.py", line 202, in _compile
          raise CompileError(msg)
      distutils.errors.CompileError: command '/usr/bin/clang' failed with exit code 1
      /private/var/folders/hw/1f0gcr8d6kn9ms0_wn0_57qc0000gn/T/pip-build-env-h3ro7__u/overlay/lib/python3.13/site-packages/setuptools/_distutils/dist.py:983: _DebuggingTips: Problem in editable installation.
      !!
      
              ********************************************************************************
              An error happened while installing `uvloop` in editable mode.
      
              The following steps are recommended to help debug this problem:
      
              - Try to install the project normally, without using the editable mode.
                Does the error still persist?
                (If it does, try fixing the problem before attempting the editable mode).
              - If you are using binary extensions, make sure you have all OS-level
                dependencies installed (e.g. compilers, toolchains, binary libraries, ...).
              - Try the latest version of setuptools (maybe the error was already fixed).
              - If you (or your project dependencies) are using any setuptools extension
                or customization, make sure they support the editable mode.
      
              After following the steps above, if the problem still persists and
              you think this is related to how setuptools handles editable installations,
              please submit a reproducible example
              (see https://stackoverflow.com/help/minimal-reproducible-example) to:
      
                  https://github.com/pypa/setuptools/issues
      
              See https://setuptools.pypa.io/en/latest/userguide/development_mode.html for details.

               ********************************************************************************
      
      !!
        cmd_obj.run()
      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 editable for uvloop

The 3.13 build for aiohttp is also failing.

Detailed error

  Building wheel for aiohttp (pyproject.toml): started
  Building wheel for aiohttp (pyproject.toml): finished with status 'error'
  error: subprocess-exited-with-error
  
  × Building wheel for aiohttp (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [329 lines of output]
      *********************
      * Accelerated build *
      *********************
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib.macosx-10.13-universal2-cpython-313
      creating build/lib.macosx-10.13-universal2-cpython-313/aiohttp
      copying aiohttp/web_ws.py -> build/lib.macosx-10.13-universal2-cpython-313/aiohttp
      copying aiohttp/worker.py -> build/lib.macosx-10.13-universal2-cpython-313/aiohttp
      copying aiohttp/multipart.py -> build/lib.macosx-10.13-universal2-cpython-313/aiohttp
      copying aiohttp/web_response.py -> build/lib.macosx-10.13-universal2-cpython-313/aiohttp
      copying aiohttp/client_ws.py -> build/lib.macosx-10.13-universal2-cpython-313/aiohttp
      copying aiohttp/test_utils.py -> build/lib.macosx-10.13-universal2-cpython-313/aiohttp
      copying aiohttp/tracing.py -> build/lib.macosx-10.13-universal2-cpython-313/aiohttp
      copying aiohttp/web_exceptions.py -> build/lib.macosx-10.13-universal2-cpython-313/aiohttp
      copying aiohttp/web_middlewares.py -> build/lib.macosx-10.13-universal2-cpython-313/aiohttp
      copying aiohttp/web.py -> build/lib.macosx-10.13-universal2-cpython-313/aiohttp
      copying aiohttp/http_exceptions.py -> build/lib.macosx-10.13-universal2-cpython-313/aiohttp
      copying aiohttp/web_app.py -> build/lib.macosx-10.13-universal2-cpython-313/aiohttp
      copying aiohttp/streams.py -> build/lib.macosx-10.13-universal2-cpython-313/aiohttp
      copying aiohttp/web_protocol.py -> build/lib.macosx-10.13-universal2-cpython-313/aiohttp
      copying aiohttp/log.py -> build/lib.macosx-10.13-universal2-cpython-313/aiohttp
      copying aiohttp/compression_utils.py -> build/lib.macosx-10.13-universal2-cpython-313/aiohttp
      copying aiohttp/client.py -> build/lib.macosx-10.13-universal2-cpython-313/aiohttp
      copying aiohttp/web_urldispatcher.py -> build/lib.macosx-10.13-universal2-cpython-313/aiohttp
      copying aiohttp/web_request.py -> build/lib.macosx-10.13-universal2-cpython-313/aiohttp
      copying aiohttp/http_websocket.py -> build/lib.macosx-10.13-universal2-cpython-313/aiohttp
      copying aiohttp/client_proto.py -> build/lib.macosx-10.13-universal2-cpython-313/aiohttp
      copying aiohttp/locks.py -> build/lib.macosx-10.13-universal2-cpython-313/aiohttp
      copying aiohttp/__init__.py -> build/lib.macosx-10.13-universal2-cpython-313/aiohttp
      copying aiohttp/web_runner.py -> build/lib.macosx-10.13-universal2-cpython-313/aiohttp
      copying aiohttp/web_server.py -> build/lib.macosx-10.13-universal2-cpython-313/aiohttp
      copying aiohttp/base_protocol.py -> build/lib.macosx-10.13-universal2-cpython-313/aiohttp
      copying aiohttp/payload.py -> build/lib.macosx-10.13-universal2-cpython-313/aiohttp
      copying aiohttp/client_reqrep.py -> build/lib.macosx-10.13-universal2-cpython-313/aiohttp
      copying aiohttp/http.py -> build/lib.macosx-10.13-universal2-cpython-313/aiohttp
      copying aiohttp/web_log.py -> build/lib.macosx-10.13-universal2-cpython-313/aiohttp
      copying aiohttp/resolver.py -> build/lib.macosx-10.13-universal2-cpython-313/aiohttp
      copying aiohttp/formdata.py -> build/lib.macosx-10.13-universal2-cpython-313/aiohttp
      copying aiohttp/payload_streamer.py -> build/lib.macosx-10.13-universal2-cpython-313/aiohttp
      copying aiohttp/web_routedef.py -> build/lib.macosx-10.13-universal2-cpython-313/aiohttp
      copying aiohttp/connector.py -> build/lib.macosx-10.13-universal2-cpython-313/aiohttp
      copying aiohttp/client_exceptions.py -> build/lib.macosx-10.13-universal2-cpython-313/aiohttp
      creating build/temp.macosx-10.13-universal2-cpython-313/aiohttp
      clang -fno-strict-overflow -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -O3 -Wall -arch arm64 -arch x86_64 -I/Library/Frameworks/Python.framework/Versions/3.13/include/python3.13 -c aiohttp/_websocket.c -o build/temp.macosx-10.13-universal2-cpython-313/aiohttp/_websocket.o
      aiohttp/_websocket.c:1284:59: warning: 'Py_UNICODE' is deprecated [-Wdeprecated-declarations]
      static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u)
                                                                ^
      /Library/Frameworks/Python.framework/Versions/3.13/include/python3.13/cpython/unicodeobject.h:10:1: note: 'Py_UNICODE' has been explicitly marked deprecated here
      Py_DEPRECATED(3.13) typedef wchar_t Py_UNICODE;
      ^
      /Library/Frameworks/Python.framework/Versions/3.13/include/python3.13/pyport.h:251:54: note: expanded from macro 'Py_DEPRECATED'
      #define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                           ^
      aiohttp/_websocket.c:1286:11: warning: 'Py_UNICODE' is deprecated [-Wdeprecated-declarations]
          const Py_UNICODE *u_end = u;
                ^
      /Library/Frameworks/Python.framework/Versions/3.13/include/python3.13/cpython/unicodeobject.h:10:1: note: 'Py_UNICODE' has been explicitly marked deprecated here
      Py_DEPRECATED(3.13) typedef wchar_t Py_UNICODE;
      ^
      /Library/Frameworks/Python.framework/Versions/3.13/include/python3.13/pyport.h:251:54: note: expanded from macro 'Py_DEPRECATED'
      #define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                           ^
      aiohttp/_websocket.c:6818:67: error: too few arguments to function call, expected 6, have 5
                                                 is_little, !is_unsigned);
                                                                        ^
      /Library/Frameworks/Python.framework/Versions/3.13/include/python3.13/cpython/longobject.h:111:17: note: '_PyLong_AsByteArray' declared here
      PyAPI_FUNC(int) _PyLong_AsByteArray(PyLongObject* v,
                      ^
      aiohttp/_websocket.c:7091:67: error: too few arguments to function call, expected 6, have 5
                                                 is_little, !is_unsigned);
                                                                        ^
      /Library/Frameworks/Python.framework/Versions/3.13/include/python3.13/cpython/longobject.h:111:17: note: '_PyLong_AsByteArray' declared here
      PyAPI_FUNC(int) _PyLong_AsByteArray(PyLongObject* v,
                      ^
      2 warnings and 2 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 aiohttp

What's fun is the aiohttp CI uses uvloop (I don't know what for exactly), so I'm not sure who can first release 3.13 wheels 🙃.

@Dreamsorcerer
Copy link

What's fun is the aiohttp CI uses uvloop (I don't know what for exactly)

Many of our tests run on uvloop, to ensure compatibility. Seems like we have a bit of a circular dependency here...

@Dreamsorcerer
Copy link

Dreamsorcerer commented Aug 19, 2024

Seems like we have a bit of a circular dependency here...

Actually, we should automatically start building wheels with the next release even without tests passing. So, both our CIs should resolve over the next few weeks.

@fantix
Copy link
Member

fantix commented Aug 19, 2024

That's a good idea, Sam! I can push an alpha wheel of uvloop like 0.21a1 for Python 3.13 later this week

@edgarrmondragon
Copy link
Contributor Author

That's a good idea, Sam! I can push an alpha wheel of uvloop like 0.21a1 for Python 3.13 later this week

Marking this as ready for review then :)

@edgarrmondragon edgarrmondragon marked this pull request as ready for review August 19, 2024 16:15
@Dreamsorcerer
Copy link

I think we have 3.13 wheels now with 3.10.5.

@fantix
Copy link
Member

fantix commented Aug 28, 2024

With #587 and #623, this should be green.

fantix added 4 commits August 28, 2024 14:26
This is derived from python/cpython#111483 but available on
all Python versions with uvloop, only that it's only enabled
by default for Python 3.13 and above to be consistent with
CPython behavior.
@fantix fantix merged commit fb5a139 into MagicStack:master Sep 2, 2024
13 checks passed
@edgarrmondragon edgarrmondragon deleted the python3.13 branch September 2, 2024 21:47
@fantix
Copy link
Member

fantix commented Sep 3, 2024

uvloop 0.21.0b1 is up with 3.13 wheels.

fantix added a commit that referenced this pull request Oct 14, 2024
Changes
=======

* Add cleanup_socket param on create_unix_server() (#623)
  (by @fantix in d6114d2)

Fixes
=====

* Use cythonized SO_REUSEPORT rather than the unwrapped native one. (#609)
  (by @ptribble in 4083a94 for #550)

* UDP errors should result in protocol.error_received (#601)
  (by @jensbjorgensen in 3c3bbef)

* Updates for Cython3 (#587)
  (by @alan-brooks in 3fba9fa for #587)

* Test with Python 3.13 (#610)
  (by @edgarrmondragon in fb5a139)
@fantix fantix mentioned this pull request Oct 14, 2024
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.

3 participants