Skip to content

Commit 03969e2

Browse files
committed
consolidate accept classes into the single AcceptCharset class
1 parent b0b14d7 commit 03969e2

File tree

5 files changed

+466
-1411
lines changed

5 files changed

+466
-1411
lines changed

CHANGES.txt

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ Feature
2525
content-negotiation is needed versus using ``acceptable_offers`` directly.
2626
See https://github.com/Pylons/webob/pull/460
2727

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

@@ -51,6 +55,23 @@ Backwards Incompatibilities
5155
Their logic is consistent with ``acceptable_offers``.
5256
See https://github.com/Pylons/webob/pull/460
5357

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

docs/api/webob.txt

Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -31,26 +31,14 @@ methods:
3131
.. autoclass:: Accept
3232
:members:
3333
parse, header_value, parsed, header_state, __init__, __add__,
34-
__bool__, __radd__, __repr__, __str__, __contains__,
34+
__bool__, __radd__, __repr__, __str__, __contains__, copy,
3535
accept_html, accepts_html, acceptable_offers, best_match, quality
3636

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

5543
.. autoclass:: AcceptEncoding
5644
:members: parse

0 commit comments

Comments
 (0)