Issue 42167: Documentation for SETUP_WITH opcode is wrong
Issue42167
Created on 2020-10-27 09:54 by pxeger, last changed 2022-04-11 14:59 by admin. This issue is now closed.
| Pull Requests | |||
|---|---|---|---|
| URL | Status | Linked | Edit |
| PR 27402 | merged | Dennis Sweeney, 2021-07-28 04:40 | |
| Messages (5) | |||
|---|---|---|---|
| msg379749 - (view) | Author: Patrick Reader (pxeger) * | Date: 2020-10-27 09:54 | |
bpo-33387 introduced two new opcodes, `RERAISE` and `WITH_EXCEPT_START` (previously called `WITH_EXCEPT_FINISH`), replacing the previous `WITH_CLEANUP_START`, `WITH_CLEANUP_FINISH`, `BEGIN_FINALLY`, `END_FINALLY`, `CALL_FINALLY` and `POP_FINALLY`. The [documentation](https://docs.python.org/3.9/library/dis.html#opcode-SETUP_WITH) for it references the since removed `WITH_CLEANUP_START`, which is definitely wrong. I don't know enough to be able to fix it though, sorry, so I've added the core team. |
|||
| msg398314 - (view) | Author: Andrei Kulakov (andrei.avk) * ![]() |
Date: 2021-07-27 19:21 | |
Note that SETUP_WITH doc was completely removed. Not sure if that was intentional (since the opcode itself still exists). |
|||
| msg398315 - (view) | Author: Patrick Reader (pxeger) * | Date: 2021-07-27 19:26 | |
It was, at least partially, replaced by BEGIN_WITH for bpo-40222: https://github.com/python/cpython/commit/adcd2205565f91c6719f4141ab4e1da6d7086126#diff-eaa488fc50d23b30ca8b24ab19e9c91c1c941339847af993e908f006eec0653bL741 |
|||
| msg398342 - (view) | Author: Dennis Sweeney (Dennis Sweeney) * ![]() |
Date: 2021-07-28 04:10 | |
Opcodes change from one version to another. You linked the Python 3.9 documentation. Python 3.9 opcodes are listed here: https://github.com/python/cpython/blob/3.9/Lib/opcode.py (and you can browse the branches and commit history for that file). 3.9 has SETUP_WITH, but not WITH_CLEANUP_START, so that particular doc entry is all that needs to change (assuming I'm not missing anything), since it wasn't updated during GH-6641. I'll open a PR against the 3.9 docs. |
|||
| msg398345 - (view) | Author: Dennis Sweeney (Dennis Sweeney) * ![]() |
Date: 2021-07-28 04:55 | |
GH-24334 already applied the necessary change for 3.10. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:59:37 | admin | set | github: 86333 |
| 2021-07-28 19:16:54 | iritkatriel | set | status: open -> closed resolution: fixed stage: patch review -> resolved |
| 2021-07-28 04:55:22 | Dennis Sweeney | set | nosy:
+ iritkatriel messages: + msg398345 |
| 2021-07-28 04:40:26 | Dennis Sweeney | set | keywords:
+ patch stage: patch review pull_requests: + pull_request25935 |
| 2021-07-28 04:10:56 | Dennis Sweeney | set | nosy:
+ Dennis Sweeney messages: + msg398342 |
| 2021-07-27 19:26:58 | pxeger | set | messages:
+ msg398315 versions: + Python 3.11 |
| 2021-07-27 19:21:41 | andrei.avk | set | nosy:
+ andrei.avk messages: + msg398314 |
| 2020-10-27 10:05:21 | xtreak | set | nosy:
+ Mark.Shannon |
| 2020-10-27 09:54:48 | pxeger | create | |

