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

Remove get_refcnt from public api #4065

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

lfn3
Copy link
Contributor

@lfn3 lfn3 commented Apr 10, 2024

This is an attempt to fix #3357.
The function is used relatively frequently in tests, so have left it with #[cfg(test)] and pub(crate).
This avoids coating the tests with unsafe, and something that doesn't indicate intent as well.
(As has been done in test_inheiritance.rs)

TODO:

  • Fix docs that refer to get_refcnt as an example - is there another function I can use instead?

This is an attempt to fix PyO3#3357.
The function is used relatively frequently in tests,
so have left it with #[cfg(test)] and pub(crate).
This avoids coating the tests with `unsafe`,
and something that doesn't indicate intent as well.

TODO:
[ ] Fix docs that refer to `get_refcnt` as an example -
    is there another function I can use instead?
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.

Refcounting changes after PEP 683
1 participant