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 — bpo-43950: Add documentation for PEP-657 by ammaraskar · Pull Request #27047 · python/cpython

Conversation

@ammaraskar

@ammaraskar ammaraskar commented Jul 6, 2021 •
edited by bedevere-bot
Loading

Uh oh!

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

Copy link
Copy Markdown
Member

First pass at documenting the feature.

https://bugs.python.org/issue43950

Sorry, something went wrong.

Uh oh!

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

All reactions
@the-knights-who-say-ni the-knights-who-say-ni added the CLA signed label Jul 6, 2021
@bedevere-bot bedevere-bot added awaiting review docs Documentation in the Doc dir labels Jul 6, 2021
@ammaraskar ammaraskar added the skip news label Jul 6, 2021
@ammaraskar
ammaraskar requested review from isidentical, pablogsal and terryjreedy July 6, 2021 19:11
ammaraskar
ammaraskar commented Jul 6, 2021
View reviewed changes
Comment thread Doc/whatsnew/3.11.rst Resolved

Uh oh!

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

@ammaraskar ammaraskar removed the skip news label Jul 6, 2021
isidentical
isidentical reviewed Jul 6, 2021
View reviewed changes
Comment thread Doc/whatsnew/3.11.rst Resolved

Uh oh!

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

Comment thread Doc/whatsnew/3.11.rst Resolved

Uh oh!

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

@isidentical

isidentical commented Jul 6, 2021

Copy link
Copy Markdown
Member

@ammaraskar can we separate co_positions() from traceback stuff? I think they are two separate features, and one masking the other right now might make users miss the co_positions() API.

All reactions

Sorry, something went wrong.

Uh oh!

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

isidentical
isidentical reviewed Jul 6, 2021
View reviewed changes
Comment thread Doc/reference/datamodel.rst Resolved

Uh oh!

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

isidentical
isidentical reviewed Jul 6, 2021
View reviewed changes
Comment thread Doc/whatsnew/3.11.rst Resolved

Uh oh!

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

@isidentical

isidentical commented Jul 6, 2021

Copy link
Copy Markdown
Member

Thanks @ammaraskar for taking the first pass on documentation. I think overall it looks great!

All reactions

Sorry, something went wrong.

Uh oh!

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

@ammaraskar

ammaraskar commented Jul 6, 2021

Copy link
Copy Markdown
Member Author

@ammaraskar can we separate co_positions() from traceback stuff? I think they are two separate features, and one masking the other right now might make users miss the co_positions() API.

Added a separate section for this to make it harder to miss.

All reactions

Sorry, something went wrong.

Uh oh!

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

isidentical
isidentical approved these changes Jul 6, 2021
View reviewed changes

@isidentical isidentical 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.

LGTM

Sorry, something went wrong.

Uh oh!

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

All reactions
Comment thread Doc/whatsnew/3.11.rst Resolved

Uh oh!

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

@bedevere-bot bedevere-bot added awaiting merge and removed awaiting review labels Jul 6, 2021
pablogsal
pablogsal reviewed Jul 6, 2021
View reviewed changes
Comment thread Doc/reference/datamodel.rst Resolved

Uh oh!

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

isidentical
isidentical reviewed Jul 6, 2021
View reviewed changes
Comment thread Doc/whatsnew/3.11.rst Resolved

Uh oh!

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

@ammaraskar
ammaraskar force-pushed the pep657-docs branch from 87f4172 to 1c25226 Compare July 7, 2021 19:11
@ammaraskar

ammaraskar commented Jul 7, 2021

Copy link
Copy Markdown
Member Author

Rebased and squashed with the CPython specific column limit removed. Hopefully the documentation conveys that you should always be prepared to handle None with the API :)

Anything else to address here?

All reactions

Sorry, something went wrong.

Uh oh!

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

pablogsal
pablogsal approved these changes Jul 7, 2021
View reviewed changes

@pablogsal pablogsal 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.

Let's focus next on finishing the specialized formats so the docs are up to date with that

Sorry, something went wrong.

Uh oh!

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

All reactions
@ammaraskar

ammaraskar commented Jul 12, 2021

Copy link
Copy Markdown
Member Author

Updated the existing examples for #27037 but maybe we should put an example of a complicated arithmetic expression to show off that specialization as well?

All reactions

Sorry, something went wrong.

Uh oh!

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

@pablogsal

pablogsal commented Jul 12, 2021

Copy link
Copy Markdown
Member

Updated the existing examples for #27037 but maybe we should put an example of a complicated arithmetic expression to show off that specialization as well?

Yeah, I want to also prepare in a separate PR some mini tutorial/example on how to use the Python fields.

We should also document "how to read the new tracebacks", especially for the specializations. For that, we should ask the one and only @willingc for advice on what's the best way to document it and where :)

All reactions

Sorry, something went wrong.

Uh oh!

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

ammaraskar and others added 3 commits July 12, 2021 16:29
@ammaraskar @pablogsal @isidentical
bpo-43950: Add documentation for PEP-657
13f6258
Co-authored-by: Pablo Galindo <[email protected]>
Co-authored-by: Batuhan Taskaya <[email protected]>
Co-authored-by: Ammar Askar <[email protected]>
@ammaraskar
Update for new subscript specialized traceback
fcc9b93
@ammaraskar
Add example of binop specialization
577d0fa
@ammaraskar
ammaraskar force-pushed the pep657-docs branch from f05b993 to 577d0fa Compare July 12, 2021 20:37
@ammaraskar

