Commit Graph

938 Commits

Author SHA1 Message Date
Fantix King 082f48ed81
Bump libuv to 1.48 2024-08-13 21:07:19 -04:00
Alexander Shadchin 62f92393b0
Fix test_create_server_4 with Python 3.12.5 (#614)
After https://github.com/python/cpython/issues/121913 error message `[errno 98] address already in use`
2024-08-13 09:18:25 -05:00
Fantix King 6c770dc3fb
uvloop 0.19.0
Changes
=======

* Drop support of Python 3.7 and update CI (#578)
  (by @fantix in ee5ad26a for #578)

Fixes
=====

* Restore uvloop.new_event_loop and other missing uvloop members to typing (#573)
  (by @graingert in 5c500ee2 for #573)

* Fix docstring of loop.shutdown_default_executor (#535)
  (by @Gelbpunkt in 919da567 for #535)

* Fix CI status badge (#522)
  (by @shuuji3 in 0e9ff6cd for #522)
2023-10-22 16:53:42 -04:00
Fantix King ee5ad26a75
Drop support of Python 3.7 and update CI (#578)
* Drop support of Python 3.7
* Upgrade and pin action revisions in CI
* Exclude C files in wheel dist
2023-10-22 13:04:03 -05:00
TAKAHASHI Shuuji 0e9ff6cd9b
Fix CI status badge (#522)
See the linked GitHub issue from the previous version of the badge:
https://github.com/badges/shields/issues/8671

In summary, this type of badge was changed in a breaking fashion such that
the badges were just linking to the github issue rather than showing the
data. Updating the url resolves this.

Also update the link of the badge to specify the workflow file rather
than the name, which matches the new behaviour of the badge.

---------

Co-authored-by: Elliot Ford <elliot.ford@astrazeneca.com>
2023-10-15 14:14:06 -05:00
Jens Reidel 919da56750
Fix docstring of loop.shutdown_default_executor (#535)
Ref: 575a253b5c

Signed-off-by: Jens Reidel <adrian@travitia.xyz>
Co-authored-by: Fantix King <fantix.king@gmail.com>
2023-10-15 12:28:17 -05:00
Thomas Grainger 5c500ee257
Restore uvloop.new_event_loop and other missing uvloop members to typing (#573) 2023-10-15 11:40:25 -05:00
Fantix King 5ddf38bcca
uvloop 0.18.0
Changes
=======

* Port uvloop to Python 3.12 (#570)
  (by @1st1, @fantix in 9f82bd74 for #569)

* Upgrade libuv to v1.46.0 (#571)
  (by @fantix in 2e1978c3 for #571)

Fixes
=====

* CI fixes (#520, #553)
  (by @altendky in 7783f1c5, @dulmandakh in 1dd40f17)

* Make extract_stack resilient to lacking frames. (#563)
  (by @jhance in 06876434 for #563)
2023-10-13 11:47:52 -04:00
Fantix King 8456be587c
Disable fail-fast in release CI 2023-10-13 11:46:32 -04:00
Fantix King 2e1978c36f
Upgrade libuv to v1.46.0 (#571)
* Fallback to fork() on macOS if preexec_fn is set with spawning subprocess
2023-10-13 09:39:46 +09:00
Yury Selivanov 9f82bd7444
Port uvloop to Python 3.12 (#570)
* Bump Cython to 0.29.36
* Add missing new API -- timeout param to shutdown_default_executor
* Stop using the beloved, but now deprecated, 'IF'
* Explicitly qualify void-returning callback functions as `noexcept`.
* Fix test_libuv_get_loop_t_ptr to work under Python 3.12
* "Fix" the failing asyncio tests by adding a sleep() call
* Add 3.12 to CI scripts
* Stop configuring watchers for asyncio tests under 3.12+
* Add the new timeout parameter of shutdown_default_executor to typeshed
* Implement uvloop.run()
* Add pyproject.toml and update CI

Co-authored-by: Fantix King <fantix.king@gmail.com>
2023-10-09 19:28:47 -05:00
jhance 068764340b
Make extract_stack resilient to lacking frames. (#563) 2023-10-07 14:53:16 -07:00
Dulmandakh 1dd40f17f3
CI: python 3.11 stable (#553)
* CI: Python 3.11 stable
* test with latest aiohttp with Python 3.11 support
2023-08-11 12:25:03 -05:00
Kyle Altendorf 7783f1c5d9
Fixup CI (#520)
* Report exception on flake8 and mypy failures
* skip test_remote_shutdown_receives_trailing_data() on linux <3.11
* pyOpenSSL~=23.0.0
2023-01-15 10:27:26 -06:00
Fantix King afb326897c
uvloop v0.17.0
This release adds Python 3.11 support, updates bundled libuv to 1.43.0
and fixes a handful of issues.

Changes
=======

* Expose uv_loop_t pointer for integration with other C-extensions (#310)
  (by @pranavtbhat in b332eb85 for #310)

* Support python 3.11+ (#473)
  (by @zeroday0619 in 8e42921d for #473)

* Expose libuv uv_fs_event functionality (#474)
  (by @jensbjorgensen @fantix in 74d381e8 for #474)

* Activate debug mode when `-X dev` is used
  (by @jack1142 in 637a77a3)

* Expose uv_version() for libuv API compatibility (#491)
  (by @fantix in 089f6cbf for #491)

* Fix loop.getaddrinfo() and tests (#495)
  (by @fantix in 598b16fd for #495)

* Bump to libuv 1.43.0
  (by @fantix in 94e5e535)

Fixes
=====

* _TransProtPair is no longer defined in asyncio.events
  (by @jensbjorgensen in fae5f7fb)

* use a TypeVar for asyncio.BaseProtocol (#478)
  (by @graingert in 3aacb352 for #478)

* Fix segfault in TimerHandle.when() after cleared
  (by @jensbjorgensen in c39afff8 for #469)

* Avoid self._errpipe_write double close (#466)
  (by @graingert in 72140d7e for #466)

* Fix typo in test (#456)
  (by @kianmeng in 033d52d0 for #456)

* Fix potential infinite loop (#446)
  (by @kfur in ada43c06 for #446)

* use a stack of self._fds_to_close to prevent double closes (#481)
  (by @graingert in 3214cf68 for #481)

* Fix incorrect main thread id value forking from a thread  (#453)
  (by @horpto @fantix in e7934c88 for #453)

* create_subprocess_exec should treat env={} as empty environment (#439) (#454)
  (by @byllyfish in e04637e0 for #439)

* Queue write only after processing all buffers (#445)
  (by @jakirkham @fantix in 9c6ecb62 for #445)

* Drop Python 3.6 support for thread ident
  (by @fantix in 9c37930e)

* bugfix: write to another transport in resume_writing() fails (#498)
  (by @fantix in d2deffef for #498)

Build
=====

* Upgrade GitHub Actions (#477) (#480)
  (by @cclauss in fcbf422d for #477, 10086942 for #480)

* typo `same as same`
  (by @YoSTEALTH in fedba80a)

* setup.py: allow to override extra_compile_args (#443)
  (by @giuliobenetti in a130375f for #443)

* Drop hack in setup.py in finalize_options (492)
  (by @fantix in 2f1bc83c for #492)

* Fix tests invocation on release CI worklow (#489)
  (by @ben9923 in d6a2b597 for #489)

Documentation
=============

* use asyncio.Runner loop_factory on 3.11+ (#472)
  (by @graingert in 31ba48ca for #472)

* Fix CI badge in docs, remove remaining Travis CI references from docs
  (by @Nothing4You in c6901a74)

* Fix typo in README
  (by @monosans in 73d7253b)
2022-09-14 10:52:35 -04:00
Christian Clauss 39cf04ceab Fix typo discovered by codespell 2022-09-14 06:24:48 -04:00
Fantix King 94e5e535b3 Bump to libuv 1.43.0
Also added comment about why uvloop getaddrinfo() may behave differently
under special cases (IP + TCP/UDP).
2022-09-13 17:54:57 -04:00
Fantix King d2deffefa1
bugfix: write to another transport in resume_writing() fails (#498)
Fixes #496
2022-09-13 15:50:27 -05:00
Fantix King 25b5f1e557
Longer test timeout (#497)
* Fix tests: 15s SSL_HANDSHAKE_TIMEOUT

Also allow longer time for slow tests on qemu aarch64 for GitHub Actions

* Build sdist on 22.04 to support LoongArch
2022-09-13 10:07:11 -05:00
Fantix King 598b16fd2b
Fix loop.getaddrinfo() and tests (#495)
* ai_canonname always follows the flag AI_CANONNAME in static resolving (#494)
* AddressFamily and SocketKind can be enums
* Also fixed failing test
2022-09-13 08:41:16 -05:00
Ben Raz d6a2b597fb
Fix tests invocation on release CI worklow (#489)
* Employ unittest discovery CLI (back again)
* Fix (sometimes) broken import with the pyx_import
* Bump cibuildwheel to 2.9.0
* Build without libffi-devel

Co-authored-by: Fantix King <fantix.king@gmail.com>
2022-09-10 10:45:27 -05:00
Fantix King 9c37930e6f Drop Python 3.6 support for thread ident
Python 3.6 uses `long` for thread ident, while 3.7 uses `unsigned long`.
2022-09-09 17:50:12 -04:00
Fantix King cdab9d3e07
CRF: rename _start_write() to _initiate_write()
Tweaked the comments too.

Refs #445
2022-09-09 17:03:24 -04:00
jakirkham 9c6ecb62ba
Queue write only after processing all buffers (#445)
Allows `writelines` to leverage vectorized IO within uvloop to send
multiple buffers in one `sendmsg` call.

* Update license copyright

Co-authored-by: Fantix King <fantix.king@gmail.com>
2022-09-09 15:48:59 -05:00
Fantix King 089f6cbf57
Expose uv_version() for libuv API compatibility (#491)
* Also renamed to have libuv_ namespace
2022-09-09 13:28:41 -05:00
Fantix King 2f1bc83c63 Partially revert "Fix running of setup.py test with recent setuptools. (#84)"
This partially reverts commit be920ea74e.

Fixes #320
2022-09-09 13:05:42 -04:00
jensbjorgensen 74d381e87a
Expose libuv uv_fs_event functionality (#474)
* Also updated pyOpenSSL to 22.x

Co-authored-by: Jens Jorgensen <jens@consiliumb.sg>
Co-authored-by: Fantix King <fantix.king@gmail.com>
2022-09-09 09:24:41 -05:00
Jakub Kuczys 637a77a3a4 Activate debug mode when `-X dev` is used 2022-09-02 12:10:01 -04:00
Euiseo Cha 8e42921d7b
Support python 3.11+ (#473)
* chore: Cython version update
* add 3.11-dev pipeline
* Test and build on Python 3.11
* Drop test_context_run_segfault
* Support context in loop.create_task()
* Consistent PseudoSocket repr
* Add stubs for new 3.11 loop.sock_*() methods
* Skip test_create_ssl_server_manual_connection_lost on 3.11 for now

Co-authored-by: Fantix King <fantix.king@gmail.com>
Co-authored-by: Elvis Pranskevichus <elvis@edgedb.com>
2022-09-01 10:56:34 -05:00
Bill Fisher e04637e088
create_subprocess_exec should treat env={} as empty environment (#439) (#454)
* Empty env dict represents empty environment.
* Allow 0-length cstring array

Co-authored-by: Fantix King <fantix.king@gmail.com>
2022-08-31 17:05:24 -05:00
horpto e7934c8820
Fix incorrect main thread id value forking from a thread (#453)
* Fix incorrect main thread id value in mp.Process
* Make MAIN_THREAD_ID a lazy value and add test

Co-authored-by: Александр Менщиков <menshchikov@zvonok.com>
Co-authored-by: Fantix King <fantix.king@gmail.com>
2022-08-31 15:59:31 -05:00
monosans 73d7253bf0 Fix typo in README 2022-08-23 11:29:27 -07:00
Thomas Grainger 3214cf685e
use a stack of self._fds_to_close to prevent double closes (#481)
* Add test for preexec_fn fd double close issue
* use a stack of self._fds_to_close to prevent double closes

and make tests easier to write because the close order is deterministic
and in the order that opens happen in

this should also be a bit faster because list.append is faster
than set.add and we skip a call to os_close(-1) and catching an
OSError exception

* DRY os_dup call

Co-authored-by: Fantix King <fantix.king@gmail.com>
2022-08-23 13:09:07 -05:00
Denis Skovpen ada43c06b8
Fix potential infinite loop (#446) 2022-08-13 15:49:17 -05:00
Pranav Thulasiram Bhat b332eb85e4
Expose uv_loop_t pointer for integration with other C-extensions (#310)
Co-authored-by: Fantix King <fantix.king@gmail.com>
2022-08-13 15:08:47 -05:00
Giulio Benetti a130375f8a
setup.py: allow to override extra_compile_args (#443)
At the moment extra_compile_args is set to -O2 by default. But m68k
toolchain has a bug that when trying to build Extension uvloop.loop enters
an infinite loop[1]. So we need to override -O2 with -O0 to make it
work. So let's getenv('MODULES_CFLAGS') and assign it to local
MODULES_CFLAGS (former CFLAGS) and assign it to extra_compile_args. If
not MODULES_CFLAGS is found then -O2 is kept as default.

[1]: http://autobuild.buildroot.net/results/17d/17d6e6422abadcd6313c430c40f2a5d7162dbbd3/build-end.log

Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>

* Rename to UVLOOP_OPT_CFLAGS

Co-authored-by: Fantix King <fantix.king@gmail.com>
2022-08-13 13:44:46 -05:00
YoSTEALTH fedba80ac1 typo `same as same` 2022-08-13 14:05:18 -04:00
Kian-Meng Ang 033d52d044
Fix typo in test (#456) 2022-07-18 09:22:06 -05:00
Christian Clauss 10086942f6
Upgrade GitHub Actions for release process (#480) 2022-07-18 09:18:36 -05:00
Richard Schwab c6901a7487 Fix CI badge in docs, remove remaining Travis CI references from docs 2022-07-17 14:06:19 -04:00
Thomas Grainger 72140d7e5c
Avoid self._errpipe_write double close (#466)
Fixes #414
2022-07-17 10:22:14 -05:00
Thomas Grainger 31ba48ca92
use asyncio.Runner loop_factory on 3.11+ (#472) 2022-07-16 18:20:07 -05:00
Thomas Grainger 3aacb35254
use a TypeVar for asyncio.BaseProtocol (#478)
* Revert "_TransProtPair is no longer defined in asyncio.events"

This reverts commit fae5f7fb78.

* fix mypy
2022-07-16 18:16:28 -05:00
Jens Jorgensen c39afff8e0
Fix segfault in TimerHandle.when() after cleared
Fixes #469
Closes #475

Co-authored-by: Fantix King <fantix.king@gmail.com>
2022-07-16 17:13:53 -04:00
Christian Clauss fcbf422dc4
Upgrade GitHub Actions (#477) 2022-07-16 15:59:22 -05:00
Jens Jorgensen fae5f7fb78
_TransProtPair is no longer defined in asyncio.events 2022-07-16 16:57:02 -04:00
Elvis Pranskevichus 3e71ddc338
uvloop v0.16.0
This release adds Python 3.10 support, updates bundled libuv to 1.42.0
and fixes a handful of issues.

Changes
=======

* Python 3.10 support (#432)
  (by @elprans in 2519e2df for #432)

* Bump vendored libuv to 1.42.0 (#433)
  (by @elprans in a62f7818 for #433)

* Use cibuildwheel to build wheels (#435)
  (by @elprans in 20febe0b for #435)

* Add support for <timer handle>.when()
  (by Jens Jorgensen in 62b2af9c)

Fixes
=====

* Fix ref issue when protocol is in Cython
  (by @fantix in 70cafc82 for #2222)

* set python_requires
  (by @graingert in c808a663)

* SSL: schedule first data after waiter wakeup
  (by @fantix in 2081db89)

* Fix a possible race condition in sslproto test
  (by @fantix in b0526cd5 for #412)

* Fix `call_soon_threadsafe` thread safety
  (by @fantix in 4b803b15)
2021-08-10 11:17:01 -07:00
Elvis Pranskevichus 3f691ab2a1
Workflow touchups 2021-08-10 11:14:18 -07:00
Jens Jorgensen 62b2af9c72
Add support for <timer handle>.when() 2021-08-10 11:13:06 -07:00
Elvis Pranskevichus 20febe0b37
Use cibuildwheel to build wheels (#435) 2021-08-09 18:17:09 -07:00