build!: drop Python 2 support, require Python 3.6+

Summary

Drop Python 2 support entirely. Python 2.7 reached end-of-life on January 1, 2020.

  • Remove all from __future__ imports
  • Remove if str is bytes: version checks
  • Remove Python 2 CI job
  • Simplify pylib/poly.py compatibility layer
  • Update build to require Python >= 3.6.0

Changes

Area Before After
pylib/poly.py 114 lines 71 lines
pylib/util.py termsize() 30+ lines 6 lines
CI jobs Includes Python 2 Python 3 only

Net: -182 lines of code

Test plan

  • waf configure shows "python version >= 3.6.0"
  • waf build passes
  • waf check passes (all tests)
  • CI pipeline

Closes discussion in !1506 where James suggested killing Python 2 entirely.

Edited by Matt Selsky

Merge request reports

Loading
Loading