Loading
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 configureshows "python version >= 3.6.0" -
waf buildpasses -
waf checkpasses (all tests) - CI pipeline
Closes discussion in !1506 where James suggested killing Python 2 entirely.
Edited by Matt Selsky