Next Python SDK major - #5005
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #5005 +/- ##
===========================================
+ Coverage 70.55% 83.76% +13.21%
===========================================
Files 180 180
Lines 18077 18080 +3
Branches 3008 3009 +1
===========================================
+ Hits 12754 15145 +2391
+ Misses 4432 1943 -2489
- Partials 891 992 +101
|
Codecov Results 📊✅ 90556 passed | ❌ 2 failed | ⏭️ 5440 skipped | Total: 95998 | Pass Rate: 94.33% | Execution Time: 329m 6s 📊 Comparison with Base Branch
➕ New Tests (2)View new tests
❌ Failed Tests
|
| File | Patch % | Lines |
|---|---|---|
| sentry_sdk/integrations/aws_lambda.py | 0.00% | |
| sentry_sdk/integrations/otlp.py | 86.21% | |
| sentry_sdk/_init_implementation.py | 88.89% | |
| sentry_sdk/client.py | 71.43% | |
| sentry_sdk/integrations/django/transactions.py | 71.43% | |
| sentry_sdk/integrations/asyncio.py | 66.67% | |
| sentry_sdk/integrations/chalice.py | 66.67% | |
| sentry_sdk/integrations/starlette.py | 75.00% |
Coverage diff
@@ Coverage Diff @@
## main #PR +/-##
==========================================
+ Coverage 89.91% 90.16% +0.25%
==========================================
Files 193 186 -7
Lines 24825 23697 -1128
Branches 8912 8528 -384
==========================================
+ Hits 22321 21365 -956
- Misses 2504 2332 -172
- Partials 1414 1365 -49Generated by Codecov Action
Semver Impact of This PR⚪ None (no version bump detected) 📋 Changelog PreviewThis is how your changes will appear in the changelog. New Features ✨
Bug Fixes 🐛Anthropic
Documentation 📚
Internal Changes 🔧
Other
🤖 This preview updates automatically when you update the PR. |
Add `UnraisablehookIntegration` to the default integrations list.
Stop raising exceptions `from None` in the ASGI and asyncio integrations. Closes #5624
Remove everything hub related, including all sorts of compatibility shims around hubs/scopes. Also remove deprecated session methods. `configure_scope` and `push_scope` removal coming in a future PR. #### Issues Closes #5001
The integration requires additional configuration which should be intentional on the user's part. #### Issues Closes #4993
- Remove everything in `integrations/opentelemetry` (`SentrySpanProcessor`, `SentryPropagator`, etc.) - Remove associated test files and CI config - Move old propagator functions and consts that we were using in `OTLPIntegration` to the OTLP propagator directly - Remove `instrumenter` Note: `NoOpSpan` was not removed because it makes mypy blow up. Not worth the effort as we'll anyway get rid of it when dropping transaction based tracing. #### Issues Closes #6932
### Description The API is deprecated and slated for removal in 3.0. #### Issues Closes #5019 #### Reminders - Please add tests to validate your changes, and lint your code using `uv run ruff`. - Add GH Issue ID _&_ Linear ID (if applicable) - PR title should use [conventional commit](https://develop.sentry.dev/engineering-practices/commit-messages/#type) style (`feat:`, `fix:`, `ref:`, `meta:`) - For external contributors: [CONTRIBUTING.md](https://github.com/getsentry/sentry-python/blob/master/CONTRIBUTING.md), [Sentry SDK development docs](https://develop.sentry.dev/sdk/), [Discord community](https://discord.gg/Ww9hbqr)
### Description Remove the deprecated API. #### Issues Closes #5018
### Description Most of the entries in our extras list serve as a way to communicate/enforce the lower boundary of the respective framework that we support. This creates a parallel system to the version checks we already have in each integration. Some extras, however, define extra dependencies or specific extras that are required for an integration to work correctly (e.g. the Flask integration needs `blinker` to work properly). In that case, keep the extra. #### Issues Closes #6259
### Description See the original potel PR linked in the ticket for more context. #### Issues Closes https://linear.app/getsentry/issue/PY-1938/remove-spotlight-django-integration Closes #5014
### Description Drop 3.6 from tests, utils, etc. CI failures should be unrelated (coming from toxgen update, once fixed on master they'll resolve here as well). Ignore the diff size; it's mostly tox.ini and friends. #### Issues Closes #5040
### Description Drop the contextvars compatibility layer that supported Python 3.6 (aiocontextvars), old gevent (<20.9.0), and old greenlet (<0.5). Warn if using an older version of either during setup. This allows us to remove the whole machinery around checking whether contextvars are safe to use and replacing them if not. Note: 3.6 tests are expected to fail on this. They'll be dropped in #6904 #### Issues Closes #5037
- Add `_check_minimum_version` calls to all integrations that had entries in `_MIN_VERSIONS` but were not enforcing them at runtime - Add new `_MIN_VERSIONS` entries for integrations that were missing them - Use package-provided version if possible; fallback to `package_version` only if not available
We're preparing our next major on this branch.
The project is tracked in Linear. If you don't have access, we'll try to tag issues belonging to the project with the
SDK3.0 label on GitHub so that you can follow along.Context
You might have read this announcement about us discontinuing work on a 3.0. This is referring to the work done on the
potel-basebranch, which included two types of changes: a huge refactor of our tracing code on the one hand, and various unrelated changes, improvements and fixes on the other. We're dropping the huge refactor part, and only porting the rest, to a new branch and eventually a new 3.0 release.Changes