Skip to content

Conversation

XuehaiPan
Copy link
Contributor

@XuehaiPan XuehaiPan commented Mar 19, 2025

Thank you for contributing to PyO3!

By submitting these contributions you agree for them to be dual-licensed under PyO3's MIT OR Apache-2.0 license.

Please consider adding the following to your pull request:

  • an entry for this PR in newsfragments - see [https://pyo3.rs/main/contributing.html#documenting-changes]
    • or start the PR title with docs: if this is a docs-only change to skip the check
  • docs to all new functions and / or detail in the guide
  • tests for all new or changed functions

PyO3's CI pipeline will check your pull request, thus make sure you have checked the Contributing.md guidelines. To run most of its tests
locally, you can run nox. See nox --list-sessions
for a list of supported actions.


Add pyo3::sync::with_critical_section2 binding for Py_{BEGIN,END}_CRITICAL_SECTION2 macros.

For free-threading builds, some functions need to be run with two objects locked. E.g. PyDict_Update(dict, other), dequeiter_next(it, it->deque).

@XuehaiPan XuehaiPan force-pushed the py-critical-section2 branch 3 times, most recently from 628a150 to a828042 Compare March 19, 2025 11:50
@XuehaiPan XuehaiPan marked this pull request as ready for review March 19, 2025 11:55
@XuehaiPan XuehaiPan force-pushed the py-critical-section2 branch from a828042 to 78dca2e Compare March 19, 2025 12:47
@XuehaiPan XuehaiPan force-pushed the py-critical-section2 branch from 78dca2e to 5d0293d Compare March 19, 2025 12:47
@XuehaiPan XuehaiPan force-pushed the py-critical-section2 branch from 5d0293d to a2372b4 Compare March 19, 2025 12:53
Copy link
Member

@davidhewitt davidhewitt left a comment

Choose a reason for hiding this comment

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

Thanks, overall looks good to me, however I would like to see a different test.

@XuehaiPan XuehaiPan requested a review from davidhewitt March 21, 2025 12:48
@XuehaiPan XuehaiPan force-pushed the py-critical-section2 branch from cbedc69 to 0fd77c6 Compare March 21, 2025 12:50
@davidhewitt davidhewitt added this pull request to the merge queue Mar 21, 2025
Merged via the queue into PyO3:main with commit ccebbde Mar 21, 2025
49 checks passed
@XuehaiPan XuehaiPan deleted the py-critical-section2 branch March 21, 2025 17:31
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