chore(api): update all dependencies (develop) (major)
This MR contains the following updates:
Package | Type | Update | Change |
---|---|---|---|
cryptography (changelog) | dependencies | major |
==41.0.7 -> ==44.0.0
|
django (changelog) | dependencies | major |
4.2.9 -> 5.1.5
|
django-allauth (source, changelog) | dependencies | major |
0.63.6 -> 65.3.1
|
django-auth-ldap (changelog) | dependencies | major |
==4.1.0 -> ==5.1.0
|
django-cleanup (changelog) | dependencies | major |
==8.1.0 -> ==9.0.0
|
django-debug-toolbar (changelog) | dev | major |
==4.2.0 -> ==5.0.1
|
django-oauth-toolkit | dependencies | major |
2.2.0 -> 3.0.1
|
faker (changelog) | dev | major |
==23.2.1 -> ==33.3.1
|
flake8 (changelog) | dev | major |
==3.9.2 -> ==7.1.1
|
gunicorn (changelog) | dependencies | major |
==21.2.0 -> ==23.0.0
|
pycountry (changelog) | dependencies | major |
23.12.11 -> 24.6.1
|
pytest-cov (changelog) | dev | major |
==4.0.0 -> ==6.0.0
|
sentry-sdk (changelog) | dependencies | major |
==1.19.1 -> ==2.20.0
|
troi (changelog) | dependencies | major |
==2024.1.26.0 -> ==2025.1.10.0
|
watchdog (changelog) | dependencies | major |
==4.0.0 -> ==6.0.0
|
Release Notes
pyca/cryptography (cryptography)
v44.0.0
v43.0.3
v43.0.1
v43.0.0
v42.0.8
v42.0.7
v42.0.6
v42.0.5
v42.0.4
v42.0.3
v42.0.2
v42.0.1
v42.0.0
django/django (django)
v5.1.5
v5.1.4
v5.1.3
v5.1.2
v5.1.1
v5.1
v5.0.11
v5.0.10
v5.0.9
v5.0.8
v5.0.7
v5.0.6
v5.0.5
v5.0.4
v5.0.3
v5.0.2
v5.0.1
v5.0
v4.2.18
v4.2.17
v4.2.16
v4.2.15
v4.2.14
v4.2.13
v4.2.12
v4.2.11
v4.2.10
allauth/django-allauth (django-allauth)
v65.3.1
v65.3.0
v65.2.0
v65.1.0
v65.0.2
v65.0.1
v65.0.0
v64.2.1
v64.2.0
v64.1.0
v64.0.0
django-auth-ldap/django-auth-ldap (django-auth-ldap)
v5.1.0
What's Changed
- Allow importing the backend without loading apps by @francoisfreitag in https://github.com/django-auth-ldap/django-auth-ldap/pull/382 (Closes #380)
- Drop support for EOL Python 3.8 by @francoisfreitag in https://github.com/django-auth-ldap/django-auth-ldap/pull/383
Full Changelog: https://github.com/django-auth-ldap/django-auth-ldap/compare/5.0.0...5.1.0
v5.0.0
Breaking changes
An LDAPError
during an LDAP search operation would cause the library to assume an empty result set.
When mirroring groups, only a portion of a user groups would be mirrored. Allowing them to proceed with authentication may then break application access controls, as membership to a group (imagine an exclude group) would be missing.
The library now systematically sends the ldap_error
django signal. If an LDAPError
occurs during an operation, the operation is aborted. In particular, when mirroring groups (LDAPUser._mirror_groups
), an AuthenticationFailed
might now be raised.
See https://github.com/django-auth-ldap/django-auth-ldap/issues/378 for details.
What else changed
- Drop support for django 3.2 by @francoisfreitag in https://github.com/django-auth-ldap/django-auth-ldap/pull/371
- Add support for Django 5.1 by @francoisfreitag in https://github.com/django-auth-ldap/django-auth-ldap/pull/373
- Restore testing for Python 3.8 and 3.9 by @francoisfreitag in https://github.com/django-auth-ldap/django-auth-ldap/pull/375
- Test support for Python 3.13 by @francoisfreitag in https://github.com/django-auth-ldap/django-auth-ldap/pull/374
Full Changelog: https://github.com/django-auth-ldap/django-auth-ldap/compare/4.8.0...5.0.0
v4.8.0
What's Changed
- Add support for custom username field by @InzGIBA in https://github.com/django-auth-ldap/django-auth-ldap/pull/368
New Contributors
- @InzGIBA made their first contribution in https://github.com/django-auth-ldap/django-auth-ldap/pull/368
Full Changelog: https://github.com/django-auth-ldap/django-auth-ldap/compare/4.7.0...4.8.0
v4.7.0
What's Changed
- Add support for Django 5.0 by @francoisfreitag in https://github.com/django-auth-ldap/django-auth-ldap/pull/356
- Drop Django 4.1 by @francoisfreitag in https://github.com/django-auth-ldap/django-auth-ldap/pull/366
Full Changelog: https://github.com/django-auth-ldap/django-auth-ldap/compare/4.6.0...4.7.0
v4.6.0
What's Changed
- Add support for Python 3.12 by @francoisfreitag in https://github.com/django-auth-ldap/django-auth-ldap/pull/349
Full Changelog: https://github.com/django-auth-ldap/django-auth-ldap/compare/4.5.0...4.6.0
v4.5.0
What's Changed
- Allow to reload DN when using user-bind and DN-template by @sevdog in https://github.com/django-auth-ldap/django-auth-ldap/pull/347
New Contributors
- @sevdog made their first contribution in https://github.com/django-auth-ldap/django-auth-ldap/pull/347
Full Changelog: https://github.com/django-auth-ldap/django-auth-ldap/compare/4.4.0...4.5.0
v4.4.0
What's Changed
- Drop support for Python 3.7 by @francoisfreitag in https://github.com/django-auth-ldap/django-auth-ldap/pull/343
Full Changelog: https://github.com/django-auth-ldap/django-auth-ldap/compare/4.3.0...4.4.0
v4.3.0
What's Changed
- Add changelog URL to PyPI package metadata by @intgr in https://github.com/django-auth-ldap/django-auth-ldap/pull/330
- Drop support for Django 4.0, add Django 4.2 by @francoisfreitag in https://github.com/django-auth-ldap/django-auth-ldap/pull/332
New Contributors
- @intgr made their first contribution in https://github.com/django-auth-ldap/django-auth-ldap/pull/330
Full Changelog: https://github.com/django-auth-ldap/django-auth-ldap/compare/4.2.0...4.3.0
v4.2.0
What's Changed
- Move LDAPSetting to the config module by @francoisfreitag in https://github.com/django-auth-ldap/django-auth-ldap/pull/289
- Drop support for Django 2.2 by @francoisfreitag in https://github.com/django-auth-ldap/django-auth-ldap/pull/319
- Add support for Django 4.1 by @francoisfreitag in https://github.com/django-auth-ldap/django-auth-ldap/pull/317
- Add support for Python 3.11 by @francoisfreitag in https://github.com/django-auth-ldap/django-auth-ldap/pull/329
Full Changelog: https://github.com/django-auth-ldap/django-auth-ldap/compare/4.1.0...4.2.0
django-commons/django-debug-toolbar (django-debug-toolbar)
v5.0.1
What's Changed
There were no functional changes in this version.
MRs
- Update release workflows to latest trusted publisher GHA. by @tim-schilling in https://github.com/django-commons/django-debug-toolbar/pull/2054
Full Changelog: https://github.com/django-commons/django-debug-toolbar/compare/5.0.0...5.0.1
v5.0.0
What's Changed
Please note that Django Debug Toolbar has now moved into the Django Commons organization.
Changelog
- Added Python 3.13 to the CI matrix.
- Removed support for Python 3.8 as it has reached end of life.
- Converted to Django Commons PyPI release process.
- Fixed a crash which occurred when using non-
str
static file values. - Documented experimental async support.
- Improved troubleshooting doc for incorrect mime types for .js static files
- Support async applications and ASGI from
Google Summer of Code Project 2024 <https://summerofcode.withgoogle.com/programs/2024/projects/iXVvyGYp>
__. - Added Django 5.1 to the CI matrix.
- Added support for the
LoginRequiredMiddleware
introduced in Django 5.1. - Support select and explain buttons for
UNION
queries on PostgreSQL. - Fixed internal toolbar requests being instrumented if the Django setting
FORCE_SCRIPT_NAME
was set. - Increase opacity of show Debug Toolbar handle to improve accessibility.
- Changed the
RedirectsPanel
to be async compatible. - Increased the contrast of text with dark mode enabled.
- Add translations for Bulgarian and Korean.
- Update translations for several languages.
- Include new translatable strings for translation.
- Fixed a crash which happened in the fallback case when session keys cannot be sorted.
MRs
- Async compatible debug-toolbar middleware by @salty-ivy in https://github.com/django-commons/django-debug-toolbar/pull/1938
- Add async tests by @salomvary in https://github.com/django-commons/django-debug-toolbar/pull/1835
- Update installation.rst by @Dr-Bernard in https://github.com/django-commons/django-debug-toolbar/pull/1967
- Make toolbar compatible with
FORCE_SCRIPT_NAME
by @dmartin in https://github.com/django-commons/django-debug-toolbar/pull/1970 - Support select and explain for UNION queries by @friedelwolff in https://github.com/django-commons/django-debug-toolbar/pull/1972
- Override
DEBUG=True
in async middleware compatibility tests by @salty-ivy in https://github.com/django-commons/django-debug-toolbar/pull/1977 - Quick hack for including csp_nonces from requests into script tags by @karolyi in https://github.com/django-commons/django-debug-toolbar/pull/1975
- Slightly increase opacity of debug toolbar button by @jribbens in https://github.com/django-commons/django-debug-toolbar/pull/1982
- Async compatible redirect panel by @salty-ivy in https://github.com/django-commons/django-debug-toolbar/pull/1976
-
🔧 update translation for Persian language by @elias-ebrahimpour in https://github.com/django-commons/django-debug-toolbar/pull/1873 - Add a paragraph describing our stance on Python typing by @matthiask in https://github.com/django-commons/django-debug-toolbar/pull/1979
- Dark mode text needs higher contrast by @myou1985 in https://github.com/django-commons/django-debug-toolbar/pull/1987
- Switch to Django Commons code of conduct by @tim-schilling in https://github.com/django-commons/django-debug-toolbar/pull/1978
- Update translations by @tim-schilling in https://github.com/django-commons/django-debug-toolbar/pull/1984
- Make Panels non async by default by @salty-ivy in https://github.com/django-commons/django-debug-toolbar/pull/1990
- Async compatible
StaticFilesPanel
by @salty-ivy in https://github.com/django-commons/django-debug-toolbar/pull/1983 - Refs #1668: Fixed the unsortable session keys fallback by @matthiask in https://github.com/django-commons/django-debug-toolbar/pull/1994
- Add Django 5.1 to the CI matrix by @matthiask in https://github.com/django-commons/django-debug-toolbar/pull/1995
- Use Heading-4 for MR template for screen-readers. by @tim-schilling in https://github.com/django-commons/django-debug-toolbar/pull/1999
- Async compatible
HistoryPanel
by @salty-ivy in https://github.com/django-commons/django-debug-toolbar/pull/1991 - Async compatible
SQLPanel
by @salty-ivy in https://github.com/django-commons/django-debug-toolbar/pull/1993 - Correct "middleware" typos by @korverdev in https://github.com/django-commons/django-debug-toolbar/pull/2003
- add support for LoginRequiredMiddleware with login_not_required decor… by @dulmandakh in https://github.com/django-commons/django-debug-toolbar/pull/2005
- Async integration tests by @salty-ivy in https://github.com/django-commons/django-debug-toolbar/pull/2001
- Modernize Python type hints and string formatting by @cclauss in https://github.com/django-commons/django-debug-toolbar/pull/2012
- Adding in support for Python 3.13 by @abeed-avayu in https://github.com/django-commons/django-debug-toolbar/pull/2014
- Fix #2011: Test the divisor, not the dividend for zero by @matthiask in https://github.com/django-commons/django-debug-toolbar/pull/2015
- Update Installation warning doc by @salty-ivy in https://github.com/django-commons/django-debug-toolbar/pull/2019
- Convert to Django Commons pypi-github release process by @tim-schilling in https://github.com/django-commons/django-debug-toolbar/pull/2017
- The static files panel shouldn't choke on unexpected data types by @matthiask in https://github.com/django-commons/django-debug-toolbar/pull/2021
- Update references to point to django-commons repo by @robhudson in https://github.com/django-commons/django-debug-toolbar/pull/2022
- Update pyupgrade's target version to Python 3.9 by @ulgens in https://github.com/django-commons/django-debug-toolbar/pull/2024
- I added more explanations to the example/readme file. by @jong-seoung in https://github.com/django-commons/django-debug-toolbar/pull/2027
- Adopt a basic security policy by @tim-schilling in https://github.com/django-commons/django-debug-toolbar/pull/2040
- Fix whitespace view in code by @thesayfulla in https://github.com/django-commons/django-debug-toolbar/pull/2043
- Documented experimental async support. by @tim-schilling in https://github.com/django-commons/django-debug-toolbar/pull/2045
- Updated Troubleshooting documentation: simpler mimetype workaround for .js file by @blep in https://github.com/django-commons/django-debug-toolbar/pull/2047
Google Summer of Code - Async project
This release contains the changes for async compatibility for the majority of panels. This is the result of the Google Summer of Code project by @salty-ivy. A massive thank you
New Contributors
- @Dr-Bernard made their first contribution in https://github.com/django-commons/django-debug-toolbar/pull/1967
- @dmartin made their first contribution in https://github.com/django-commons/django-debug-toolbar/pull/1970
- @friedelwolff made their first contribution in https://github.com/django-commons/django-debug-toolbar/pull/1972
- @karolyi made their first contribution in https://github.com/django-commons/django-debug-toolbar/pull/1975
- @jribbens made their first contribution in https://github.com/django-commons/django-debug-toolbar/pull/1982
- @elias-ebrahimpour made their first contribution in https://github.com/django-commons/django-debug-toolbar/pull/1873
- @myou1985 made their first contribution in https://github.com/django-commons/django-debug-toolbar/pull/1987
- @korverdev made their first contribution in https://github.com/django-commons/django-debug-toolbar/pull/2003
- @dulmandakh made their first contribution in https://github.com/django-commons/django-debug-toolbar/pull/2005
- @abeed-avayu made their first contribution in https://github.com/django-commons/django-debug-toolbar/pull/2014
- @robhudson made their first contribution in https://github.com/django-commons/django-debug-toolbar/pull/2022
- @ulgens made their first contribution in https://github.com/django-commons/django-debug-toolbar/pull/2024
- @jong-seoung made their first contribution in https://github.com/django-commons/django-debug-toolbar/pull/2027
- @thesayfulla made their first contribution in https://github.com/django-commons/django-debug-toolbar/pull/2043
- @blep made their first contribution in https://github.com/django-commons/django-debug-toolbar/pull/2047
Full Changelog: https://github.com/django-commons/django-debug-toolbar/compare/4.4.6...5.0.0
v4.4.6
What's Changed
- Close #1509: Revert the infinite recursion fix, Django has changed the behavior by @matthiask in https://github.com/jazzband/django-debug-toolbar/pull/1955
- Fixed order and grammatical number of panels in documentation by @bkdekoning in https://github.com/jazzband/django-debug-toolbar/pull/1956
- Alerts panel: Only process HTML responses by @matthiask in https://github.com/jazzband/django-debug-toolbar/pull/1960
Full Changelog: https://github.com/jazzband/django-debug-toolbar/compare/4.4.5...4.4.6
v4.4.5
What's Changed
- Fix #1951: Do not crash if the 'alerts' key doesn't exist by @matthiask in https://github.com/jazzband/django-debug-toolbar/pull/1953
- Only import the jinja2 instrumentation when jinja2 itself is importable by @matthiask in https://github.com/jazzband/django-debug-toolbar/pull/1954
Full Changelog: https://github.com/jazzband/django-debug-toolbar/compare/4.4.4...4.4.5
v4.4.4
What's Changed
- Check for for StreamingHttpResponse when generating stats in Alert by @danjac in https://github.com/jazzband/django-debug-toolbar/pull/1946
- Actually use the Jinja2 template backend by @matthiask in https://github.com/jazzband/django-debug-toolbar/pull/1882
New Contributors
- @danjac made their first contribution in https://github.com/jazzband/django-debug-toolbar/pull/1946
Full Changelog: https://github.com/jazzband/django-debug-toolbar/compare/4.4.3...4.4.4
v4.4.3
What's Changed
- Fix overriding font-family for both light and dark themes by @federicobond in https://github.com/jazzband/django-debug-toolbar/pull/1930
- Restore compatibility with iptools.IpRangeList by @quinox in https://github.com/jazzband/django-debug-toolbar/pull/1929
- Limit the cases for E001 to likely scenarios by @tim-schilling in https://github.com/jazzband/django-debug-toolbar/pull/1925
- Introduce debug_toolbar_urls to simplify installation by @tim-schilling in https://github.com/jazzband/django-debug-toolbar/pull/1926
- Fixed #1682 -- alert user when using file field without proper encoding by @bkdekoning in https://github.com/jazzband/django-debug-toolbar/pull/1933
- Remove rem units from svg by @michjnich in https://github.com/jazzband/django-debug-toolbar/pull/1942
New Contributors
- @quinox made their first contribution in https://github.com/jazzband/django-debug-toolbar/pull/1929
- @bkdekoning made their first contribution in https://github.com/jazzband/django-debug-toolbar/pull/1933
- @michjnich made their first contribution in https://github.com/jazzband/django-debug-toolbar/pull/1942
Full Changelog: https://github.com/jazzband/django-debug-toolbar/compare/4.4.2...4.4.3
v4.4.2
What's Changed
- [pre-commit.ci] pre-commit autoupdate by @pre-commit-ci in https://github.com/jazzband/django-debug-toolbar/pull/1909
- Avoid setting color-scheme on :root, we're only a guest on pages by @matthiask in https://github.com/jazzband/django-debug-toolbar/pull/1923
- Add a section to the installation docs about running tests by @matthiask in https://github.com/jazzband/django-debug-toolbar/pull/1921
- Version 4.4.2 by @matthiask in https://github.com/jazzband/django-debug-toolbar/pull/1924
Full Changelog: https://github.com/jazzband/django-debug-toolbar/compare/4.4.1...4.4.2
v4.4.1
What's changed
MRs merged
- Limit metadata version for Jazzband's release process by @tim-schilling in https://github.com/jazzband/django-debug-toolbar/pull/1916
Full Changelog: https://github.com/jazzband/django-debug-toolbar/compare/4.4...4.4.1
v4.4.0
v4.3.0
jazzband/django-oauth-toolkit (django-oauth-toolkit)
v3.0.1
Fixed
- #1491 Fix migration error when there are pre-existing Access Tokens.
v3.0.0
WARNING - POTENTIAL BREAKING CHANGES
- Changes to the
AbstractAccessToken
model require doing amanage.py migrate
after upgrading. - If you use swappable models you will need to make sure your custom models are also updated (usually
manage.py makemigrations
). - Old Django versions below 4.2 are no longer supported.
- A few deprecations warned about in 2.4.0 (#1345) have been removed. See below.
Added
- #1366 Add Docker containerized apps for testing IDP and RP.
-
#1454 Added compatibility with
LoginRequiredMiddleware
introduced in Django 5.1.
Changed
- Many documentation and project internals improvements.
-
#1446 Use generic models
pk
instead ofid
. This enables, for example, custom swapped models to have a different primary key field. -
#1447 Update token to TextField from CharField. Removing the 255 character limit enables supporting JWT tokens with additional claims.
This adds a SHA-256
token_checksum
field that is used to validate tokens. - #1450 Transactions wrapping writes of the Tokens now rely on Django's database routers to determine the correct database to use instead of assuming that 'default' is the correct one.
- #1455 Changed minimum supported Django version to >=4.2.
Removed
-
#1425 Remove deprecated
RedirectURIValidator
,WildcardSet
per #1345;validate_logout_request
per #1274
Fixed
- #1444, #1476 Fix several 500 errors to instead raise appropriate errors.
-
#1469 Fix
ui_locales
request parameter triggersAttributeError
under certain circumstances
Security
-
#1452 Add a new setting
REFRESH_TOKEN_REUSE_PROTECTION
. In combination withROTATE_REFRESH_TOKEN
, this prevents refresh tokens from being used more than once. See more at OAuth 2.0 Security Best Current Practice - #1481 Bump oauthlib version required to 3.2.2 and above to address CVE-2022-36087.
v2.4.0
WARNING
Issues caused by Release 2.0.0 breaking changes continue to be logged. Please make sure to carefully read these release notes before performing a MAJOR upgrade to 2.x.
These issues both result in {"error": "invalid_client"}
:
-
The application client secret is now hashed upon save. You must copy it before it is saved. Using the hashed value will fail.
-
PKCE_REQUIRED
is nowTrue
by default. You should use PKCE with your client or setPKCE_REQUIRED=False
if you are unable to fix the client.
If you are going to revert migration 0006 make note that previously hashed client_secret cannot be reverted!
Added
-
#1304 Add
OAuth2ExtraTokenMiddleware
for adding access token to request. See Setup a provider in the Tutorial. - #1273 Performance improvement: Add caching of loading of OIDC private key.
-
#1285 Add
post_logout_redirect_uris
field in the Application Registration form - #1311,#1334 (Security) Add option to disable client_secret hashing to allow verifying JWTs' signatures when using HS256 keys. This means your client secret will be stored in cleartext but is the only way to successfully use HS256 signed JWT's.
- #1350 Support Python 3.12 and Django 5.0
-
#1367 Add
code_challenge_methods_supported
property to auto discovery information, per RFC 8414 section 2 - #1328 Adds the ability to define how to store a user profile.
Fixed
-
#1292 Interpret
EXP
in AccessToken always as UTC instead of (possibly) local timezone. Use settingAUTHENTICATION_SERVER_EXP_TIME_ZONE
to enable different time zone in case the remote authentication server does not provide EXP in UTC. - #1323 Fix instructions in documentation on how to create a code challenge and code verifier
- #1284 Fix a 500 error when trying to logout with no id_token_hint even if the browser session already expired.
-
#1296 Added reverse function in migration
0006_alter_application_client_secret
. Note that reversing this migration cannot undo a hashedclient_secret
. -
#1345 Fix encapsulation for Redirect URI scheme validation. Deprecates
RedirectURIValidator
in favor ofAllowedURIValidator
. - #1357 Move import of setting_changed signal from test to django core modules.
- #1361 Fix prompt=none redirects to login screen
- #1380 Fix AttributeError in OAuth2ExtraTokenMiddleware when a custom AccessToken model is used.
- #1288 Fix #1276 which attempted to resolve #1092 for requests that don't have a client_secret per RFC 6749 4.1.1
-
#1337 Gracefully handle expired or deleted refresh tokens, in
validate_user
. - Various documentation improvements: #1410, #1408, #1405, #1399, #1401, #1396, #1375, #1162, #1315, #1307
Removed
- #1350 Remove support for Python 3.7 and Django 2.2
v2.3.0
WARNING
Issues caused by Release 2.0.0 breaking changes continue to be logged. Please make sure to carefully read these release notes before performing a MAJOR upgrade to 2.x.
These issues both result in {"error": "invalid_client"}
:
-
The application client secret is now hashed upon save. You must copy it before it is saved. Using the hashed value will fail.
-
PKCE_REQUIRED
is nowTrue
by default. You should use PKCE with your client or setPKCE_REQUIRED=False
if you are unable to fix the client.
Added
- Add Japanese(日本語) Language Support
- #1244 implement OIDC RP-Initiated Logout
- #1092 Allow Authorization Code flow without a client_secret per RFC 6749 2.3.1
- #1264 Support Django 4.2.
Changed
joke2k/faker (faker)
v33.3.1
- Fix
nl_BE
Bank Provider (BBAN, IBAN, SWIFT). Thanks @AliYmn.
v33.3.0
- Add support for Zulu (
zu_ZA
) address provider and corresponding tests. Thanks @AliYmn.
v33.2.0
- Add currency provider for
uk_UA
. Thanks @SaulTigh.
v33.1.3
- Fix type annotation on Python 3.8.
v33.1.2
- Fix
ru_RU
passport provider. Thanks @denisSurkov.
v33.1.1
- Fix address number output issue in
ko_KR
address provider. Thanks @semi-yu.
v33.1.0
- Add support for Python 3.13. Thanks @edgarrmondragon.
v33.0.0
- Revert "Make pytest fixture session-scoped".
v32.1.0
- Fix
ko_KR
road address. Thanks @semi-yu.
v32.0.0
- Make pytest fixture session-scoped. Thanks @acolombier.
v31.0.0
- Remove
Collection[str]
type fromElementTypes
. Thanks @tvuotila.
v30.10.0
- Add jobs for locale
de_AT
; added methodsjob_female
andjob_male
. Thanks @ChristinaRau.
v30.9.0
- Added Providers for
uz_UZ
language. Thanks @laziest-coder.
v30.8.2
- Revert "Add decorator to optionally format dates as string.".
v30.8.1
- Fix
month_in_guj
.
v30.8.0
- Update city names for
uk_UA
. Thanks @lexxai.
v30.7.0
- Add person provider for
gu_IN
locale. Thanks @debjeetsingha. - Add
datetime
provider forgu_IN
locale. Thanks @wh0th3h3llam1.
v30.6.0
- Add passport provider for
ru_RU
locale. Thanks @Abdujabbar.
v30.5.0
- Add Providers for
ka_GE
locale. Thanks @onesch.
v30.4.0
- Add separate male/female names along with prefix/suffix for
hi_IN
locale. Thanks @wh0th3h3llam1.
v30.3.0
- Add decorator to optionally format dates as string. Thanks @browniebroke.
v30.2.0
- Cache Factory._find_provider_class module look-ups. Thanks @huonw.
v30.1.0
- Add PIN Code range and union territories in
en_IN
address provider. Thanks @wh0th3h3llam1.
v30.0.0
- Force the slug always be generated with ASCII characters. Thanks @Pandede.
v29.0.0
- Fix
pydecimal
distribution when called with a range across0
. Thanks @AlexLitvino.
v28.4.1
- Fix issue where Faker does not properly convert min/max float values to
Decimal
. Thanks @bdjellabaldebaran.
v28.4.0
- Add
it_IT
lorem provider. Thanks @gianni-di-noia.
v28.3.0
- Fix male forms of female surnames in
uk_UA
.Thanks @AlexLitvino.
v28.2.0
- Add
es_ES
isbn provider. Thanks @mondeja.
v28.1.0
- Fix Incorrect City Spelling in
uk_UA
locale. Thanks @ch4zzy.
v28.0.0
- Fix
pydecimal
handling ofpositive
keyword. Thanks @tahzeer.
v27.4.0
- Add person provider for
pk_PK
locale. Thanks @c2-tlhah
v27.3.0
- Add providers for
vi_VN
locale. Thanks @ntd1683.
v27.2.0
- Split names in
en_IN
person provider. Thanks @wh0th3h3llam1.
v27.1.0
- Add address providoer for
en_MS
local. Thanks @carlosfunk.
v27.0.0
- Re-introduce
part_of_speech
argument towords()
method.
v26.3.0
- Extend
ro_RO
company localization with prefixes. Thanks @DDSNA.
v26.2.0
- Add Swahili (
sw
) provider for generating Swahili names. Thanks @5uru.
v26.1.0
- Add more entries to
sk_SK
Geo provider. Thanks @george0st.
v26.0.0
- Fix upper limit of nb_elements. Thanks @mileswatsonbjss.
v25.9.2
- Remove duplicate entry in currency provider.
v25.9.1
- Change
pydecimal
type hint formin_value
,max_value
to allowint
s. Thanks @parsariyahi.
v25.9.0
- Add support for Nigerian Yoruba names and surnames (
yo_NG
). Thanks @5uru.
v25.8.0
- Add handshake emoji with different color variations to emoji provider list. Thanks @tamkc.
v25.7.0
- Add missing translation for countries in
pt-BR
. Thanks @LeonardoFurtado.
v25.6.0
- Fix data in geo for
pl_PL
. Thanks @george0st, @mgorny.
v25.5.0
- Fix data in geo for
pl_PL
. Thanks @george0st.
v25.4.0
- Add landmarks in
geo
forpl_PL
. Thanks @george0st.
v25.3.0
- Add more iOS versions to
user_agent
. Thanks @george0st.
v25.2.0
- Update VAT generation in
nl_BE
to align with correct Belgian format. Thanks @JorisSpruyt.
v25.1.0
- Add geo for
pl_PL
. Thanks @george0st. - Add geo for
sk_SK
. Thanks @george0st.
v25.0.1
- Add type stub file to
setup.py
.
v25.0.0
- Drop support for Python 3.7. Thanks @kloczek.
v24.14.1
- Include type stubs in release.
v24.14.0
- Add job provider for
cs_CZ
. Thanks @george0st.
v24.13.0
- Add geo provider for
sk_SK
. Thanks @george0st. - Clean up data in
sk_SK
job provider. Thanks @george0st.
v24.12.0
- Remove offensive word from
pl_PL
lorem provider. Thanks @Rey092.
v24.11.0
- Tune
cs_CZ
phone number validation. Thanks @george0st.
v24.10.0
- Update list of
first_name_*
andlast_name
inpt_BR
PersonProvider
. Thanks @dclobato.
v24.9.0
- Update
uk_UA
phone provider. Thanks @lozik4.
v24.8.0
- Fix wrong pricetag format in
ru_RU
locale. Thanks @Pandede.
v24.7.1
- Fix previous release issue.
v24.7.0
- Update last names for
de_DE
locale. Thanks @george0st. - Update phone number formats for
cs_CZ
,sk_SK
. Thanks @george0st.
v24.6.0
- Update versions in
user_agent
provider. Thanks @george0st.
v24.5.0
- Add type hints stubs. Thanks @KaylaHood.
v24.4.0
- Add address words for
cs_CZ
. Thanks @george0st
v24.3.0
- Add phone number formats to nl_BE. Thanks @maximegmd.
v24.2.1
- Return capitalized city names in
hu_HU
. Thanks @AlexLitvino.
v24.2.0
v24.1.1
- Fix prefix for male
bg_BG
names Thanks @DimitarVanguelov.
v24.1.0
v24.0.0
- Fix returning random data for person provider in
et_EE
locale when the same seed value is set. Thanks @AlexLitvino.
v23.3.0
- Add person, bank provider for
sk_SK
locale. Thanks @mhandl.
pycqa/flake8 (flake8)
v7.1.1
v7.1.0
v7.0.0
v6.1.0
v6.0.0
v5.0.4
v5.0.3
v5.0.2
v5.0.1
v5.0.0
v4.0.1
v4.0.0
benoitc/gunicorn (gunicorn)
v23.0.0
Gunicorn 23.0.0 has been released. This version improve HTTP 1.1. support and which improve safety
You're invited to upgrade asap your own installation.
23.0.0 - 2024-08-10
- minor docs fixes (
🇵🇷 3217
,🇵🇷 3089
,🇵🇷 3167
) - worker_class parameter accepts a class (
🇵🇷 3079
) - fix deadlock if request terminated during chunked parsing (
🇵🇷 2688
) - permit receiving Transfer-Encodings: compress, deflate, gzip (
🇵🇷 3261
) - permit Transfer-Encoding headers specifying multiple encodings. note: no parameters, still (
🇵🇷 3261
) - sdist generation now explicitly excludes sphinx build folder (
🇵🇷 3257
) - decode bytes-typed status (as can be passed by gevent) as utf-8 instead of raising
TypeError
(🇵🇷 2336
) - raise correct Exception when encounting invalid chunked requests (
🇵🇷 3258
) - the SCRIPT_NAME and PATH_INFO headers, when received from allowed forwarders, are no longer restricted for containing an underscore (
🇵🇷 3192
) - include IPv6 loopback address
[::1]
in default for :ref:forwarded-allow-ips
and :ref:proxy-allow-ips
(🇵🇷 3192
)
** NOTE **
- The SCRIPT_NAME change mitigates a regression that appeared first in the 22.0.0 release
- Review your :ref:
forwarded-allow-ips
setting if you are still not seeing the SCRIPT_NAME transmitted - Review your :ref:
forwarder-headers
setting if you are missing headers after upgrading from a version prior to 22.0.0
** Breaking changes **
- refuse requests where the uri field is empty (
🇵🇷 3255
) - refuse requests with invalid CR/LR/NUL in heade field values (
🇵🇷 3253
) - remove temporary
--tolerate-dangerous-framing
switch from 22.0 (🇵🇷 3260
) - If any of the breaking changes affect you, be aware that now refused requests can post a security problem, especially so in setups involving request pipe-lining and/or proxies.
Fix CVE-2024-1135
v22.0.0
: Gunicorn 22.0 has been released
Gunicorn 22.0.0 has been released. This version fix the numerous security vulnerabilities. You're invited to upgrade asap your own installation.
Changes:
22.0.0 - 2024-04-17
===================
- use `utime` to notify workers liveness
- migrate setup to pyproject.toml
- fix numerous security vulnerabilities in HTTP parser (closing some request smuggling vectors)
- parsing additional requests is no longer attempted past unsupported request framing
- on HTTP versions < 1.1 support for chunked transfer is refused (only used in exploits)
- requests conflicting configured or passed SCRIPT_NAME now produce a verbose error
- Trailer fields are no longer inspected for headers indicating secure scheme
- support Python 3.12
** Breaking changes **
- minimum version is Python 3.7
- the limitations on valid characters in the HTTP method have been bounded to Internet Standards
- requests specifying unsupported transfer coding (order) are refused by default (rare)
- HTTP methods are no longer casefolded by default (IANA method registry contains none affected)
- HTTP methods containing the number sign (#) are no longer accepted by default (rare)
- HTTP versions < 1.0 or >= 2.0 are no longer accepted by default (rare, only HTTP/1.1 is supported)
- HTTP versions consisting of multiple digits or containing a prefix/suffix are no longer accepted
- HTTP header field names Gunicorn cannot safely map to variables are silently dropped, as in other software
- HTTP headers with empty field name are refused by default (no legitimate use cases, used in exploits)
- requests with both Transfer-Encoding and Content-Length are refused by default (such a message might indicate an attempt to perform request smuggling)
- empty transfer codings are no longer permitted (reportedly seen with really old & broken proxies)
** SECURITY **
- fix CVE-2024-1135
- Documentation is available there: https://docs.gunicorn.org/en/stable/news.html
- Packages: https://pypi.org/project/gunicorn/
flyingcircusio/pycountry (pycountry)
v24.6.1
-
Breaking change: Reverted the fallback to name when country common_name or official_name attributes not available, which was added in 23.12.11.
-
Fixed import of importlib_metadata to importlib.metadata
-
Fixed bug causing parent subdivision codes to be returned with additional country code preceding (i.e. GB-GB-ENG instead of GB-ENG)
-
Update to iso-codes 4.16.0. (Thanks to musicinmybrain!)
pytest-dev/pytest-cov (pytest-cov)
v6.0.0
- Updated various documentation inaccuracies, especially on subprocess handling.
- Changed fail under checks to use the precision set in the coverage configuration.
Now it will perform the check just like
coverage report
would. - Added a
--cov-precision
cli option that can override the value set in your coverage configuration. - Dropped support for now EOL Python 3.8.
v5.0.0
- Removed support for xdist rsync (now deprecated).
Contributed by Matthias Reichenbach in
#​623 <https://github.com/pytest-dev/pytest-cov/pull/623>
_. - Switched docs theme to Furo.
- Various legacy Python cleanup and CI improvements.
Contributed by Christian Clauss and Hugo van Kemenade in
#​630 <https://github.com/pytest-dev/pytest-cov/pull/630>
,#​631 <https://github.com/pytest-dev/pytest-cov/pull/631>
,#​632 <https://github.com/pytest-dev/pytest-cov/pull/632>
_ and#​633 <https://github.com/pytest-dev/pytest-cov/pull/633>
_. - Added a
pyproject.toml
example in the docs. Contributed by Dawn James in#​626 <https://github.com/pytest-dev/pytest-cov/pull/626>
_. - Modernized project's pre-commit hooks to use ruff. Initial POC contributed by
Christian Clauss in
#​584 <https://github.com/pytest-dev/pytest-cov/pull/584>
_. - Dropped support for Python 3.7.
v4.1.0
- Updated CI with new Pythons and dependencies.
- Removed rsyncdir support. This makes pytest-cov compatible with xdist 3.0.
Contributed by Sorin Sbarnea in
#​558 <https://github.com/pytest-dev/pytest-cov/pull/558>
_. - Optimized summary generation to not be performed if no reporting is active (for example,
when
--cov-report=''
is used without--cov-fail-under
). Contributed by Jonathan Stewmon in#​589 <https://github.com/pytest-dev/pytest-cov/pull/589>
_. - Added support for JSON reporting.
Contributed by Matthew Gamble in
#​582 <https://github.com/pytest-dev/pytest-cov/pull/582>
_. - Refactored code to use f-strings.
Contributed by Mark Mayo in
#​572 <https://github.com/pytest-dev/pytest-cov/pull/572>
_. - Fixed a skip in the test suite for some old xdist.
Contributed by a bunch of people in
#​565 <https://github.com/pytest-dev/pytest-cov/pull/565>
_. - Dropped support for Python 3.6.
getsentry/sentry-python (sentry-sdk)
v2.20.0
-
New integration: Add Typer integration (#3869) by @patrick91
For more information, see the documentation for the TyperIntegration.
-
New integration: Add Unleash feature flagging integration (#3888) by @aliu39
For more information, see the documentation for the UnleashIntegration.
-
Add custom tracking of feature flag evaluations (#3860) by @aliu39
-
Feature Flags: Register LD hook in setup instead of init, and don't check for initialization (#3890) by @aliu39
-
Feature Flags: Moved adding of
flags
context into Scope (#3917) by @antonpirker -
Create a separate group for feature flag test suites (#3911) by @sentrivana
-
Fix cache pollution from mutable reference (#3887) by @cmanallen
-
Centralize minimum version checking (#3910) by @sentrivana
-
Support SparkIntegration activation after SparkContext created (#3411) by @seyoon-lim
-
Preserve ARQ enqueue_job kwdefaults after patching (#3903) by @danmr
-
Add Github workflow to comment on issues when a fix was released (#3866) by @antonpirker
-
Update test matrix for Sanic (#3904) by @antonpirker
-
Rename scripts (#3885) by @sentrivana
-
Fix CI (#3878) by @sentrivana
-
Treat
potel-base
as release branch in CI (#3912) by @sentrivana -
build(deps): bump actions/create-github-app-token from 1.11.0 to 1.11.1 (#3893) by @dependabot
-
build(deps): bump codecov/codecov-action from 5.0.7 to 5.1.1 (#3867) by @dependabot
-
build(deps): bump codecov/codecov-action from 5.1.1 to 5.1.2 (#3892) by @dependabot
v2.19.2
Various fixes & improvements
- Deepcopy and ensure get_all function always terminates (#3861) by @cmanallen
- Cleanup chalice test environment (#3858) by @antonpirker
v2.19.1
Various fixes & improvements
- Fix errors when instrumenting Django cache (#3855) by @BYK
- Copy
scope.client
reference as well (#3857) by @sl0thentr0py - Don't give up on Spotlight on 3 errors (#3856) by @BYK
- Add missing stack frames (#3673) by @antonpirker
- Fix wrong metadata type in async gRPC interceptor (#3205) by @fdellekart
- Rename launch darkly hook to match JS SDK (#3743) by @aliu39
- Script for checking if our instrumented libs are Python 3.13 compatible (#3425) by @antonpirker
- Improve Ray tests (#3846) by @antonpirker
- Test with Celery
5.5.0rc3
(#3842) by @sentrivana - Fix asyncio testing setup (#3832) by @sl0thentr0py
- Bump
codecov/codecov-action
from5.0.2
to5.0.7
(#3821) by @dependabot - Fix CI (#3834) by @sentrivana
- Use new ClickHouse GH action (#3826) by @antonpirker
v2.19.0
Various fixes & improvements
- New: introduce
rust_tracing
integration. See https://docs.sentry.io/platforms/python/integrations/rust_tracing/ (#3717) by @matt-codecov - Auto enable Litestar integration (#3540) by @provinzkraut
- Deprecate
sentry_sdk.init
context manager (#3729) by @szokeasaurusrex - feat(spotlight): Send PII to Spotlight when no DSN is set (#3804) by @BYK
- feat(spotlight): Add info logs when Sentry is enabled (#3735) by @BYK
- feat(spotlight): Inject Spotlight button on Django (#3751) by @BYK
- feat(spotlight): Auto enable cache_spans for Spotlight on DEBUG (#3791) by @BYK
- fix(logging): Handle parameter
stack_info
for theLoggingIntegration
(#3745) by @gmcrocetti - fix(pure-eval): Make sentry-sdk[pure-eval] installable with pip==24.0 (#3757) by @sentrivana
- fix(rust_tracing): include_tracing_fields arg to control unvetted data in rust_tracing integration (#3780) by @matt-codecov
- fix(aws) Fix aws lambda tests (by reducing event size) (#3770) by @antonpirker
- fix(arq): fix integration with Worker settings as a dict (#3742) by @saber-solooki
- fix(httpx): Prevent Sentry baggage duplication (#3728) by @szokeasaurusrex
- fix(falcon): Don't exhaust request body stream (#3768) by @szokeasaurusrex
- fix(integrations): Check
retries_left
before capturing exception (#3803) by @malkovro - fix(openai): Use name instead of description (#3807) by @sourceful-rob
- test(gcp): Only run GCP tests when they should (#3721) by @szokeasaurusrex
- chore: Shorten CI workflow names (#3805) by @sentrivana
- chore: Test with pyspark prerelease (#3760) by @sentrivana
- build(deps): bump codecov/codecov-action from 4.6.0 to 5.0.2 (#3792) by @dependabot
- build(deps): bump actions/checkout from 4.2.1 to 4.2.2 (#3691) by @dependabot
v2.18.0
Various fixes & improvements
-
New integration: Add LaunchDarkly integration (#3648) by @cmanallen
For more information, see the documentation for the LaunchDarklyIntegration.
-
New integration: Add OpenFeature feature flagging integration (#3648) by @cmanallen
For more information, see the documentation for the OpenFeatureIntegration.
-
Add LaunchDarkly and OpenFeature integration (#3648) by @cmanallen
-
Correct typo in a comment (#3726) by @szokeasaurusrex
-
End
http.client
span on timeout (#3723) by @Zylphrex -
Check for
h2
existence in HTTP/2 transport (#3690) by @BYK -
Use
type()
instead when extracting frames (#3716) by @Zylphrex -
Prefer
python_multipart
import overmultipart
(#3710) by @musicinmybrain -
Update active thread for asgi (#3669) by @Zylphrex
-
Prepare for upstream Strawberry extension removal (#3649) by @DoctorJohn
-
Enhance README with improved clarity and developer-friendly examples (#3667) by @UTSAVS26
-
Run license compliance action on all MRs (#3699) by @szokeasaurusrex
-
Run CodeQL action on all MRs (#3698) by @szokeasaurusrex
-
Exclude fakeredis 2.26.0 on py3.6 and 3.7 (#3695) by @szokeasaurusrex
-
Unpin
pytest
fortornado-latest
tests (#3714) by @szokeasaurusrex -
Install
pytest-asyncio
forredis
tests (Python 3.12-13) (#3706) by @szokeasaurusrex -
Clarify that only pinned tests are required (#3713) by @szokeasaurusrex
-
Remove accidentally-committed print (#3712) by @szokeasaurusrex
-
Disable broken RQ test in newly-released RQ 2.0 (#3708) by @szokeasaurusrex
-
Unpin
pytest
forcelery
tests (#3701) by @szokeasaurusrex -
Unpin
pytest
on Python 3.8+gevent
tests (#3700) by @szokeasaurusrex -
Unpin
pytest
for Python 3.8+common
tests (#3697) by @szokeasaurusrex -
Remove
pytest
pin inrequirements-devenv.txt
(#3696) by @szokeasaurusrex -
Test with Falcon 4.0 (#3684) by @sentrivana
v2.17.0
Various fixes & improvements
- Add support for async calls in Anthropic and OpenAI integration (#3497) by @vetyy
- Allow custom transaction names in ASGI (#3664) by @sl0thentr0py
- Langchain: Handle case when parent span wasn't traced (#3656) by @rbasoalto
- Fix Anthropic integration when using tool calls (#3615) by @kwnath
- More defensive Django Spotlight middleware injection (#3665) by @BYK
- Remove
ensure_integration_enabled_async
(#3632) by @sentrivana - Test with newer Falcon version (#3644, #3653, #3662) by @sentrivana
- Fix mypy (#3657) by @sentrivana
- Fix flaky transport test (#3666) by @sentrivana
- Remove pin on
sphinx
(#3650) by @sentrivana - Bump
actions/checkout
from4.2.0
to4.2.1
(#3651) by @dependabot
v2.16.0
Integrations
-
Bottle: Add
failed_request_status_codes
(#3618) by @szokeasaurusrexYou can now define a set of integers that will determine which status codes should be reported to Sentry.
sentry_sdk.init( integrations=[ BottleIntegration( failed_request_status_codes={403, *range(500, 600)}, ) ] )
Examples of valid
failed_request_status_codes
:-
{500}
will only send events on HTTP 500. -
{400, *range(500, 600)}
will send events on HTTP 400 as well as the 5xx range. -
{500, 503}
will send events on HTTP 500 and 503. -
set()
(the empty set) will not send events for any HTTP status code.
The default is
{*range(500, 600)}
, meaning that all 5xx status codes are reported to Sentry. -
-
Bottle: Delete never-reached code (#3605) by @szokeasaurusrex
-
Redis: Remove flaky test (#3626) by @sentrivana
-
Django: Improve getting
psycopg3
connection info (#3580) by @nijel -
Django: Add
SpotlightMiddleware
when Spotlight is enabled (#3600) by @BYK -
Django: Open relevant error when
SpotlightMiddleware
is on (#3614) by @BYK -
Django: Support
http_methods_to_capture
in ASGI Django (#3607) by @sentrivanaASGI Django now also supports the
http_methods_to_capture
integration option. This is a configurable tuple of HTTP method verbs that should create a transaction in Sentry. The default is("CONNECT", "DELETE", "GET", "PATCH", "POST", "PUT", "TRACE",)
.OPTIONS
andHEAD
are not included by default.Here's how to use it:
sentry_sdk.init( integrations=[ DjangoIntegration( http_methods_to_capture=("GET", "POST"), ), ], )
Miscellaneous
- Add 3.13 to setup.py (#3574) by @sentrivana
- Add 3.13 to basepython (#3589) by @sentrivana
- Fix type of
sample_rate
in DSC (and add explanatory tests) (#3603) by @antonpirker - Add
httpcore
basedHTTP2Transport
(#3588) by @BYK - Add opportunistic Brotli compression (#3612) by @BYK
- Add
__notes__
support (#3620) by @szokeasaurusrex - Remove useless makefile targets (#3604) by @antonpirker
- Simplify tox version spec (#3609) by @sentrivana
- Consolidate contributing docs (#3606) by @antonpirker
- Bump
codecov/codecov-action
from4.5.0
to4.6.0
(#3617) by @dependabot
v2.15.0
Integrations
-
Configure HTTP methods to capture in ASGI/WSGI middleware and frameworks (#3531) by @antonpirker
We've added a new option to the Django, Flask, Starlette and FastAPI integrations called
http_methods_to_capture
. This is a configurable tuple of HTTP method verbs that should create a transaction in Sentry. The default is("CONNECT", "DELETE", "GET", "PATCH", "POST", "PUT", "TRACE",)
.OPTIONS
andHEAD
are not included by default.Here's how to use it (substitute Flask for your framework integration):
sentry_sdk.init( integrations=[ FlaskIntegration( http_methods_to_capture=("GET", "POST"), ), ], )
-
Django: Allow ASGI to use
drf_request
inDjangoRequestExtractor
(#3572) by @PakawiNz -
Django: Don't let
RawPostDataException
bubble up (#3553) by @sentrivana -
Django: Add
sync_capable
toSentryWrappingMiddleware
(#3510) by @szokeasaurusrex -
AIOHTTP: Add
failed_request_status_codes
(#3551) by @szokeasaurusrexYou can now define a set of integers that will determine which status codes should be reported to Sentry.
sentry_sdk.init( integrations=[ AioHttpIntegration( failed_request_status_codes={403, *range(500, 600)}, ) ] )
Examples of valid
failed_request_status_codes
:-
{500}
will only send events on HTTP 500. -
{400, *range(500, 600)}
will send events on HTTP 400 as well as the 5xx range. -
{500, 503}
will send events on HTTP 500 and 503. -
set()
(the empty set) will not send events for any HTTP status code.
The default is
{*range(500, 600)}
, meaning that all 5xx status codes are reported to Sentry. -
-
AIOHTTP: Delete test which depends on AIOHTTP behavior (#3568) by @szokeasaurusrex
-
AIOHTTP: Handle invalid responses (#3554) by @szokeasaurusrex
-
FastAPI/Starlette: Support new
failed_request_status_codes
(#3563) by @szokeasaurusrexThe format of
failed_request_status_codes
has changed from a list of integers and containers to a set:sentry_sdk.init( integrations=StarletteIntegration( failed_request_status_codes={403, *range(500, 600)}, ), )
The old way of defining
failed_request_status_codes
will continue to work for the time being. Examples of valid new-stylefailed_request_status_codes
:-
{500}
will only send events on HTTP 500. -
{400, *range(500, 600)}
will send events on HTTP 400 as well as the 5xx range. -
{500, 503}
will send events on HTTP 500 and 503. -
set()
(the empty set) will not send events for any HTTP status code.
The default is
{*range(500, 600)}
, meaning that all 5xx status codes are reported to Sentry. -
-
FastAPI/Starlette: Fix
failed_request_status_codes=[]
(#3561) by @szokeasaurusrex -
FastAPI/Starlette: Remove invalid
failed_request_status_code
tests (#3560) by @szokeasaurusrex -
FastAPI/Starlette: Refactor shared test parametrization (#3562) by @szokeasaurusrex
Miscellaneous
- Deprecate
sentry_sdk.metrics
(#3512) by @szokeasaurusrex - Add
name
parameter tostart_span()
and deprecatedescription
parameter (#3524 & #3525) by @antonpirker - Fix
add_query_source
with modules outside of project root (#3313) by @rominf - Test more integrations on 3.13 (#3578) by @sentrivana
- Fix trailing whitespace (#3579) by @sentrivana
- Improve
get_integration
typing (#3550) by @szokeasaurusrex - Make import-related tests stable (#3548) by @BYK
- Fix breadcrumb sorting (#3511) by @sentrivana
- Fix breadcrumb timestamp casting and its tests (#3546) by @BYK
- Don't use deprecated
logger.warn
(#3552) by @sentrivana - Fix Cohere API change (#3549) by @BYK
- Fix deprecation message (#3536) by @antonpirker
- Remove experimental
explain_plan
feature. (#3534) by @antonpirker - X-fail one of the Lambda tests (#3592) by @antonpirker
- Update Codecov config (#3507) by @antonpirker
- Update
actions/upload-artifact
tov4
with merge (#3545) by @joshuarli - Bump
actions/checkout
from4.1.7
to4.2.0
(#3585) by @dependabot
v2.14.0
Various fixes & improvements
-
New
SysExitIntegration
(#3401) by @szokeasaurusrexFor more information, see the documentation for the SysExitIntegration.
-
Support Strawberry
0.239.2
(#3491) by @szokeasaurusrex -
Add separate
pii_denylist
toEventScrubber
and run it always (#3463) by @sl0thentr0py -
Celery: Add wrapper for
Celery().send_task
to support behavior asTask.apply_async
(#2377) by @divaltor -
Django: SentryWrappingMiddleware.init fails if super() is object (#2466) by @cameron-simpson
-
Fix data_category for sessions envelope items (#3473) by @sl0thentr0py
-
Fix non-UTC timestamps (#3461) by @szokeasaurusrex
-
Remove obsolete object as superclass (#3480) by @sentrivana
-
Replace custom
TYPE_CHECKING
with stdlibtyping.TYPE_CHECKING
(#3447) by @dev-satoshi -
Explicitly export symbol in subpackages instead of ignoring (#3400) by @hartungstenio
-
Better test coverage reports (#3498) by @antonpirker
-
Fixed config for old coverage versions (#3504) by @antonpirker
-
Fix AWS Lambda tests (#3495) by @antonpirker
-
Remove broken Bottle tests (#3505) by @sentrivana
v2.13.0
Various fixes & improvements
-
New integration: Ray (#2400) (#2444) by @glowskir
Usage: (add the RayIntegration to your
sentry_sdk.init()
call and make sure it is called in the worker processes)import ray import sentry_sdk from sentry_sdk.integrations.ray import RayIntegration def init_sentry(): sentry_sdk.init( dsn="...", traces_sample_rate=1.0, integrations=[RayIntegration()], ) init_sentry() ray.init( runtime_env=dict(worker_process_setup_hook=init_sentry), )
For more information, see the documentation for the Ray integration.
-
New integration: Litestar (#2413) (#3358) by @KellyWalker
Usage: (add the LitestarIntegration to your
sentry_sdk.init()
)from litestar import Litestar, get import sentry_sdk from sentry_sdk.integrations.litestar import LitestarIntegration sentry_sdk.init( dsn="...", traces_sample_rate=1.0, integrations=[LitestarIntegration()], ) @​get("/") async def index() -> str: return "Hello, world!" app = Litestar(...)
For more information, see the documentation for the Litestar integration.
-
New integration: Dramatiq from @jacobsvante (#3397) by @antonpirker Usage: (add the DramatiqIntegration to your
sentry_sdk.init()
)import dramatiq import sentry_sdk from sentry_sdk.integrations.dramatiq import DramatiqIntegration sentry_sdk.init( dsn="...", traces_sample_rate=1.0, integrations=[DramatiqIntegration()], ) @​dramatiq.actor(max_retries=0) def dummy_actor(x, y): return x / y dummy_actor.send(12, 0)
For more information, see the documentation for the Dramatiq integration.
-
New config option: Expose
custom_repr
function that precedessafe_repr
invocation in serializer (#3438) by @sl0thentr0pySee: https://docs.sentry.io/platforms/python/configuration/options/#custom-repr
-
Profiling: Add client SDK info to profile chunk (#3386) by @Zylphrex
-
Serialize vars early to avoid living references (#3409) by @sl0thentr0py
-
Deprecate hub-based
sessions.py
logic (#3419) by @szokeasaurusrex -
Deprecate
is_auto_session_tracking_enabled
(#3428) by @szokeasaurusrex -
Add note to generated yaml files (#3423) by @sentrivana
-
Slim down MR template (#3382) by @sentrivana
-
Use new banner in readme (#3390) by @sentrivana
v2.12.0
Various fixes & improvements
- API: Expose the scope getters to top level API and use them everywhere (#3357) by @sl0thentr0py
- API:
push_scope
deprecation warning (#3355) (#3355) by @szokeasaurusrex - API: Replace
push_scope
(#3353, #3354) by @szokeasaurusrex - API: Deprecate, avoid, or stop using
configure_scope
(#3348, #3349, #3350, #3351) by @szokeasaurusrex - OTel: Remove experimental autoinstrumentation (#3239) by @sentrivana
- Graphene: Add span for grapqhl operation (#2788) by @czyber
- AI: Add async support for
ai_track
decorator (#3376) by @czyber - CI: Workaround bug preventing Django test runs (#3371) by @szokeasaurusrex
- CI: Remove Django setuptools pin (#3378) by @szokeasaurusrex
- Tests: Test with Django 5.1 RC (#3370) by @sentrivana
- Broaden
add_attachment
type (#3342) by @szokeasaurusrex - Add span data to the transactions trace context (#3374) by @antonpirker
- Gracefully fail attachment path not found case (#3337) by @sl0thentr0py
- Document attachment parameters (#3342) by @szokeasaurusrex
- Bump checkouts/data-schemas from
0feb234
to6d2c435
(#3369) by @dependabot - Bump checkouts/data-schemas from
88273a9
to0feb234
(#3252) by @dependabot
v2.11.0
Various fixes & improvements
-
Add
disabled_integrations
(#3328) by @sentrivanaDisabling individual integrations is now much easier. Instead of disabling all automatically enabled integrations and specifying the ones you want to keep, you can now use the new
disabled_integrations
config option to provide a list of integrations to disable:import sentry_sdk from sentry_sdk.integrations.flask import FlaskIntegration sentry_sdk.init(
Do not use the Flask integration even if Flask is installed.
disabled_integrations=[
FlaskIntegration(),
],
)
- Use operation name as transaction name in Strawberry (#​3294) by @​sentrivana
- WSGI integrations respect `SCRIPT_NAME` env variable (#​2622) by @​sarvaSanjay
- Make Django DB spans have origin `auto.db.django` (#​3319) by @​antonpirker
- Sort breadcrumbs by time before sending (#​3307) by @​antonpirker
- Fix `KeyError('sentry-monitor-start-timestamp-s')` (#​3278) by @​Mohsen-Khodabakhshi
- Set MongoDB tags directly on span data (#​3290) by @​0Calories
- Lower logger level for some messages (#​3305) by @​sentrivana and @​antonpirker
- Emit deprecation warnings from `Hub` API (#​3280) by @​szokeasaurusrex
- Clarify that `instrumenter` is internal-only (#​3299) by @​szokeasaurusrex
- Support Django 5.1 (#​3207) by @​sentrivana
- Remove apparently unnecessary `if` (#​3298) by @​szokeasaurusrex
- Preliminary support for Python 3.13 (#​3200) by @​sentrivana
- Move `sentry_sdk.init` out of `hub.py` (#​3276) by @​szokeasaurusrex
- Unhardcode integration list (#​3240) by @​rominf
- Allow passing of PostgreSQL port in tests (#​3281) by @​rominf
- Add tests for `@ai_track` decorator (#​3325) by @​colin-sentry
- Do not include type checking code in coverage report (#​3327) by @​antonpirker
- Fix test_installed_modules (#​3309) by @​szokeasaurusrex
- Fix typos and grammar in a comment (#​3293) by @​szokeasaurusrex
- Fixed failed tests setup (#​3303) by @​antonpirker
- Only assert warnings we are interested in (#​3314) by @​szokeasaurusrex
v2.10.0
Various fixes & improvements
-
Add client cert and key support to
HttpTransport
(#3258) by @grammy-jiangAdd
cert_file
andkey_file
to yoursentry_sdk.init
to use a custom client cert and key. Alternatively, the environment variablesCLIENT_CERT_FILE
andCLIENT_KEY_FILE
can be used as well. -
OpenAI: Lazy initialize tiktoken to avoid http at import time (#3287) by @colin-sentry
-
OpenAI, Langchain: Make tiktoken encoding name configurable + tiktoken usage opt-in (#3289) by @colin-sentry
Fixed a bug where having certain packages installed along the Sentry SDK caused an HTTP request to be made to OpenAI infrastructure when the Sentry SDK was initialized. The request was made when the
tiktoken
package and at least one of theopenai
orlangchain
packages were installed.The request was fetching a
tiktoken
encoding in order to correctly measure token usage in some OpenAI and Langchain calls. This behavior is now opt-in. The choice of encoding to use was made configurable as well. To opt in, set thetiktoken_encoding_name
parameter in the OpenAPI or Langchain integration.sentry_sdk.init( integrations=[ OpenAIIntegration(tiktoken_encoding_name="cl100k_base"), LangchainIntegration(tiktoken_encoding_name="cl100k_base"), ], )
-
PyMongo: Send query description as valid JSON (#3291) by @0Calories
-
Remove Python 2 compatibility code (#3284) by @szokeasaurusrex
-
Fix
sentry_sdk.init
type hint (#3283) by @szokeasaurusrex -
Deprecate
hub
inProfile
(#3270) by @szokeasaurusrex -
Stop using
Hub
ininit
(#3275) by @szokeasaurusrex -
Delete
_should_send_default_pii
(#3274) by @szokeasaurusrex -
Remove
Hub
usage inconftest
(#3273) by @szokeasaurusrex -
Rename debug logging filter (#3260) by @szokeasaurusrex
-
Update
NoOpSpan.finish
signature (#3267) by @szokeasaurusrex -
Remove
Hub
inTransaction.finish
(#3267) by @szokeasaurusrex -
Remove Hub from
capture_internal_exception
logic (#3264) by @szokeasaurusrex -
Improve
Scope._capture_internal_exception
type hint (#3264) by @szokeasaurusrex -
Correct
ExcInfo
type (#3266) by @szokeasaurusrex -
Stop using
Hub
intracing_utils
(#3269) by @szokeasaurusrex
v2.9.0
Various fixes & improvements
- ref(transport): Improve event data category typing (#3243) by @szokeasaurusrex
- ref(tracing): Improved handling of span status (#3261) by @antonpirker
- test(client): Add tests for dropped span client reports (#3244) by @szokeasaurusrex
- test(transport): Test new client report features (#3244) by @szokeasaurusrex
- feat(tracing): Record lost spans in client reports (#3244) by @szokeasaurusrex
- test(sampling): Replace custom logic with
capture_record_lost_event_calls
(#3257) by @szokeasaurusrex - test(transport): Non-order-dependent discarded events assertion (#3255) by @szokeasaurusrex
- test(core): Introduce
capture_record_lost_event_calls
fixture (#3254) by @szokeasaurusrex - test(core): Fix non-idempotent test (#3253) by @szokeasaurusrex
v2.8.0
Various fixes & improvements
-
profiler_id
uses underscore (#3249) by @Zylphrex - Don't send full env to subprocess (#3251) by @kmichel-aiven
- Stop using
Hub
inHttpTransport
(#3247) by @szokeasaurusrex - Remove
ipdb
from test requirements (#3237) by @rominf - Avoid propagation of empty baggage (#2968) by @hartungstenio
- Add entry point for
SentryPropagator
(#3086) by @mender - Bump checkouts/data-schemas from
8c13457
to88273a9
(#3225) by @dependabot
v2.7.1
Various fixes & improvements
- fix(otel): Fix missing baggage (#3218) by @sentrivana
- This is the config file of asdf-vm which we do not use. (#3215) by @antonpirker
- Added option to disable middleware spans in Starlette (#3052) by @antonpirker
- build: Update tornado version in setup.py to match code check. (#3206) by @aclemons
v2.7.0
- Add
origin
to spans and transactions (#3133) by @antonpirker - OTel: Set up typing for OTel (#3168) by @sentrivana
- OTel: Auto instrumentation skeleton (#3143) by @sentrivana
- OpenAI: If there is an internal error, still return a value (#3192) by @colin-sentry
- MongoDB: Add MongoDB collection span tag (#3182) by @0Calories
- MongoDB: Change span operation from
db.query
todb
(#3186) by @0Calories - MongoDB: Remove redundant command name in query description (#3189) by @0Calories
- Apache Spark: Fix spark driver integration (#3162) by @seyoon-lim
- Apache Spark: Add Spark test suite to tox.ini and to CI (#3199) by @sentrivana
- Codecov: Add failed test commits in MRs (#3190) by @antonpirker
- Update library, Python versions in tests (#3202) by @sentrivana
- Remove Hub from our test suite (#3197) by @antonpirker
- Use env vars for default CA cert bundle location (#3160) by @DragoonAethis
- Create a separate test group for AI (#3198) by @sentrivana
- Add additional stub packages for type checking (#3122) by @Daverball
- Proper naming of requirements files (#3191) by @antonpirker
- Pinning pip because new version does not work with some versions of Celery and Httpx (#3195) by @antonpirker
- build(deps): bump supercharge/redis-github-action from 1.7.0 to 1.8.0 (#3193) by @dependabot
- build(deps): bump actions/checkout from 4.1.6 to 4.1.7 (#3171) by @dependabot
- build(deps): update pytest-asyncio requirement (#3087) by @dependabot
v2.6.0
- Introduce continuous profiling mode (#2830) by @Zylphrex
- Profiling: Add deprecation comment for profiler internals (#3167) by @sentrivana
- Profiling: Move thread data to trace context (#3157) by @Zylphrex
- Explicitly export cron symbols for typecheckers (#3072) by @spladug
- Cleaning up ASGI tests for Django (#3180) by @antonpirker
- Celery: Add Celery receive latency (#3174) by @antonpirker
- Metrics: Update type hints for tag values (#3156) by @elramen
- Django: Fix psycopg3 reconnect error (#3111) by @szokeasaurusrex
- Tracing: Keep original function signature when decorated (#3178) by @sentrivana
- Reapply "Refactor the Celery Beat integration (#3105)" (#3144) (#3175) by @antonpirker
- Added contributor image to readme (#3183) by @antonpirker
- bump actions/checkout from 4.1.4 to 4.1.6 (#3147) by @dependabot
- bump checkouts/data-schemas from
59f9683
to8c13457
(#3146) by @dependabot
v2.5.1
This change fixes a regression in our cron monitoring feature, which caused cron checkins not to be sent. The regression appears to have been introduced in version 2.4.0.
We recommend that all users, who use Cron monitoring and are currently running sentry-python ≥2.4.0, upgrade to this release as soon as possible!
Other fixes & improvements
- feat(tracing): Warn if not-started transaction entered (#3003) by @szokeasaurusrex
- test(scope): Ensure
last_event_id
cleared (#3124) by @szokeasaurusrex - fix(scope): Clear last_event_id on scope clear (#3124) by @szokeasaurusrex
v2.5.0
Various fixes & improvements
-
Allow to configure status codes to report to Sentry in Starlette and FastAPI (#3008) by @sentrivana
By passing a new option to the FastAPI and Starlette integrations, you're now able to configure what status codes should be sent as events to Sentry. Here's how it works:
from sentry_sdk.integrations.starlette import StarletteIntegration from sentry_sdk.integrations.fastapi import FastApiIntegration sentry_sdk.init(
...
integrations=[
StarletteIntegration(
failed_request_status_codes=[403, range(500, 599)],
),
FastApiIntegration(
failed_request_status_codes=[403, range(500, 599)],
),
]
)
`failed_request_status_codes` expects a list of integers or containers (objects that allow membership checks via `in`)
of integers. Examples of valid `failed_request_status_codes`:
- `[500]` will only send events on HTTP 500.
- `[400, range(500, 599)]` will send events on HTTP 400 as well as the 500-599 range.
- `[500, 503]` will send events on HTTP 500 and 503.
The default is `[range(500, 599)]`.
See the [FastAPI](https://docs.sentry.io/platforms/python/integrations/fastapi/) and [Starlette](https://docs.sentry.io/platforms/python/integrations/starlette/) integration docs for more details.
- Support multiple keys with `cache_prefixes` (#​3136) by @​sentrivana
- Support integer Redis keys (#​3132) by @​sentrivana
- Update SDK version in CONTRIBUTING.md (#​3129) by @​sentrivana
- Bump actions/checkout from 4.1.4 to 4.1.5 (#​3067) by @​dependabot
v2.4.0
Various fixes & improvements
- Celery: Made
cache.key
span data field a list (#3110) by @antonpirker - Celery Beat: Refactor the Celery Beat integration (#3105) by @antonpirker
- GRPC: Add None check for grpc.aio interceptor (#3109) by @ordinary-jamie
- Docs: Remove
last_event_id
from migration guide (#3126) by @szokeasaurusrex - fix(django): Proper transaction names for i18n routes (#3104) by @sentrivana
- fix(scope): Copy
_last_event_id
inScope.__copy__
(#3123) by @szokeasaurusrex - fix(tests): Adapt to new Anthropic version (#3119) by @sentrivana
- build(deps): bump checkouts/data-schemas from
4381a97
to59f9683
(#3066) by @dependabot
v2.3.1
Various fixes & improvements
- Handle also byte arras as strings in Redis caches (#3101) by @antonpirker
- Do not crash exceptiongroup (by patching excepthook and keeping the name of the function) (#3099) by @antonpirker
v2.3.0
Various fixes & improvements
- NEW: Redis integration supports now Sentry Caches module. See https://docs.sentry.io/product/performance/caches/ (#3073) by @antonpirker
- NEW: Django integration supports now Sentry Caches module. See https://docs.sentry.io/product/performance/caches/ (#3009) by @antonpirker
- Fix
cohere
testsuite for new release ofcohere
(#3098) by @antonpirker - Fix ClickHouse integration where
_sentry_span
might be missing (#3096) by @sentrivana
v2.2.1
Various fixes & improvements
- Add conditional check for delivery_info's existence (#3083) by @cmanallen
- Updated deps for latest langchain version (#3092) by @antonpirker
- Fixed grpcio extras to work as described in the docs (#3081) by @antonpirker
- Use pythons venv instead of virtualenv to create virtual envs (#3077) by @antonpirker
- Celery: Add comment about kwargs_headers (#3079) by @szokeasaurusrex
- Celery: Queues module producer implementation (#3079) by @szokeasaurusrex
- Fix N803 flake8 failures (#3082) by @szokeasaurusrex
v2.2.0
New features
- Celery integration now sends additional data to Sentry to enable new features to guage the health of your queues
- Added a new integration for Cohere
- Reintroduced the
last_event_id
function, which had been removed in 2.0.0
Other fixes & improvements
- Add tags + data passing functionality to @ai_track (#3071) by @colin-sentry
- Only propagate headers from spans within transactions (#3070) by @szokeasaurusrex
- Improve type hints for set metrics (#3048) by @elramen
- Fix
get_client
typing (#3063) by @szokeasaurusrex - Auto-enable Anthropic integration + gate imports (#3054) by @colin-sentry
- Made
MeasurementValue.unit
NotRequired (#3051) by @antonpirker
v2.1.1
- Fix trace propagation in Celery tasks started by Celery Beat. (#3047) by @antonpirker
v2.1.0
-
fix(quart): Fix Quart integration (#3043) by @szokeasaurusrex
-
New integration: Langchain (#2911) by @colin-sentry
Usage: (Langchain is auto enabling, so you do not need to do anything special)
from langchain_openai import ChatOpenAI import sentry_sdk sentry_sdk.init( dsn="...", enable_tracing=True, traces_sample_rate=1.0, ) llm = ChatOpenAI(model="gpt-3.5-turbo-0125", temperature=0)
Check out the LangChain docs for details.
-
New integration: Anthropic (#2831) by @czyber
Usage: (add the AnthropicIntegration to your
sentry_sdk.init()
call)from anthropic import Anthropic import sentry_sdk sentry_sdk.init( dsn="...", enable_tracing=True, traces_sample_rate=1.0, integrations=[AnthropicIntegration()], ) client = Anthropic()
Check out the Anthropic docs for details.
-
New integration: Huggingface Hub (#3033) by @colin-sentry
Usage: (Huggingface Hub is auto enabling, so you do not need to do anything special)
import sentry_sdk from huggingface_hub import InferenceClient sentry_sdk.init( dsn="...", enable_tracing=True, traces_sample_rate=1.0, ) client = InferenceClient("some-model")
Check out the Huggingface docs for details. (comming soon!)
-
fix(huggingface): Reduce API cross-section for huggingface in test (#3042) by @colin-sentry
-
fix(django): Fix Django ASGI integration on Python 3.12 (#3027) by @bellini666
-
feat(perf): Add ability to put measurements directly on spans. (#2967) by @colin-sentry
-
fix(tests): Fix trytond tests (#3031) by @sentrivana
-
fix(tests): Update
pytest-asyncio
to fix CI (#3030) by @sentrivana -
fix(docs): Link to respective migration guides directly (#3020) by @sentrivana
-
docs(scope): Add docstring to
Scope.set_tags
(#2978) by @szokeasaurusrex -
test(scope): Fix typos in assert error message (#2978) by @szokeasaurusrex
-
feat(scope): New
set_tags
function (#2978) by @szokeasaurusrex -
test(scope): Add unit test for
Scope.set_tags
(#2978) by @szokeasaurusrex -
feat(scope): Add
set_tags
to top-level API (#2978) by @szokeasaurusrex -
test(scope): Add unit test for top-level API
set_tags
(#2978) by @szokeasaurusrex -
feat(tests): Parallelize tox (#3025) by @sentrivana
-
build(deps): Bump checkouts/data-schemas from
4aa14a7
to4381a97
(#3028) by @dependabot -
meta(license): Bump copyright year (#3029) by @szokeasaurusrex
v2.0.1
Various fixes & improvements
- Fix: Do not use convenience decorator (#3022) by @sentrivana
- Refactoring propagation context (#2970) by @antonpirker
- Use
pid
for test database name in Django tests (#2998) by @antonpirker - Remove outdated RC mention in docs (#3018) by @sentrivana
- Delete inaccurate comment from docs (#3002) by @szokeasaurusrex
- Add Lambda function that deletes test Lambda functions (#2960) by @antonpirker
- Correct discarded transaction debug message (#3002) by @szokeasaurusrex
- Add tests for discarded transaction debug messages (#3002) by @szokeasaurusrex
- Fix comment typo in metrics (#2992) by @szokeasaurusrex
- build(deps): bump actions/checkout from 4.1.1 to 4.1.4 (#3011) by @dependabot
- build(deps): bump checkouts/data-schemas from
1e17eb5
to4aa14a7
(#2997) by @dependabot
v2.0.0
This is the first major update in a long time!
We dropped support for some ancient languages and frameworks (Yes, Python 2.7 is no longer supported). Additionally we refactored a big part of the foundation of the SDK (how data inside the SDK is handled).
We hope you like it!
For a shorter version of what you need to do, to upgrade to Sentry SDK 2.0 see: https://docs.sentry.io/platforms/python/migration/1.x-to-2.x
New Features
- Additional integrations will now be activated automatically if the SDK detects the respective package is installed: Ariadne, ARQ, asyncpg, Chalice, clickhouse-driver, GQL, Graphene, huey, Loguru, PyMongo, Quart, Starlite, Strawberry.
- Added new API for custom instrumentation:
new_scope
,isolation_scope
. See the Deprecated section to see how they map to the existing APIs.
Changed
(These changes are all backwards-incompatible. Breaking Change (if you are just skimming for that phrase))
- The Pyramid integration will not capture errors that might happen in
authenticated_userid()
in a customAuthenticationPolicy
class. - The method
need_code_loation
of theMetricsAggregator
was renamed toneed_code_location
. - The
BackgroundWorker
thread used to process events was renamed fromraven-sentry.BackgroundWorker
tosentry-sdk.BackgroundWorker
. - The
reraise
function was moved fromsentry_sdk._compat
tosentry_sdk.utils
. - The
_ScopeManager
was moved fromsentry_sdk.hub
tosentry_sdk.scope
. - Moved the contents of
tracing_utils_py3.py
totracing_utils.py
. Thestart_child_span_decorator
is now insentry_sdk.tracing_utils
. - The actual implementation of
get_current_span
was moved tosentry_sdk.tracing_utils
.sentry_sdk.get_current_span
is still accessible as part of the top-level API. -
sentry_sdk.tracing_utils.add_query_source()
: Removed thehub
parameter. It is not necessary anymore. -
sentry_sdk.tracing_utils.record_sql_queries()
: Removed thehub
parameter. It is not necessary anymore. -
sentry_sdk.tracing_utils.get_current_span()
does now take ascope
instead of ahub
as parameter. -
sentry_sdk.tracing_utils.should_propagate_trace()
now takes aClient
instead of aHub
as first parameter. -
sentry_sdk.utils.is_sentry_url()
now takes aClient
instead of aHub
as first parameter. -
sentry_sdk.utils._get_contextvars
does not return a tuple with three values, but a tuple with two values. Thecopy_context
was removed. - If you create a transaction manually and later mutate the transaction in a
configure_scope
block this does not work anymore. Here is a recipe on how to change your code to make it work: Your existing implementation:transaction = sentry_sdk.transaction(...)
later in the code execution:
with sentry_sdk.configure_scope() as scope:
scope.set_transaction_name("new-transaction-name")
```
needs to be changed to this:
```python
transaction = sentry_sdk.transaction(...)
later in the code execution:
scope = sentry_sdk.get_current_scope()
scope.set_transaction_name("new-transaction-name")
```
-
The classes listed in the table below are now abstract base classes. Therefore, they can no longer be instantiated. Subclasses can only be instantiated if they implement all of the abstract methods.
Show table
Class Abstract methods sentry_sdk.integrations.Integration
setup_once
sentry_sdk.metrics.Metric
add
,serialize_value
, andweight
sentry_sdk.profiler.Scheduler
setup
andteardown
sentry_sdk.transport.Transport
capture_envelope
Removed
(These changes are all backwards-incompatible. Breaking Change (if you are just skimming for that phrase))
- Removed support for Python 2 and Python 3.5. The SDK now requires at least Python 3.6.
- Removed support for Celery 3.*.
- Removed support for Django 1.8, 1.9, 1.10.
- Removed support for Flask 0.*.
- Removed support for gRPC < 1.39.
- Removed support for Tornado < 6.
- Removed
last_event_id()
top level API. The last event ID is still returned bycapture_event()
,capture_exception()
andcapture_message()
but the top level APIsentry_sdk.last_event_id()
has been removed. - Removed support for sending events to the
/store
endpoint. Everything is now sent to the/envelope
endpoint. If you're on SaaS you don't have to worry about this, but if you're running Sentry yourself you'll need version20.6.0
or higher of self-hosted Sentry. - The deprecated
with_locals
configuration option was removed. Useinclude_local_variables
instead. See https://docs.sentry.io/platforms/python/configuration/options/#include-local-variables. - The deprecated
request_bodies
configuration option was removed. Usemax_request_body_size
. See https://docs.sentry.io/platforms/python/configuration/options/#max-request-body-size. - Removed support for
user.segment
. It was also removed from the trace header as well as from the dynamic sampling context. - Removed support for the
install
method for custom integrations. Please usesetup_once
instead. - Removed
sentry_sdk.tracing.Span.new_span
. Usesentry_sdk.tracing.Span.start_child
instead. - Removed
sentry_sdk.tracing.Transaction.new_span
. Usesentry_sdk.tracing.Transaction.start_child
instead. - Removed support for creating transactions via
sentry_sdk.tracing.Span(transaction=...)
. To create a transaction, please usesentry_sdk.tracing.Transaction(name=...)
. - Removed
sentry_sdk.utils.Auth.store_api_url
. -
sentry_sdk.utils.Auth.get_api_url
's now accepts asentry_sdk.consts.EndpointType
enum instead of a string as its only parameter. We recommend omitting this argument when calling the function, since the parameter's default value is the only possiblesentry_sdk.consts.EndpointType
value. The parameter exists for future compatibility. - Removed
tracing_utils_py2.py
. Thestart_child_span_decorator
is now insentry_sdk.tracing_utils
. - Removed the
sentry_sdk.profiler.Scheduler.stop_profiling
method. Any calls to this method can simply be removed, since this was a no-op method.
Deprecated
-
Using the
Hub
directly as well as using hub-based APIs has been deprecated. Where available, use the top-level API instead; otherwise use the scope API or the client API.Before:
with hub.start_span(...):
do something
After:
```python
import sentry_sdk
with sentry_sdk.start_span(...):
### do something
-
Hub cloning is deprecated.
Before:
with Hub(Hub.current) as hub:
do something with the cloned hub
After:
```python
import sentry_sdk
with sentry_sdk.isolation_scope() as scope:
### do something with the forked scope
-
configure_scope
is deprecated. Use the new isolation scope directly viaget_isolation_scope()
instead.Before:
with configure_scope() as scope:
scope
do something with
After:
```python
from sentry_sdk import get_isolation_scope
scope = get_isolation_scope()
v1.45.1
This is a security backport release.
-
Don't send full env to subprocess (
892dd80
) by @kmichel-aivenSee also https://github.com/getsentry/sentry-python/security/advisories/GHSA-g92j-qhmh-64v2
v1.45.0
This is the final 1.x release for the forseeable future. Development will continue on the 2.x release line. The first 2.x version will be available in the next few weeks.
Various fixes & improvements
-
Allow to upsert monitors (#2929) by @sentrivana
It's now possible to provide
monitor_config
to themonitor
decorator/context manager directly:from sentry_sdk.crons import monitor
v1.44.1
Various fixes & improvements
-
Make
monitor
async friendly (#2912) by @sentrivanaYou can now decorate your async functions with the
monitor
decorator and they will correctly report their duration and completion status. -
Fixed
Event | None
runtimeTypeError
(#2928) by @szokeasaurusrex
v1.44.0
Various fixes & improvements
- ref: Define types at runtime (#2914) by @szokeasaurusrex
- Explicit reexport of types (#2866) (#2913) by @szokeasaurusrex
- feat(profiling): Add thread data to spans (#2843) by @Zylphrex
v1.43.0
Various fixes & improvements
-
Add optional
keep_alive
(#2842) by @sentrivanaIf you're experiencing frequent network issues between the SDK and Sentry, you can try turning on TCP keep-alive:
import sentry_sdk sentry_sdk.init(
...your usual settings...
keep_alive=True,
)
- Add support for Celery Redbeat cron tasks (#​2643) by @​kwigley
The SDK now supports the Redbeat scheduler in addition to the default
Celery Beat scheduler for auto instrumenting crons. See
[the docs](https://docs.sentry.io/platforms/python/integrations/celery/crons/)
for more information about how to set this up.
- `aws_event` can be an empty list (#​2849) by @​sentrivana
- Re-export `Event` in `types.py` (#​2829) by @​szokeasaurusrex
- Small API docs improvement (#​2828) by @​antonpirker
- Fixed OpenAI tests (#​2834) by @​antonpirker
- Bump `checkouts/data-schemas` from `ed078ed` to `8232f17` (#​2832) by @​dependabot
v1.42.0
Various fixes & improvements
-
New integration: OpenAI integration (#2791) by @colin-sentry
We added an integration for OpenAI to capture errors and also performance data when using the OpenAI Python SDK.
Useage:
This integrations is auto-enabling, so if you have the
openai
package in your project it will be enabled. Just initialize Sentry before you create your OpenAI client.from openai import OpenAI import sentry_sdk sentry_sdk.init( dsn="___PUBLIC_DSN___", enable_tracing=True, traces_sample_rate=1.0, ) client = OpenAI()
For more information, see the documentation for OpenAI integration.
-
Discard open OpenTelemetry spans after 10 minutes (#2801) by @antonpirker
-
Propagate sentry-trace and baggage headers to Huey tasks (#2792) by @cnschn
-
Added Event type (#2753) by @szokeasaurusrex
-
Improve scrub_dict typing (#2768) by @szokeasaurusrex
-
Dependencies: bump types-protobuf from 4.24.0.20240302 to 4.24.0.20240311 (#2797) by @dependabot
v1.41.0
Various fixes & improvements
-
Add recursive scrubbing to
EventScrubber
(#2755) by @Cheapshot003By default, the
EventScrubber
will not search your events for potential PII recursively. With this release, you can enable this behavior with:import sentry_sdk from sentry_sdk.scrubber import EventScrubber sentry_sdk.init(
...your usual settings...
event_scrubber=EventScrubber(recursive=True),
)
- Expose `socket_options` (#​2786) by @​sentrivana
If the SDK is experiencing connection issues (connection resets, server
closing connection without response, etc.) while sending events to Sentry,
tweaking the default `urllib3` socket options to the following can help:
```python
import socket
from urllib3.connection import HTTPConnection
import sentry_sdk
sentry_sdk.init(
### ...your usual settings...
socket_options=HTTPConnection.default_socket_options + [
(socket.SOL_SOCKET, socket.SO_KEEPALIVE, 1),
### note: skip the following line if you're on MacOS since TCP_KEEPIDLE doesn't exist there
(socket.SOL_TCP, socket.TCP_KEEPIDLE, 45),
(socket.SOL_TCP, socket.TCP_KEEPINTVL, 10),
(socket.SOL_TCP, socket.TCP_KEEPCNT, 6),
],
)
- Allow to configure merge target for releases (#2777) by @sentrivana
- Allow empty character in metric tags values (#2775) by @viglia
- Replace invalid tag values with an empty string instead of _ (#2773) by @markushi
- Add documentation comment to
scrub_list
(#2769) by @szokeasaurusrex - Fixed regex to parse version in lambda package file (#2767) by @antonpirker
- xfail broken AWS Lambda tests for now (#2794) by @sentrivana
- Removed print statements because it messes with the tests (#2789) by @antonpirker
- Bump
types-protobuf
from 4.24.0.20240129 to 4.24.0.20240302 (#2782) by @dependabot - Bump
checkouts/data-schemas
fromeb941c2
toed078ed
(#2781) by @dependabot
v1.40.6
Various fixes & improvements
- Fix compatibility with
greenlet
/gevent
(#2756) by @sentrivana - Fix query source relative filepath (#2717) by @gggritso
- Support
clickhouse-driver==0.2.7
(#2752) by @sentrivana - Bump
checkouts/data-schemas
from6121fd3
toeb941c2
(#2747) by @dependabot
v1.40.5
Various fixes & improvements
-
Deprecate
last_event_id()
. (#2749) by @antonpirker -
Warn if uWSGI is set up without proper thread support (#2738) by @sentrivana
uWSGI has to be run in threaded mode for the SDK to run properly. If this is not the case, the consequences could range from features not working unexpectedly to uWSGI workers crashing.
Please make sure to run uWSGI with both
--enable-threads
and--py-call-uwsgi-fork-hooks
. -
parsed_url
can beNone
(#2734) by @sentrivana -
Python 3.7 is not supported anymore by Lambda, so removed it and added 3.12 (#2729) by @antonpirker
v1.40.4
Various fixes & improvements
- Only start metrics flusher thread on demand (#2727) by @sentrivana
- Bump checkouts/data-schemas from
aa7058c
to6121fd3
(#2724) by @dependabot
v1.40.3
Various fixes & improvements
- Turn off metrics for uWSGI (#2720) by @sentrivana
- Minor improvements (#2714) by @antonpirker
v1.40.2
Various fixes & improvements
- test: Fix
pytest
error (#2712) by @szokeasaurusrex - build(deps): bump types-protobuf from 4.24.0.4 to 4.24.0.20240129 (#2691) by @dependabot
v1.40.1
Various fixes & improvements
- Fix uWSGI workers hanging (#2694) by @sentrivana
- Make metrics work with
gevent
(#2694) by @sentrivana - Guard against
engine.url
beingNone
(#2708) by @sentrivana - Fix performance regression in
sentry_sdk.utils._generate_installed_modules
(#2703) by @GlenWalker - Guard against Sentry initialization mid SQLAlchemy cursor (#2702) by @apmorton
- Fix yaml generation script (#2695) by @sentrivana
- Fix AWS Lambda workflow (#2710) by @sentrivana
- Bump
codecov/codecov-action
from 3 to 4 (#2706) by @dependabot - Bump
actions/cache
from 3 to 4 (#2661) by @dependabot - Bump
actions/checkout
from 3.1.0 to 4.1.1 (#2561) by @dependabot - Bump
github/codeql-action
from 2 to 3 (#2603) by @dependabot - Bump
actions/setup-python
from 4 to 5 (#2577) by @dependabot
v1.40.0
Various fixes & improvements
- Enable metrics related settings by default (#2685) by @iambriccardo
- Fix
UnicodeDecodeError
on Python 2 (#2657) by @sentrivana - Enable DB query source by default (#2629) by @sentrivana
- Fix query source duration check (#2675) by @sentrivana
- Reformat with
black==24.1.0
(#2680) by @sentrivana - Cleaning up existing code to prepare for new Scopes API (#2611) by @antonpirker
- Moved redis related tests to databases (#2674) by @antonpirker
- Improve
sentry_sdk.trace
type hints (#2633) by @szokeasaurusrex - Bump
checkouts/data-schemas
frome9f7d58
toaa7058c
(#2639) by @dependabot
v1.39.2
Various fixes & improvements
- Fix timestamp in transaction created by OTel (#2627) by @antonpirker
- Fix relative path in DB query source (#2624) by @antonpirker
- Run more CI checks on 2.0 branch (#2625) by @sentrivana
- Fix tracing
TypeError
for static and class methods (#2559) by @szokeasaurusrex - Fix missing
ctx
in Arq integration (#2600) by @ivanovart - Change
data_category
fromcheck_in
tomonitor
(#2598) by @sentrivana
v1.39.1
Various fixes & improvements
- Fix psycopg2 detection in the Django integration (#2593) by @sentrivana
- Filter out empty string releases (#2591) by @sentrivana
- Fixed local var not present when there is an error in a user's
error_sampler
function (#2511) by @antonpirker - Fixed typing in
aiohttp
(#2590) by @antonpirker
v1.39.0
Various fixes & improvements
- Add support for cluster clients from Redis SDK (#2394) by @md384
- Improve location reporting for timer metrics (#2552) by @mitsuhiko
- Fix Celery
TypeError
with no-argumentapply_async
(#2575) by @szokeasaurusrex - Fix Lambda integration with EventBridge source (#2546) by @davidcroda
- Add max tries to Spotlight (#2571) by @hazAT
- Handle
os.path.devnull
access issues (#2579) by @sentrivana - Change
code.filepath
frame picking logic (#2568) by @sentrivana - Trigger AWS Lambda tests on label (#2538) by @sentrivana
- Run permissions step on pull_request_target but not push (#2548) by @sentrivana
- Hash AWS Lambda test functions based on current revision (#2557) by @sentrivana
- Update Django version in tests (#2562) by @sentrivana
- Make metrics tests non-flaky (#2572) by @antonpirker
v1.38.0
Various fixes & improvements
- Only add trace context to checkins and do not run
event_processors
for checkins (#2536) by @antonpirker - Metric span summaries (#2522) by @mitsuhiko
- Add source context to code locations (#2539) by @jan-auer
- Use in-app filepath instead of absolute path (#2541) by @antonpirker
- Switch to
jinja2
for generating CI yamls (#2534) by @sentrivana
v1.37.1
Various fixes & improvements
- Fix
NameError
onparse_version
with eventlet (#2532) by @sentrivana - build(deps): bump checkouts/data-schemas from
68def1e
toe9f7d58
(#2501) by @dependabot
v1.37.0
Various fixes & improvements
-
Move installed modules code to utils (#2429) by @sentrivana
Note: We moved the internal function
_get_installed_modules
fromsentry_sdk.integrations.modules
tosentry_sdk.utils
. So if you use this function you have to update your imports -
Add code locations for metrics (#2526) by @jan-auer
-
Add query source to DB spans (#2521) by @antonpirker
-
Run integration tests with newest
pytest
(#2518) by @sentrivana -
Bring tests up to date (#2512) by @sentrivana
-
Fix: Prevent global var from being discarded at shutdown (#2530) by @antonpirker
-
Fix: Scope transaction source not being updated in scope.span setter (#2519) by @sl0thentr0py
v1.36.0
Various fixes & improvements
- Django: Support Django 5.0 (#2490) by @sentrivana
- Django: Handling ASGI body in the right way. (#2513) by @antonpirker
- Flask: Test with Flask 3.0 (#2506) by @sentrivana
- Celery: Do not create a span when task is triggered by Celery Beat (#2510) by @antonpirker
- Redis: Ensure
RedisIntegration
is disabled, unlessredis
is installed (#2504) by @szokeasaurusrex - Quart: Fix Quart integration for Quart 0.19.4 (#2516) by @antonpirker
- gRPC: Make async gRPC less noisy (#2507) by @jyggen
v1.35.0
Various fixes & improvements
-
Updated gRPC integration: Asyncio interceptors and easier setup (#2369) by @fdellekart
Our gRPC integration now instruments incoming unary-unary grpc requests and outgoing unary-unary, unary-stream grpc requests using grpcio channels. Everything works now for sync and async code.
Before this release you had to add Sentry interceptors by hand to your gRPC code, now the only thing you need to do is adding the
GRPCIntegration
to yousentry_sdk_init()
call. (See documentation for more information):import sentry_sdk from sentry_sdk.integrations.grpc import GRPCIntegration sentry_sdk.init( dsn="___PUBLIC_DSN___", enable_tracing=True, integrations=[ GRPCIntegration(), ], )
The old way still works, but we strongly encourage you to update your code to the way described above.
-
Python 3.12: Replace deprecated datetime functions (#2502) by @sentrivana
-
Metrics: Unify datetime format (#2409) by @mitsuhiko
-
Celery: Set correct data in
check_in
s (#2500) by @antonpirker -
Celery: Read timezone for Crons monitors from
celery_schedule
if existing (#2497) by @antonpirker -
Django: Removing redundant code in Django tests (#2491) by @vagi8
-
Django: Make reading the request body work in Django ASGI apps. (#2495) by @antonpirker
-
FastAPI: Use wraps on fastapi request call wrapper (#2476) by @nkaras
-
Fix: Probe for psycopg2 and psycopg3 parameters function. (#2492) by @antonpirker
-
Fix: Remove unnecessary TYPE_CHECKING alias (#2467) by @rafrafek
v1.34.0
Various fixes & improvements
- Added Python 3.12 support (#2471, #2483)
- Handle missing
connection_kwargs
inpatch_redis_client
(#2482) by @szokeasaurusrex - Run common test suite on Python 3.12 (#2479) by @sentrivana
v1.33.1
Various fixes & improvements
- Make parse_version work in utils.py itself. (#2474) by @antonpirker
v1.33.0
Various fixes & improvements
- New: Added
error_sampler
option (#2456) by @szokeasaurusrex - Python 3.12: Detect interpreter in shutdown state on thread spawn (#2468) by @mitsuhiko
- Patch eventlet under Sentry SDK (#2464) by @szokeasaurusrex
- Mitigate CPU spikes when sending lots of events with lots of data (#2449) by @antonpirker
- Make
debug
option also configurable via environment (#2450) by @antonpirker - Make sure
get_dsn_parameters
is an actual function (#2441) by @sentrivana - Bump pytest-localserver, add compat comment (#2448) by @sentrivana
- AWS Lambda: Update compatible runtimes for AWS Lambda layer (#2453) by @antonpirker
- AWS Lambda: Load AWS Lambda secrets in Github CI (#2153) by @antonpirker
- Redis: Connection attributes in
redis
database spans (#2398) by @antonpirker - Falcon: Falcon integration checks response status before reporting error (#2465) by @szokeasaurusrex
- Quart: Support Quart 0.19 onwards (#2403) by @pgjones
- Sanic: Sanic integration initial version (#2419) by @szokeasaurusrex
- Django: Fix parsing of Django
path
patterns (#2452) by @sentrivana - Django: Add Django 4.2 to test suite (#2462) by @sentrivana
- Polish changelog (#2434) by @sentrivana
- Update CONTRIBUTING.md (#2443) by @krishvsoni
- Update README.md (#2435) by @sentrivana
v1.32.0
Various fixes & improvements
-
New: Error monitoring for some of the most popular Python GraphQL libraries:
-
Add GQL GraphQL integration (#2368) by @szokeasaurusrex
Usage:
import sentry_sdk from sentry_sdk.integrations.gql import GQLIntegration sentry_sdk.init( dsn='___PUBLIC_DSN___', integrations=[ GQLIntegration(), ], )
-
Add Graphene GraphQL error integration (#2389) by @sentrivana
Usage:
import sentry_sdk from sentry_sdk.integrations.graphene import GrapheneIntegration sentry_sdk.init( dsn='___PUBLIC_DSN___', integrations=[ GrapheneIntegration(), ], )
-
Add Strawberry GraphQL error & tracing integration (#2393) by @sentrivana
Usage:
import sentry_sdk from sentry_sdk.integrations.strawberry import StrawberryIntegration sentry_sdk.init( dsn='___PUBLIC_DSN___', integrations=[
-
make sure to set async_execution to False if you're executing
GraphQL queries synchronously
StrawberryIntegration(async_execution=True),
],
traces_sample_rate=1.0,
)
```
-
Add Ariadne GraphQL error integration (#2387) by @sentrivana
Usage:
import sentry_sdk from sentry_sdk.integrations.ariadne import AriadneIntegration sentry_sdk.init( dsn='___PUBLIC_DSN___', integrations=[ AriadneIntegration(), ], )
-
Capture multiple named groups again (#2432) by @sentrivana
-
Don't fail when upstream scheme is unusual (#2371) by @vanschelven
-
Support new RQ version (#2405) by @antonpirker
-
Remove
utcnow
,utcfromtimestamp
deprecated in Python 3.12 (#2415) by @rmad17 -
Add
trace
to__all__
in top-level__init__.py
(#2401) by @lobsterkatie -
Move minimetrics code to the SDK (#2385) by @mitsuhiko
-
Add configurable compression levels (#2382) by @mitsuhiko
-
Shift flushing by up to a rollup window (#2396) by @mitsuhiko
-
Make a consistent noop flush behavior (#2428) by @mitsuhiko
-
Stronger recursion protection (#2426) by @mitsuhiko
-
Remove
OpenTelemetryIntegration
from__init__.py
(#2379) by @sentrivana -
Update API docs (#2397) by @antonpirker
-
Pin some test requirements because new majors break our tests (#2404) by @antonpirker
-
Run more
requests
,celery
,falcon
tests (#2414) by @sentrivana -
Move
importorskip
s in tests to__init__.py
files (#2412) by @sentrivana -
Fix
mypy
errors (#2433) by @sentrivana -
Fix pre-commit issues (#2424) by @bukzor-sentryio
-
Update CONTRIBUTING.md (#2411) by @sentrivana
-
Bump
sphinx
from 7.2.5 to 7.2.6 (#2378) by @dependabot -
[Experimental] Add explain plan to DB spans (#2315) by @antonpirker
v1.31.0
Various fixes & improvements
-
New: Add integration for
clickhouse-driver
(#2167) by @mimre25For more information, see the documentation for clickhouse-driver for more information.
Usage:
import sentry_sdk from sentry_sdk.integrations.clickhouse_driver import ClickhouseDriverIntegration sentry_sdk.init( dsn='___PUBLIC_DSN___', integrations=[ ClickhouseDriverIntegration(), ], )
-
New: Add integration for
asyncpg
(#2314) by @mimre25For more information, see the documentation for asyncpg for more information.
Usage:
import sentry_sdk from sentry_sdk.integrations.asyncpg import AsyncPGIntegration sentry_sdk.init( dsn='___PUBLIC_DSN___', integrations=[ AsyncPGIntegration(), ], )
-
New: Allow to override
propagate_traces
inCelery
per task (#2331) by @jan-auerFor more information, see the documentation for Celery for more information.
Usage:
import sentry_sdk from sentry_sdk.integrations.celery import CeleryIntegration
Enable global distributed traces (this is the default, just to be explicit.)
sentry_sdk.init(
dsn='___PUBLIC_DSN___',
integrations=[
CeleryIntegration(propagate_traces=True),
],
)
...
This will NOT propagate the trace. (The task will start its own trace):
my_task_b.apply_async(
args=("some_parameter", ),
headers={"sentry-propagate-traces": False},
)
- Prevent Falcon integration from breaking ASGI apps (#​2359) by @​szokeasaurusrex
- Backpressure: only downsample a max of 10 times (#​2347) by @​sl0thentr0py
- Made NoOpSpan compatible to Transactions. (#​2364) by @​antonpirker
- Cleanup ASGI integration (#​2335) by @​antonpirker
- Pin anyio in tests (dep of httpx), because new major 4.0.0 breaks tests. (#​2336) by @​antonpirker
- Added link to backpressure section in docs. (#​2354) by @​antonpirker
- Add .vscode to .gitignore (#​2317) by @​shoaib-mohd
- Documenting Spans and Transactions (#​2358) by @​antonpirker
- Fix in profiler: do not call getcwd from module root (#​2329) by @​Zylphrex
- Fix deprecated version attribute (#​2338) by @​vagi8
- Fix transaction name in Starlette and FastAPI (#​2341) by @​antonpirker
- Fix tests using Postgres (#​2362) by @​antonpirker
- build(deps): Updated linting tooling (#​2350) by @​antonpirker
- build(deps): bump sphinx from 7.2.4 to 7.2.5 (#​2344) by @​dependabot
- build(deps): bump actions/checkout from 2 to 4 (#​2352) by @​dependabot
- build(deps): bump checkouts/data-schemas from `ebc77d3` to `68def1e` (#​2351) by @​dependabot
v1.30.0
Various fixes & improvements
-
Officially support Python 3.11 (#2300) by @sentrivana
-
Context manager monitor (#2290) by @szokeasaurusrex
-
Set response status code in transaction
response
context. (#2312) by @antonpirker -
Add missing context kwarg to
_sentry_task_factory
(#2267) by @JohnnyDeuss -
In Postgres take the connection params from the connection (#2308) by @antonpirker
-
Experimental: Allow using OTel for performance instrumentation (#2272) by @sentrivana
This release includes experimental support for replacing Sentry's default performance monitoring solution with one powered by OpenTelemetry without having to do any manual setup.
Try it out by installing
pip install sentry-sdk[opentelemetry-experimental]
and then initializing the SDK with:sentry_sdk.init(
...your usual options...
_experiments={"otel_powered_performance": True},
)
```
This enables OpenTelemetry performance monitoring support for some of the most
popular frameworks and libraries (Flask, Django, FastAPI, requests...).
We're looking forward to your feedback! Please let us know about your experience
in this discussion: https://github.com/getsentry/sentry/discussions/55023
**Important note:** Please note that this feature is experimental and in a
proof-of-concept stage and is not meant for production use. It may be changed or
removed at any point.
-
Enable backpressure handling by default (#2298) by @sl0thentr0py
The SDK now dynamically downsamples transactions to reduce backpressure in high throughput systems. It starts a new
Monitor
thread to perform some health checks which decide to downsample (halved each time) in 10 second intervals till the system is healthy again.To disable this behavior, use:
sentry_sdk.init(
...your usual options...
enable_backpressure_handling=False,
)
```
If your system serves heavy load, please let us know how this feature works for you!
Check out the [documentation](https://docs.sentry.io/platforms/python/configuration/options/#enable-backpressure-handling) for more information.
- Stop recording spans for internal web requests to Sentry (#2297) by @szokeasaurusrex
- Add test for
ThreadPoolExecutor
(#2259) by @gggritso - Add docstrings for
Scope.update_from_*
(#2311) by @sentrivana - Moved
is_sentry_url
to utils (#2304) by @szokeasaurusrex - Fix: arq attribute error on settings, support worker args (#2260) by @rossmacarthur
- Fix: Exceptions include detail property for their value (#2193) by @nicolassanmar
- build(deps): bump mypy from 1.4.1 to 1.5.1 (#2319) by @dependabot
- build(deps): bump sphinx from 7.1.2 to 7.2.4 (#2322) by @dependabot
- build(deps): bump sphinx from 7.0.1 to 7.1.2 (#2296) by @dependabot
- build(deps): bump checkouts/data-schemas from
1b85152
toebc77d3
(#2254) by @dependabot
v1.29.2
Various fixes & improvements
- Revert GraphQL integration (#2287) by @sentrivana
v1.29.1
Various fixes & improvements
- Fix GraphQL integration swallowing responses (#2286) by @sentrivana
- Fix typo (#2283) by @sentrivana
v1.29.0
Various fixes & improvements
- Capture GraphQL client errors (#2243) by @sentrivana
- The SDK will now create dedicated errors whenever an HTTP client makes a request to a
/graphql
endpoint and the response contains an error. You can opt out of this by providingcapture_graphql_errors=False
to the HTTP client integration.
- The SDK will now create dedicated errors whenever an HTTP client makes a request to a
- Read MAX_VALUE_LENGTH from client options (#2121) (#2171) by @puittenbroek
- Rename
request_bodies
tomax_request_body_size
(#2247) by @mgaligniana - Always sample checkin regardless of
sample_rate
(#2279) by @szokeasaurusrex - Add information to short-interval cron error message (#2246) by @lobsterkatie
- Add DB connection attributes in spans (#2274) by @antonpirker
- Add
db.system
to remaining Redis spans (#2271) by @AbhiPrasad - Clarified the procedure for running tests (#2276) by @szokeasaurusrex
- Fix Chalice tests (#2278) by @sentrivana
- Bump Black from 23.3.0 to 23.7.0 (#2256) by @dependabot
- Remove py3.4 from tox.ini (#2248) by @sentrivana
v1.28.1
Various fixes & improvements
- Redis: Add support for redis.asyncio (#1933) by @Zhenay
- Make sure each task that is started by Celery Beat has its own trace. (#2249) by @antonpirker
- Add Sampling Decision to Trace Envelope Header (#2239) by @antonpirker
- Do not add trace headers (
sentry-trace
andbaggage
) to HTTP requests to Sentry (#2240) by @antonpirker - Prevent adding
sentry-trace
header multiple times (#2235) by @antonpirker - Skip distributions with incomplete metadata (#2231) by @rominf
- Remove stale.yml (#2245) by @hubertdeng123
- Django: Fix 404 Handler handler being labeled as "generic ASGI request" (#1277) by @BeryJu
v1.28.0
Various fixes & improvements
- Add support for cron jobs in ARQ integration (#2088) by @lewazo
- Backpressure handling prototype (#2189) by @sl0thentr0py
- Add "replay" context to event payload (#2234) by @antonpirker
- Update test Django app to be compatible for Django 4.x (#1794) by @DilLip-Chowdary-Codes
v1.27.1
Various fixes & improvements
- Add Starlette/FastAPI template tag for adding Sentry tracing information (#2225) by @antonpirker
- By adding
{{ sentry_trace_meta }}
to your Starlette/FastAPI Jinja2 templates we will include Sentry trace information as a meta tag in the rendered HTML to allow your frontend to pick up and continue the trace started in the backend.
- By adding
- Fixed generation of baggage when a DSC is already in propagation context (#2232) by @antonpirker
- Handle explicitly passing
None
fortrace_configs
inaiohttp
(#2230) by @Harmon758 - Support newest Starlette versions (#2227) by @antonpirker
v1.27.0
Various fixes & improvements
-
Support for SQLAlchemy 2.0 (#2200) by @antonpirker
-
Add instrumentation of
aiohttp
client requests (#1761) by @md384 -
Add Django template tag for adding Sentry tracing information (#2222) by @antonpirker
- By adding
{{ sentry_trace_meta }}
to your Django templates we will include Sentry trace information as a meta tag in the rendered HTML to allow your frontend to pick up and continue the trace started in the backend.
- By adding
-
Update Flask HTML meta helper (#2203) by @antonpirker
-
Take trace ID always from propagation context (#2209) by @antonpirker
-
Fix trace context in event payload (#2205) by @antonpirker
-
Use new top level API in
trace_propagation_meta
(#2202) by @antonpirker -
Do not overwrite existing baggage on outgoing requests (#2191, #2214) by @sentrivana
-
Set the transaction/span status from an OTel span (#2115) by @daniil-konovalenko
-
Fix propagation of OTel
NonRecordingSpan
(#2187) by @hartungstenio -
Fix
TaskLockedException
handling in Huey integration (#2206) by @Zhenay -
Add message format configuration arguments to Loguru integration (#2208) by @Gwill
-
Profiling: Add client reports for profiles (#2207) by @Zylphrex
-
CI: Fix CI (#2220) by @antonpirker
-
Dependencies: Bump
checkouts/data-schemas
from7fdde87
to1b85152
(#2218) by @dependabot -
Dependencies: Bump
mypy
from 1.3.0 to 1.4.1 (#2194) by @dependabot -
Docs: Change API doc theme (#2210) by @sentrivana
-
Docs: Allow (some) autocompletion for top-level API (#2213) by @sentrivana
-
Docs: Revert autocomplete hack (#2224) by @sentrivana
v1.26.0
Various fixes & improvements
- Tracing without performance (#2136) by @antonpirker
- Load tracing information from environment (#2176) by @antonpirker
- Auto-enable HTTPX integration if HTTPX installed (#2177) by @sentrivana
- Support for SOCKS proxies (#1050) by @Roguelazer
- Wrap
parse_url
calls incapture_internal_exceptions
(#2162) by @sentrivana - Run 2.7 tests in CI again (#2181) by @sentrivana
- Crons: Do not support sub-minute cron intervals (#2172) by @antonpirker
- Profile: Add function name to profiler frame cache (#2164) by @Zylphrex
- Dependencies: bump checkouts/data-schemas from
0ed3357
to7fdde87
(#2165) by @dependabot - Update changelog (#2163) by @sentrivana
v1.25.1
Django update (ongoing)
Collections of improvements to our Django integration.
By: @mgaligniana (#1773)
Various fixes & improvements
-
Fix
parse_url
(#2161) by @sentrivana and @antonpirkerOur URL sanitization used in multiple integrations broke with the recent Python security update. If you started seeing
ValueError
s with"'Filtered' does not appear to be an IPv4 or IPv6 address"
, this release fixes that. See the original issue for more context. -
Better version parsing in integrations (#2152) by @antonpirker
We now properly support all integration versions that conform to PEP 440. This replaces our naïve version parsing that wouldn't accept versions such as
2.0.0rc1
or2.0.5.post1
. -
Align HTTP status code as span data field
http.response.status_code
(#2113) by @antonpirker -
Do not encode cached value to determine size (#2143) by @sentrivana
-
Fix using
unittest.mock
whenever available (#1926) by @mgorny -
Fix 2.7
common
tests (#2145) by @sentrivana -
Bump
actions/stale
from6
to8
(#1978) by @dependabot -
Bump
black
from22.12.0
to23.3.0
(#1984) by @dependabot -
Bump
mypy
from1.2.0
to1.3.0
(#2110) by @dependabot -
Bump
sphinx
from5.3.0
to7.0.1
(#2112) by @dependabot
v1.25.0
Various fixes & improvements
-
Support urllib3>=2.0.0 (#2148) by @asottile-sentry
We're now supporting urllib3's new major version, 2.0.0. If you encounter issues (e.g. some of your dependencies not supporting the new urllib3 version yet) you might consider pinning the urllib3 version to
<2.0.0
manually in your project. Check out the the urllib3 migration guide for details. -
Auto-retry tests on failure (#2134) by @sentrivana
-
Correct
importlib.metadata
check intest_modules
(#2149) by @asottile-sentry -
Fix distribution name normalization (PEP-0503) (#2144) by @rominf
-
Fix
functions_to_trace
typing (#2141) by @rcmarron
v1.24.0
Various fixes & improvements
-
New: Celery Beat exclude tasks option (#2130) by @antonpirker
You can exclude Celery Beat tasks from being auto-instrumented. To do this, add a list of tasks you want to exclude as option
exclude_beat_tasks
when creatingCeleryIntegration
. The list can contain simple strings with the full task name, as specified in the Celery Beat schedule, or regular expressions to match multiple tasks.For more information, see the documentation for Crons for more information.
Usage:
exclude_beat_tasks = [ "some-task-a", "payment-check-.*", ] sentry_sdk.init( dsn='___PUBLIC_DSN___', integrations=[ CeleryIntegration( monitor_beat_tasks=True, exclude_beat_tasks=exclude_beat_tasks, ), ], )
In this example the task
some-task-a
and all tasks with a name starting withpayment-check-
will be ignored. -
New: Add support for ExceptionGroups (#2025) by @antonpirker
Note: If running Self-Hosted Sentry, you should wait to adopt this SDK update until after updating to the 23.6.0 (est. June 2023) release of Sentry. Updating early will not break anything, but you will not get the full benefit of the Exception Groups improvements to issue grouping that were added to the Sentry backend.
-
Prefer
importlib.metadata
overpkg_resources
if available (#2081) by @sentrivana -
Work with a copy of request, vars in the event (#2125) by @sentrivana
-
Pinned version of dependency that broke the build (#2133) by @antonpirker
v1.23.1
Various fixes & improvements
- Disable Django Cache spans by default. (#2120) by @antonpirker
v1.23.0
Various fixes & improvements
-
New: Add
loguru
integration (#1994) by @PerchunPakCheck the documentation for more information.
Usage:
from loguru import logger import sentry_sdk from sentry_sdk.integrations.loguru import LoguruIntegration sentry_sdk.init( dsn="___PUBLIC_DSN___", integrations=[ LoguruIntegration(), ], ) logger.debug("I am ignored") logger.info("I am a breadcrumb") logger.error("I am an event", extra=dict(bar=43)) logger.exception("An exception happened")
- An error event with the message
"I am an event"
will be created. -
"I am a breadcrumb"
will be attached as a breadcrumb to that event. -
bar
will end up in theextra
attributes of that event. -
"An exception happened"
will send the current exception fromsys.exc_info()
with the stack trace to Sentry. If there's no exception, the current stack will be attached. - The debug message
"I am ignored"
will not be captured by Sentry. To capture it, setlevel
toDEBUG
or lower inLoguruIntegration
.
- An error event with the message
-
Do not truncate request body if
request_bodies
is"always"
(#2092) by @sentrivana -
Fixed Celery headers for Beat auto-instrumentation (#2102) by @antonpirker
-
Add
db.operation
to Redis and MongoDB spans (#2089) by @antonpirker -
Make sure we're importing
redis
the library (#2106) by @sentrivana -
Add
include_source_context
option (#2020) by @farhat-nawaz and @sentrivana -
Import
Markup
frommarkupsafe
(#2047) by @rco-ableton -
Fix
__qualname__
missing attribute in asyncio integration (#2105) by @sl0thentr0py -
Remove relay extension from AWS Layer (#2068) by @sl0thentr0py
-
Add a note about
pip freeze
to the bug template (#2103) by @sentrivana
v1.22.2
Various fixes & improvements
- Fix: Django caching spans when using keyword arguments (#2086) by @antonpirker
- Fix: Duration in Celery Beat tasks monitoring (#2087) by @antonpirker
- Fix: Docstrings of SPANDATA (#2084) by @antonpirker
v1.22.1
Various fixes & improvements
- Fix: Handle a list of keys (not just a single key) in Django cache spans (#2082) by @antonpirker
v1.22.0
Various fixes & improvements
-
Add
cache.hit
andcache.item_size
to Django (#2057) by @antonpirkerNote: This will add spans for all requests to the caches configured in Django. This will probably add some overhead to your server an also add multiple spans to your performance waterfall diagrams. If you do not want this, you can disable this feature in the DjangoIntegration:
sentry_sdk.init( dsn="...", integrations=[ DjangoIntegration(cache_spans=False), ] )
-
Use
http.method
instead ofmethod
(#2054) by @AbhiPrasad -
Handle non-int
exc.status_code
in Starlette (#2075) by @sentrivana -
Handle SQLAlchemy
engine.name
being bytes (#2074) by @sentrivana -
Fix
KeyError
incapture_checkin
if SDK is not initialized (#2073) by @antonpirker -
Use
functools.wrap
forThreadingIntegration
patches to fix attributes (#2080) by @EpicWink -
Pin
urllib3
to <2.0.0 for now (#2069) by @sl0thentr0py
v1.21.1
Various fixes & improvements
- Do not send monitor_config when unset (#2058) by @evanpurkhiser
- Add
db.system
span data (#2040, #2042) by @antonpirker - Fix memory leak in profiling (#2049) by @Zylphrex
- Fix crash loop when returning none in before_send (#2045) by @sentrivana
v1.21.0
Various fixes & improvements
-
Better handling of redis span/breadcrumb data (#2033) by @antonpirker
Note: With this release we will limit the description of redis db spans and the data in breadcrumbs represting redis db operations to 1024 characters.
This can can lead to truncated data. If you do not want this there is a new parameter
max_data_size
inRedisIntegration
. You can set this toNone
for disabling trimming.Example for disabling trimming of redis commands in spans or breadcrumbs:
sentry_sdk.init( integrations=[ RedisIntegration(max_data_size=None), ] )
Example for custom trim size of redis commands in spans or breadcrumbs:
sentry_sdk.init( integrations=[ RedisIntegration(max_data_size=50), ] )`
-
Add
db.system
to redis and SQLAlchemy db spans (#2037, #2038, #2039) (#2037) by @AbhiPrasad -
Upgraded linting tooling (#2026) by @antonpirker
-
Made code more resilient. (#2031) by @antonpirker
v1.20.0
Various fixes & improvements
-
Send all events to /envelope endpoint when tracing is enabled (#2009) by @antonpirker
Note: If you’re self-hosting Sentry 9, you need to stay in the previous version of the SDK or update your self-hosted to at least 20.6.0
-
Profiling: Remove profile context from SDK (#2013) by @Zylphrex
-
Profiling: Additionl performance improvements to the profiler (#1991) by @Zylphrex
-
Fix: Celery Beat monitoring without restarting the Beat process (#2001) by @antonpirker
-
Fix: Using the Codecov uploader instead of deprecated python package (#2011) by @antonpirker
-
Fix: Support for Quart (#2003)` (#2003) by @antonpirker
metabrainz/troi-recommendation-playground (troi)
v2025.1.10.0
v2025.1.3.0
v2024.12.4.0
v2024.12.3.0
v2024.8.30.1
v2024.8.30.0
v2024.4.26.0
v2024.2.9.0
v2024.1.30.0
gorakhargosh/watchdog (watchdog)
v6.0.0
: 6.0.0
Breaking Changes
- [inotify] Use of
select.poll()
instead of deprecatedselect.select()
, if available. (#1078) - [utils] Removed the unused
echo_class()
function from theecho
module. - [utils] Removed the unused
echo_instancemethod()
function from theecho
module. - [utils] Removed the unused
echo_module()
function from theecho
module. - [utils] Removed the unused
is_class_private_name()
function from theecho
module. - [utils] Removed the unused
is_classmethod()
function from theecho
module. - [utils] Removed the unused
is_method(met()
function from theecho
module. - [utils] Removed the unused
method_name()
function from theecho
module. - [utils] Removed the unused
name()
function from theecho
module. - [watchmedo] Removed the
--trace
CLI argument from thewatchmedo log
command, useless since events are logged by default at theLoggerTrick
class level.
Other Changes
- Pin test dependecies.
- [docs] Add typing info to quick start. (#1082)
- [inotify] Fix reading inotify file descriptor after closing it. (#1081)
- [utils] The
stop_signal
keyword-argument type of theAutoRestartTrick
class can now be either asignal.Signals
or anint
. - [utils] Added the
__repr__()
method to theTrick
class. - [watchmedo] Fixed Mypy issues.
- [watchmedo] Added the
__repr__()
method to theHelpFormatter
class. - [windows] Fixed Mypy issues.
v5.0.3
: 5.0.3
- [inotify] Improve cleaning up
Inotify
threads, and addeventlet
test cases (#1070)
v5.0.2
: 5.0.2
- Enable OS specific Mypy checks (#1064)
- [watchmedo] Fix
tricks
argument type ofschedule_tricks()
(#1063)
v5.0.1
: 5.0.1
- [kqueue] Fix
TypeError: kqueue.control() only accepts positional parameters
(#1062)
v5.0.0
: 5.0.0
Breaking Changes
- Drop support for Python 3.8 (#1055)
- [core] Enforced usage of proper keyword-arguments (#1057)
- [core] Renamed the
BaseObserverSubclassCallable
class toObserverType
(#1055) - [inotify] Renamed the
inotify_event_struct
class toInotifyEventStruct
(#1055) - [inotify] Renamed the
UnsupportedLibc
exception toUnsupportedLibcError
(#1057) - [inotify] Removed the
InotifyConstants.IN_CLOSE
constant (#1046) - [watchmedo] Renamed the
LogLevelException
exception toLogLevelError
(#1057) - [watchmedo] Renamed the
WatchdogShutdown
exception toWatchdogShutdownError
(#1057) - [windows] Renamed the
FILE_NOTIFY_INFORMATION
class toFileNotifyInformation
(#1055) - [windows] Removed the unused
WATCHDOG_TRAVERSE_MOVED_DIR_DELAY
constant (#1057)
Other Changes
- [core] Enable
disallow_untyped_calls
Mypy rule (#1055) - [core] Enable
disallow_untyped_defs
Mypy rule (#1060) - [core] Improve typing references for events (#1040)
- [inotify] Add support for
IN_CLOSE_NOWRITE
events. AFileClosedNoWriteEvent
event will be fired, and itson_closed_no_write()
dispatcher has been introduced (#1046)
v4.0.2
: 4.0.2
- Add support for Python 3.13 (#1052)
- [core] Run
ruff
, apply several fixes (#1033) - [core] Remove execution rights from
events.py
- [documentation] Update
PatternMatchingEventHandler
docstrings (#1048) - [documentation] Simplify the quickstart example (#1047)
- [fsevents] Add missing
event_filter
keyword-argument toFSEventsObserver.schedule()
(#1049) - [utils] Fix a possible race condition in
AutoRestartTrick
(#1002) - [watchmedo] Remove execution rights from
watchmedo.py
v4.0.1
: 4.0.1
- [inotify] Fix missing
event_filter
for the full emitter (#1032)
Configuration
-
If you want to rebase/retry this MR, check this box
This MR has been generated by Renovate Bot.