Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Google sync #1516

Merged
merged 11 commits into from
Oct 13, 2023
Merged

Google sync #1516

merged 11 commits into from
Oct 13, 2023

Conversation

rchen152
Copy link
Contributor

No description provided.

Solumin and others added 11 commits October 12, 2023 19:25
This is causing a crash that's proving very hard to debug.

PiperOrigin-RevId: 572376335
Adds tests to capture the state of our current partial support.

PiperOrigin-RevId: 572392523
PiperOrigin-RevId: 572427153
This is needed to support the etils library (specifically:
https://github.com/google/etils/blob/ea1f4876517656ef86deedaa41de47c87f00a999/etils/epy/py_utils.py#L33)
in 3.11.

PiperOrigin-RevId: 572613882
`parse_pyi.py` currently raises an exception when trying to decompose
the results of `parser.parse_pyi`. It only returns a single value,
but the left-hand side of the assignment specifies two variables.

Since the second variable is unused, all this CL does is remove that
portion of the assignment statement.

#tftypes

PiperOrigin-RevId: 572626607
The way this is supposed to work in 3.11 is that SEND gets a value from the
generator, YIELD_VALUE yields it, and JUMP_BACKWARDS_NO_INTERRUPT jumps back to
the SEND, repeatedly, until there are no more values to yield. At that point,
SEND pushes the generator's return value onto the stack and jumps past the
backwards jump. However, we removed the jump opcode, so we can't follow this
implementation. Reusing 3.10's YIELD_FROM implementation seems to work.

I also renamed some of the variables in our generator-related VM code to make
it easier to follow.

PiperOrigin-RevId: 572628644
`pytd_visitors.RenameModuleVisitor` previously skipped
renaming a module if, when matching against the text of
a node, it detected a `.` character in any text trailing
the previous module name.

This prevents the visitor from correctly removing module
names added during pytype's serialization of ASTs.

This change removes that check and only that check. The
remaining check (which verifies that there is no text
preceding the match) should be sufficient to prevent
erroneous replacement in partial-match situations.

#tftypes

PiperOrigin-RevId: 572677520
After staring at this long enough, I think I figured out how to implement SEND
properly. This (hopefully) has no user-visible effect.

PiperOrigin-RevId: 572691337
@rchen152 rchen152 merged commit 639a505 into main Oct 13, 2023
22 checks passed
@rchen152 rchen152 deleted the google_sync branch October 13, 2023 03:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants