Skip to content

Conversation

@mmyyrroonn
Copy link
Contributor

@mmyyrroonn mmyyrroonn commented Apr 8, 2020

antlr4 is used in monitor. We use 4.7.2 antlr4 tool to generate some codes in monitor. We still need a antlr4 runtime. But we didn't define it as a requirement in azure-cli before. In azure-cli-core, the version is not locked and the new version is 4.8.0. It would cause warning if two versions are not same.

Fix #12892

Description of PR (Mandatory)
(Why this PR? What is changed? What is the effect? etc. A high-quality description can accelerate the review process)

Testing Guide
(Example commands with explanations)

History Notes:
(Fill in the following template if multiple notes are needed, otherwise PR title will be used for history note.)

[Component Name 1] (BREAKING CHANGE:) (az command:) make some customer-facing change.
[Component Name 2] (BREAKING CHANGE:) (az command:) make some customer-facing change.


This checklist is used to make sure that common guidelines for a pull request are followed.

packages=find_packages(exclude=["*.tests", "*.tests.*", "tests.*", "tests"]),
install_requires=DEPENDENCIES,
extras_require={
":python_version<'3.0'": ['antlr4-python2-runtime']
Copy link
Member

Choose a reason for hiding this comment

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

We have dropped Python 2. We can safely remove this dependency. #11363

]

DEPENDENCIES = [
'antlr4-python3-runtime~=4.7.2',
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm not sure. Is it the correct way to fix this issue? @fengzhou-msft Since python2 and python3 share the same namespace.

Copy link
Member

Choose a reason for hiding this comment

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

We do not support python 2 now, this is fine.

Copy link
Member

Choose a reason for hiding this comment

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

Do you have any code that may have different handlings for py2 and py3 with this antlr4 dependency? You may also clean that code if yes.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

no. They share same signature to us.

packages=find_packages(exclude=["*.tests", "*.tests.*", "tests.*", "tests"]),
install_requires=DEPENDENCIES,
extras_require={
":python_version<'3.0'": ['antlr4-python2-runtime']
Copy link
Contributor Author

Choose a reason for hiding this comment

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

maybe something like ":python_version<'3.0'": ['antlr4-python2-runtime'==4.7.2]?

Copy link
Member

Choose a reason for hiding this comment

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

Just delete this line.

@yonzhan yonzhan added this to the S168 milestone Apr 8, 2020
@yonzhan
Copy link
Collaborator

yonzhan commented Apr 8, 2020

add to S168

@mmyyrroonn mmyyrroonn requested a review from jiasli April 9, 2020 02:01
@mmyyrroonn mmyyrroonn changed the title {Monitor}fix dependency {Monitor} Fix dependency Apr 9, 2020
@mmyyrroonn mmyyrroonn changed the title {Monitor} Fix dependency {Monitor} Move antlr4-python3-runtime to src/azure-cli/setup.py Apr 9, 2020
@mmyyrroonn mmyyrroonn merged commit 2c25588 into Azure:dev Apr 9, 2020
@mmyyrroonn mmyyrroonn deleted the fix-12892-wrong-dependency branch April 9, 2020 07:21
@jiasli jiasli mentioned this pull request Apr 11, 2020
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.

az monitor metrics alert create returns invalid JSON on success.

4 participants