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

gh-133059: fix `Tools/build/deepfreeze.py` nsmallposints by albertedwardson · Pull Request #139906 · python/cpython · GitHub

/ cpython Public

gh-133059: fix Tools/build/deepfreeze.py nsmallposints - #139906

Merged
Eclips4 merged 5 commits into
python:mainfrom
albertedwardson:nsmallposints
Oct 17, 2025
Merged

gh-133059: fix Tools/build/deepfreeze.py nsmallposints#139906
Eclips4 merged 5 commits into
python:mainfrom
albertedwardson:nsmallposints

Conversation

albertedwardson commented Oct 10, 2025
edited
Loading

Copy link
Copy Markdown
Contributor

In Tools/build/deepfreeze.py nsmallposints was still 256.

Although deepfreeze is no longer used (#116919), this script still needs to be kept and be actual until it is completely removed.

This PR steals the parser of those numbers from Tools/build/generate_global_objects.py and puts it in a new script, so getting constants can be unified.

bedevere-app Bot commented Oct 10, 2025

Copy link
Copy Markdown

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.

Eclips4 changed the title gh-133160: fix Tools/build/deepfreeze.py nsmallposints gh-133059: fix Tools/build/deepfreeze.py nsmallposints Oct 10, 2025
Eclips4 self-requested a review October 10, 2025 15:28
Comment thread Tools/build/consts_getter.py Outdated
import os

SCRIPT_NAME = 'Tools/build/consts_getter.py'
__file__ = os.path.abspath(__file__)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Why do you redefine __file__?

Comment thread Tools/build/consts_getter.py Outdated

SCRIPT_NAME = 'Tools/build/consts_getter.py'
__file__ = os.path.abspath(__file__)
ROOT = os.path.dirname(os.path.dirname(os.path.dirname(__file__)))

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

What about builds that are performed in a different folder? It is possible to do that.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

these constants were stolen from Tools/build/generate_global_objects.py, so in this case I think it will be more than enough not to override __file__ and just specify a valid path to Include's

Comment thread Tools/build/consts_getter.py Outdated
@@ -0,0 +1,22 @@
import os

SCRIPT_NAME = 'Tools/build/consts_getter.py'

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Is it needed?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

in this case, I think it's not. it's only used in scripts that generate .c files to put a comment on top to indicate that those file were generated by this particular script

will remove

Eclips4 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I have one minor comment, otherwise LGTM.

Comment thread Tools/build/consts_getter.py Outdated
Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
Comment thread Tools/build/consts_getter.py Outdated

efimov-mikhail left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

LGTM

Eclips4 merged commit 999ab89 into python:main Oct 17, 2025
55 checks passed

Eclips4 commented Oct 17, 2025

Copy link
Copy Markdown
Member

Thank you Albert!

StanFromIreland pushed a commit to StanFromIreland/cpython that referenced this pull request Dec 6, 2025
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants


Back | FazBrowse Home | New Git URL