azure-sdk-for-python
azure-sdk-for-python copied to clipboard
Reduce dependencies for azure-core
Is your feature request related to a problem? Please describe.
I would love to use the azure.identity
package but it has dependencies via azure-core that conflict with other projects and this is frustrating. In my particular case the conflict is with typing-extensions
which although sounds useful to development, is not related to Azure at all and should not be present in azure-core. Given this is a core library it should an extreme minimum of dependencies, otherwise it cannot be used flexibly.
pkg_resources.ContextualVersionConflict: (typing-extensions 4.3.0 (/usr/local/lib/python3.8/site-packages), Requirement.parse('typing-extensions<4,>=3.10'), {'apache-superset'})
Describe the solution you'd like Review dependencies in azure.core and eliminate all dependencies (typing-extensions, six) that are not directly related to Azure functionality.
Describe alternatives you've considered The alternative is to rewrite parts of the Azure Identity library from scratch. I have done this, and it works. I'd rather not have to do this.
Label prediction was below confidence level 0.6
for Model:ServiceLabels
: 'Azure.Core:0.4729176,Extensions:0.14902386,Azure.Identity:0.11857724'
Thanks for the feedback, we’ll investigate asap.
Hi, Is the Issue is resolved? Because I'm also getting the same error while importing the module named as Feathr.
Till now this error was not coming.
No. It is not solved yet.
You can get more details in https://github.com/Azure/azure-sdk-for-python/pull/22891#issuecomment-1280969123.
@georgewfisher, about dependencies, first of all I agree on your intent 100%. We have recoded some parsing and things ourselves precisely to have as low dependencies as we could. About what remains:
- We will definitely remove
six
, but we found instances of packages that usesix
directly and have dependencies onazure-core
without themselves having a dependency onsix
. This is bad, they shouldn't have been in this situation, but they are, so we'll removesix
when we feel it's unlikely anyone got trouble. We're fixing those packages.azure-core
code itself do not rely onsix
anymore. - We don't plan to remove
typing_extensions
. This is honestly a standard library addition at this point, which is heavily supported by Python core developers. We don't see this dependency as problematic. I acknowledge the feedback that we might have jumped to v4 a little fast though, but now that we jumped we won't come back. We're doing this because a lot of people have strong feedback and expectations on typing quality nowadays, and it all starts withazure-core
. It's difficult to get all customers 100% happy, but having a recent typing-extensions is making more happy people than sad people. - We would like to remove
requests
, and we did the work inazure-core
that if you are async only, you can uninstallrequests
and still everything is working fine. We fall into the first bucket where removingrequests
would make some downstream packages fail. We keep a very low minimal boundary ofrequests
on purpose to not block anyone (right now it's 2.18.4, from August 2017, which is 5 years old at time of this answer).
Side note, I see that apache-superset
is now expecting typing-extensions >=4:
https://github.com/apache/superset/blob/12f2b0f8e7d31ced91ebbc602704e7f08fd5ae76/setup.py#L126
@Uditanshu1612 your issue is not related to the initial issue here. From your screenshot, the feathr
package is putting an upper boundary on azure-core
to 1.22.1, we're not responsible for the choice of feathr
developpers to put a limit on what version you can install. I believe looking at other issues like https://github.com/Azure/azure-sdk-for-python/pull/22891, that they did so because of typing-extensions
. I would hope the feathr
team can accept typing-extensions
v4 soon. If you are aware this is problematic for them, let us know.
Thanks!
Closing this issue, as I think we adressed the points discussed.