Fontbakery: Go Python 3.6+ only

Created on 7 Jul 2018  路  9Comments  路  Source: googlefonts/fontbakery

http://python3statement.org/

I'd say it is soon time to drop Python 2 support. That would allow some code clean-up and eases maintenance.

All 9 comments

Since FB isn't used by GF staff eng team today, it would be fine to do this
now I think.

(Huh, it isn't?)

By the way, a nice side-effect of 3.6+ only is that you can freely use pathlib's Path object to construct and manipulate paths, instead of the very clunky os.path.* family of functions and even pass them to open() and friends! In 3.5 and below, you had to str() them before passing them to any builtin function. 3.6 makes working with [Pp]aths much nicer.

Currently, by the time the staff engineers touch the files, the files are
presumed good; FB is used by the contractors that Google works with to
prepare fonts for onboarding into the API.

I reviewed the code and it looks good (and safe) to merge.

I'm happy to see this :)

yeah. Me too. The full rationale for my code review was posted at https://github.com/googlefonts/fontbakery/pull/1980#issuecomment-407043124

OK. Initially I felt worried about touching so many files (57) at once. But now I finished reviewing the full set of changes and the bulk of it is changing the string formatting code-style. That's nice. This new syntax makes it more readable and possibly easier to write as well.

My other worry was related to introducing bugs. We have a test suite with still only 60% code coverage, so it is not guaranteed it will catch all possible new problems. But the fact that I read the full change-set above and did not notice anything too unconventional, makes me feel safe to move on now and merge this.

Thanks, @madig and @hugovk

Keep in mind that even a 100% coverage just means that every line of code got executed at least once, it does not mean that the code has no bugs. I think one would need quantum computers to test every possible state of a program.

Was this page helpful?
0 / 5 - 0 ratings