| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
…erators * Moves the `GET_ITER` instruction into the generator function preamble. This means the the iterable is converted into an iterator during generator creation, as documented, but keeps it in the same code object allowing optimization.
There was a problem hiding this comment.
Sorry, the code was changed so much since I worked with it, that I can no longer make qualified review. I can understand particular changes, but I cannot catch if something was missed. The original idea looks reasonably.
BTW, what happens when __iter__() raises StopIteration?
Is similar change needed for asynchronous generators?
Sorry, something went wrong.
The exception is raised before the generator is created and the traceback shows the iterable as the location of the exception. |
Sorry, something went wrong.
I don't think asynchronous generators were ever changed, so they still have the old behavior from 3.13 and earlier. |
Sorry, something went wrong.
There was a problem hiding this comment.
Other than the one nit looks good to me
Sorry, something went wrong.
| int gen_index, int depth, | ||
| expr_ty elt, expr_ty val, int type, | ||
| int iter_on_stack) | ||
| IterStackState iter_on_stack) |
There was a problem hiding this comment.
nit: Is it worth renaming these to something like iter_state like it is in codegen_comprehension?
Sorry, something went wrong.
There was a problem hiding this comment.
It isn't it state, it is its location. Maybe I'll rename IterStackState instead.
Sorry, something went wrong.
⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️Hi! The buildbot ARM64 macOS 3.x (tier-2) has failed when building commit ae53da5. What do you need to do:
You can take a look at the buildbot page here: https://buildbot.python.org/#/builders/725/builds/12565 Failed tests:
Failed subtests:
Summary of the results of the build (if available): == Click to see traceback logsTraceback (most recent call last):
File "/Users/buildbot/buildarea/3.x.pablogsal-macos-m1.macos-with-brew/build/Lib/test/test_ssl.py", line 5476, in test_preauth_data_to_tls_server
self.assertIn("before TLS handshake with data", wrap_error.args[1])
~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: 'before TLS handshake with data' not found in '[SSL: RECORD_LAYER_FAILURE] record layer failure (_ssl.c:1096)'
Traceback (most recent call last):
File "/Users/buildbot/buildarea/3.x.pablogsal-macos-m1.macos-with-brew/build/Lib/test/test_unittest/testmock/testthreadingmock.py", line 219, in test_call_count_thread_safe
self.assertEqual(m.call_count, LOOPS * THREADS)
~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: 998 != 1000
|
Sorry, something went wrong.
Summary: python/cpython#143569 has fixed a bug introduced in the code gen where passing a non-iterable to a generator doesn't raise immediately. This matches the code gen. Reviewed By: mpage Differential Revision: D90706769 fbshipit-source-id: 229a355c62e4b07ca0f3853ba91ac31b81946a8b
Summary: Fixes up the CinderX build after the latest import. This brought in python/cpython#142911 which move somethings into ceval.h so that we can directly include it rather than borrowing those functions. We bring back `cinderx-only-headers` and now use them on 3.10 and 3.15+. There's also a fix related to python/cpython#143569 where we need to update the interpreter loop. Also python/cpython@bb25f72 seems to have refactored `_PyDict_LookupIndex` to use `_PyDict_LookupIndexAndValue`. There's some more work after this to further reduce our usage of `ceval_macros.h` but this just gets things working again. Reviewed By: itamaro Differential Revision: D91146024 fbshipit-source-id: 6da3ef18fe5fe5f79e29a71cdbe98491bbb45a9d
…orting virtual iterators (pythonGH-143569) * Moves the `GET_ITER` instruction into the generator function preamble. This means the the iterable is converted into an iterator during generator creation, as documented, but keeps it in the same code object allowing optimization.
| Back | FazBrowse Home | New Git URL |
Uh oh!
There was an error while loading. Please reload this page.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.