Skip to content
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

Update profiling to work with python3.12 #1194

Merged
merged 1 commit into from
Nov 12, 2024

Conversation

glados-verma
Copy link
Collaborator

@glados-verma glados-verma commented Nov 12, 2024

We are affected by two changes in Python 3.12:

  1. Tempfiles have a new argument, delete_on_close, which defaults to True. As fix, we set the existing delete argument to False which makes the new argument a no-op.
  2. Nested profiling now raises. This behavior change isn't captured in the release notes and caused various bug reports in Python, for example. Previously we were enabling profiling in the Test Executor thread, but we didn't actually use that profile. This patch stops enabling profiling in that thread, since we only care about profiling of the actual phases.

Tested by running one of the example tests with profiling and checking the generated file using pstats.


This change is Reviewable

Copy link
Contributor

@cclauss cclauss left a comment

Choose a reason for hiding this comment

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

Nice!

@copybara-service copybara-service bot merged commit 1938ce8 into google:master Nov 12, 2024
8 checks passed
@glados-verma glados-verma deleted the profile branch November 12, 2024 19:42
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.

2 participants