gruns / gruns/furl

IPv6 addresses do not quite work as advertised

Open
#124 5 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
2.8k
Forks
165
PR merge metrics
No merged PRs in 30d

Description

```python
>>> from furl import furl
>>> f = furl()
>>> f.host = '::1'
Traceback (most recent call last):
File "", line 1, in
File "/home/mstenber/.local/lib/python3.7/site-packages/furl/furl.py", line 1851, in __setattr__
object.__setattr__(self, attr, value)
File "/home/mstenber/.local/lib/python3.7/site-packages/furl/furl.py", line 1425, in host
raise ValueError(errmsg % (host, INVALID_HOST_CHARS))
ValueError: Invalid host '::1'. Host strings must have at least one non-period character, can't contain any of '!@#$%^&'"*()+=:;/', and can't have adjacent periods.
>>> f.host = '[::1]'
>>> f
furl('//[::1]')
```
As the documentation says 'host' can accept IPv6 address, it is not quite right :)
```
| host: URL host (hostname, IPv4 address, or IPv6 address), not
| including port. All lowercase. Initially None.
```
At least as user I'd be happier if []s just showed up, and IPv6 address was compressed automatically (e.g. `str(ip_address.ipaddress(addr))` )

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.