-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
test_invalid_idna fails with idna 3.11 #12027
Copy link
Copy link
Closed
Labels
Description
Describe the bug
Using idna version 3.10 the test_invalid_idna testcase succeeds.
Using idna version 3.11 the same testcase fails.
To Reproduce
- Install idna version 3.11
- Run aiohttp test:
pytest -k test_invalid_idna - The testcase fails.
Expected behavior
Successful test execution.
Logs/tracebacks
Attached in file `test_output_with_idna_3.11.log`Python Version
$ python --version
3.14.2aiohttp Version
$ python -m pip show aiohttp
3.13.3multidict Version
$ python -m pip show multidict
6.7.1propcache Version
$ python -m pip show propcache
0.4.1yarl Version
$ python -m pip show yarl
1.22OS
Yocto, built from a recent master branch
Related component
Client
Additional context
Using idna version 3.10 the same testcase succeeds.
Below is the output of the failing statement in the python interpreter.
With idna 3.11 (the unicode character is removed):
root@qemux86-64:/usr/lib/python3.14/site-packages# python3
Python 3.14.2 (main, Dec 5 2025, 16:49:16) [GCC 15.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from yarl import URL
>>> a = URL("http://\u2061owhefopw.com")
>>> print("%s" % repr(a))
URL('http://owhefopw.com')
With idna 3.10 (the unicode char throws an exception, as expected by the test):
root@qemux86-64:/usr/lib/python3-aiohttp/ptest# python3
Python 3.14.2 (main, Dec 5 2025, 16:49:16) [GCC 15.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from yarl import URL
>>> a = URL("http://\u2061owhefopw.com")
Traceback (most recent call last):
File "/usr/lib/python3.14/site-packages/idna/core.py", line 357, in uts46_remap
raise IndexError()
IndexError
During handling of the above exception, another exception occurred:
...
test_output_with_idna_3.11.log
Code of Conduct
- I agree to follow the aio-libs Code of Conduct
Reactions are currently unavailable