Python 3.13.2: TestConnectParams.test_connect_params fails with ValueError: Invalid IPv6 URL
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 35/100
Hướng nghiên cứu
Bắt đầu với tests/test_connect.py::TestConnectParams::test_connect_params và tái hiện lỗi trên Python 3.13.2. Đọc asyncpg/connect_utils.py quanh _parse_connect_dsn_and_args và urllib.parse.urlparse; hoàn thành khi test được nhắm mục tiêu không còn phát sinh ValueError: Invalid IPv6 URL.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Based on historical test-builds of the python-asyncpg package in Fedora, this appears to be a regression from Python 3.13.1 to 3.13.2.
$ python3.13 --version
Python 3.13.2
$ python3.13 -m venv _e
$ . _e/bin/activate
(_e) $ pip install -e .[gssauth,test]
(_e) $ pip install pytest
(_e) $ python -m pytest
[…]
========================================================================================== short test summary info ===========================================================================================
FAILED tests/test__sourcecode.py::TestCodeQuality::test_flake8 - AssertionError: flake8 validation failed:
FAILED tests/test_codecs.py::TestCodecs::test_custom_codec_binary - asyncpg.exceptions.FeatureNotSupportedError: extension "hstore" is not available
FAILED tests/test_codecs.py::TestCodecs::test_custom_codec_text - asyncpg.exceptions.FeatureNotSupportedError: extension "hstore" is not available
FAILED tests/test_codecs.py::TestCodecs::test_extra_codec_alias - asyncpg.exceptions.FeatureNotSupportedError: extension "hstore" is not available
FAILED tests/test_codecs.py::TestCodecs::test_unhandled_type_fallback - asyncpg.exceptions.FeatureNotSupportedError: extension "isn" is not available
FAILED tests/test_codecs.py::TestCodecs::test_unknown_type_text_fallback - asyncpg.exceptions.FeatureNotSupportedError: extension "citext" is not available
FAILED tests/test_connect.py::TestConnectParams::test_connect_params - ValueError: Invalid IPv6 URL
FAILED tests/test_connect.py::TestConnectionAttributes::test_prefer_standby_picks_master_when_standby_is_down - TimeoutError
FAILED tests/test_introspection.py::TestIntrospection::test_introspection_no_stmt_cache_01 - asyncpg.exceptions.FeatureNotSupportedError: extension "hstore" is not available
FAILED tests/test_introspection.py::TestIntrospection::test_introspection_no_stmt_cache_02 - asyncpg.exceptions.FeatureNotSupportedError: extension "hstore" is not available
===================================================================== 10 failed, 300 passed, 3 skipped, 3 warnings in 132.00s (0:02:12) ======================================================================
The subject of this report is:
FAILED tests/test_connect.py::TestConnectParams::test_connect_params - ValueError: Invalid IPv6 URL
The full output for that failure is:
___________________________________________________________________________________ TestConnectParams.test_connect_params ____________________________________________________________________________________
Traceback (most recent call last):
File "/usr/lib64/python3.13/unittest/case.py", line 58, in testPartExecutor
yield
File "/usr/lib64/python3.13/unittest/case.py", line 651, in run
self._callTestMethod(testMethod)
~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^
File "/usr/lib64/python3.13/unittest/case.py", line 606, in _callTestMethod
if method() is not None:
~~~~~~^^
File "/home/ben/src/forks/asyncpg/tests/test_connect.py", line 1237, in test_connect_params
self.run_testcase(testcase)
~~~~~~~~~~~~~~~~~^^^^^^^^^^
File "/home/ben/src/forks/asyncpg/tests/test_connect.py", line 1154, in run_testcase
addrs, params = connect_utils._parse_connect_dsn_and_args(
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
dsn=dsn, host=host, port=port, user=user, password=password,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...<3 lines>...
target_session_attrs=target_session_attrs,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
krbsrvname=krbsrvname, gsslib=gsslib)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/ben/src/forks/asyncpg/asyncpg/connect_utils.py", line 282, in _parse_connect_dsn_and_args
parsed = urllib.parse.urlparse(dsn)
File "/usr/lib64/python3.13/urllib/parse.py", line 395, in urlparse
splitresult = urlsplit(url, scheme, allow_fragments)
File "/usr/lib64/python3.13/urllib/parse.py", line 516, in urlsplit
_check_bracketed_netloc(netloc)
~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^
File "/usr/lib64/python3.13/urllib/parse.py", line 451, in _check_bracketed_netloc
raise ValueError("Invalid IPv6 URL")
ValueError: Invalid IPv6 URL
- Ngôn ngữ chính
- Python
- Star
- 8.1k
- Fork
- 469
- Merge trung bình
- 4 ngày 1 giờ
- Pull request đã merge (30 ngày)
- 14
Chuẩn bị môi trường
Chúng tôi chưa kiểm tra các tệp thiết lập môi trường của dự án này. Hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của MagicStack/asyncpg
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 72/100
MagicStack/asyncpg#1342 ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 56/100
MagicStack/asyncpg#1340 · 1 bình luận ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 28/100
MagicStack/asyncpg#1337 ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 42/100
MagicStack/asyncpg#1330 · 1 bình luận ·
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 38/100
MagicStack/asyncpg#1322 ·
Tất cả issue của MagicStack/asyncpg
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
gradio-app/gradio#13895 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
build-error
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
spack/spack-packages#6713 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Use issue templatesĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
ActivityWatch/activitywatch#1464 · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Bug]: The ckg tool drops the return type of every decorated Python method in class search resultsĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
bytedance/trae-agent#483 ·
Maintainer thường phản hồi trong vòng 1 ngày