[issue15030] PyPycLoader can't read cached .pyc files

2012-07-03 Thread Brett Cannon
Brett Cannon added the comment: Maybe you can try emailing in the form again, Marc? Let me know when you have and if it is lost again I will bug the proper people. Anyway, the original patch I committed added you to Misc/ACKS: http://hg.python.org/cpython/file/56260d30985d/Misc/ACKS#l16

[issue15030] PyPycLoader can't read cached .pyc files

2012-07-02 Thread Marc Abramowitz
Marc Abramowitz added the comment: Hi Martin, I already did. See http://bugs.python.org/msg164162 and http://bugs.python.org/msg164164. Maybe it's not "on file" yet? -- ___ Python tracker ___

[issue15030] PyPycLoader can't read cached .pyc files

2012-07-02 Thread Martin v . Löwis
Martin v. Löwis added the comment: Marc, can you please submit a contributor form? -- ___ Python tracker ___ ___ Python-bugs-list mai

[issue15030] PyPycLoader can't read cached .pyc files

2012-07-02 Thread Marc Abramowitz
Marc Abramowitz added the comment: Hi Brett, can I get an ack in Misc/ACKS please (to make my Mom proud :-))? Attaching patch. -- Added file: http://bugs.python.org/file26236/Misc_ACKS.patch ___ Python tracker __

[issue15030] PyPycLoader can't read cached .pyc files

2012-07-02 Thread Brett Cannon
Brett Cannon added the comment: Changeset b7463ec1980c has the fix and test update (went with a simple solution for the tests which uses the mock to verify). Thanks to Ronan and Marc for helping out! -- dependencies: -Split .pyc parsing from module loading resolution: -> fixed statu

[issue15030] PyPycLoader can't read cached .pyc files

2012-06-28 Thread Marc Abramowitz
Marc Abramowitz added the comment: I don't know if I'll have time soon to do the tweaks to Ronan's test (and maybe he wants to do them himself anyway?), but here's the correction of the size calculation in the header (from size of bytecode to size of source -- thanks, Brett!) -- Adde

[issue15030] PyPycLoader can't read cached .pyc files

2012-06-27 Thread Marc Abramowitz
Marc Abramowitz added the comment: Oops. Refactor. :-) -- Added file: http://bugs.python.org/file26189/cpython-issue-15030.patch ___ Python tracker ___ _

[issue15030] PyPycLoader can't read cached .pyc files

2012-06-27 Thread Marc Abramowitz
Marc Abramowitz added the comment: Oops, last attachment included the source timestamp twice instead of timestamp + bytecode size. -- Added file: http://bugs.python.org/file26188/cpython-issue-15030.patch ___ Python tracker

[issue15030] PyPycLoader can't read cached .pyc files

2012-06-27 Thread Marc Abramowitz
Marc Abramowitz added the comment: Here's a patch that unconditionally switches over to the 12 byte format. I'm assuming the "size" in data[8:12] is the length of the bytecode? -- Added file: http://bugs.python.org/file26186/cpython-issue-15030.patch __

[issue15030] PyPycLoader can't read cached .pyc files

2012-06-27 Thread Brett Cannon
Brett Cannon added the comment: The patch could be updated to ignore the 12 bytes unconditionally when reading bytecode but still write out the accurate file size (when possible). That should be fully compatible within Python 3.3 no matter who generated the bytecode (PyPycLoader or import).

[issue15030] PyPycLoader can't read cached .pyc files

2012-06-27 Thread Antoine Pitrou
Antoine Pitrou added the comment: > I am unsure as to whether this is a bug in the test or the implementation. You should probably investigate a bit more. We don't want to silence exceptions if there's not a good reason to. -- ___ Python tracker <

[issue15030] PyPycLoader can't read cached .pyc files

2012-06-27 Thread Marc Abramowitz
Marc Abramowitz added the comment: Hmmm if I simply do: diff -r b66e82c9f852 Lib/importlib/abc.py --- a/Lib/importlib/abc.py Tue Jun 26 23:05:27 2012 +0200 +++ b/Lib/importlib/abc.py Wed Jun 27 12:15:55 2012 -0700 @@ -282,7 +282,7 @@ if len(raw_timestamp) < 4:

[issue15030] PyPycLoader can't read cached .pyc files

2012-06-27 Thread Antoine Pitrou
Antoine Pitrou added the comment: > I think the loader should just unconditionally assume 12 bytes header. > This is meant to work only for the exact version it ships with, so it > just has to match. Agreed with Martin. -- ___ Python tracker

[issue15030] PyPycLoader can't read cached .pyc files

2012-06-27 Thread Martin v . Löwis
Martin v. Löwis added the comment: I think the loader should just unconditionally assume 12 bytes header. This is meant to work only for the exact version it ships with, so it just has to match. -- nosy: +loewis ___ Python tracker

[issue15030] PyPycLoader can't read cached .pyc files

