Skip to content

gh-133403: Check Tools/build/deepfreeze.py with mypy #133802

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 15, 2025

Conversation

sobolevn
Copy link
Member

@sobolevn sobolevn commented May 10, 2025

@@ -402,7 +417,7 @@ def generate(self, name: str, obj: object) -> str:
# print(f"Cache hit {key!r:.40}: {self.cache[key]!r:.40}")
return self.cache[key]
self.misses += 1
if isinstance(obj, (types.CodeType, umarshal.Code)) :
if isinstance(obj, types.CodeType) :
Copy link
Member Author

@sobolevn sobolevn May 10, 2025

Choose a reason for hiding this comment

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

here umarshal.Code won't work, because generate_code requires a lot more attrs than umarshal.Code has

@sobolevn sobolevn merged commit 7eaa097 into python:main May 15, 2025
50 checks passed
@miss-islington-app
Copy link

Thanks @sobolevn for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request May 15, 2025
…H-133802)

(cherry picked from commit 7eaa097)

Co-authored-by: sobolevn <mail@sobolevn.me>
@miss-islington-app
Copy link

Sorry, @sobolevn, I could not cleanly backport this to 3.13 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker 7eaa09739059aaac4812395f8d6bb586af8eadcc 3.13

@bedevere-app
Copy link

bedevere-app bot commented May 15, 2025

GH-134038 is a backport of this pull request to the 3.14 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.14 bugs and security fixes label May 15, 2025
sobolevn added a commit to sobolevn/cpython that referenced this pull request May 15, 2025
…ythonGH-133802)

(cherry picked from commit 7eaa097)

Co-authored-by: sobolevn <mail@sobolevn.me>
@bedevere-app
Copy link

bedevere-app bot commented May 15, 2025

GH-134040 is a backport of this pull request to the 3.13 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.13 bugs and security fixes label May 15, 2025
sobolevn added a commit that referenced this pull request May 15, 2025
) (#134038)

gh-133403: Check `Tools/build/deepfreeze.py` with mypy (GH-133802)
(cherry picked from commit 7eaa097)

Co-authored-by: sobolevn <mail@sobolevn.me>
sobolevn added a commit that referenced this pull request May 15, 2025
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.

2 participants