Skip to content

Commit 6fc063e

Browse files
committed
consolidate AcceptCharsetXXXHeader classes into the single AcceptCharset class
1 parent af05bfd commit 6fc063e

File tree

5 files changed

+477
-1402
lines changed

5 files changed

+477
-1402
lines changed

CHANGES.txt

+28
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,15 @@ Feature
2525
``acceptable_offers``. See backward incompatibilities below.
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+
32+
- ``webob.acceptparse.AcceptCharset``, methods ``best_match``, ``quality``, and
33+
``__contains__`` are undeprecated and their logic is made consistent with
34+
``acceptable_offers``. See backward incompatibilities below.
35+
See https://github.com/Pylons/webob/pull/461
36+
2837
Compatibility
2938
~~~~~~~~~~~~~
3039

@@ -56,6 +65,25 @@ Backwards Incompatibilities
5665

5766
See https://github.com/Pylons/webob/pull/460
5867

68+
- Remove ``AcceptCharsetValidHeader``, ``AcceptCharsetNoHeader`` and
69+
``AcceptCharsetInvalidHeader``. These classes are consolidated into
70+
``AcceptCharset`` with a ``header_state`` attribute for users that need
71+
to know the state of the header.
72+
See https://github.com/Pylons/webob/pull/461
73+
74+
- Remove previously-deprecated ``webob.acceptparse.AcceptCharset.__iter__``.
75+
See https://github.com/Pylons/webob/pull/461
76+
77+
- ``webob.acceptparse.AcceptCharset`` methods, ``best_match``, ``quality``, and
78+
``__contains__`` are now thin wrappers around ``acceptable_offers`` which
79+
modifies their behavior slightly:
80+
81+
- A tuple can no longer be an offer containing server-side quality values.
82+
- An offer will only match a ``*`` clause in a header if it does not match
83+
any other clauses.
84+
85+
See https://github.com/Pylons/webob/pull/461
86+
5987
Experimental Features
6088
~~~~~~~~~~~~~~~~~~~~~
6189

docs/api/webob.txt

+5-17
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)