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-74929: locals() documentation update for PEP 667 by ncoghlan · Pull Request #118265 · python/cpython

Conversation

@ncoghlan

@ncoghlan ncoghlan commented Apr 25, 2024 •
edited by bedevere-app Bot
Loading

Uh oh!

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

Copy link
Copy Markdown
Contributor

Proposed documentation wording taken from the
withdrawn PEP 558 (which had switched to the
Python level semantics proposed in PEP 667 prior
to its withdrawal).


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

  • Issue: Local variable assignment is broken when combined with threads + tracing + closures #74929

Sorry, something went wrong.

Uh oh!

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

All reactions
@ncoghlan
locals() docs update for PEP 667
c843d7b
Proposed documentation wording taken from the
withdrawn PEP 558 (which had switched to the
Python level semantics proposed in PEP 667 prior
to its withdrawal).
@ncoghlan ncoghlan added docs Documentation in the Doc dir DO-NOT-MERGE labels Apr 25, 2024
@bedevere-app bedevere-app Bot added skip news awaiting core review labels Apr 25, 2024
@ncoghlan

ncoghlan commented Apr 25, 2024

Copy link
Copy Markdown
Contributor Author

DO-NOT-MERGE label added, as this should only be merged after the PEP 667 implementation in #115153 has been completed and merged.

All reactions

Sorry, something went wrong.

Uh oh!

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

ncoghlan
ncoghlan commented Apr 26, 2024
View reviewed changes
Comment thread Doc/library/functions.rst Resolved

Uh oh!

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

@ncoghlan ncoghlan changed the title locals() documentation update for PEP 667 gh-74929: locals() documentation update for PEP 667 Apr 26, 2024
@bedevere-app bedevere-app Bot mentioned this pull request Apr 26, 2024
Local variable assignment is broken when combined with threads + tracing + closures #74929
Closed
@nineteendo

nineteendo commented Apr 26, 2024

Copy link
Copy Markdown
Contributor

Wouldn't it better to convert the pull request back to a draft? GitHub automatically prevents you from merging those.

All reactions

Sorry, something went wrong.

Uh oh!

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

@ncoghlan ncoghlan self-assigned this Apr 28, 2024
@ncoghlan
ncoghlan marked this pull request as draft April 28, 2024 10:04
@bedevere-app bedevere-app Bot removed the awaiting core review label Apr 28, 2024
@ncoghlan ncoghlan removed the DO-NOT-MERGE label Apr 28, 2024
@ncoghlan

ncoghlan commented Apr 28, 2024

Copy link
Copy Markdown
Contributor Author

Wouldn't it better to convert the pull request back to a draft? GitHub automatically prevents you from merging those.

Good point, done (enough years of experience where draft PRs weren't available that I still forget to use them when appropriate)

All reactions

Sorry, something went wrong.

Uh oh!

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

ncoghlan added 2 commits April 28, 2024 20:07
@ncoghlan
Merge branch 'main' into pep-667-locals-docs
9c0aab2
@ncoghlan
Include versionchanged note
0e290f5
ncoghlan
ncoghlan commented Apr 28, 2024
View reviewed changes
Comment thread Doc/library/functions.rst
implicitly refreshed by other operations, such as calling ``locals()``
again. Obtaining the legacy CPython behaviour now requires explicit
calls to update the initially returned dictionary with the results
of subsequent calls to ``locals()``.

@ncoghlan ncoghlan Apr 28, 2024

Copy link
Copy Markdown
Contributor Author

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.

I plan to eventually replace the latter two sentences here with something like "For details, refer to the 'Python 3.13 porting guide'" (with a link to the relevant part of the 3.13 What's New document). That will be in a later PR that adds an initial version of the What's New update for PEP 667, though.

Sorry, something went wrong.

Uh oh!

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

All reactions
@ncoghlan
ncoghlan marked this pull request as ready for review May 6, 2024 10:04
@bedevere-app bedevere-app Bot added the awaiting core review label May 6, 2024
@ncoghlan
ncoghlan merged commit 757fd3e into python:main May 6, 2024
@bedevere-app bedevere-app Bot removed the awaiting core review label May 6, 2024
@ncoghlan ncoghlan mentioned this pull request May 6, 2024
Clarify the required behaviour of locals() #62160
Closed
SonicField pushed a commit to SonicField/cpython that referenced this pull request May 8, 2024
@ncoghlan @SonicField
pythongh-74929: locals() documentation update for PEP 667 (python#118265
7ccecd1
)

Documentation wording taken from the
withdrawn PEP 558 (which had switched to the
Python level semantics proposed in PEP 667 prior
to its withdrawal).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

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

Assignees

@ncoghlan ncoghlan

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.

Uh oh!

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

2 participants

@ncoghlan @nineteendo
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.