Skip to content

feat(py-client)!: Remove deprecated compression argument from Session.put - #718

Merged
jan-auer merged 1 commit into
mainfrom
feat/py-client-remove-put-compression
Oct 22, 2026
Merged

jan-auer merged 1 commit into
mainfrom
feat/py-client-remove-put-compression

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Changelog Entry

  • Remove the deprecated compression argument from Session.put()
    • Replace session.put(..., compression=...) with session.put(..., compress=...).

Details

Breaking change for the Python client.

Session.put(compression=...) was deprecated in #586 in favor of compress. This removes the argument, its DeprecationWarning, and the check against passing both.

It also deletes test_compression_argument_is_deprecated. #586 added that test specifically for the deprecated path: it asserts the DeprecationWarning and the ValueError when both arguments are passed. Neither applies anymore. Its uncompressed round trip through compress="none" is already covered by test_full_cycle_uncompressed and test_full_cycle_with_origin, so renaming the argument in the test would only duplicate them.

via @lcian.

--

View Junior Session [Sentry]

….put

Co-Authored-By: Lorenzo Cian <17258265+lcian@users.noreply.github.com>
@codecov

codecov Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.81%. Comparing base (60adc25) to head (78c16d4).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #718      +/-   ##
==========================================
- Coverage   91.81%   91.81%   -0.01%     
==========================================
  Files         116      116              
  Lines       24065    24060       -5     
==========================================
- Hits        22095    22090       -5     
  Misses       1970     1970              
Components Coverage Δ
Rust Backend 94.87% <ø> (ø)
Rust Client 82.38% <ø> (ø)
Python Client 93.47% <ø> (-0.04%) ⬇️

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@lcian
lcian marked this pull request as ready for review October 22, 2026 10:34
@lcian
lcian requested a review from a team as a code owner October 22, 2026 10:34
@jan-auer
jan-auer enabled auto-merge (squash) October 22, 2026 12:06
@jan-auer
jan-auer disabled auto-merge October 22, 2026 12:06
@jan-auer
jan-auer merged commit cb76469 into main Oct 22, 2026
25 checks passed
@jan-auer
jan-auer deleted the feat/py-client-remove-put-compression branch October 22, 2026 12:06
jan-auer added a commit that referenced this pull request Oct 22, 2026
#718 removed the deprecated `compression` argument from `Session.put`
and with it the only use of `warnings` in `client.py`. The leftover
import fails `ruff check` (F401) in the Lint Python job on main.

Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com>
Co-authored-by: async jauer <jan.auer@sentry.io>
@github-actions

Copy link
Copy Markdown

Semver Impact of This PR

🔴 Major (breaking changes)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


Breaking Changes 🛠

Py Client

  • Remove the deprecated compression argument from Session.put() by sentry-junior[bot] in #718
    • Replace session.put(..., compression=...) with session.put(..., compress=...).
  • Split the signing key from the token policy: SecretKey(kid, secret_key) now only holds the EdDSA key, and TokenGenerator(key, expiry_seconds=60, permissions=None) wraps it with the token defaults and is what you pass to Client(token=...). The deprecated sign_for_scope() alias is removed. by sentry-junior in #721
    • Replace SecretKey(kid, secret_key, expiry_seconds, permissions) or TokenGenerator(kid, secret_key, ...) with TokenGenerator(SecretKey(kid, secret_key), expiry_seconds, permissions).
      # Before
      client = Client(url, token=SecretKey(kid, secret_key, expiry_seconds=300))
      
      # After
      key = SecretKey(kid, secret_key)
      client = Client(url, token=TokenGenerator(key, expiry_seconds=300))
    • Replace .sign_for_scope(...) with .token_for_scope(...).
  • Remove the deprecated compression argument from Session.put() by sentry-junior in #718
    • Replace session.put(..., compression=...) with session.put(..., compress=...).
  • Remove the deprecated propagate_traces argument from Client by sentry-junior in #714
    • Drop propagate_traces=... from Client(...) calls. Sentry's StdlibIntegration, enabled by default, already propagates traces on Objectstore requests.

Rs Client

  • Remove the deprecated Session::mint_token() by sentry-junior in #717
    • Replace session.mint_token() with session.get_token().
  • Remove the deprecated TokenGenerator::sign() by sentry-junior in #716
    • Replace generator.sign(&scope) with generator.create_token(&scope).sign().
  • Remove the deprecated PutBuilder::compression() by sentry-junior in #715
    • Replace .compression(...) with .compress(...) on put builders.
  • Usecase::new now returns a Result, and the panicking constructor is now Usecase::from_static by sentry-junior in #710
    • Replace Usecase::new("name") with Usecase::from_static("name").
    • Replace Usecase::try_new(name) with Usecase::new(name).
  • Mark Error as #[non_exhaustive] so new error variants can be added without a breaking change by lcian in #706
    • Add a wildcard arm (_ => ...) to exhaustive match expressions on objectstore_client::Error.
  • Remove the multipart upload API (Session::initiate_multipart_upload(), Session::resume_multipart_upload()) and the multipart feature flag by lcian in #704
    • Use resumable uploads instead.
    • Remove match arms for the removed Error::InvalidPartNumber, Error::InvalidUploadId and Error::MultipartComplete variants.

New Features ✨

  • Add a response_content_disposition option ("inline" or "attachment") to Session.object_url() and Session.presigned_object_url(). Pre-signed URLs include it in their signature. by jan-auer in #696

🤖 This preview updates automatically when you update the PR.

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