Skip to content

gh-126425: Refactor _lsprof_Profiler_enable #126426

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 3 commits into from
Nov 5, 2024
Merged

Conversation

sobolevn
Copy link
Member

@sobolevn sobolevn commented Nov 5, 2024

  • Explicit memory management for None objects (since we still try to treat immortal objects as regular objects)
  • Respect possible errors of sys.monitoring.register_callback call

Copy link
Member

@vstinner vstinner left a comment

Choose a reason for hiding this comment

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

LGTM

@erlend-aasland
Copy link
Contributor

Friendly reminder to amend PR title and description to match the actual change :)

@sobolevn sobolevn merged commit 7587260 into python:main Nov 5, 2024
37 checks passed
@miss-islington-app
Copy link

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

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Nov 5, 2024
- Explicit memory management for `None` objects (since we still try to treat immortal objects as regular objects)
- Respect possible errors of `sys.monitoring.register_callback` call
(cherry picked from commit 7587260)

Co-authored-by: sobolevn <mail@sobolevn.me>
@sobolevn
Copy link
Member Author

sobolevn commented Nov 5, 2024

Thanks a lot, everyone!

@bedevere-app
Copy link

bedevere-app bot commented Nov 5, 2024

GH-126442 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 Nov 5, 2024
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Nov 5, 2024
- Explicit memory management for `None` objects (since we still try to treat immortal objects as regular objects)
- Respect possible errors of `sys.monitoring.register_callback` call
(cherry picked from commit 7587260)

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

bedevere-app bot commented Nov 5, 2024

GH-126443 is a backport of this pull request to the 3.12 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.12 only security fixes label Nov 5, 2024
sobolevn added a commit that referenced this pull request Nov 5, 2024
…6443)

gh-126425: Refactor `_lsprof_Profiler_enable` (GH-126426)

- Explicit memory management for `None` objects (since we still try to treat immortal objects as regular objects)
- Respect possible errors of `sys.monitoring.register_callback` call
(cherry picked from commit 7587260)

Co-authored-by: sobolevn <mail@sobolevn.me>
sobolevn added a commit that referenced this pull request Nov 5, 2024
…6442)

gh-126425: Refactor `_lsprof_Profiler_enable` (GH-126426)

- Explicit memory management for `None` objects (since we still try to treat immortal objects as regular objects)
- Respect possible errors of `sys.monitoring.register_callback` call
(cherry picked from commit 7587260)

Co-authored-by: sobolevn <mail@sobolevn.me>
picnixz pushed a commit to picnixz/cpython that referenced this pull request Dec 8, 2024
- Explicit memory management for `None` objects (since we still try to treat immortal objects as regular objects)
- Respect possible errors of `sys.monitoring.register_callback` call
ebonnal pushed a commit to ebonnal/cpython that referenced this pull request Jan 12, 2025
- Explicit memory management for `None` objects (since we still try to treat immortal objects as regular objects)
- Respect possible errors of `sys.monitoring.register_callback` call
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