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 2021年09月13日 20:34 by eric.snow, last changed 2022年04月11日 14:59 by admin. This issue is now closed.
| Pull Requests | |||
|---|---|---|---|
| URL | Status | Linked | Edit |
| PR 28335 | merged | eric.snow, 2021年09月14日 16:09 | |
| PR 28379 | open | eric.snow, 2021年09月16日 04:38 | |
| Messages (9) | |||
|---|---|---|---|
| msg401724 - (view) | Author: Eric Snow (eric.snow) * (Python committer) | Date: 2021年09月13日 20:34 | |
(See: https://github.com/python/cpython/pull/28107#issuecomment-915627148) The output from marshal (e.g. PyMarshal_WriteObjectToString(), marshal.dump()) may be different depending on if it is a debug or non-debug build. I found this while working on freezing stdlib modules. |
|||
| msg401726 - (view) | Author: Eric Snow (eric.snow) * (Python committer) | Date: 2021年09月13日 20:34 | |
FYI, I came up with a fix (for frozen modules, at least) in https://github.com/python/cpython/pull/28107. |
|||
| msg401727 - (view) | Author: Eric Snow (eric.snow) * (Python committer) | Date: 2021年09月13日 20:36 | |
One consequence of this is that frozen module .h files can be different for debug vs. non-debug, which causes CI (and Windows builds) to fail. |
|||
| msg401847 - (view) | Author: Eric Snow (eric.snow) * (Python committer) | Date: 2021年09月15日 16:19 | |
New changeset cbeb81971057d6c382f45ecce92df2b204d4106a by Eric Snow in branch 'main': bpo-45020: Freeze some of the modules imported during startup. (gh-28335) https://github.com/python/cpython/commit/cbeb81971057d6c382f45ecce92df2b204d4106a |
|||
| msg401869 - (view) | Author: Guido van Rossum (gvanrossum) * (Python committer) | Date: 2021年09月15日 17:59 | |
I would propose that marshal internally make an extra pass over its input in order to determine which objects are referenced multiple times. This will speed up reading marshalled data (in addition to addressing the reproducibility issue with debug builds) at the cost of slowing down writing it, so there may need to be a way for 3rd party users to turn this off (or a way for importlib and compileall to turn it on). |
|||
| msg401884 - (view) | Author: Eric Snow (eric.snow) * (Python committer) | Date: 2021年09月15日 18:56 | |
That's a good idea. It's certainly cleaner than the approach I took (optionally pass in to marshal.dumps() the list of "before" object/refcount pairs to compare in w_ref()). Adding a flag to marshal.dumps() to opt out shouldn't be too big a deal. (I expect all users of marshal will want the improvement by default.) |
|||
| msg401927 - (view) | Author: Inada Naoki (methane) * (Python committer) | Date: 2021年09月16日 07:56 | |
FYI, This issue is duplicate of https://bugs.python.org/issue34093, and I had made two pull requests to solve the issue. |
|||
| msg401960 - (view) | Author: Eric Snow (eric.snow) * (Python committer) | Date: 2021年09月16日 15:35 | |
Thanks, Inada-san. That's super helpful. |
|||
| msg401977 - (view) | Author: Eric Snow (eric.snow) * (Python committer) | Date: 2021年09月16日 18:23 | |
I'm closing this in favor of bpo-34093. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:59:49 | admin | set | github: 89349 |
| 2021年09月16日 18:33:16 | eric.snow | set | status: open -> closed superseder: Reproducible pyc: FLAG_REF is not stable. resolution: duplicate stage: patch review -> resolved |
| 2021年09月16日 18:23:41 | eric.snow | set | messages: + msg401977 |
| 2021年09月16日 15:35:55 | eric.snow | set | messages: + msg401960 |
| 2021年09月16日 07:56:09 | methane | set | nosy:
+ methane messages: + msg401927 |
| 2021年09月16日 04:38:27 | eric.snow | set | pull_requests: + pull_request26794 |
| 2021年09月15日 18:56:56 | eric.snow | set | messages: + msg401884 |
| 2021年09月15日 17:59:21 | gvanrossum | set | nosy:
+ gvanrossum messages: + msg401869 |
| 2021年09月15日 16:19:37 | eric.snow | set | messages: + msg401847 |
| 2021年09月14日 16:09:35 | eric.snow | set | keywords:
+ patch stage: needs patch -> patch review pull_requests: + pull_request26746 |
| 2021年09月13日 20:48:21 | eric.snow | link | issue45020 dependencies |
| 2021年09月13日 20:36:49 | eric.snow | set | messages: + msg401727 |
| 2021年09月13日 20:34:45 | eric.snow | set | messages: + msg401726 |
| 2021年09月13日 20:34:10 | eric.snow | create | |