GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — gh-100117: Fix inaccuracy in documentation of the CodeObject's co_positions field. by iritkatriel · Pull Request #119364 · python/cpython

Conversation

@iritkatriel

@iritkatriel iritkatriel commented May 21, 2024 •
edited by github-actions Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

Fixes #100117.

  • Issue: code.co_positions behaviour does not match documentation #100117

📚 Documentation preview 📚: https://cpython-previews--119364.org.readthedocs.build/

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@iritkatriel
pythongh-100117: Fix inaccuracy in documentation of the CodeObject's …
8abc8a8
…co_positions field.
@iritkatriel iritkatriel added docs Documentation in the Doc dir needs backport to 3.11 only security fixes needs backport to 3.12 only security fixes needs backport to 3.13 only security fixes labels May 21, 2024
@bedevere-app bedevere-app Bot added skip news awaiting core review labels May 21, 2024
@bedevere-app bedevere-app Bot mentioned this pull request May 21, 2024
code.co_positions behaviour does not match documentation #100117
Closed
@iritkatriel
iritkatriel requested a review from brandtbucher May 21, 2024 21:25
markshannon
markshannon approved these changes May 31, 2024
View reviewed changes

@markshannon markshannon left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One comment, but not important.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread Doc/reference/datamodel.rst Outdated
Column information is 0-indexed utf-8 byte offsets on the given source
line.
position of the source code that compiled to the *i-th* code unit. A
code unit is either a bytecode instruction or a cache entry of an

@markshannon markshannon May 31, 2024

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To be pedantic, cache entries can span several code units, as can the instruction if the EXTENDED_ARG prefix is included.

Maybe just use "code unit" here, and explain the instruction format elsewhere (in another PR)

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

iritkatriel reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
@bedevere-app bedevere-app Bot added awaiting merge and removed awaiting core review labels May 31, 2024
@iritkatriel
remove the incorrect code unit explanation
b4d2730
iritkatriel
iritkatriel commented May 31, 2024
View reviewed changes
Comment thread Doc/reference/datamodel.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

@iritkatriel
whitespace
e254c0e
@iritkatriel
iritkatriel enabled auto-merge (squash) May 31, 2024 16:51
@iritkatriel
iritkatriel merged commit 015b1fd into python:main May 31, 2024
@bedevere-app bedevere-app Bot removed the awaiting merge label May 31, 2024
@miss-islington-app

miss-islington-app Bot commented May 31, 2024

Copy link
Copy Markdown

Thanks @iritkatriel for the PR 🌮🎉.. I'm working now to backport this PR to: 3.11, 3.12, 3.13.
🐍🍒⛏🤖

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request May 31, 2024
@iritkatriel @miss-islington
pythongh-100117: Fix inaccuracy in documentation of the CodeObject's …
6e7e27b
…co_positions field. (pythonGH-119364)

(cherry picked from commit 015b1fd)

Co-authored-by: Irit Katriel <[email protected]>
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request May 31, 2024
@iritkatriel @miss-islington
pythongh-100117: Fix inaccuracy in documentation of the CodeObject's …
f421bbe
…co_positions field. (pythonGH-119364)

(cherry picked from commit 015b1fd)

Co-authored-by: Irit Katriel <[email protected]>
@bedevere-app

bedevere-app Bot commented May 31, 2024

Copy link
Copy Markdown

GH-119869 is a backport of this pull request to the 3.13 branch.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request May 31, 2024
@iritkatriel @miss-islington
pythongh-100117: Fix inaccuracy in documentation of the CodeObject's …
75c103e
…co_positions field. (pythonGH-119364)

(cherry picked from commit 015b1fd)

Co-authored-by: Irit Katriel <[email protected]>
@bedevere-app bedevere-app Bot removed the needs backport to 3.13 only security fixes label May 31, 2024
@bedevere-app

bedevere-app Bot commented May 31, 2024

Copy link
Copy Markdown

GH-119870 is a backport of this pull request to the 3.12 branch.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-app bedevere-app Bot removed the needs backport to 3.12 only security fixes label May 31, 2024
@bedevere-app

bedevere-app Bot commented May 31, 2024

Copy link
Copy Markdown

GH-119871 is a backport of this pull request to the 3.11 branch.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-app bedevere-app Bot removed the needs backport to 3.11 only security fixes label May 31, 2024
iritkatriel added a commit that referenced this pull request May 31, 2024
@miss-islington @iritkatriel
[3.12] gh-100117: Fix inaccuracy in documentation of the CodeObject's…
045be77
… co_positions field. (GH-119364) (#119870)

gh-100117: Fix inaccuracy in documentation of the CodeObject's co_positions field. (GH-119364)
(cherry picked from commit 015b1fd)

Co-authored-by: Irit Katriel <[email protected]>
iritkatriel added a commit that referenced this pull request May 31, 2024
@miss-islington @iritkatriel
[3.13] gh-100117: Fix inaccuracy in documentation of the CodeObject's…
24e3a8a
… co_positions field. (GH-119364) (#119869)

gh-100117: Fix inaccuracy in documentation of the CodeObject's co_positions field. (GH-119364)
(cherry picked from commit 015b1fd)

Co-authored-by: Irit Katriel <[email protected]>
estyxx pushed a commit to estyxx/cpython that referenced this pull request Jul 17, 2024
@iritkatriel @estyxx
pythongh-100117: Fix inaccuracy in documentation of the CodeObject's …
2c7ce95
…co_positions field. (python#119364)
ambv pushed a commit that referenced this pull request Sep 4, 2024
@miss-islington @iritkatriel
[3.11] gh-100117: Fix inaccuracy in documentation of the CodeObject's…
851821d
… co_positions field. (GH-119364) (#119871)

(cherry picked from commit 015b1fd)

Co-authored-by: Irit Katriel <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@markshannon markshannon markshannon approved these changes
@brandtbucher brandtbucher Awaiting requested review from brandtbucher

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

docs Documentation in the Doc dir skip news

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

code.co_positions behaviour does not match documentation

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@iritkatriel @markshannon
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.