2012-06-27 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis : -- nosy: +Arfrever ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue15030] PyPycLoader can't read cached .pyc files

2012-06-27 Thread Marc Abramowitz
Marc Abramowitz added the comment: Brett, I just emailed the contributor agreement. -- ___ Python tracker ___ ___ Python-bugs-list ma

[issue15030] PyPycLoader can't read cached .pyc files

2012-06-27 Thread Brett Cannon
Brett Cannon added the comment: Patch looks good, Marc. Can you sign a PSF contributor agreement and send it in (http://www.python.org/psf/contrib/)? -- assignee: -> brett.cannon stage: -> commit review ___ Python tracker

[issue15030] PyPycLoader can't read cached .pyc files

2012-06-27 Thread Marc Abramowitz
Marc Abramowitz added the comment: Third revision of my patch based on additional feedback from Brett (thanks!)... -- Added file: http://bugs.python.org/file26178/cpython-issue-15030.patch ___ Python tracker _

[issue15030] PyPycLoader can't read cached .pyc files

2012-06-27 Thread Marc Abramowitz
Marc Abramowitz added the comment: Updated patch based on feedback from Brett (thanks!) -- Added file: http://bugs.python.org/file26177/cpython-issue-15030.patch ___ Python tracker

[issue15030] PyPycLoader can't read cached .pyc files

2012-06-26 Thread Marc Abramowitz
Marc Abramowitz added the comment: Similar issue in distribute: https://bitbucket.org/tarek/distribute/issue/283/bdist_egg-issues-with-python-330ax -- ___ Python tracker ___ __

[issue15030] PyPycLoader can't read cached .pyc files

2012-06-26 Thread Georg Brandl
Georg Brandl added the comment: Patch looks innocent enough; would be nice to fix this for 3.3. -- nosy: +georg.brandl priority: normal -> release blocker ___ Python tracker ___

[issue15030] PyPycLoader can't read cached .pyc files

2012-06-26 Thread Marc Abramowitz
Marc Abramowitz added the comment: Attaching a patch... Using Ronan's test_PyPyc.diff, before my patch: {{{ ~/dev/hg-repos/cpython$ ./python.exe -m unittest Lib/importlib/test/source/test_abc_loader.py ...E.. ===

[issue15030] PyPycLoader can't read cached .pyc files

2012-06-08 Thread Brett Cannon
Brett Cannon added the comment: Yes, a fix would be easiest, but someone has to write the fix. =) I will try to get to it before the first beta (unless Antoine, who made the .pyc change, wants to do it =). -- ___ Python tracker

[issue15030] PyPycLoader can't read cached .pyc files

2012-06-08 Thread Ronan Lamy
Ronan Lamy added the comment: Well, working on a deprecated ABC is certainly low-priority, but it seems rather bad to have 2 incompatible implementations of the .pyc format in the stdlib. If this is to stay like this, it should at least come with a strong warning that users of PyPycLoader mus

[issue15030] PyPycLoader can't read cached .pyc files

2012-06-07 Thread Brett Cannon
Brett Cannon added the comment: The format did change and importlib.abc.PyPycLoader was not subsequently updated. Problem is that the ABC has been deprecated and given backwards-compatibility instructions for Python 3.1, so I don't know if it should be considered a priority to fix this to rea

[issue15030] PyPycLoader can't read cached .pyc files

2012-06-07 Thread Jesús Cea Avión
Changes by Jesús Cea Avión : -- dependencies: +Split .pyc parsing from module loading ___ Python tracker ___ ___ Python-bugs-list mail

[issue15030] PyPycLoader can't read cached .pyc files

2012-06-07 Thread Ronan Lamy
Ronan Lamy added the comment: My preferred solution would be to use to use the functions I describe in issue 15031. -- ___ Python tracker ___ __

[issue15030] PyPycLoader can't read cached .pyc files

2012-06-07 Thread Jesús Cea Avión
Jesús Cea Avión added the comment: Could you write a patch for 3.3? -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsub

[issue15030] PyPycLoader can't read cached .pyc files

2012-06-07 Thread Ronan Lamy
Ronan Lamy added the comment: 2.7 doesn't have PyPycLoader. For 3.2, it's such a pain to create a working concrete subclass of PyPycLoader that I gave up. But just by reading the code, it doesn't seem affected, as there's no discrepancy with importlib._bootstrap: they both consider that metad

[issue15030] PyPycLoader can't read cached .pyc files

2012-06-07 Thread Jesús Cea Avión
Jesús Cea Avión added the comment: Ronan, can you confirm if 2.7 or 3.2 are affected too? -- nosy: +jcea ___ Python tracker ___ ___ P

[issue15030] PyPycLoader can't read cached .pyc files

2012-06-07 Thread Ronan Lamy
New submission from Ronan Lamy : PyPycLoader can't read or write .pyc files created by the core import machinery. I'm attaching a failing test case demonstrating the issue: if you import a .py file using standard mechanisms, thus creating a .pyc, and then (in a separate process, say) attempt t