Skip to content

Commit

Permalink
consolidate AcceptCharsetXXXHeader classes into the single AcceptChar…
Browse files Browse the repository at this point in the history
…set class
  • Loading branch information
mmerickel committed Mar 4, 2024
1 parent 36171cb commit 0afa9f2
Show file tree
Hide file tree
Showing 5 changed files with 477 additions and 1,402 deletions.
28 changes: 28 additions & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,15 @@ Feature
``acceptable_offers``. See backward incompatibilities below.
See https://github.com/Pylons/webob/pull/460

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

- ``webob.acceptparse.AcceptCharset``, methods ``best_match``, ``quality``, and
``__contains__`` are undeprecated and their logic is made consistent with
``acceptable_offers``. See backward incompatibilities below.
See https://github.com/Pylons/webob/pull/461

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

Expand Down Expand Up @@ -56,6 +65,25 @@ Backwards Incompatibilities

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

- Remove ``AcceptCharsetValidHeader``, ``AcceptCharsetNoHeader`` and
``AcceptCharsetInvalidHeader``. These classes are consolidated into
``AcceptCharset`` with a ``header_state`` attribute for users that need
to know the state of the header.
See https://github.com/Pylons/webob/pull/461

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

- ``webob.acceptparse.AcceptCharset`` methods, ``best_match``, ``quality``, and
``__contains__`` are now thin wrappers around ``acceptable_offers`` which
modifies their behavior slightly:

- 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.

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

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

Expand Down
22 changes: 5 additions & 17 deletions docs/api/webob.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,26 +31,14 @@ methods:
.. autoclass:: Accept
:members:
parse, header_value, parsed, header_state, __init__, __add__,
__bool__, __radd__, __repr__, __str__, __contains__,
__bool__, __radd__, __repr__, __str__, __contains__, copy,
accept_html, accepts_html, acceptable_offers, best_match, quality

.. autoclass:: AcceptCharset
:members: parse

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

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

.. autoclass:: AcceptCharsetInvalidHeader
: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:: AcceptEncoding
:members: parse
Expand Down
Loading

0 comments on commit 0afa9f2

Please sign in to comment.