You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Installation of only one component of the package #101
I use only the database functionality of this package, and do all web management myself using aiohttp. It would be great if this package didn't pull requests into my dependency graph as my application is entirely async, (and also didn't force my aiohttp version to be less than 4 in case that ever gets updated).
I think you can use the extras_require argument to setup() (with setuptools) to add optional dependencies. Maybe something like:
I noticed a similar issue when putting together an offline install of this package. I've also noticed the version of requests is very specific (June 2020 version and onwards), and can be loosened.
Loosen the version of the requests library that can be used
I can understand if the maintainers don't want to make aiohttp and requests optional as it'll require anyone pulling this library in to do a different install command, and they might have issues with existing projects if they use this library as an unpinned dependency. I thought it was worth raising the Pull Request anyway, see what the feedback is like. I think the urllib and requests version change are worth including, even if adding the optional dependencies is too disruptive.
In our case is exactly the opposite, but still the same principle. We have geoip2 as a dependency in our django projects but we aren't using asyncio at all, so having aiohttp as an optional requirement would be ideal.
Reacted by Dave Brondsema, Davide Setti and Andrey Fedosenko
Maxmind is retiring legacy databases on May 31 2022, forcing users to upgrade to GeoIP2 format. This means that all projects which are using only the offline database are now forced to install the unnecessary aiohttp client and its dependencies.
Is there any plan to make this dependency optional?
There is no immediate plans on doing this. As mentioned above, it may make sense to break this package into several packages at some point, but it is unlikely to happen soon.
If you are particularly concerned about unnecessary dependencies, I would suggest using maxminddb directly.
There is no immediate plans on doing this. As mentioned above, it may make sense to break this package into several packages at some point, but it is unlikely to happen soon.
If you are particularly concerned about unnecessary dependencies, I would suggest using maxminddb directly.
thanks for the db reader tip, this is exactly what I was looking for!
Activity
sg3-141-592 commentedon Nov 8, 2020
I noticed a similar issue when putting together an offline install of this package. I've also noticed the version of
requestsis very specific (June 2020 version and onwards), and can be loosened.I've raised Pull Request #104 to
urllib3aiohttpandrequestsoptional dependenciesrequestslibrary that can be usedI can understand if the maintainers don't want to make
aiohttpandrequestsoptional as it'll require anyone pulling this library in to do a different install command, and they might have issues with existing projects if they use this library as an unpinned dependency. I thought it was worth raising the Pull Request anyway, see what the feedback is like. I think theurllibandrequestsversion change are worth including, even if adding the optional dependencies is too disruptive.menecio commentedon Mar 8, 2021
In our case is exactly the opposite, but still the same principle. We have
geoip2as a dependency in our django projects but we aren't usingasyncioat all, so havingaiohttpas an optional requirement would be ideal.adi1 commentedon Mar 16, 2022
Maxmind is retiring legacy databases on May 31 2022, forcing users to upgrade to GeoIP2 format. This means that all projects which are using only the offline database are now forced to install the unnecessary aiohttp client and its dependencies.
Is there any plan to make this dependency optional?
oschwald commentedon Mar 16, 2022
There is no immediate plans on doing this. As mentioned above, it may make sense to break this package into several packages at some point, but it is unlikely to happen soon.
If you are particularly concerned about unnecessary dependencies, I would suggest using
maxminddbdirectly.adi1 commentedon Mar 16, 2022
thanks for the db reader tip, this is exactly what I was looking for!
Make aiohttp and requests optional dependencies
Make aiohttp and requests optional dependencies
Make aiohttp and requests optional dependencies
Make aiohttp and requests optional dependencies
Make aiohttp and requests optional dependencies
Make aiohttp and requests optional dependencies
Make aiohttp and requests optional dependencies
Make aiohttp and requests optional dependencies
Make aiohttp and requests optional dependencies
Make aiohttp and requests optional dependencies
Make aiohttp and requests optional dependencies
Make aiohttp and requests optional dependencies
Make aiohttp and requests optional dependencies