| changeset | 63c9680eed20 |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | John Rouillard <rouilj@ieee.org> |
| description | fake8 whitespace; variable name replacement |
| files |
| changeset | 3b945aee0919 |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | John Rouillard <rouilj@ieee.org> |
| description | accept_language parse; fix priority order; preserve insertion order There are conditions under which the order is not correctly returned. Use hashq.hashpop in a loop to get items out of hash (list) in proper priority order. Make 3 element tuples in hashq include insertion order. This makes tuples inserted later lower in priority when priority q values are the same. Makes: "zn;q=1.0;q= 1.0,pt-br,en-US; q=0.5" return ['zn', 'pt_br', 'en_US'] (pt_br is default prio of 1 like zn). Otherwise we get ['pt_br', 'zn', 'en_US'] since 'p' > 'z'. |
| files |
| changeset | ed8a9974c1bd |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | John Rouillard <rouilj@ieee.org> |
| description | flake8 cleanups. whie space changes. |
| files |
| changeset | 936275dfe1fa |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | John Rouillard <rouilj@ieee.org> |
| description | Try to fix: DeprecationWarning: invalid escape sequence \d DeprecationWarning: invalid escape sequence \s DeprecationWarning: invalid escape sequence \) Strings under python 3 are unicode strings rather then "regular" strings as under python 2. So all regexps need to be raw strings. We will see how many I fixed and if I broke any. |
| files |
| changeset | b00cd44fea16 |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | Joseph Myers <jsm@polyomino.org.uk> |
| description | Python 3 preparation: update string translate method call in cgi/accept_language.py. The str translate method in Python 3 is sufficiently different from that in Python 2 that different arguments are needed here. Note that the existing code "ascii = ''.join([chr(x) for x in range(256)])" is redundant with both versions (in Python 2, None can be used instead as the first translate argument from Python 2.6 onwards). |
| files |
| changeset | 74476eaac38a |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | Richard Jones <richard@users.sourceforge.net> |
| description | more modernisation |
| files |
| changeset | 52f89836d05b |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | Alexander Smishlajev <a1s@users.sourceforge.net> |
| description | Parse the Accept-Language header as defined in RFC2616. |
| files |