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

Stop support for list of "take" protocol #1517

Merged
merged 4 commits into from
Jan 10, 2025
Merged

Stop support for list of "take" protocol #1517

merged 4 commits into from
Jan 10, 2025

Conversation

dachengx
Copy link
Collaborator

@dachengx dachengx commented Jan 10, 2025

To be compatible with python > 3.9.21

In the actions of #1513, I saw errors like

FAILED tests/test_url_config.py::TestURLConfig::test_json_protocol - ValueError: '1,2,3' does not appear to be an IPv4 or IPv6 address

For python > 3.9.20, the URL should fulfill the test:

Added checks to ensure that [ bracketed ] hosts found by urllib.parse.urlsplit() are of IPv6 or IPvFuture format.

, this was introduced from https://www.python.org/downloads/release/python-3921/.

So "take://json://[1,2,3]?take=0" will not work. But 'take://json://{"a":1}?take=a' still works.

This PR adds a check in "take" protocol to make sure that the container is a dict.

@dachengx dachengx marked this pull request as ready for review January 10, 2025 02:28
@coveralls
Copy link

Coverage Status

coverage: 89.49% (+0.02%) from 89.468%
when pulling 1822a4f on take_no_list
into 69265ff on master.

@dachengx dachengx merged commit f993f0b into master Jan 10, 2025
8 checks passed
@dachengx dachengx deleted the take_no_list branch January 10, 2025 03:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants