gruns / gruns/furl

Use the `ipaddress` module to detect valid IPV6

Open
#164 2 comments 1 reaction 0 assignees View on GitHub
Kind/Bug
Dominant language
Python
Stars
2.8k
Forks
165
PR merge metrics
No merged PRs in 30d

Description

I was surprised to see that furl would allow invalid but well-formed IPV6:

https://github.com/gruns/furl/blob/774846234ff803606fdd289a7549f9b50b2b3677/tests/test_furl.py#L1658-L1661

I would suggest to use the [IPV6Address](https://docs.python.org/3/library/ipaddress.html#ipaddress.IPv6Address) object from the python3 [ipaddress](https://docs.python.org/3/library/ipaddress.html) module to validate IPV6. For python2 I would suggest using the [ipaddress backport on pypi](https://pypi.org/project/ipaddress/).

If it is OK I would volunteer for a PR. What do you think?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.