-
Notifications
You must be signed in to change notification settings - Fork 547
Custom settings for decimal context broke the app #4213
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hey @mikhaillazko thanks for reporting this! I will have a look |
I have a PR with a fix up @mikhaillazko. We will probably release this next week |
Hello! Is there any update on this one? I saw #4231 got closed, but nothing new seems to be opened yet? 🤔 |
We'll revive the closed PR and fix the issue this week folks, sorry for the wait. In the longer term we're planning on moving away from Decimal in SDK internals altogether (just an fyi -- we're still fixing this bug before that happens). |
Fix will be out in 2.27.0 in a bit. Let us know if anything is still not as it should be |
I'm still having problems w/ 2.27.0:
For reference, my code sets: decimal.DefaultContext.traps[decimal.FloatOperation] = True |
Uh oh!
There was an error while loading. Please reload this page.
How do you use Sentry?
Sentry Saas (sentry.io)
Version
2.24.0
Steps to Reproduce
Hi! I have an issue with decimal. I defined custom rules for decimal type like this:
and call this function before FastAPI initialization
An error occurs when i running the application and calling the API.
Thanks for great tool!
Expected Result
The application should not crash.
Actual Result
This is stack trace that i see
It looks like you need to define a local context for this operation using
decimal.localcontext
The text was updated successfully, but these errors were encountered: