This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author loewis
Recipients benjamin.peterson, loewis
Date 2008-11-25.04:03:00
SpamBayes Score 1.4270113e-07
Marked as misclassified No
Message-id <1227585782.3.0.0582254728079.issue4423@psf.upfronthosting.co.za>
In-reply-to
Content
Are there any plans to improve that? In the specific case, it would help
if commands gets only replaced if an import of commands appears "in
scope" (or, if that is too difficult, anywhere in the file). I think
2to3 should create a list of all names that get imported anywhere, and
compare candidates for renaming against this list.

Also, I tried to work-around by just deleting "commands" from MAPPING
(nobody uses the commands module, anyway); this unfortunately failed
because PATTERN already had the name compiled in. It would be helpful if
PATTERN was computed more lazily, e.g. by overriding compile_pattern.
(I then worked around by regenerating PATTERN after monkey-patching
MAPPING).
History
Date User Action Args
2008-11-25 04:03:02loewissetrecipients: + loewis, benjamin.peterson
2008-11-25 04:03:02loewissetmessageid: <1227585782.3.0.0582254728079.issue4423@psf.upfronthosting.co.za>
2008-11-25 04:03:01loewislinkissue4423 messages
2008-11-25 04:03:00loewiscreate