forked from web-platform-tests/wpt
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix a bunch of Python 3 issues in the manifest code
The goal here is to get mypy passing in Python 3; prior to this patch there were a lot of cases where Python 3 behaviour was broken but not picked up by the tests (e.g. because it only happened when updating the manifest or with certain caches or similar). Many of these issues were seen by mypy, but that had been disabled for Py3 specfically to avoid having to fix all the issues at the time the annotations were added. But now we do need that support. The general approach here is to use the same types for Py 2 and Py 3. In particular we use Text where possible (with a couple of exceptions where it was easier not to), rather than bytes. The native str type is avoided wherever possible since this introduces difficult to debug differences between Python versions. The preference for Text includes paths, which means we no longer support running in non-unicode directories (in practice it is likely to be broken if the path isn't UTF-8 compatible on Unix or UTF-16 compatible on Windows).
- Loading branch information
Showing
21 changed files
with
492 additions
and
452 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.