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.

classification
Title: lib2to3 ability to output files into a different directory and alter their names
Type: enhancement Stage: resolved
Components: 2to3 (2.x to 3.x conversion tool) Versions: Python 3.2, Python 3.3, Python 2.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: gregory.p.smith Nosy List: benjamin.peterson, gregory.p.smith, nadeem.vawda, python-dev, twouters
Priority: normal Keywords: patch

Created on 2012-02-03 07:41 by gregory.p.smith, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
2to3-output-to-new-dir-gps01.patch gregory.p.smith, 2012-02-03 07:41
a6cd0518495e.diff gregory.p.smith, 2012-02-03 18:39 review
Messages (6)
msg152498 - (view) Author: Gregory P. Smith (gregory.p.smith) * (Python committer) Date: 2012-02-03 07:41
In order for lib2to3 to be integrated into parts of our workflow at work we need it to be able to write converted code out to new directory and modify the filename in the process.  While doing that, it is very convenient if it can also write all files regardless of if refactoring caused any changes.

This patch adds those three features.

Uploading it to the bugtracker in hope of it showing up with a code review link.
msg152547 - (view) Author: Gregory P. Smith (gregory.p.smith) * (Python committer) Date: 2012-02-03 18:39
while the initial patch below was against 3.1 I'm only intending to commit this to 3.2, 3.3 and 2.7.

Feature backports on lib2to3 are allowed per http://mail.python.org/pipermail/python-dev/2011-December/115089.html.
msg153239 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2012-02-13 00:00
New changeset ceea9ebfe003 by Gregory P. Smith in branch '3.2':
Issue #13930: Adds ability for 2to3 to write its output to a different
http://hg.python.org/cpython/rev/ceea9ebfe003

New changeset 9f583700d27f by Gregory P. Smith in branch '2.7':
Issue #13930: Adds ability for 2to3 to write its output to a different
http://hg.python.org/cpython/rev/9f583700d27f

New changeset 4b791e513c2c by Gregory P. Smith in branch 'default':
Issue #13930: Adds ability for 2to3 to write its output to a different
http://hg.python.org/cpython/rev/4b791e513c2c
msg153292 - (view) Author: Nadeem Vawda (nadeem.vawda) * (Python committer) Date: 2012-02-13 20:00
Tests are failing on all the Windows buildbots (e.g. http://www.python.org/dev/buildbot/all/builders/x86%20XP-4%203.x/builds/5966/steps/test/logs/stdio ).

The problem seems to be that the test in question is hardwired to expect "/" as the directory separator.
msg153307 - (view) Author: Gregory P. Smith (gregory.p.smith) * (Python committer) Date: 2012-02-14 00:13
oh did I miss a / vs os.sep somewhere?  Looking.  I'll fix this.
msg153313 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2012-02-14 00:29
New changeset 6fd16782ecb8 by Gregory P. Smith in branch '3.2':
Issue #13930: fix a / to use os.sep so that the test works on Windows.
http://hg.python.org/cpython/rev/6fd16782ecb8

New changeset f13fbd848d50 by Gregory P. Smith in branch 'default':
Issue #13930: fix a / to use os.sep so that the test works on Windows.
http://hg.python.org/cpython/rev/f13fbd848d50

New changeset 34445738954b by Gregory P. Smith in branch '2.7':
Issue #13930: fix a / to use os.sep so that the test works on Windows.
http://hg.python.org/cpython/rev/34445738954b
History
Date User Action Args
2022-04-11 14:57:26adminsetgithub: 58138
2012-02-14 02:27:54gregory.p.smithsetstatus: open -> closed
2012-02-14 00:29:36python-devsetmessages: + msg153313
2012-02-14 00:13:01gregory.p.smithsetmessages: + msg153307
2012-02-13 22:25:58pitrousetstatus: closed -> open
stage: patch review -> resolved
2012-02-13 20:00:32nadeem.vawdasetnosy: + nadeem.vawda
messages: + msg153292
2012-02-13 00:04:41gregory.p.smithsetstatus: open -> closed
resolution: fixed
2012-02-13 00:01:46gregory.p.smithsethgrepos: - hgrepo111
2012-02-13 00:00:28python-devsetnosy: + python-dev
messages: + msg153239
2012-02-03 18:39:54gregory.p.smithsetfiles: + a6cd0518495e.diff
2012-02-03 18:39:08gregory.p.smithsetnosy: + benjamin.peterson

messages: + msg152547
versions: - Python 3.1
2012-02-03 07:41:27gregory.p.smithcreate