Skip to content

Commit

Permalink
consolidate accept classes into the single AcceptCharset class
Browse files Browse the repository at this point in the history
  • Loading branch information
mmerickel committed Mar 1, 2024
1 parent b0b14d7 commit 03969e2
Show file tree
Hide file tree
Showing 5 changed files with 466 additions and 1,411 deletions.
21 changes: 21 additions & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ Feature
content-negotiation is needed versus using ``acceptable_offers`` directly.
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

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

Expand All @@ -51,6 +55,23 @@ Backwards Incompatibilities
Their logic is consistent with ``acceptable_offers``.
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.__contains__``,
``webob.acceptparse.AcceptCharset.__iter__``, and
``webob.acceptparse.AcceptCharset.quality``.
See https://github.com/Pylons/webob/pull/461

- Change behavior of ``webob.acceptparse.AcceptCharset.best_match`` to no
longer allow offers that are not mimetypes and to no longer allow offers
with server-side quality values. Logic is now normalized to use
``webob.acceptparse.AcceptCharset.acceptable_offers``.
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 03969e2

Please sign in to comment.