Skip to content

pub(crate) all functions prefixed with _Py#6053

Merged
davidhewitt merged 19 commits into
PyO3:mainfrom
clin1234:private-api-cleanup
May 24, 2026
Merged

pub(crate) all functions prefixed with _Py#6053
davidhewitt merged 19 commits into
PyO3:mainfrom
clin1234:private-api-cleanup

Conversation

@clin1234
Copy link
Copy Markdown
Contributor

No description provided.

Comment thread newsfragments/6053.changed.md Outdated
Comment thread pyo3-ffi/src/cpython/bytesobject.rs Outdated
Comment thread newsfragments/6053.removed.md
Comment thread pyo3-ffi/src/cpython/ceval.rs Outdated
Comment thread pyo3-ffi/src/cpython/code.rs Outdated
@Icxolu
Copy link
Copy Markdown
Member

Icxolu commented May 23, 2026

Sorry for not mentioning this last time. What is the motivation for making them private rather than removing them? I don't see any uses of these function within pyo3-ffi and no body else could use them after this, so this would essentially become dead code.

@clin1234
Copy link
Copy Markdown
Contributor Author

All of these functions are mentioned within https://github.com/PyO3/pyo3/blob/main/pyo3-ffi/src/impl_/macros.rs#L26-L222; do you think removing them won't cause breakage?

@Icxolu
Copy link
Copy Markdown
Member

Icxolu commented May 23, 2026

That is a work around for linking symbols that start with _. The corresponding arms can be removed as well, as we don't need to link these symbols anymore.

Comment thread pyo3-ffi/src/cpython/objimpl.rs
Comment thread newsfragments/6053.removed.md Outdated
clin1234 and others added 4 commits May 23, 2026 09:58
@Icxolu Icxolu added this pull request to the merge queue May 23, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks May 23, 2026
@davidhewitt davidhewitt added this pull request to the merge queue May 24, 2026
Merged via the queue into PyO3:main with commit 210da91 May 24, 2026
48 checks passed
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.

4 participants