Skip to content

Commit 7481fd5

Browse files
committed
consolidate AcceptLanguageXXXHeader classes into the single AcceptLanguage class
1 parent d19faa7 commit 7481fd5

5 files changed

Lines changed: 418 additions & 1665 deletions

File tree

CHANGES.txt

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@ Feature
4343
``acceptable_offers``. See backward incompatibilities below.
4444
See https://github.com/Pylons/webob/pull/462
4545

46+
- Consolidation of ``AcceptLanguage`` header handling into a single class.
47+
See backward incompatibilities below for more information.
48+
See https://github.com/Pylons/webob/pull/463
49+
4650
Compatibility
4751
~~~~~~~~~~~~~
4852

@@ -114,6 +118,18 @@ Backwards Incompatibilities
114118

115119
See https://github.com/Pylons/webob/pull/462
116120

121+
- Remove ``AcceptLanguageValidHeader``, ``AcceptLanguageNoHeader`` and
122+
``AcceptLanguageInvalidHeader``. These classes are consolidated into
123+
``AcceptLanguage`` with a ``header_state`` attribute for users that need
124+
to know the state of the header.
125+
See https://github.com/Pylons/webob/pull/463
126+
127+
- Remove previously-deprecated ``webob.acceptparse.AcceptLanguage`` methods
128+
``__iter__``, ``__contains__``, ``best_match`` and ``quality``.
129+
Look at using ``basic_filtering`` and ``lookup`` methods instead that
130+
implement RFC-compliant algorithms for language negotiation.
131+
See https://github.com/Pylons/webob/pull/463
132+
117133
Experimental Features
118134
~~~~~~~~~~~~~~~~~~~~~
119135

docs/api/webob.txt

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -47,23 +47,9 @@ methods:
4747
acceptable_offers, best_match, quality
4848

4949
.. autoclass:: AcceptLanguage
50-
:members: parse
51-
52-
.. autoclass:: AcceptLanguageValidHeader
53-
:members: header_value, parsed, __init__, __add__, __contains__, __iter__,
54-
__radd__, __str__, parse, basic_filtering, best_match, lookup,
55-
quality
56-
57-
.. autoclass:: AcceptLanguageNoHeader
58-
:members: header_value, parsed, __init__, __add__, __contains__, __iter__,
59-
__radd__, __str__, parse, basic_filtering, best_match, lookup,
60-
quality
61-
62-
.. autoclass:: AcceptLanguageInvalidHeader
63-
:members: header_value, parsed, __init__, __add__, __contains__, __iter__,
64-
__radd__, __str__, parse, basic_filtering, best_match, lookup,
65-
quality
66-
50+
:members:
51+
parse, header_value, parsed, header_state, __init__, __add__,
52+
__bool__, __radd__, __repr__, __str__, copy, basic_filtering, lookup
6753

6854
Cache-Control
6955
~~~~~~~~~~~~~

0 commit comments

Comments
 (0)