Closed craigds closed 3 months ago
Thanks @craigds, we'll take a look.
Hey @craigds !
I have now tried this with Sentry SDK version 2.0.0
and it works now:
(.venv) antonpirker@Y7CYJ0XDQY tmp/deleteme » pip install sentry-sdk==2.0.0
Collecting sentry-sdk==2.0.0
Downloading sentry_sdk-2.0.0-py2.py3-none-any.whl (266 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 266.8/266.8 kB 1.1 MB/s eta 0:00:00
Collecting urllib3>=1.26.11
Using cached urllib3-2.2.1-py3-none-any.whl (121 kB)
Collecting certifi
Using cached certifi-2024.6.2-py3-none-any.whl (164 kB)
Installing collected packages: urllib3, certifi, sentry-sdk
Successfully installed certifi-2024.6.2 sentry-sdk-2.0.0 urllib3-2.2.1
[notice] A new release of pip is available: 23.0.1 -> 24.0
[notice] To update, run: pip install --upgrade pip
(.venv) antonpirker@Y7CYJ0XDQY tmp/deleteme » python -V
Python 3.10.13
(.venv) antonpirker@Y7CYJ0XDQY tmp/deleteme » python -W error::ImportWarning
Python 3.10.13 (main, Jan 22 2024, 14:59:06) [Clang 15.0.0 (clang-1500.1.0.2.5)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import sentry_sdk
>>> sentry_sdk.init()
<sentry_sdk.hub._InitGuard object at 0x101609780>
>>>
Can you confirm that it is working for you when using version 2.0.0 or newer?
Thanks, yes I can confirm this is fixed now 👍
How do you use Sentry?
Self-hosted/on-premise
Version
1.40.5
Steps to Reproduce
Call
sentry_sdk.init()
while ImportWarnings are enabled, or convert them to error to see tracebackExpected Result
it doesn't produce any ImportWarnings
Actual Result
This seems to happen while processing the
celery
andfalcon
integrations. Note: I have celery installed but I don't have falcon installed. It may also happen with other integrations; I haven't tested with all the default integrations.packages installed
Can't include full pip freeze output, but here's a few that might be relevant
Python 3.10.12, installed via apt Ubuntu 22.04.4 LTS