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 vstinner
Recipients collinwinter, vstinner
Date 2008-08-19.22:05:38
SpamBayes Score 1.3686932e-05
Marked as misclassified No
Message-id <1219183541.38.0.933947202959.issue3606@psf.upfronthosting.co.za>
In-reply-to
Content
I tried 2to3 on my python-ptrace project and with minor changes, it 
works fine. One of the minor changes is to replace 
subprocess.split(";") by commands.split(";"). The original code was:

   commands = command
   ok = True
   for command in commands.split(";"):
      command = command.strip()
      ok &= self.execute(command)

I don't import subprocess and I don't use this module in my code. It 
is possible to reproduce the bug only with two lines:

   commands = "a;b;c"
   x = commands.split(";")

So 2to3 doesn't care if commands is a module or variable, it just 
replaced the text pattern... It looks like the change is done 
by "fixes/fix_imports.py", maybe this pattern:

   # Find usages of module members in code e.g. urllib.foo(bar)
   yield """power< (%s)
            trailer<'.' any > any* >
         """ % mod_name_list
History
Date User Action Args
2008-08-19 22:05:41vstinnersetrecipients: + vstinner, collinwinter
2008-08-19 22:05:41vstinnersetmessageid: <1219183541.38.0.933947202959.issue3606@psf.upfronthosting.co.za>
2008-08-19 22:05:40vstinnerlinkissue3606 messages
2008-08-19 22:05:39vstinnercreate