Skip to content

Commit

Permalink
consolidate AcceptEncodingXXXHeader classes into the single AcceptEnc…
Browse files Browse the repository at this point in the history
…oding class
  • Loading branch information
mmerickel committed Mar 2, 2024
1 parent 7359d70 commit 07db20b
Show file tree
Hide file tree
Showing 5 changed files with 549 additions and 1,519 deletions.
29 changes: 29 additions & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,15 @@ Feature
See backward incompatibilities below.
See https://github.com/Pylons/webob/pull/461

- Consolidation of ``AcceptEncoding`` header handling into a single class.
See backward incompatibilities below for more information.
See https://github.com/Pylons/webob/pull/462

- ``webob.acceptparse.AcceptEncoding``, methods ``best_match``, ``quality``, and
``__contains__`` are no longer deprecated and are consistent
with the logic in ``acceptable_offers``. Please see backward incompatibilities
below. See https://github.com/Pylons/webob/pull/462

Compatibility
~~~~~~~~~~~~~

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

- Remove ``AcceptEncodingValidHeader``, ``AcceptEncodingNoHeader`` and
``AcceptEncodingInvalidHeader``. These classes are consolidated into
``AcceptEncoding`` with a ``header_state`` attribute for users that need
to know the state of the header.
See https://github.com/Pylons/webob/pull/462

- Remove previously-deprecated ``webob.acceptparse.AcceptEncoding.__iter__``.
See https://github.com/Pylons/webob/pull/462

- ``webob.acceptparse.AcceptEncoding`` methods, ``best_match``, ``quality``,
and ``__contains__`` are now consistent with ``acceptable_offers``.

- A tuple can no longer be an offer containing server-side quality values.
- An offer will only match a ``*`` clause in a header if it does not match
any other clauses.
- The ``identity`` offer was not properly considered a match unless the
header explicitly it excluded via ``*;q=0`` or ``identity;q=0``.

See https://github.com/Pylons/webob/pull/462

Experimental Features
~~~~~~~~~~~~~~~~~~~~~

Expand Down
20 changes: 4 additions & 16 deletions docs/api/webob.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,22 +41,10 @@ methods:
acceptable_offers, best_match, quality

.. autoclass:: AcceptEncoding
:members: parse

.. autoclass:: AcceptEncodingValidHeader
:members: parse, header_value, parsed, __init__, __add__, __bool__,
__contains__, __iter__, __radd__, __repr__, __str__,
acceptable_offers, best_match, quality

.. autoclass:: AcceptEncodingNoHeader
:members: parse, header_value, parsed, __init__, __add__, __bool__,
__contains__, __iter__, __radd__, __repr__, __str__,
acceptable_offers, best_match, quality

.. autoclass:: AcceptEncodingInvalidHeader
:members: parse, header_value, parsed, __init__, __add__, __bool__,
__contains__, __iter__, __radd__, __repr__, __str__,
acceptable_offers, best_match, quality
:members:
parse, header_value, parsed, header_state, __init__, __add__,
__bool__, __radd__, __repr__, __str__, __contains__, copy,
acceptable_offers, best_match, quality

.. autoclass:: AcceptLanguage
:members: parse
Expand Down
Loading

0 comments on commit 07db20b

Please sign in to comment.