[issue41655] New Node may not be visited in lib2to3.refactor.RefactoringTool.traverse_by

Gregory P. Smith report at bugs.python.org
Sat Nov 21 04:19:57 EST 2020


Gregory P. Smith <greg at krypto.org> added the comment:

I expect your overall logic is sound in the PR. But this is a public API change, and while we've typically exempted lib2to3 from needing to concern itself about deprecations and API changes by leaving it undocumented and explicitly promising not to care about this module in that sense... Enough things use it today that we should probably not do that anymore.

Especially given that we're considering it a deprecated library these days. It isn't likely to stand up well to 3.10+'s new grammar.

Various projects have forked lib2to3 into their own maintained thing either directly on PyPI or as an internalized third_party fork within their own project (as I believe Black has done?). It is probably best to do that for changes of this nature rather than push for them to be included in a future stdlib lib2to3.

See https://bugs.python.org/issue40360 for context.

----------
nosy: +gregory.p.smith

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue41655>
_______________________________________


More information about the Python-bugs-list mailing list