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 f8606fc commit 2bcc46d
Show file tree
Hide file tree
Showing 5 changed files with 422 additions and 1,443 deletions.
21 changes: 21 additions & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ Feature
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 Down Expand Up @@ -55,6 +59,23 @@ Backwards Incompatibilities
``webob.acceptparse.Accept.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
21 changes: 4 additions & 17 deletions docs/api/webob.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,26 +30,13 @@ methods:

.. autoclass:: Accept
:members: parse, header_value, parsed, header_state, __init__, __add__,
__bool__, __radd__, __repr__, __str__,
__bool__, __radd__, __repr__, __str__, copy,
accept_html, accepts_html, acceptable_offers, best_match

.. 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__, copy,
acceptable_offers, best_match

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

0 comments on commit 2bcc46d

Please sign in to comment.