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

Test with Python 3.13 #622

Merged
merged 3 commits into from
Jun 14, 2024
Merged

Conversation

godlygeek
Copy link
Contributor

Note that wheels are not yet published, because Python 3.13 is not yet ABI stable.

After-fork handlers installed by `pthread_atfork` run before the
interpreter has reinitialized its locks. That poses a problem for us in
Python 3.13, because the CPython API we call to install our profile
function has been changed to acquire a lock that's not yet been
reinitialized.

Switch to using Python fork handlers installed by `os.register_at_fork`
instead. These are called after the locks have been reinitialized.

I've removed a comment saying that we must register the after-fork
handlers only after all of our other one-time setup has been done. That
can't possibly be correct: since it's not possible to unregister
a handler, these handlers can fire after tracking has stopped, which
means they must do nothing when tracking isn't active, and so installing
them before tracking starts must be harmless. If this wasn't the case,
we always would have had incorrect behavior in the case where tracking
is restarted after having been stopped.

Signed-off-by: Matt Wozniski <mwozniski@bloomberg.net>
@godlygeek godlygeek self-assigned this Jun 4, 2024
- Use the new `PyEval_SetProfileAllThreads` public function, instead of
  our hacky backport of it.
- Handle `_Py_IsFinalizing` being promoted to a public API.
- Handle the prototype for `_PyMem_GetCurrentAllocatorName` being
  removed.

Signed-off-by: Matt Wozniski <mwozniski@bloomberg.net>
@codecov-commenter
Copy link

codecov-commenter commented Jun 4, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.06%. Comparing base (41248ed) to head (90ea24c).
Report is 79 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #622      +/-   ##
==========================================
+ Coverage   92.55%   93.06%   +0.51%     
==========================================
  Files          91       94       +3     
  Lines       11304    11408     +104     
  Branches     1581     2089     +508     
==========================================
+ Hits        10462    10617     +155     
+ Misses        837      791      -46     
+ Partials        5        0       -5     
Flag Coverage Δ
cpp 93.06% <100.00%> (+7.12%) ⬆️
python_and_cython 93.06% <100.00%> (-2.66%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Note that wheels are not yet published, because Python 3.13 is not yet
ABI stable.

Signed-off-by: Matt Wozniski <mwozniski@bloomberg.net>
@godlygeek godlygeek marked this pull request as ready for review June 4, 2024 03:27
@godlygeek godlygeek requested a review from pablogsal June 4, 2024 03:51
@pablogsal pablogsal merged commit d9df1dd into bloomberg:main Jun 14, 2024
18 checks passed
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.

None yet

3 participants