Last call regarding Python 2 removal
Matt Selsky
Matthew.Selsky at twosigma.com
Mon Nov 9 06:02:48 UTC 2026
Hi all,
Sorry for the confusion on the date -- I meant Saturday, November 7, and
the discussion has run past that anyway. I'm planning to merge !1510
this coming weekend unless something new comes up.
Fred, thanks for the history on the poly*() wrappers -- I agree they're
about Python 3's bytes/str model, not Python 2. !1510 doesn't remove
them: it only deletes the Python 2 branches inside poly.py and the
other `str is bytes` checks, so every ntp.poly function keeps working
for Python 3 callers.
On the user-visible side: anyone who needs Python 2 can stay on 1.2.6,
which announced that it would be the last release supporting it.
Third-party code using our ntp modules under Python 3 should see no
change from !1510.
Moving our own code off the poly*() wrappers is a separate job, and I'd
do it module by module with tests, keeping ntp.poly importable for
outside users. Adding type annotations first would let mypy point out
exactly where str and bytes meet, which addresses the risk Fred raised.
Cheers,
Matt
More information about the devel
mailing list