msg336797 - (view) |
Author: Guido van Rossum (gvanrossum) *  |
Date: 2019-02-28 04:11 |
The stdib keyword.py module must be regenerated after adding/removing keywords from the grammar. While this is rare, we now generate everything else derived from the grammar. Hopefully someone can add some rules to the Makefile to auto-generate this one too when regen-grammar is run. This is probably an easy project for a beginning contributor. |
|
|
msg336799 - (view) |
Author: Zachary Ware (zach.ware) *  |
Date: 2019-02-28 04:35 |
Lib/keyword.py already regenerates itself from Python/graminit.c when run as a script, but there should be a `regen-keyword.py` target added to Makefile.pre.in and included as a dependency of the `regen-all` target. Agreed that this is a good starting issue, particularly for anyone wanting to get more familiar with Makefiles. See also . |
|
|
msg336835 - (view) |
Author: Joannah Nanjekye (nanjekyejoannah) *  |
Date: 2019-02-28 14:46 |
I am working on this. Shouldn't there be a PR by tomorrow from me. Someone else can take it on. |
|
|
msg336836 - (view) |
Author: Serhiy Storchaka (serhiy.storchaka) *  |
Date: 2019-02-28 15:01 |
Do not haste with this. After implementing pgen in Python, Lib/keyword.py can be generated directly by pgen. |
|
|
msg336838 - (view) |
Author: Joannah Nanjekye (nanjekyejoannah) *  |
Date: 2019-02-28 15:12 |
Noted. Releasing this in favor of when pgen is implemented in Python to solve this. |
|
|
msg336839 - (view) |
Author: Guido van Rossum (gvanrossum) *  |
Date: 2019-02-28 15:35 |
A similar thing seems to be the list of keywords in Lib/pydoc.py. The recipe says # CAUTION: if you change one of these dictionaries, be sure to adapt the # list of needed labels in Doc/tools/extensions/pyspecific.py and # regenerate the pydoc_data/topics.py file by running # make pydoc-topics # in Doc/ and copying the output file into the Lib/ directory. |
|
|
msg336840 - (view) |
Author: Guido van Rossum (gvanrossum) *  |
Date: 2019-02-28 15:36 |
(However that doesn't seem to work. Anyway, there's a list of all keywords there.) |
|
|
msg336842 - (view) |
Author: Guido van Rossum (gvanrossum) *  |
Date: 2019-02-28 15:47 |
Hum, it seems the right solution was to arrange for async and await to appear in the list of keywords despite their special status. Nevertheless in theory there's something that can be done here to auto-regenerate the list derived from the Grammar. |
|
|
msg336844 - (view) |
Author: STINNER Victor (vstinner) *  |
Date: 2019-02-28 15:51 |
> Do not haste with this. After implementing pgen in Python, Lib/keyword.py can be generated directly by pgen. That's bpo-35808 and PR 11814 which is under review. Anyway, at the end, it would be nice if Lib/keyword.py would be regenerated by "make regen-all". Currently, "regen-all" doesn't regenerate everything. For example, configure is not regenerated. |
|
|
msg338825 - (view) |
Author: Pablo Galindo Salgado (pablogsal) *  |
Date: 2019-03-25 22:01 |
New changeset 91759d98015e1d6d5e1367cff60592ab548e7806 by Pablo Galindo in branch 'master': bpo-36143: Regenerate Lib/keyword.py from the Grammar and Tokens file using pgen (GH-12456) https://github.com/python/cpython/commit/91759d98015e1d6d5e1367cff60592ab548e7806 |
|
|
msg385224 - (view) |
Author: STINNER Victor (vstinner) *  |
Date: 2021-01-18 20:23 |
New changeset 6a809fa01f59bb00f4029d35d132cd87553554c3 by Victor Stinner in branch 'master': bpo-36143: make regen-all now also runs regen-keyword (GH-24245) https://github.com/python/cpython/commit/6a809fa01f59bb00f4029d35d132cd87553554c3 |
|
|