Skip to content

deprecate unsound buffer apis - #6381

Open
Person-93 wants to merge 5 commits into
PyO3:mainfrom
Person-93:deprecate-unsound-buffer-api
Open

Person-93 wants to merge 5 commits into
PyO3:mainfrom
Person-93:deprecate-unsound-buffer-api

Conversation

@Person-93

Copy link
Copy Markdown
Contributor

Mark slice accessors of PyBuffer as deprecated. See #6267

@davidhewitt davidhewitt left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think we should probably add an entry to the migration guide and make the deprecation message point at alternatives, so that users can have some guidance how to migrate.

@Person-93

Copy link
Copy Markdown
Contributor Author

The alternatives are added in #6382, I can add the migration guide after either this or that PR is merged, or as a separate PR.

@davidhewitt
davidhewitt added this pull request to the merge queue Sep 12, 2026
@davidhewitt
davidhewitt removed this pull request from the merge queue due to a manual request Sep 12, 2026
@davidhewitt

Copy link
Copy Markdown
Member

Sorry stated merging the wrong pr

@Person-93
Person-93 force-pushed the deprecate-unsound-buffer-api branch from 37fde0f to ec557cf Compare September 13, 2026 00:12
@Person-93
Person-93 force-pushed the deprecate-unsound-buffer-api branch from ec557cf to a989173 Compare September 13, 2026 00:14
@codspeed

codspeed Bot commented Sep 13, 2026

Copy link
Copy Markdown

Merging this PR will regress 2 benchmarks

⚠️ Different runtime environments detected

Some benchmarks with significant performance changes were compared across different runtime environments,
which may affect the accuracy of the results.

Open the report in CodSpeed to investigate

⚡ 2 improved benchmarks
❌ 2 regressed benchmarks
✅ 137 untouched benchmarks
⏩ 6 skipped benchmarks1

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Benchmark BASE HEAD Efficiency
extract_biguint_small 1.4 µs 1.5 µs -10.78%
extract_biguint_zero 1.4 µs 1.6 µs -10.41%
into_biguint_small 1.5 µs 1.3 µs +16.79%
test_empty_class_init 31.6 µs 28.7 µs +10.13%

Tip

Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.


Comparing Person-93:deprecate-unsound-buffer-api (a989173) with main (5f3ea66)

Open in CodSpeed

Footnotes

  1. 6 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@Person-93

Copy link
Copy Markdown
Contributor Author

@davidhewitt, do you think the deprecation can be included in 0.29.3 ? Maybe the migration guide should be a separate PR that gets included in 0.30 when the functions are actually removed.

This branch has not been deployed

No deployments
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