Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix round-trip of IPv6 addresses when converting to a string #1158

Merged
merged 29 commits into from
Sep 26, 2024
Merged

Conversation

bdraco
Copy link
Member

@bdraco bdraco commented Sep 26, 2024

What do these changes do?

The brackets were missing when the URL was convert to a string

fixes #1157
regressed in #1033

Are there changes in behavior for the user?

no

The brackets were missing when the URL was convert to a string

fixes #1157
yarl/_url.py Outdated Show resolved Hide resolved
yarl/_url.py Outdated Show resolved Hide resolved
yarl/_url.py Outdated Show resolved Hide resolved
yarl/_url.py Outdated Show resolved Hide resolved
yarl/_url.py Outdated Show resolved Hide resolved
yarl/_url.py Outdated Show resolved Hide resolved
yarl/_url.py Outdated Show resolved Hide resolved
yarl/_url.py Outdated Show resolved Hide resolved
@bdraco bdraco mentioned this pull request Sep 26, 2024
4 tasks
@psf-chronographer psf-chronographer bot added the bot:chronographer:provided There is a change note present in this PR label Sep 26, 2024
tests/test_url_parsing.py Outdated Show resolved Hide resolved
tests/test_url_parsing.py Outdated Show resolved Hide resolved
CHANGES/1158.bugfix.rst Outdated Show resolved Hide resolved
@bdraco bdraco changed the title Fix round-trip of IPv6 addresses Fix round-trip of IPv6 addresses when converting to a string Sep 26, 2024
@bdraco bdraco marked this pull request as ready for review September 26, 2024 21:59
@bdraco bdraco enabled auto-merge (squash) September 26, 2024 21:59
@webknjaz
Copy link
Member

I wonder if this is where we could finally stick a hypothesis-based property test..

Copy link

codecov bot commented Sep 26, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.48%. Comparing base (7d013d2) to head (ed85d2b).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1158      +/-   ##
==========================================
+ Coverage   95.46%   95.48%   +0.01%     
==========================================
  Files          30       30              
  Lines        4807     4825      +18     
  Branches      428      429       +1     
==========================================
+ Hits         4589     4607      +18     
  Misses        192      192              
  Partials       26       26              
Flag Coverage Δ
CI-GHA 95.44% <100.00%> (+0.01%) ⬆️
MyPy 41.56% <66.66%> (+0.16%) ⬆️
OS-Linux 99.40% <100.00%> (+0.05%) ⬆️
OS-Windows 99.50% <100.00%> (+0.05%) ⬆️
OS-macOS 99.12% <100.00%> (+0.05%) ⬆️
Py-3.10.11 99.01% <100.00%> (+0.05%) ⬆️
Py-3.10.15 99.24% <100.00%> (+0.05%) ⬆️
Py-3.11.10 99.24% <100.00%> (+0.05%) ⬆️
Py-3.11.9 99.01% <100.00%> (+0.05%) ⬆️
Py-3.12.6 99.24% <100.00%> (+0.05%) ⬆️
Py-3.13.0-rc.2 99.24% <100.00%> (+0.05%) ⬆️
Py-3.8.10 98.96% <100.00%> (+0.05%) ⬆️
Py-3.8.18 99.19% <100.00%> (+0.05%) ⬆️
Py-3.9.13 98.96% <100.00%> (+0.05%) ⬆️
Py-3.9.20 99.19% <100.00%> (+0.05%) ⬆️
Py-pypy7.3.11 99.25% <100.00%> (+0.05%) ⬆️
Py-pypy7.3.16 99.25% <100.00%> (+0.05%) ⬆️
Py-pypy7.3.17 99.28% <100.00%> (+0.05%) ⬆️
VM-macos-latest 99.12% <100.00%> (+0.05%) ⬆️
VM-ubuntu-latest 99.40% <100.00%> (+0.05%) ⬆️
VM-windows-latest 99.50% <100.00%> (+0.05%) ⬆️
pytest 99.40% <100.00%> (+0.05%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@bdraco bdraco merged commit 7128872 into master Sep 26, 2024
47 of 49 checks passed
@bdraco bdraco deleted the ipv6_fix branch September 26, 2024 22:02
@bdraco
Copy link
Member Author

bdraco commented Sep 26, 2024

I wonder if this is where we could finally stick a hypothesis-based property test..

It would be really nice to get #860 going. The open PRs list is shrinking enough that is coming to the top soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bot:chronographer:provided There is a change note present in this PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Parsing an IPv6 address URL with no port number (e.g. http://[::1]/) loses the square brackets
2 participants