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-146579: _zstd: Fix decompression options dict error message by cuiweixie · Pull Request #146577 · python/cpython

Conversation

@cuiweixie

@cuiweixie cuiweixie commented Mar 28, 2026 •
edited by bedevere-app Bot
Loading

Uh oh!

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

Copy link
Copy Markdown
Contributor

Summary

Fix the TypeError string in _zstd_set_d_parameters: it incorrectly said
compression options dictionary when validating decompression option keys.

Test plan

  • No behavior change beyond the error text; optional manual check by passing an
    invalid key type to decompression options.
  • Issue: _zstd: Fix decompression options dict error message #146579

Sorry, something went wrong.

Uh oh!

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

All reactions
@cuiweixie
_zstd: Fix decompression options dict error message
d924559
The TypeError in _zstd_set_d_parameters incorrectly referred to
compression options; say decompression options instead.
@cuiweixie
cuiweixie requested review from AA-Turner and emmatyping as code owners March 28, 2026 15:44
@bedevere-app bedevere-app Bot added the awaiting review label Mar 28, 2026
@cuiweixie cuiweixie changed the title _zstd: Fix decompression options dict error message gh-146579: _zstd: Fix decompression options dict error message Mar 28, 2026
@bedevere-app bedevere-app Bot mentioned this pull request Mar 28, 2026
_zstd: Fix decompression options dict error message #146579
Closed
picnixz
picnixz approved these changes Mar 28, 2026
View reviewed changes
@bedevere-app bedevere-app Bot added awaiting merge and removed awaiting review labels Mar 28, 2026
@picnixz picnixz added skip news needs backport to 3.14 bugs and security fixes labels Mar 28, 2026
@serhiy-storchaka

serhiy-storchaka commented Mar 29, 2026

Copy link
Copy Markdown
Member

I am not sure this is a bug. Should not the compression options dictionary be the same for compression and decompression? They are compression options which should be passed to decompressor to inform what options were used during compression.

All reactions

Sorry, something went wrong.

Uh oh!

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

@picnixz

picnixz commented Mar 29, 2026

Copy link
Copy Markdown
Member

Should not the compression options dictionary be the same for compression and decompression?

They actually differ:

  • https://docs.python.org/3/library/compression.zstd.html#compression.zstd.CompressionParameter
  • https://docs.python.org/3/library/compression.zstd.html#compression.zstd.DecompressionParameter
serhiy-storchaka and emmatyping reacted with thumbs up emoji
All reactions
  • 👍 2 reactions

Sorry, something went wrong.

Uh oh!

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

@serhiy-storchaka

serhiy-storchaka commented Mar 29, 2026

Copy link
Copy Markdown
Member

You are right. This check is especially to check that they are not mixed.

picnixz reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

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

serhiy-storchaka
serhiy-storchaka approved these changes Mar 29, 2026
View reviewed changes
emmatyping
emmatyping approved these changes Mar 29, 2026
View reviewed changes

@emmatyping emmatyping left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Thank you for catching this!

Sorry, something went wrong.

Uh oh!

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

All reactions
@emmatyping
emmatyping merged commit 4d0e8ee into python:main Mar 29, 2026
59 checks passed

Uh oh!

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

@miss-islington-app

miss-islington-app Bot commented Mar 29, 2026

Copy link
Copy Markdown

Thanks @cuiweixie for the PR, and @emmatyping for merging it 🌮🎉.. I'm working now to backport this PR to: 3.14.
🐍🍒⛏🤖

All reactions

Sorry, something went wrong.

Uh oh!

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

@bedevere-app bedevere-app Bot removed the awaiting merge label Mar 29, 2026
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Mar 29, 2026
@cuiweixie @miss-islington
pythongh-146579: _zstd: Fix decompression options dict error message (p…
850272a
…ythonGH-146577)

The TypeError in _zstd_set_d_parameters incorrectly referred to
compression options; say decompression options instead.
(cherry picked from commit 4d0e8ee)

Co-authored-by: cui <[email protected]>
@bedevere-app

bedevere-app Bot commented Mar 29, 2026

Copy link
Copy Markdown

GH-146611 is a backport of this pull request to the 3.14 branch.

All reactions

Sorry, something went wrong.

Uh oh!

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

@bedevere-app bedevere-app Bot removed the needs backport to 3.14 bugs and security fixes label Mar 29, 2026
emmatyping pushed a commit that referenced this pull request Mar 30, 2026
@miss-islington @cuiweixie
[3.14] gh-146579: _zstd: Fix decompression options dict error message (…
de234fc
…GH-146577) (#146611)

The TypeError in _zstd_set_d_parameters incorrectly referred to
compression options; say decompression options instead.
(cherry picked from commit 4d0e8ee)

Co-authored-by: cui <[email protected]>
@bedevere-bot

bedevere-bot commented Mar 30, 2026

Copy link
Copy Markdown

⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️

Hi! The buildbot iOS ARM64 Simulator 3.14 (tier-3) has failed when building commit de234fc.

What do you need to do:

  1. Don't panic.
  2. Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/#/builders/1722/builds/1143) and take a look at the build logs.
  4. Check if the failure is related to this commit (de234fc) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/#/builders/1722/builds/1143

Summary of the results of the build (if available):

Click to see traceback logs
remote: Enumerating objects: 5, done.        
remote: Counting objects:  50% (1/2)        
remote: Counting objects: 100% (2/2)        
remote: Counting objects: 100% (2/2), done.        
remote: Compressing objects:  50% (1/2)        
remote: Compressing objects: 100% (2/2)        
remote: Compressing objects: 100% (2/2), done.        
remote: Total 5 (delta 0), reused 0 (delta 0), pack-reused 3 (from 1)        
From https://github.com/python/cpython
 * branch                    3.14       -> FETCH_HEAD
Note: switching to 'de234fc07adfc94518e847abecef02527e0dd130'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:

  git switch -c <new-branch-name>

Or undo this operation with:

  git switch -

Turn off this advice by setting config variable advice.detachedHead to false

HEAD is now at de234fc07ad [3.14] gh-146579: _zstd: Fix decompression options dict error message (GH-146577) (#146611)
Switched to and reset branch '3.14'

Traceback (most recent call last):
  File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/Users/buildbot/buildarea/3.14.rkm-arm64-ios-simulator.iOS-simulator.arm64/build/Platforms/Apple/__main__.py", line 57, in <module>
    ArgsT = Sequence[str | Path]
TypeError: unsupported operand type(s) for |: 'type' and 'type'

Traceback (most recent call last):
  File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/Users/buildbot/buildarea/3.14.rkm-arm64-ios-simulator.iOS-simulator.arm64/build/Platforms/Apple/__main__.py", line 57, in <module>
    ArgsT = Sequence[str | Path]
TypeError: unsupported operand type(s) for |: 'type' and 'type'
All reactions

Sorry, something went wrong.

Uh oh!

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

@bedevere-bot

bedevere-bot commented Mar 30, 2026

Copy link
Copy Markdown

⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️

Hi! The buildbot s390x Fedora Stable Refleaks 3.14 (tier-3) has failed when building commit de234fc.

What do you need to do:

  1. Don't panic.
  2. Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/#/builders/1776/builds/1040) and take a look at the build logs.
  4. Check if the failure is related to this commit (de234fc) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/#/builders/1776/builds/1040

Failed tests:

  • test_external_inspection

Failed subtests:

  • test_only_active_thread - test.test_external_inspection.TestGetStackTrace.test_only_active_thread
  • test_timerfd_poll - test.test_os.TimerfdTests.test_timerfd_poll

Summary of the results of the build (if available):

==

Click to see traceback logs
Traceback (most recent call last):
  File "/var/lib/buildbot/worker/cstratak-fedora-stable-s390x/3.14.cstratak-fedora-stable-s390x.refleak/build/Lib/test/test_os.py", line 4554, in test_timerfd_poll
    self.check_timerfd_poll(False)
    ~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^
  File "/var/lib/buildbot/worker/cstratak-fedora-stable-s390x/3.14.cstratak-fedora-stable-s390x.refleak/build/Lib/test/test_os.py", line 4542, in check_timerfd_poll
    self.assertEqual(self.read_count_signaled(fd), 1)
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: 2 != 1


Traceback (most recent call last):
  File "/var/lib/buildbot/worker/cstratak-fedora-stable-s390x/3.14.cstratak-fedora-stable-s390x.refleak/build/Lib/test/test_external_inspection.py", line 1289, in test_only_active_thread
    self.assertEqual(
    ~~~~~~~~~~~~~~~~^
        len(gil_traces), 1, "Should have exactly one GIL holder"
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
AssertionError: 0 != 1 : Should have exactly one GIL holder
All reactions

Sorry, something went wrong.

Uh oh!

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

@picnixz

picnixz commented Mar 30, 2026

Copy link
Copy Markdown
Member
Traceback (most recent call last):
  File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/Users/buildbot/buildarea/3.14.rkm-arm64-ios-simulator.iOS-simulator.arm64/build/Platforms/Apple/__main__.py", line 57, in <module>
    ArgsT = Sequence[str | Path]
TypeError: unsupported operand type(s) for |: 'type' and 'type'

It looks like we are not running the correct Python version.

All reactions

Sorry, something went wrong.

Uh oh!

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

@mhsmith

mhsmith commented Mar 30, 2026

Copy link
Copy Markdown
Member

The Python version on the iOS buildbot should now be corrected.

All reactions

Sorry, something went wrong.

Uh oh!

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

maurycy added a commit to maurycy/cpython that referenced this pull request Mar 30, 2026
@maurycy
Merge remote-tracking branch 'upstream/main' into tachyon-ndjson-kole…
6a0ea81
…ktor

* upstream/main: (119 commits)
  pythongh-144270: Make SubElement parent and tag positional-only (pythonGH-144845)
  pythongh-146558: JIT optimize dict access for objects with known hash (python#146559)
  pythongh-139922: always run MSVC 64-bit tail-calling CI (pythonGH-146570)
  pythongh-126835: Fix _PY_IS_SMALL_INT() macro (python#146631)
  pythongh-146587: fix type slot assignment incase of multiple slots for same name (python#146593)
  pythongh-138122: Add differential flame graph (python#145785)
  pythongh-146416: Emscripten: Improve standard stream handling in node_entry.mjs (python#146417)
  pythongh-146444: Don't package as part of iOS 'build hosts' target (python#146628)
  pythongh-138850: Add --disable-epoll to configure (pythonGH-145768)
  pythongh-146444: Make Platforms/Apple/ compatible with Python 3.9 (python#146624)
  pythongh-138577: Fix keyboard shortcuts in getpass with echo_char (python#141597)
  pythongh-146556: Fix infinite loop in annotationlib.get_annotations() on circular __wrapped__ (python#146557)
  pythongh-146579: _zstd: Fix decompression options dict error message (python#146577)
  pythongh-146083: Upgrade bundled Expat to 2.7.5 (python#146085)
  pythongh-146080: fix a crash in SNI callbacks when the SSL object is gone (python#146573)
  pythongh-146090: fix memory management of internal `sqlite3` callback contexts (python#146569)
  pythongh-145876: Do not mask KeyErrors raised during dictionary unpacking in call (pythonGH-146472)
  pythongh-146004: fix test_args_from_interpreter_flags on windows (python#146580)
  pythongh-139003: Use frozenset for module level attributes in _pyrepl.utils (python#139004)
  pythonGH-146527: Add more data to GC statistics and add it to PyDebugOffsets (python#146532)
  ...
@pablogsal pablogsal mentioned this pull request Apr 4, 2026
gh-130273: Fix traceback color output with unicode characters #142529
Merged
clin1234 pushed a commit to clin1234/cpython that referenced this pull request Apr 16, 2026
@cuiweixie @clin1234
pythongh-146579: _zstd: Fix decompression options dict error message (p…
7e8cdd6
…ython#146577)

The TypeError in _zstd_set_d_parameters incorrectly referred to
compression options; say decompression options instead.
ljfp pushed a commit to ljfp/cpython that referenced this pull request Apr 25, 2026
@cuiweixie @ljfp
pythongh-146579: _zstd: Fix decompression options dict error message (p…
df07663
…ython#146577)

The TypeError in _zstd_set_d_parameters incorrectly referred to
compression options; say decompression options instead.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@serhiy-storchaka serhiy-storchaka serhiy-storchaka approved these changes
@emmatyping emmatyping emmatyping approved these changes
@picnixz picnixz picnixz approved these changes
@AA-Turner AA-Turner Awaiting requested review from AA-Turner AA-Turner is a code owner

Uh oh!

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

Assignees

No one assigned

Labels

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.

6 participants

@cuiweixie @serhiy-storchaka @picnixz @bedevere-bot @mhsmith @emmatyping
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.