Skip to content

Commit 07db20b

Browse files
committed
consolidate AcceptEncodingXXXHeader classes into the single AcceptEncoding class
1 parent 7359d70 commit 07db20b

File tree

5 files changed

+549
-1519
lines changed

5 files changed

+549
-1519
lines changed

CHANGES.txt

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,15 @@ Feature
3535
See backward incompatibilities below.
3636
See https://github.com/Pylons/webob/pull/461
3737

38+
- Consolidation of ``AcceptEncoding`` header handling into a single class.
39+
See backward incompatibilities below for more information.
40+
See https://github.com/Pylons/webob/pull/462
41+
42+
- ``webob.acceptparse.AcceptEncoding``, methods ``best_match``, ``quality``, and
43+
``__contains__`` are no longer deprecated and are consistent
44+
with the logic in ``acceptable_offers``. Please see backward incompatibilities
45+
below. See https://github.com/Pylons/webob/pull/462
46+
3847
Compatibility
3948
~~~~~~~~~~~~~
4049

@@ -77,6 +86,26 @@ Backwards Incompatibilities
7786
consistent with ``acceptable_offers``.
7887
See https://github.com/Pylons/webob/pull/461
7988

89+
- Remove ``AcceptEncodingValidHeader``, ``AcceptEncodingNoHeader`` and
90+
``AcceptEncodingInvalidHeader``. These classes are consolidated into
91+
``AcceptEncoding`` with a ``header_state`` attribute for users that need
92+
to know the state of the header.
93+
See https://github.com/Pylons/webob/pull/462
94+
95+
- Remove previously-deprecated ``webob.acceptparse.AcceptEncoding.__iter__``.
96+
See https://github.com/Pylons/webob/pull/462
97+
98+
- ``webob.acceptparse.AcceptEncoding`` methods, ``best_match``, ``quality``,
99+
and ``__contains__`` are now consistent with ``acceptable_offers``.
100+
101+
- A tuple can no longer be an offer containing server-side quality values.
102+
- An offer will only match a ``*`` clause in a header if it does not match
103+
any other clauses.
104+
- The ``identity`` offer was not properly considered a match unless the
105+
header explicitly it excluded via ``*;q=0`` or ``identity;q=0``.
106+
107+
See https://github.com/Pylons/webob/pull/462
108+
80109
Experimental Features
81110
~~~~~~~~~~~~~~~~~~~~~
82111

docs/api/webob.txt

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -41,22 +41,10 @@ methods:
4141
acceptable_offers, best_match, quality
4242

4343
.. autoclass:: AcceptEncoding
44-
:members: parse
45-
46-
.. autoclass:: AcceptEncodingValidHeader
47-
:members: parse, header_value, parsed, __init__, __add__, __bool__,
48-
__contains__, __iter__, __radd__, __repr__, __str__,
49-
acceptable_offers, best_match, quality
50-
51-
.. autoclass:: AcceptEncodingNoHeader
52-
:members: parse, header_value, parsed, __init__, __add__, __bool__,
53-
__contains__, __iter__, __radd__, __repr__, __str__,
54-
acceptable_offers, best_match, quality
55-
56-
.. autoclass:: AcceptEncodingInvalidHeader
57-
:members: parse, header_value, parsed, __init__, __add__, __bool__,
58-
__contains__, __iter__, __radd__, __repr__, __str__,
59-
acceptable_offers, best_match, quality
44+
:members:
45+
parse, header_value, parsed, header_state, __init__, __add__,
46+
__bool__, __radd__, __repr__, __str__, __contains__, copy,
47+
acceptable_offers, best_match, quality
6048

6149
.. autoclass:: AcceptLanguage
6250
:members: parse

0 commit comments

Comments
 (0)