-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make tests run on py3 #398
Commits on Jan 21, 2020
-
Cleanup: remove gettext functions override
This was used for live translation, a feature which ceased to exist long time ago.
Configuration menu - View commit details
-
Copy full SHA for bcf95ae - Browse repository at this point
Copy the full SHA bcf95aeView commit details -
Configuration menu - View commit details
-
Copy full SHA for 571d3e1 - Browse repository at this point
Copy the full SHA 571d3e1View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6216567 - Browse repository at this point
Copy the full SHA 6216567View commit details -
Configuration menu - View commit details
-
Copy full SHA for da8df5c - Browse repository at this point
Copy the full SHA da8df5cView commit details -
Configuration menu - View commit details
-
Copy full SHA for ee05d35 - Browse repository at this point
Copy the full SHA ee05d35View commit details -
Configuration menu - View commit details
-
Copy full SHA for b05729a - Browse repository at this point
Copy the full SHA b05729aView commit details -
Configuration menu - View commit details
-
Copy full SHA for db856cd - Browse repository at this point
Copy the full SHA db856cdView commit details -
Configuration menu - View commit details
-
Copy full SHA for 22ded4e - Browse repository at this point
Copy the full SHA 22ded4eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 619b93a - Browse repository at this point
Copy the full SHA 619b93aView commit details -
py3: encode str to bytes when writing
We need to do this because the file has been open in binary mode.
Configuration menu - View commit details
-
Copy full SHA for 471863a - Browse repository at this point
Copy the full SHA 471863aView commit details -
Configuration menu - View commit details
-
Copy full SHA for e8f663d - Browse repository at this point
Copy the full SHA e8f663dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 00a32ae - Browse repository at this point
Copy the full SHA 00a32aeView commit details -
Configuration menu - View commit details
-
Copy full SHA for 6a2fb00 - Browse repository at this point
Copy the full SHA 6a2fb00View commit details -
url_trim: encoding name is 'unicode' as a string
The `tostring` API only accepts strings, and this didn't break in py2 because `unicode` exists as a constructor. So while it didn't break, it was encoding strings as ASCII. Refs. https://github.com/lxml/lxml/blob/6beef451a6690796d13fc3d2a19321434b880d16/src/lxml/html/__init__.py#L1790-L1793
Configuration menu - View commit details
-
Copy full SHA for 753e575 - Browse repository at this point
Copy the full SHA 753e575View commit details -
Configuration menu - View commit details
-
Copy full SHA for a938dea - Browse repository at this point
Copy the full SHA a938deaView commit details -
Configuration menu - View commit details
-
Copy full SHA for 75654c9 - Browse repository at this point
Copy the full SHA 75654c9View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2c9ccbb - Browse repository at this point
Copy the full SHA 2c9ccbbView commit details -
Configuration menu - View commit details
-
Copy full SHA for 1c39237 - Browse repository at this point
Copy the full SHA 1c39237View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8ae732f - Browse repository at this point
Copy the full SHA 8ae732fView commit details -
Configuration menu - View commit details
-
Copy full SHA for de492dc - Browse repository at this point
Copy the full SHA de492dcView commit details -
Configuration menu - View commit details
-
Copy full SHA for 9716203 - Browse repository at this point
Copy the full SHA 9716203View commit details -
Configuration menu - View commit details
-
Copy full SHA for 415c2b3 - Browse repository at this point
Copy the full SHA 415c2b3View commit details -
Configuration menu - View commit details
-
Copy full SHA for f873c1e - Browse repository at this point
Copy the full SHA f873c1eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 900238c - Browse repository at this point
Copy the full SHA 900238cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 297fecb - Browse repository at this point
Copy the full SHA 297fecbView commit details -
Configuration menu - View commit details
-
Copy full SHA for e9e5d02 - Browse repository at this point
Copy the full SHA e9e5d02View commit details -
Configuration menu - View commit details
-
Copy full SHA for 816a784 - Browse repository at this point
Copy the full SHA 816a784View commit details -
py3: L suffix is not allowed in numeric literals
int and long are now contained within int.
Configuration menu - View commit details
-
Copy full SHA for 57e1db5 - Browse repository at this point
Copy the full SHA 57e1db5View commit details -
Configuration menu - View commit details
-
Copy full SHA for bb92c96 - Browse repository at this point
Copy the full SHA bb92c96View commit details -
Configuration menu - View commit details
-
Copy full SHA for 002d6ce - Browse repository at this point
Copy the full SHA 002d6ceView commit details -
Configuration menu - View commit details
-
Copy full SHA for b7a2f3a - Browse repository at this point
Copy the full SHA b7a2f3aView commit details -
py3: drop redundant
re.U
flag forre.compile
From the Python docs: "for backward compatibility, the re.U flag still exists (as well as its synonym re.UNICODE and its embedded counterpart (?u)), but these are redundant in Python 3 since matches are Unicode by default for strings"
Configuration menu - View commit details
-
Copy full SHA for 81051c5 - Browse repository at this point
Copy the full SHA 81051c5View commit details -
py3: make sure serialization returns bytes
Previously the `__str__` method would perform the conversion step, and the `serialize` method was relying on that behavior. When we merged `__unicode__` and `__str__` methods though, that behavior ceased to exist. At the same time, we need to serialize to bytes (which was str in PY2), so that change is needed too.
Configuration menu - View commit details
-
Copy full SHA for 7451f09 - Browse repository at this point
Copy the full SHA 7451f09View commit details -
py3: open test files in binary mode
By default, files will be open in text mode under py3 (py2 was str, hence bytes). In order to keep the previous behavior, we need to force reading to bytes by specifying the extra 'b' flag to `open`.
Configuration menu - View commit details
-
Copy full SHA for 3e01065 - Browse repository at this point
Copy the full SHA 3e01065View commit details -
py3: make sure to compare numbers against numbers
`last_sync_revision` and `source_revision` can be `None`, and in such cases comparisons and even logging would fail, because py3 is stricter on what operations can be done across data types.
Configuration menu - View commit details
-
Copy full SHA for b374028 - Browse repository at this point
Copy the full SHA b374028View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3e9c8f4 - Browse repository at this point
Copy the full SHA 3e9c8f4View commit details -
py3: filter/map now return iterators
We convert filter/map to list comprehensions only when we actually need a list. No changes have been made in cases where an iterator can be used (e.g. for post-processing with `any`, `sorted`, `list`, or just iterating).
Configuration menu - View commit details
-
Copy full SHA for 1b2c7e9 - Browse repository at this point
Copy the full SHA 1b2c7e9View commit details -
py3: convert
keys()
anditems()
to listBecause now `keys()` and `items()` return iterators, in some cases we need to convert them to lists.
Configuration menu - View commit details
-
Copy full SHA for 9394906 - Browse repository at this point
Copy the full SHA 9394906View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7e7b4fa - Browse repository at this point
Copy the full SHA 7e7b4faView commit details -
Configuration menu - View commit details
-
Copy full SHA for 0a7a333 - Browse repository at this point
Copy the full SHA 0a7a333View commit details -
py3: convert QuerySet result to list
The QuerySet returned by `values()` is not subscriptable, so we need to convert it to a list.
Configuration menu - View commit details
-
Copy full SHA for 54f80d0 - Browse repository at this point
Copy the full SHA 54f80d0View commit details -
Configuration menu - View commit details
-
Copy full SHA for af3b279 - Browse repository at this point
Copy the full SHA af3b279View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9977130 - Browse repository at this point
Copy the full SHA 9977130View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5522e69 - Browse repository at this point
Copy the full SHA 5522e69View commit details -
Configuration menu - View commit details
-
Copy full SHA for ce94dc8 - Browse repository at this point
Copy the full SHA ce94dc8View commit details -
Configuration menu - View commit details
-
Copy full SHA for 54bc7fd - Browse repository at this point
Copy the full SHA 54bc7fdView commit details -
Configuration menu - View commit details
-
Copy full SHA for d47a758 - Browse repository at this point
Copy the full SHA d47a758View commit details
Commits on Jan 22, 2020
-
py3: use raw strings for regexes
Fixes linting issues and simplifies some patterns by removing unneeded escaping.
Configuration menu - View commit details
-
Copy full SHA for 6637ada - Browse repository at this point
Copy the full SHA 6637adaView commit details