🌐 URL parsing and manipulation made easy.
Fixed: Support Python 3.9's changed urllib.parse.urljoin() behavior.
furl('wss://slrp.com/').join('foo:1')
-> 'wss://slrp.com/foo:1'
furl('wss://slrp.com/').join('foo:1')
-> 'foo:1'
Changed: Drop semicolon query delimiters. See https://bugs.python.org/issue42967. Changed: Drop support for EOL Python 3.4 and Python 3.5.
Fixed: Export metadata variables (furl.__title__
, furl.__version__
, etc).
Added: scheme
, host
, netloc
, and origin
as parameters to furl.remove()
.
Changed: Homogenize parameter order across furl.add()
, furl.set()
, and furl.remove()
.
Changed: furl.origin
can be assigned None
. This has the same behavior as furl.remove(origin=True)
.
Added: a dont_quote=
parameter to Query.encode()
and a
query_dont_quote=
parameter to furl.tostr()
that exempt valid query
characters from being percent-encoded, either in their entirety with
dont_quote=True
, or selectively with dont_quote=<string>
, like
dont_quote='/?@_'
.
Changed: Move package info from __init__.py
into the more standard
__version__.py
.
Fixed: Support Unicode usernames and passwords in Python 2.
Fixed: Update orderedmultdict to v1.0.1 to resolve a DeprecationWarning.
Fixed: Encode '/'
consistently in query strings across both
quote_plus=True
and quote_plus=False
.
Added: All URL components (scheme
, host
, path
, etc) to furl()
's constructor as
keyword arguments. E.g. f = furl(scheme='http', host='host', path='/lolsup')
.
Changed: furl.truediv() and Path.truediv() now mirror Pathlib.truediv()'s
behavior and return a new instance. The original instance is no longer modified.
Old behavior: f = furl('1'); f / '2' -> str(f) == '1'
. New behavior:
f = furl('1'); f /= '2' -> str(f) == '1/2'
.
Fixed: Path.load() now accepts Path instances, e.g. f.path.load(Path('hi'))
.
Removed: Support for Python 2.6, which reached EOL on 2013-10-29.
foo:blah
) consistently with
urllib.parse.urljoin().=
, ?
, etc). Old encoding:
?url=http://foo.com/
; new encoding: ?url=http%3A%2F%2Ffoo.com%2F
. Equal
signs remain decoded in query values where the key is empty to allow for, and
preserve, queries like ?==3==
.&&==
of http://foo.com?&&==
as-is. Empty key=value pairs are
stored as ('', None)
in Query.params, e.g. [('', None), ('', None)]
for the
query &
.=
) in query values if the key is empty.
That is, allow and preserve queries like ?==3==
while also percent encoding
equal signs in query values with an associted key, as expected. E.g.
?a=1%3D1
.mailto:[email protected]
, without an explicit whitelist of such schemes
(e.g. tel:
, sms:
, mailto:
, etc).furl.url = 'http://www.foo.com/'
.