GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||
GeezerVison is showing github.com — gh-115398: Increment PyExpat_CAPI_MAGIC for SetReparseDeferralEnabled addition by gpshead · Pull Request #116301 · python/cpython Conversation
|
|
This looks unnecessary: There's an extra size field that's also checked. See #115623 (comment) . |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
…eferralEnabled addition (pythonGH-116301)" This reverts part of commit eda2963.
|
It's also hurting, so I have created pull request #116411 now to revert the bump. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Revert "gh-115398: Increment PyExpat_CAPI_MAGIC for SetReparseDeferralEnabled addition (GH-116301)" This reverts part of commit eda2963. Why? this comment buried in an earlier code review explains: I checked again how that value is used in practice, it's here: https://github.com/python/cpython/blob/0c80da4c14d904a367968955544dd6ae58c8101c/Modules/_elementtree.c#L4363-L4372 Based on that code my understanding is that loading bigger structs from the future is considered okay unless `PyExpat_CAPI_MAGIC` differs, which implies that (1) magic needs to stay the same to support loading the future from the past and (2) that `PyExpat_CAPI_MAGIC` should only ever change for changes that do not increase size (but keep it constant). To summarize, that supports your argument. I checked branches 3.8, 3.9, 3.10, 3.11, 3.12 now and they all have the same comparison code there so reverting that magic string bump will support seamless backporting.
|
I hadn't seen the earlier review comment, I just looked at the history of the magic and saw it was bumped up to 1.1 during a bugfix release 6+ years ago. I trust y'all's analysis. revert merged. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
…nabled addition (pythonGH-116301) * Increment PyExpat_CAPI_MAGIC due to SetReparseDeferralEnabled addition. This is a followup to git commit 6a95676 from Github PR python#115623. * RESTify news API list.
…16411) Revert "pythongh-115398: Increment PyExpat_CAPI_MAGIC for SetReparseDeferralEnabled addition (pythonGH-116301)" This reverts part of commit eda2963. Why? this comment buried in an earlier code review explains: I checked again how that value is used in practice, it's here: https://github.com/python/cpython/blob/0c80da4c14d904a367968955544dd6ae58c8101c/Modules/_elementtree.c#L4363-L4372 Based on that code my understanding is that loading bigger structs from the future is considered okay unless `PyExpat_CAPI_MAGIC` differs, which implies that (1) magic needs to stay the same to support loading the future from the past and (2) that `PyExpat_CAPI_MAGIC` should only ever change for changes that do not increase size (but keep it constant). To summarize, that supports your argument. I checked branches 3.8, 3.9, 3.10, 3.11, 3.12 now and they all have the same comparison code there so reverting that magic string bump will support seamless backporting.
…nabled addition (pythonGH-116301) * Increment PyExpat_CAPI_MAGIC due to SetReparseDeferralEnabled addition. This is a followup to git commit 6a95676 from Github PR python#115623. * RESTify news API list.
…16411) Revert "pythongh-115398: Increment PyExpat_CAPI_MAGIC for SetReparseDeferralEnabled addition (pythonGH-116301)" This reverts part of commit eda2963. Why? this comment buried in an earlier code review explains: I checked again how that value is used in practice, it's here: https://github.com/python/cpython/blob/0c80da4c14d904a367968955544dd6ae58c8101c/Modules/_elementtree.c#L4363-L4372 Based on that code my understanding is that loading bigger structs from the future is considered okay unless `PyExpat_CAPI_MAGIC` differs, which implies that (1) magic needs to stay the same to support loading the future from the past and (2) that `PyExpat_CAPI_MAGIC` should only ever change for changes that do not increase size (but keep it constant). To summarize, that supports your argument. I checked branches 3.8, 3.9, 3.10, 3.11, 3.12 now and they all have the same comparison code there so reverting that magic string bump will support seamless backporting.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.