-
Notifications
You must be signed in to change notification settings - Fork 137
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Move requests package to optional dependency #417
Comments
Thank you @phillipuniverse for bringing this up. That makes a lot of sense! We currently import requests at the package level and use it as the default HTTP sender for a few handlers. We will need to try to import it if the handler uses it and throw an exception if it does not exist. Because of that, this is a breaking change. I am adding this to our Is this update something you would be willing to contribute to? |
@danielmorell yes, I can work on a contribution for this. Do y'all have a candidate timeline for when you are looking at a 1.0 release? |
Thank you @phillipuniverse. I greatly appreciate that! I am aiming at release Q1 2023. But I will need to talk to product before anything concrete is determined. |
Please also add optional dependencies for other handlers like
This is not the way how dependencies should be listed. |
@danielmorell candidate PR at #422.
@homm indeed, it should be an |
@phillipuniverse Right. I think it's a good idea to define one key in |
I decided to go in a slightly different direction here that didn't rely on removing the requests package from pyrollbar. I used [tool.ruff.flake8-tidy-imports.banned-api]
"requests".msg = "Use httpx instead" This achieves my purposes of trying to prevent developers from using blocking code accidentally. |
I have a fully asynchronous FastAPI application that I use with Rollbar for error tracking. I want to avoid other developers accidentally utilizing the
requests
package to make external API calls as it will introduce blocking code within a fully asynchronous service.However, requests is non-optional
pyrollbar/setup.py
Lines 82 to 87 in 55d08a6
Ideally, adding a dependency on pyrollbar would not transitively bring in the requests package.
The text was updated successfully, but these errors were encountered: