GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — gh-132983: [DRAFT] Test _zstd code with Python test suite by emmatyping · Pull Request #133185 · python/cpython

Conversation

@emmatyping

@emmatyping emmatyping commented Apr 30, 2025 •
edited by github-actions Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

This PR is only to run the test suite for #133027 across the build bots, DO NOT MERGE

  • Issue: Implement PEP 784 - Adding Zstandard to the Python standard library #132983

📚 Documentation preview 📚: https://cpython-previews--133185.org.readthedocs.build/

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
emmatyping and others added 30 commits April 28, 2025 17:52
@emmatyping
Add _zstd module
9814e3b
This commit introduces the `_zstd` module, with bindings to libzstd from
the pyzstd project. It also includes the unix build system configuration.
Windows build system support will be integrated independently as it
depends on integration with cpython-source-deps.
@emmatyping
Add _zstd to modules
fda87c8
@emmatyping
Fix path for compression.zstd module
887e564
@emmatyping
Ignore _zstd module like _io
cdba656
@emmatyping
Expand module state macros to improve code quality
6b67e9b
Also removes module state references from the classes in the _zstd
module and instead uses PyType_GetModuleState()
@emmatyping @StanFromIreland
Remove backticks suggested in review
a99a5d2
Co-authored-by: Stan Ulbrych <[email protected]>
@emmatyping
Use critical sections to lock object state
02cd17a
This should avoid races and deadlocks.
@emmatyping
Remove compress/decompress and mark module as not reliant on the GIL
54eca74
The `compress`/`decompress` functions will be moved to Python code for simplicity.
C implementations can always be re-added in the future.

Also, mark _zstd as not requiring the GIL.
@emmatyping
Lift critical section to avoid clang warning
f605956
@emmatyping
Respond to comments by picnixz
2eadc65
@emmatyping @AA-Turner
Call out pyzstd explicitly in license description
8eac354
Co-authored-by: Adam Turner <[email protected]>
@emmatyping @picnixz
Use a much more robust implementation...
26775be
... for `get_zstd_state_from_type`

Co-authored-by: Bénédikt Tran <[email protected]>
@emmatyping
Use PyList_GetItemRef for thread safety purposes
eae460f
@emmatyping
Use a macro for the minimum supported version
2ab5e4a
@emmatyping
remove const from primivite types
d5bf1c1
@emmatyping
Use PyMem_New in another spot
9e92b9f
@emmatyping
Simplify error handling in _get_frame_size
47f815a
@emmatyping
Another simplification of error handling in get_frame_info
6a4f7b8
@emmatyping
Rename _module_state to mod_state
d7b3805
@emmatyping
Rewrite comment explaining the context of the code
c225ea6
@emmatyping
Add link to pyzstd
6e8c61c
@emmatyping
Add TODO about refactoring dict training code
e52ad06
@emmatyping
Use PyModule_AddObjectRef over PyModule_AddObject
2a1ad8b
PyModule_AddObject is soft-deprecated, so we should use PyModule_AddObjectRef
@emmatyping
Check result of OutputBufferGrow
94473b9
@emmatyping @picnixz
Simplify return logic in add_constant_to_type
e2b2515
Co-authored-by: Bénédikt Tran <[email protected]>
@emmatyping @picnixz
Ignore return value of _zstd_clear()
cd2f085
Co-authored-by: Bénédikt Tran <[email protected]>
@emmatyping
Remove redundant comments
79e174f
@emmatyping
Remove __reduce__ from ZstdDict
ce6f79c
We should instead document that to pickle a dictionary a user should use
the `.dict_content` attribute.
@emmatyping
Use PyUnicode_FromFormat instead of a buffer
e15dd85
@emmatyping
Don't use C constants/types in error messages
685a3d1
emmatyping added 9 commits April 29, 2025 00:15
@emmatyping
Make error messages easier to understand for Python users
1b9f786
@emmatyping
Lower minimum required version 1.4.0
40c653c
@emmatyping
Use casts and make slot function signatures correct
428677d
@emmatyping
Be consistent with CPython on const usage
0962bbb
@emmatyping
Make else clauses in line with PEP 7
85efc18
@emmatyping
Fix over-indented blocks in argument clinic
cadf6e4
@emmatyping
Merge branch 'main' into 3.14-zstd-c-code
e45c22a
@emmatyping
Add Python files
5c1e360
@emmatyping
Fix byteswarning in test
1ad29f2
@emmatyping emmatyping added skip news DO-NOT-MERGE labels Apr 30, 2025
@bedevere-app bedevere-app Bot mentioned this pull request Apr 30, 2025
Implement PEP 784 - Adding Zstandard to the Python standard library #132983
Closed
13 tasks done
@emmatyping emmatyping added the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Apr 30, 2025
@bedevere-bot

bedevere-bot commented Apr 30, 2025

Copy link
Copy Markdown

🤖 New build scheduled with the buildbot fleet by @emmatyping for commit 1ad29f2 🤖

Results will be shown at:

https://buildbot.python.org/all/#/grid?branch=refs%2Fpull%2F133185%2Fmerge

If you want to schedule another build, you need to add the 🔨 test-with-buildbots label again.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-bot bedevere-bot removed the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Apr 30, 2025
@emmatyping emmatyping changed the title gh-132983: Test _zstd code with Python test suite gh-132983: [DRAFT] Test _zstd code with Python test suite Apr 30, 2025
@emmatyping emmatyping mentioned this pull request Apr 30, 2025
gh-132983: Introduce _zstd bindings module #133027
Merged
4 tasks done
@emmatyping

emmatyping commented Apr 30, 2025

Copy link
Copy Markdown
Member Author

Looks like the buildbots passed other than a few unrelated failures:

  • test_interpreters failed on the Fedora refleak build.
  • ditto for the FreeBSD refleak
  • The debian installed with X failures seem unrelated, and very odd
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@emmatyping

emmatyping commented Apr 30, 2025

Copy link
Copy Markdown
Member Author

Closing as the results have been gathered.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@emmatyping emmatyping closed this Apr 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@AA-Turner AA-Turner Awaiting requested review from AA-Turner AA-Turner will be requested when the pull request is marked ready for review AA-Turner is a code owner
@ethanfurman ethanfurman Awaiting requested review from ethanfurman ethanfurman will be requested when the pull request is marked ready for review ethanfurman is a code owner
@giampaolo giampaolo Awaiting requested review from giampaolo giampaolo will be requested when the pull request is marked ready for review giampaolo is a code owner
@ericsnowcurrently ericsnowcurrently Awaiting requested review from ericsnowcurrently ericsnowcurrently will be requested when the pull request is marked ready for review ericsnowcurrently is a code owner
@erlend-aasland erlend-aasland Awaiting requested review from erlend-aasland erlend-aasland will be requested when the pull request is marked ready for review erlend-aasland is a code owner
@itamaro itamaro Awaiting requested review from itamaro itamaro will be requested when the pull request is marked ready for review itamaro is a code owner
@corona10 corona10 Awaiting requested review from corona10 corona10 will be requested when the pull request is marked ready for review corona10 is a code owner

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

DO-NOT-MERGE skip news

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@emmatyping @bedevere-bot
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.