Uh oh!
There was an error while loading. Please reload this page.
gh-102021 : Allow multiple input files for interpreter loop generator - #102022
Conversation
bedevere-bot
commented
Feb 18, 2023
Most changes to Python require a NEWS entry. Please add it using the blurb_it web app or the blurb command-line tool. |
arhadthedev
commented
Feb 18, 2023
@gvanrossum@iritkatriel as authors of |
gvanrossum
commented
Feb 18, 2023
I would like to wait reviewing until I am back from my break, around 2/27. |
gvanrossum
left a comment
There was a problem hiding this comment.
Thanks for doing this! I have a few suggestions, feel free to push back!
Uh oh!
There was an error while loading. Please reload this page.
| families: dict[str, parser.Family] | ||
| def every_thing(self) -> Iterable[parser.InstDef | parser.Super | parser.Macro]: | ||
| return itertools.chain( |
There was a problem hiding this comment.
I'm not a big fan of itertools.chain. Maybe make this a generator?
I also noticed this is causing the output to be emitted in a different order again. But I quite like having the generated instructions in the same order as they occur in the input. Could you restore that behavior? (I understand that it's a little tricky due to overrides. Ideally there would be a comment left in the output for instructions that are overridden by later ones.)
There was a problem hiding this comment.
Okay, I've changed things now so the output will retain the definition order and if there are overrides they'll look something like this:
...
// TARGET(NOP) overridden by later definition
...
// Override
TARGET(NOP) {
DISPATCH();
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
(In the future please don't force push. It makes things more complicated for the reviewer, and we squash commits at the end anyway.) |
gvanrossum
left a comment
There was a problem hiding this comment.
LG!
I'll apply the small correction to the metadata header comment, wait for tests to pass again, and merge it. Thanks!
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
jbower-fb
commented
Mar 3, 2023
Great, thank you. |
Uh oh!
There was an error while loading. Please reload this page.
* main: pythongh-102021 : Allow multiple input files for interpreter loop generator (python#102022) Add import of `unittest.mock.Mock` in documentation (python#102346) pythongh-102383: [docs] Arguments of `PyObject_CopyData` are `PyObject *` (python#102390) pythongh-101754: Document that Windows converts keys in `os.environ` to uppercase (pythonGH-101840) pythongh-102324: Improve tests of `typing.override` (python#102325)
…erator (python#102022) The input files no longer use `-i`.
I'm not sure a NEWS blurb is needed as the generator is entirely new in 3.12 anyway.