Use the `ipaddress` module to detect valid IPV6
Open
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.