I don't understand why this has been marked resolved.
I have finally worked out how to do what has been suggested,
but it is pretty painful and obscure, and involves monkey
patching. Something like:
import distutils.util
import setuptools
from lib2to3.refactor import get_fixers_from_package
fixer_names = []
for p in setuptools.lib2to3_fixer_packages:
fixer_names.extend(get_fixers_from_package(p))
# Modify
fixer_names.remove('lib2to3.fixes.fix_next')
# Monkey patch:
distutils.util.Mixin2to3.fixer_names = fixer_names
Is that really what is being suggested as the way to do this?
|