Skip to content
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

{Packaging} Add msal-extensions dependency #19910

Merged
merged 2 commits into from
Oct 18, 2021
Merged

{Packaging} Add msal-extensions dependency #19910

merged 2 commits into from
Oct 18, 2021

Conversation

jiasli
Copy link
Member

@jiasli jiasli commented Oct 16, 2021

Description

Even though azure-identity depends on msal-extensions and azure-cli depends on azure-identity:

> pipdeptree -r -p msal-extensions
msal-extensions==0.3.0
  - azure-identity==1.6.1 [requires: msal-extensions~=0.3.0]
    - azure-cli==2.29.0 [requires: azure-identity]

azure-cli should declare the direct dependency on msal-extensions as msal-extensions is directly used by azure-cli.

Comment on lines +112 to 113
msal-extensions==0.3.0
msal==1.15.0
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

- < =

Comment on lines 53 to 54
'msal-extensions>=0.3.0',
'msal>=1.15.0,<2.0.0',
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In ASCII, - appears before >, so alphabetically msal-extensions>=0.3.0 is smaller than msal>=1.15.0,<2.0.0.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You folks sort dependency alphabetically? Interesting. I am not aware that practice, but it sounds good. But I would assume the sorting should only compare the package name (i.e. msal < msal-extensions), not the entire versioning condition (i.e. msal>... < msal-extensions...).

Just my random thoughts. You can ignore this comment. :-)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In deed, sorting by package name is better, but is is hard to do with an IDE.

As the dependencies of Azure CLI are too many, not soring them will frequently cause merging conflicts.

@@ -50,13 +50,14 @@
'humanfriendly>=4.7,<10.0',
'jmespath',
'knack~=0.8.2',
'msal-extensions>=0.3.0',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will you consider adding an upper bound such as msal-extensions>=0.3.0,<1, or strictly speaking, msal-extensions>=0.3.0,<0.4?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That depends on whether msal-extensions will make a breaking change in 1.0 or 0.4. I can't predict the future. 😉

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK. My point was you would want to at least use some upper bound, rather than no upper bound at all. I think you can go with extensions>=0.3.0,<0.4, for now.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, recently we deliberately removed upper bound for some libraries like cryptography (#19639) so that users can always use the latest versions of dependencies, rather than waiting for us to bump it. Since pip is being more strict than before, setting a wider version range helps eliminate dependency conflicts.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

msal and msal-extensions use Semantic Versioning. And the whole point of Semantic Versioning (i.e. Why Semantic Versioning) is to be able to:

So, I would still suggest you to properly set both lower and upper bounds for msal and msal-extensions.

cryptography is a different story. It does not use SemVer, so its practice is vastly different. It is off-topic in this context. We can follow up offline separately.

@yonzhan
Copy link
Collaborator

yonzhan commented Oct 16, 2021

Packaging

@yonzhan yonzhan added this to the Oct 2021 (2021-11-02) milestone Oct 16, 2021
Copy link
Member

@rayluo rayluo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jiasli jiasli requested a review from calvinhzy October 18, 2021 02:52
@jiasli jiasli merged commit 50c8c6f into Azure:dev Oct 18, 2021
@jiasli jiasli deleted the msal-ext branch October 18, 2021 07:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants