FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-120029: refactor ``symtable.c`` (remove deprecated macros and update some values) by picnixz · Pull Request #120218 · python/cpython · GitHub

/ cpython Public

gh-120029: refactor symtable.c (remove deprecated macros and update some values) - #120218

Closed
picnixz wants to merge 3 commits into
python:mainfrom
picnixz:deprecate-def-free-symtable
Closed

gh-120029: refactor symtable.c (remove deprecated macros and update some values)#120218
picnixz wants to merge 3 commits into
python:mainfrom
picnixz:deprecate-def-free-symtable

Conversation

picnixz commented Jun 7, 2024
edited
Loading

Copy link
Copy Markdown
Member

This PR removes DEF_FREE and the unused GENERATOR and GENERATOR_EXPRESSION macros.

In addition, I re-ordered the values of the flags so that they are meaningfully separated (and made that reflection on the export order and the debug order). Note that some comments were outdated (and I updated them accordingly).

I will address the import order of symtable in a separate PR and make it so that the flags are meaningfully printed.

By the way, I'm not sure if this change really required updating the magic number (compile.c checks flags so if the numbers change, then an old bytecode might perhaps have incorrect flag values, (unless they are not kept)).

picnixz added 3 commits June 7, 2024 12:45
- remove unused flag `DEF_FREE`
- remove unused macros `GENERATOR` and `GENERATOR_EXPRESSION`
- update values of `DEF_*` and `USE` flags
- reflect new ordering in the code

picnixz commented Jun 7, 2024

Copy link
Copy Markdown
Member Author

Converting into a draft to split the PR into two (so that we can discuss whether the re-ordering and the value's changes should be done or not). I'll open a separate PR for that.

brettcannon removed their request for review June 11, 2024 20:35

picnixz commented Jun 12, 2024

Copy link
Copy Markdown
Member Author

In light of Jelle's comment (#120029 (comment)), I will not change any concrete values here. Maybe in the future we will update them to reflect their usage in symtable.py, but let's keep it that way for now.

picnixz closed this Jun 12, 2024
picnixz deleted the deprecate-def-free-symtable branch June 12, 2024 16:46
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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.

1 participant


Back | FazBrowse Home | New Git URL