You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
An internal BasicAuth issue: aiohttp connection can fail because a field name _password in a named tuple in /aiohttp/helpers.py starts with an underscore.
It should fail, or succeed, but not because of an issue with an underscore in a BasicAuth named tuple.
Logs/tracebacks
Traceback (most recent call last):
File "./test_ws.py", line 4, in <module>import aiohttp
File "vlpy312/lib/python3.12/site-packages/aiohttp/__init__.py", line 6, in <module>from .client import (
File "vlpy312/lib/python3.12/site-packages/aiohttp/client.py", line 38, in <module>from . import hdrs, http, payload
File "vlpy312/lib/python3.12/site-packages/aiohttp/http.py", line 7, in <module>from .http_parser import (
File "vlpy312/lib/python3.12/site-packages/aiohttp/http_parser.py", line 30, in <module>from .helpers import (
File "vlpy312/lib/python3.12/site-packages/aiohttp/helpers.py", line 117, in <module>classBasicAuth(namedtuple("BasicAuth", ["login", "_password", "encoding"])):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "~/.pyenv/versions/3.12.2/lib/python3.12/collections/__init__.py", line 409, in namedtupleraiseValueError('Field names cannot start with an underscore: 'ValueError: Field names cannot start with an underscore: '_password'
Describe the bug
An internal BasicAuth issue: aiohttp connection can fail because a field name
_password
in a named tuple in/aiohttp/helpers.py
starts with an underscore.https://docs.python.org/3/library/collections.html#collections.namedtuple
To Reproduce
Try to run this code:
Expected behavior
It should fail, or succeed, but not because of an issue with an underscore in a BasicAuth named tuple.
Logs/tracebacks
Python Version
aiohttp Version
multidict Version
yarl Version
OS
Darwin LUSM7JR49DP75 23.3.0 Darwin Kernel Version 23.3.0: Wed Dec 20 21:30:44 PST 2023; root:xnu-10002.81.5~7/RELEASE_ARM64_T6000 arm64
Related component
Client
Additional context
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: