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 2014年02月26日 09:49 by bkabrda, last changed 2022年04月11日 14:57 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| fix-bytes-skipped-in-load_module.patch | bkabrda, 2014年02月26日 09:49 | review | ||
| Messages (14) | |||
|---|---|---|---|
| msg212244 - (view) | Author: Bohuslav "Slavek" Kabrda (bkabrda) * | Date: 2014年02月26日 09:49 | |
ModuleFinder.load_module currently only skips 8 bytes before trying to marshal.load the rest of the file, but it should skip 12 since 3.3 (magic, date, file size). I'm attaching a patch with test case. BTW this was very painful to find out, since I couldn't find any reference to written pyc files - am I searching wrong or is this really not documented anywhere? (Note, that this was originally reported at https://bugzilla.redhat.com/show_bug.cgi?id=1060338). |
|||
| msg212256 - (view) | Author: Brett Cannon (brett.cannon) * (Python committer) | Date: 2014年02月26日 14:58 | |
It's not documented because the format of .pyc files is considered an internal implementation detail. |
|||
| msg212259 - (view) | Author: Brett Cannon (brett.cannon) * (Python committer) | Date: 2014年02月26日 15:10 | |
Probably want to make sure that modulefinder uses importlib._bootstrap._validate_bytecode_header() to do the parsing. |
|||
| msg212260 - (view) | Author: R. David Murray (r.david.murray) * (Python committer) | Date: 2014年02月26日 15:14 | |
Since modulefinder is used by freeze tools (notably cx_Freeze, which seems to be the most popular currently), should this be considered a release blocker? |
|||
| msg212262 - (view) | Author: Brett Cannon (brett.cannon) * (Python committer) | Date: 2014年02月26日 15:21 | |
It's been broken since Python 3.3 so this is not a 3.3 regression. |
|||
| msg212265 - (view) | Author: R. David Murray (r.david.murray) * (Python committer) | Date: 2014年02月26日 15:37 | |
Right. I'm asking if it should be a release blocker for the next 3.3, too :) I'm not saying it should be, just raising the question. It's in my mind because I'm currently using cx_Freeze in a project for a client. It could have affected me, since I was going to release using 3.3, but as it turns out I have to use 2.7 because of a non-ported dependency that I don't have time to port myself. |
|||
| msg212268 - (view) | Author: R. David Murray (r.david.murray) * (Python committer) | Date: 2014年02月26日 15:40 | |
Oops, didn't mean to remove the keyword. |
|||
| msg212274 - (view) | Author: Brett Cannon (brett.cannon) * (Python committer) | Date: 2014年02月26日 16:12 | |
Don't know why this is any more special of a bug because it influences cx_freeze compared to any other bug that influences a popular project. I mean I'm not going to stop you from making it a blocker but I'm also not going to rush to fix it myself either. |
|||
| msg212276 - (view) | Author: R. David Murray (r.david.murray) * (Python committer) | Date: 2014年02月26日 17:07 | |
Well, because of the fact that freeze tools are used to distribute programs on the Windows platform. But, given that it hasn't been reported before and has been a problem since 3.3, it seems like there is no rush. |
|||
| msg212447 - (view) | Author: Roundup Robot (python-dev) (Python triager) | Date: 2014年02月28日 15:50 | |
New changeset 432cb56db05d by Brett Cannon in branch '3.3': Issue #20778: Fix modulefinder to work with bytecode-only modules. http://hg.python.org/cpython/rev/432cb56db05d New changeset b6e999c8907c by Brett Cannon in branch 'default': merge for issue #20778 http://hg.python.org/cpython/rev/b6e999c8907c |
|||
| msg212448 - (view) | Author: Brett Cannon (brett.cannon) * (Python committer) | Date: 2014年02月28日 15:52 | |
Fixed in Python 3.3.6 and 3.4.1. Bohuslav, could you sign the contributor agreement at http://www.python.org/psf/contrib/contrib-form/ ? While I didn't directly use your patch this time I noticed you are already in Misc/ACKS so it would be helpful if you could sign the document. |
|||
| msg212449 - (view) | Author: Bohuslav "Slavek" Kabrda (bkabrda) * | Date: 2014年02月28日 15:55 | |
Brett, I signed it just yesterday, it probably wasn't processed yet. Hopefully it will be in few days. Thanks for patching this! |
|||
| msg212450 - (view) | Author: Bohuslav "Slavek" Kabrda (bkabrda) * | Date: 2014年02月28日 15:56 | |
Whoops, reopened by accident. Closing again. |
|||
| msg215013 - (view) | Author: Thomas Kluyver (takluyver) * | Date: 2014年03月28日 02:11 | |
For future reference, cx_Freeze ships its own copy of ModuleFinder, so it doesn't depend on the stdlib copy. This issue was fixed there some time around the release of Python 3.3. I realised recently that this is based on code in the stdlib, and I've been meaning to work out whether cx_Freeze can use any of the stdlib code and lose parts of its own implementation. I guess it's been diverging for quite some time, though. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:57:59 | admin | set | github: 64977 |
| 2014年03月28日 02:11:54 | takluyver | set | nosy:
+ takluyver messages: + msg215013 |
| 2014年02月28日 15:56:19 | bkabrda | set | status: open -> closed resolution: fixed messages: + msg212450 |
| 2014年02月28日 15:55:27 | bkabrda | set | status: closed -> open resolution: fixed -> (no value) messages: + msg212449 |
| 2014年02月28日 15:52:49 | brett.cannon | set | status: open -> closed resolution: fixed messages: + msg212448 stage: resolved |
| 2014年02月28日 15:50:43 | python-dev | set | nosy:
+ python-dev messages: + msg212447 |
| 2014年02月27日 07:49:47 | Arfrever | set | keywords: + patch |
| 2014年02月27日 07:49:38 | Arfrever | set | keywords: + 3.3regression, - patch, 3.2regression |
| 2014年02月26日 23:30:46 | brett.cannon | set | assignee: brett.cannon |
| 2014年02月26日 17:28:46 | larry | set | nosy:
- larry |
| 2014年02月26日 17:07:55 | r.david.murray | set | messages: + msg212276 |
| 2014年02月26日 16:12:25 | brett.cannon | set | messages: + msg212274 |
| 2014年02月26日 15:40:03 | r.david.murray | set | keywords:
+ 3.2regression messages: + msg212268 |
| 2014年02月26日 15:37:37 | r.david.murray | set | keywords:
- 3.2regression messages: + msg212265 |
| 2014年02月26日 15:21:37 | brett.cannon | set | keywords: + patch |
| 2014年02月26日 15:21:12 | brett.cannon | set | keywords:
+ 3.2regression, - patch messages: + msg212262 |
| 2014年02月26日 15:14:33 | r.david.murray | set | nosy:
+ r.david.murray messages: + msg212260 |
| 2014年02月26日 15:10:39 | brett.cannon | set | messages: + msg212259 |
| 2014年02月26日 15:00:08 | brett.cannon | set | priority: release blocker -> normal |
| 2014年02月26日 14:58:35 | brett.cannon | set | priority: normal -> release blocker nosy: + larry, georg.brandl messages: + msg212256 |
| 2014年02月26日 13:25:00 | r.david.murray | set | nosy:
+ brett.cannon, eric.snow |
| 2014年02月26日 10:40:40 | Arfrever | set | nosy:
+ Arfrever |
| 2014年02月26日 09:49:14 | bkabrda | create | |