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-119180: PEP 649: Add __annotate__ attributes by JelleZijlstra · Pull Request #119209 · python/cpython

Conversation

@JelleZijlstra

@JelleZijlstra JelleZijlstra commented May 20, 2024 •
edited by bedevere-app Bot
Loading

Uh oh!

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

Copy link
Copy Markdown
Member

This implements https://peps.python.org/pep-0649/#annotate-and-annotations. In separate PRs I will work on making the compiler synthesize __annotate__ functions.

  • Issue: Implement PEP 649 and PEP 749 #119180

Sorry, something went wrong.

Uh oh!

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

All reactions
JelleZijlstra added 3 commits May 20, 2024 09:59
@JelleZijlstra
Add __annotate__ descriptors
985f8df
@JelleZijlstra
fix refleaks
c822ffa
@JelleZijlstra
blurb
e80095e
@JelleZijlstra
JelleZijlstra requested review from ericsnowcurrently and markshannon as code owners May 20, 2024 14:13
@bedevere-app bedevere-app Bot added the awaiting core review label May 20, 2024
@JelleZijlstra
Fix some tests
90ff2c4
@JelleZijlstra
JelleZijlstra requested a review from AlexWaygood as a code owner May 20, 2024 14:25
@JelleZijlstra
regen globals
026c0ff
@JelleZijlstra JelleZijlstra changed the title PEP 649: Add __annotate__ attributes gh-119180: PEP 649: Add __annotate__ attributes May 20, 2024
@bedevere-app bedevere-app Bot mentioned this pull request May 20, 2024
Implement PEP 649 and PEP 749 #119180
Closed
21 of 30 tasks
@JelleZijlstra
JelleZijlstra requested a review from ambv May 20, 2024 15:41
@AlexWaygood
AlexWaygood removed their request for review May 20, 2024 21:24
picnixz
picnixz reviewed May 21, 2024
View reviewed changes

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

Some comments. I'm wondering whether the error message "annotate returned a non-dict" could be changed to "annotate must return a dict" or "did not return a dict"

Sorry, something went wrong.

Uh oh!

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

All reactions
Comment thread Objects/moduleobject.c Resolved

Uh oh!

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

Comment thread Objects/moduleobject.c Resolved

Uh oh!

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

Comment thread Objects/moduleobject.c Resolved

Uh oh!

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

@JelleZijlstra

JelleZijlstra commented May 21, 2024

Copy link
Copy Markdown
Member Author

Some comments. I'm wondering whether the error message "annotate returned a non-dict" could be changed to "annotate must return a dict" or "did not return a dict"

For comparison:

>>> iter(X())
Traceback (most recent call last):
  File "<python-input-4>", line 1, in <module>
    iter(X())
    ~~~~^^^^^
TypeError: iter() returned non-iterator of type 'int'

I think I'll make the __annotate__ errors similar.

ambv, picnixz, and AlexWaygood reacted with thumbs up emoji
All reactions
  • 👍 3 reactions

Sorry, something went wrong.

Uh oh!

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

JelleZijlstra added 5 commits May 21, 2024 10:56
@JelleZijlstra
CR feedback
3f5b8c1
@JelleZijlstra
better error
e2e2bde
@JelleZijlstra
Merge branch 'main' into pep649-anno
827c53c
@JelleZijlstra
Merge remote-tracking branch 'upstream/main' into pep649-anno
3a63c82
@JelleZijlstra
return None not NULL
b0809da
carljm
carljm reviewed May 21, 2024
View reviewed changes

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

Looks good in general, a few comments.

I would prefer to remove the "set __annotate__ to None" behavior; I guess we would have to ask the Steering Council about that. Maybe not worth it unless we see it causing confusion in practice.

Sorry, something went wrong.

Uh oh!

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

All reactions
Comment thread Objects/funcobject.c Resolved

Uh oh!

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

Comment thread Objects/funcobject.c Resolved

Uh oh!

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

Comment thread Objects/typeobject.c Resolved

Uh oh!

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

Comment thread Objects/typeobject.c Resolved

Uh oh!

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

@JelleZijlstra
Modifications
67cf08f
@JelleZijlstra JelleZijlstra mentioned this pull request May 21, 2024
gh-119180: PEP 649 compiler changes #119361
Merged
@ambv
ambv merged commit e9875ec into python:main May 22, 2024
@bedevere-app bedevere-app Bot removed the awaiting core review label May 22, 2024
@JelleZijlstra
JelleZijlstra deleted the pep649-anno branch May 22, 2024 06:47
@JelleZijlstra JelleZijlstra mentioned this pull request May 29, 2024
PEP about implementing PEP 649 JelleZijlstra/peps#11
Closed
9 tasks done
estyxx pushed a commit to estyxx/cpython that referenced this pull request Jul 17, 2024
@JelleZijlstra @estyxx
pythongh-119180: PEP 649: Add __annotate__ attributes (python#119209)
577d2a5
@JelleZijlstra
JelleZijlstra restored the pep649-anno branch September 10, 2024 23:37
@Zheaoli Zheaoli mentioned this pull request Oct 22, 2024
[3.13] Crash when generator frame proxies outlive their generator #125723
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@carljm carljm carljm left review comments
@picnixz picnixz picnixz left review comments
@ericsnowcurrently ericsnowcurrently Awaiting requested review from ericsnowcurrently ericsnowcurrently is a code owner
@markshannon markshannon Awaiting requested review from markshannon markshannon is a code owner
@ambv ambv Awaiting requested review from ambv

Uh oh!

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

Assignees

No one assigned

Labels

None yet

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.

4 participants

@JelleZijlstra @carljm @picnixz @ambv
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 01402520 — 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.