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.
Created on 2012年08月31日 22:27 by brett.cannon, last changed 2022年04月11日 14:57 by admin. This issue is now closed.
| Messages (5) | |||
|---|---|---|---|
| msg169587 - (view) | Author: Brett Cannon (brett.cannon) * (Python committer) | Date: 2012年08月31日 22:27 | |
2to3 isn't (ironically) translating lib2to3 so that it can run under Python 3: File "/Users/bcannon/Developer/repo/benchmarks_py3k/lib/2to3/lib2to3/fixes/fix_operator.py", line 89, in _check_method method = getattr(self, "_" + results["method"][0].value.encode("ascii")) Might need to let Python 3 use its stdlib copy of lib2to3. Otherwise will need to come up with a way to have two copies of a library, one for Python 2 and another for Python 3, and then copy the right thing. Maybe a lib3 directory that is only copied over by make_perf3.sh? |
|||
| msg169589 - (view) | Author: Antoine Pitrou (pitrou) * (Python committer) | Date: 2012年08月31日 22:42 | |
> Might need to let Python 3 use its stdlib copy of lib2to3. Otherwise > will need to come up with a way to have two copies of a library, one > for Python 2 and another for Python 3, and then copy the right thing. > Maybe a lib3 directory that is only copied over by make_perf3.sh? Sounds like a good idea. Even better if you can find a 3.x copy of lib2to3 which is close the 2.x one :-) |
|||
| msg169591 - (view) | Author: Brett Cannon (brett.cannon) * (Python committer) | Date: 2012年08月31日 23:20 | |
On Fri, Aug 31, 2012 at 6:42 PM, Antoine Pitrou <report@bugs.python.org>wrote: > > Antoine Pitrou added the comment: > > > Might need to let Python 3 use its stdlib copy of lib2to3. Otherwise > > will need to come up with a way to have two copies of a library, one > > for Python 2 and another for Python 3, and then copy the right thing. > > Maybe a lib3 directory that is only copied over by make_perf3.sh? > > Sounds like a good idea. > Even better if you can find a 3.x copy of lib2to3 which is close the 2.x > one :-) > I think short of copying the stdlib versions from Python 2.7 and 3.2 I don't think there is much choice short of doing a 2to3+fixes translation ourselves just to have a version that is as close to the same as possible. But looking at the stdlib versions they are practically the same already except that one uses StringIO and the other uses io.StringIO (and Python 3 doesn't need the encode() call that triggered this whole discussion). I don't remember if StringIO or io.StringIO is faster in Python 2.6 and 2.7, but based on that we can either leave it as-is or tweak it to use the other just for benchmarking to make it even. |
|||
| msg187956 - (view) | Author: Brett Cannon (brett.cannon) * (Python committer) | Date: 2013年04月28日 03:29 | |
Since lib3 now exists we should probably take advantage and just keep a translated, patched copy of 2to3 there to avoid this problem while keeping performance on an even keel for comparison. |
|||
| msg188307 - (view) | Author: Roundup Robot (python-dev) (Python triager) | Date: 2013年05月03日 17:07 | |
New changeset 66f168b468c3 by Brett Cannon in branch 'default': #15834: Make 2to3 so it can actually be proper translated. http://hg.python.org/benchmarks/rev/66f168b468c3 |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:57:35 | admin | set | github: 60038 |
| 2013年05月03日 17:08:16 | brett.cannon | set | status: open -> closed resolution: fixed stage: needs patch -> resolved |
| 2013年05月03日 17:07:29 | python-dev | set | nosy:
+ python-dev messages: + msg188307 |
| 2013年04月28日 03:29:11 | brett.cannon | set | messages: + msg187956 |
| 2013年04月28日 03:25:47 | brett.cannon | set | keywords: + easy |
| 2013年03月26日 18:01:21 | brett.cannon | set | assignee: collinwinter -> brett.cannon |
| 2012年08月31日 23:20:05 | brett.cannon | set | messages: + msg169591 |
| 2012年08月31日 22:42:24 | pitrou | set | messages: + msg169589 |
| 2012年08月31日 22:27:19 | brett.cannon | create | |