Skip to content

Commit 2bcc46d

Browse files
committed
consolidate accept classes into the single AcceptCharset class
1 parent f8606fc commit 2bcc46d

File tree

5 files changed

+422
-1443
lines changed

5 files changed

+422
-1443
lines changed

CHANGES.txt

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@ Feature
2727
using ``acceptable_offers`` directly.
2828
See https://github.com/Pylons/webob/pull/460
2929

30+
- Consolidation of ``AcceptCharset`` header handling into a single class.
31+
See backward incompatibilities below for more information.
32+
See https://github.com/Pylons/webob/pull/461
33+
3034
Compatibility
3135
~~~~~~~~~~~~~
3236

@@ -55,6 +59,23 @@ Backwards Incompatibilities
5559
``webob.acceptparse.Accept.acceptable_offers``.
5660
See https://github.com/Pylons/webob/pull/460
5761

62+
- Remove ``AcceptCharsetValidHeader``, ``AcceptCharsetNoHeader`` and
63+
``AcceptCharsetInvalidHeader``. These classes are consolidated into
64+
``AcceptCharset`` with a ``header_state`` attribute for users that need
65+
to know the state of the header.
66+
See https://github.com/Pylons/webob/pull/461
67+
68+
- Remove previously-deprecated ``webob.acceptparse.AcceptCharset.__contains__``,
69+
``webob.acceptparse.AcceptCharset.__iter__``, and
70+
``webob.acceptparse.AcceptCharset.quality``.
71+
See https://github.com/Pylons/webob/pull/461
72+
73+
- Change behavior of ``webob.acceptparse.AcceptCharset.best_match`` to no
74+
longer allow offers that are not mimetypes and to no longer allow offers
75+
with server-side quality values. Logic is now normalized to use
76+
``webob.acceptparse.AcceptCharset.acceptable_offers``.
77+
See https://github.com/Pylons/webob/pull/461
78+
5879
Experimental Features
5980
~~~~~~~~~~~~~~~~~~~~~
6081

docs/api/webob.txt

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -30,26 +30,13 @@ methods:
3030

3131
.. autoclass:: Accept
3232
:members: parse, header_value, parsed, header_state, __init__, __add__,
33-
__bool__, __radd__, __repr__, __str__,
33+
__bool__, __radd__, __repr__, __str__, copy,
3434
accept_html, accepts_html, acceptable_offers, best_match
3535

3636
.. autoclass:: AcceptCharset
37-
:members: parse
38-
39-
.. autoclass:: AcceptCharsetValidHeader
40-
:members: parse, header_value, parsed, __init__, __add__, __bool__,
41-
__contains__, __iter__, __radd__, __repr__, __str__,
42-
acceptable_offers, best_match, quality
43-
44-
.. autoclass:: AcceptCharsetNoHeader
45-
:members: parse, header_value, parsed, __init__, __add__, __bool__,
46-
__contains__, __iter__, __radd__, __repr__, __str__,
47-
acceptable_offers, best_match, quality
48-
49-
.. autoclass:: AcceptCharsetInvalidHeader
50-
:members: parse, header_value, parsed, __init__, __add__, __bool__,
51-
__contains__, __iter__, __radd__, __repr__, __str__,
52-
acceptable_offers, best_match, quality
37+
:members: parse, header_value, parsed, header_state, __init__, __add__,
38+
__bool__, __radd__, __repr__, __str__, copy,
39+
acceptable_offers, best_match
5340

5441
.. autoclass:: AcceptEncoding
5542
:members: parse

0 commit comments

Comments
 (0)