Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

consolidate AcceptCharsetXXXHeader classes into the single AcceptCharset class #461

Open
wants to merge 1 commit into
base: simplify-accept-parsing
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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