Commit Graph

16 Commits

Author SHA1 Message Date
Niklas Rousset 777785257c
Upgrade libuv to v1.48.0 (#600)
* Fix for libuv 1.48
* Fix for macOS (resolve empty host string as "localhost")
* Add test

---------

Co-authored-by: Fantix King <fantix.king@gmail.com>
2024-08-14 22:18:07 -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
Yury Selivanov eb8d7ba170 tests: Stop passing loop explicitly in tests
In 3.8 a lot of asyncio functions have their `loop` parameter
deprecated.  So we change the semantics of uvloop tests to never
pass the loop explicitly (unless to Future objects, when necessary)

That means that we now also need to set up asyncio/uvloop loop policies
for tests in setUp hooks.
2019-10-24 14:42:54 -04:00
Yury Selivanov 7384b22f0b Convert Future-returning loop methods to coroutines.
The following event loop methods are now coroutines:

* getaddrinfo()
* sock_recv()
* sock_recv_into()
* sock_accept()
* subprocess_shell()
* subprocess_exec()
2018-05-23 12:21:23 -04:00
Yury Selivanov 92fb0fc37f Make loop methods reject socket kinds they do not support.
More specifically:
* loop.create_connection() and loop.create_server() can accept
  AF_INET or AF_INET6 SOCK_STREAM sockets;

* loop.create_datagram_endpoint() can accept only SOCK_DGRAM
  sockets;

* loop.connect_accepted_socket() can accept only SOCK_STREAM
  sockets;

* fixed a bug in create_unix_server() and create_unix_connection()
  to properly check for SOCK_STREAM sockets on Linux;

* fixed static DNS resolution to decline socket types that aren't
  strictly equal to SOCK_STREAM or SOCK_DGRAM.  On Linux socket
  type can be a bit mask, and we should let system getaddrinfo()
  to deal with it.
2016-11-09 15:38:30 -05:00
Yury Selivanov 25a76b2c99 tests/dns: Add a test for '::1' ipv6 address 2016-05-23 18:48:52 -04:00
Yury Selivanov 67ab05da3e test: Fix getaddrinfo tests 2016-05-23 18:38:03 -04:00
Yury Selivanov 011b1295eb tests: More tests for getaddrinfo() 2016-05-23 14:27:41 -04:00
Yury Selivanov c4bd13b2db tests: Add more tests for getaddrinfo 2016-05-23 14:07:59 -04:00
claws f894ac7403 Fix code style in unittest 2016-05-07 11:05:33 -04:00
Yury Selivanov 00b3a398ec Another fix for getaddrinfo: don't set `host` to None if it's empty 2016-05-05 14:05:56 -04:00
Yury Selivanov 448eea338a loop: Make loop.getaddrinfo behave like socket.getaddrinfo in edge cases 2016-05-05 12:42:42 -04:00
Yury Selivanov d82d5c838f Make sure that getaddrinfo() accepts bytes (as asyncio/socket version) 2016-04-19 16:10:20 -04:00
Yury Selivanov 4b94712793 dns: Implement loop.getnameinfo 2016-04-11 19:44:35 -04:00
Yury Selivanov 2718a91b45 Refactor exceptions; translate exceptions for EAI* errors; tests for dns 2015-11-20 19:08:48 -05:00