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

{Service Connector} Fix #24213: az spring connection create mysql-flexible: Resolve dependency conflict with interactive extension #24268

Merged
merged 3 commits into from
Oct 20, 2022

Conversation

xfz11
Copy link
Member

@xfz11 xfz11 commented Oct 19, 2022

Related command

Description

Fix #24213 by replacing mycli with PyMySQL

Testing Guide

History Notes

[Component Name 1] BREAKING CHANGE: az command a: Make some customer-facing breaking change
[Component Name 2] az command b: Add some customer-facing feature


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

@yonzhan
Copy link
Collaborator

yonzhan commented Oct 19, 2022

Fix dependency conflict issue

src/azure-cli/setup.py Outdated Show resolved Hide resolved
@bebound bebound changed the title {Service Connector} az spring connection create mysql-flexible: Fix dependency conflict issue {Service Connector} Fix #24213: az spring connection create mysql-flexible: Resolve dependency conflict with interactive extension Oct 19, 2022
@@ -215,7 +215,7 @@ def create_aad_user_in_mysql(self, connection_kwargs, query_list):
for d in installed_packages)
if not pym_installed:
import pip
pip.main(['install', 'mycli'])
pip.main(['install', 'pymysql'])
Copy link
Member

Choose a reason for hiding this comment

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

mycli internally depends on PyMySQL:

https://github.com/dbcli/mycli/blob/bc9492a2d425c4d4908c1bfc97c316739a284b9f/setup.py#L27

install_requirements = [
    'click >= 7.0',
    # Temporary to suppress paramiko Blowfish warning which breaks CI.
    # Pinning cryptography should not be needed after paramiko 2.11.0.
    'cryptography == 36.0.2',
    # 'Pygments>=1.6,<=2.11.1',
    'Pygments>=1.6',
    'prompt_toolkit>=3.0.6,<4.0.0',
    'PyMySQL >= 0.9.2',

I guess that's why mycli can be replaced by PyMySQL here.

I am still wondering why mycli was chosen in lieu of PyMySQL initially. Any functionality from mycli is used?

Copy link
Member Author

@xfz11 xfz11 Oct 19, 2022

Choose a reason for hiding this comment

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

Mysql team use mycli in their extension, we just align with them but currently Service Connector commands don't need other function from mycli.

@kairu-ms kairu-ms merged commit a62bac3 into Azure:dev Oct 20, 2022
avgale pushed a commit to avgale/azure-cli that referenced this pull request Aug 24, 2023
…ql-flexible`: Resolve dependency conflict with `interactive` extension (Azure#24268)

* fix dependency issue

* fix setup dependency

* revert other changes
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 interactive fails to start: ModuleNotFoundError: No module named 'prompt_toolkit.interface'
6 participants