ammaraskar commented Jul 12, 2021

Copy link
Copy Markdown
Member Author

Added an example for binary operations.

We should also document "how to read the new tracebacks"

Definitely, both of those sound good for follow-up docs. Maybe we can ask the overarching docs working group and specifically cc Carol in for help :)

All reactions

Sorry, something went wrong.

Uh oh!

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

@ammaraskar ammaraskar mentioned this pull request Jul 12, 2021
Mark PEP657 as Final python/peps#2032
Merged
@ammaraskar

ammaraskar commented Jul 12, 2021

Copy link
Copy Markdown
Member Author

Ready to go 🚀

All reactions

Sorry, something went wrong.

Uh oh!

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

pablogsal
pablogsal reviewed Jul 12, 2021
View reviewed changes
Comment thread Doc/c-api/code.rst Resolved

Uh oh!

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

@ammaraskar @pablogsal
Add return value for failure
32e1a54
Co-authored-by: Pablo Galindo Salgado <[email protected]>
pablogsal
pablogsal reviewed Jul 12, 2021
View reviewed changes
Comment thread Doc/reference/datamodel.rst Outdated
Comment on lines +1032 to +1036
- Running the interpreter with ``-X no_debug_ranges``.
- Loading a pyc file compiled while using ``-X no_debug_ranges``.
- Position tuples corresponding to artificial instructions.
- Line and column numbers that can't be represented due to
implementation specific limitations.

@pablogsal pablogsal Jul 12, 2021

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.

Nice 👍

Sorry, something went wrong.

Uh oh!

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

All reactions
pablogsal
pablogsal reviewed Jul 12, 2021
View reviewed changes
Comment thread Doc/whatsnew/3.11.rst Resolved

Uh oh!

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

@pablogsal
Update Doc/whatsnew/3.11.rst
835d086
pablogsal
pablogsal reviewed Jul 12, 2021
View reviewed changes
Comment thread Doc/whatsnew/3.11.rst Resolved

Uh oh!

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

@ammaraskar
Add note about memory usage in whatsnew
27e5ba5
pablogsal
pablogsal reviewed Jul 12, 2021
View reviewed changes
Comment thread Doc/whatsnew/3.11.rst Resolved

Uh oh!

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

ammaraskar and others added 2 commits July 12, 2021 19:54
@ammaraskar @pablogsal
Reword note with Pablo's suggestion
23d962d
Co-authored-by: Pablo Galindo Salgado <[email protected]>
@ammaraskar
Copy note to codeobject docs
f69904f
pablogsal
pablogsal reviewed Jul 13, 2021
View reviewed changes
Comment thread Doc/reference/datamodel.rst Resolved

Uh oh!

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

pablogsal
pablogsal reviewed Jul 13, 2021
View reviewed changes
Comment thread Doc/whatsnew/3.11.rst Resolved

Uh oh!

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

pablogsal added 2 commits July 13, 2021 01:18
@pablogsal
Update Doc/whatsnew/3.11.rst
6378690
@pablogsal
Update Doc/reference/datamodel.rst
997bad4
pablogsal
pablogsal approved these changes Jul 13, 2021
View reviewed changes
pablogsal
pablogsal reviewed Jul 13, 2021
View reviewed changes
Comment thread Doc/reference/datamodel.rst Resolved

Uh oh!

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

@pablogsal
Update Doc/reference/datamodel.rst
2ba721d
pablogsal
pablogsal reviewed Jul 13, 2021
View reviewed changes
Comment thread Doc/reference/datamodel.rst Resolved

Uh oh!

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

@pablogsal
Update Doc/reference/datamodel.rst
c65c283
pablogsal
pablogsal reviewed Jul 13, 2021
View reviewed changes
Comment thread Doc/whatsnew/3.11.rst Resolved

Uh oh!

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

@pablogsal
Update Doc/whatsnew/3.11.rst
0ca45fc
pablogsal
pablogsal reviewed Jul 13, 2021
View reviewed changes
Comment thread Doc/whatsnew/3.11.rst Resolved

Uh oh!

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

@pablogsal
Update Doc/whatsnew/3.11.rst
95048a5
@pablogsal
pablogsal merged commit 9c3eaf8 into python:main Jul 13, 2021
@bedevere-bot bedevere-bot removed the awaiting merge label Jul 13, 2021
@ammaraskar
ammaraskar deleted the pep657-docs branch July 13, 2021 04:20
@pablogsal pablogsal mentioned this pull request Apr 13, 2022
Include column offsets for bytecode instructions #88116
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@pablogsal pablogsal pablogsal approved these changes
@isidentical isidentical isidentical approved these changes
@terryjreedy terryjreedy Awaiting requested review from terryjreedy

Uh oh!

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

Assignees

No one assigned

Labels

docs Documentation in the Doc dir

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

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

5 participants

@ammaraskar @isidentical @pablogsal @the-knights-who-say-ni @bedevere-bot
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.