Changelog¶
Next (Unreleased)¶
1.9.0 (08-Jul-2022)¶
Removed
ietfparse.compat
module.Changed
algorithms.RemoveUrlAuthResult
from a named tuple to a proper class.Deprecated using
len()
on the return value fromalgorithms.remove_url_auth()
Replace type hints with annotations.
Deprecated
rewrite_url
andremove_url_auth
. Use yarl instead. It is an awesome library and a more general solution.Stop building universal wheels
1.8.0 (11-Aug-2021)¶
Removing support for Python versions before 3.7
1.7.0 (04-Nov-2020)¶
Behavioural Change
headers.parse_accept()
used to fail with a ValueError
when
it encountered an invalid content type value in the header. Now it skips
the invalid value. If you want the previous behaviour, then pass strict=True
.
Advertise support for Python 3.7-3.9, remove 3.4 & 3.5
Clarify that
headers.parse_content_type()
raisesValueError
when it encounters an invalid content type headerSkip unparseable content types in
headers.parse_accept()
unless the newstrict
parameter is truthy
1.6.1 (26-Jan-2020)¶
Fixed project URL metadata.
Updated links to refer to canonical URLs.
1.6.0 (25-Jan-2020)¶
Switched from travis-ci to circle-ci.
Add type stubs.
Allow “bad whitespace” around
=
in link header parameter lists as indicated in RFC 8288#section-3.Replaced nosetests usage with the
unittest
module.
1.5.1 (04-Mar-2018)¶
Add RFC 6839 content suffix support to
datastructures.ContentType
andheaders.parse_content_type()
1.5.0 (24-Dec-2017)¶
Officially drop support for Python 2.6 and 3.3.
Change
headers.parse_accept()
to also prefer explicit highest quality preferences over inferred highest quality preferences.Rename the
normalized_parameter_values
keyword ofheaders._parse_parameter_list()
. The current spelling is retained with a deprecation warning. This will be removed in 2.0.Add
normalize_parameter_names
keyword to theheaders._parse_parameter_list()
internal function.Add support for parsing RFC 7239
Forwarded
headers withheaders.parse_forwarded()
.Add
algorithms.remove_url_auth()
1.4.3 (30-Oct-2017)¶
Change parsing of qualified lists to retain the initial ordering whenever possible. The algorithm prefers explicit highest quality (1.0) preferences over inferred highest quality preferences. It also retains the initial ordering in the presence of multiple highest quality matches. This affects
headers.parse_accept_charset()
,headers.parse_accept_encoding()
, andheaders.parse_accept_language()
.
1.4.2 (04-Jul-2017)¶
Add formatting of HTTP Link header using
str(header)
.
1.4.1 (03-Apr-2017)¶
Add some documentation about exceptions raised during header parsing.
1.4.0 (18-Oct-2016)¶
Fixed parsing of lists like
max-age=5, x-foo="prune"
. The previous versions incorrectly produced['max-age=5', 'x-foo="prune']
.Added
headers.parse_accept_encoding()
which parses HTTP Accept-Encoding header values into a list.Added
headers.parse_accept_language()
which parses HTTP Accept-Language header values into a list.
1.3.0 (11-Aug-2016)¶
Added
headers.parse_cache_control()
which parses HTTP Cache-Control header values into a dictionary.Renamed
headers.parse_http_accept_header()
toheaders.parse_accept()
, adding a wrapper function that raises a deprecation function when invokingheaders.parse_http_accept_header()
.Renamed
headers.parse_link_header()
toheaders.parse_link()
, adding a wrapper function that raises a deprecation function when invokingheaders.parse_link_header()
.Renamed
headers.parse_list_header()
toheaders.parse_list()
, adding a wrapper function that raises a deprecation function when invokingheaders.parse_list_header()
.
1.2.2 (27-May-2015)¶
Added
headers.parse_list_header()
which parses generic comma- separated list headers with support for quoted parts.Added
headers.parse_accept_charset()
which parses an HTTP Accept-Charset header into a sorted list.
1.2.1 (25-May-2015)¶
algorithms.select_content_type()
claims to work withdatastructures.ContentType`
values but it was requiring the augmented ones returned fromalgorithms.parse_http_accept_header()
. IOW, the algorithm required that the quality attribute exist. RFC 7231#section-5.3.1 states that missing quality values are treated as 1.0.
1.2.0 (19-Apr-2015)¶
Added support for RFC 5988
Link
headers. This consists ofheaders.parse_link_header()
anddatastructures.LinkHeader
1.1.1 (10-Feb-2015)¶
Removed
setupext
module since it was causing problems with source distributions.
1.1.0 (26-Oct-2014)¶
Added
algorithms.rewrite_url()
1.0.0 (21-Sep-2014)¶
Initial implementation containing the following functionality: -
algorithms.select_content_type()
-datastructures.ContentType
-errors.NoMatch
-errors.RootException
-headers.parse_content_type()
-headers.parse_http_accept_header()