Skip to content
This repository has been archived by the owner on Sep 18, 2024. It is now read-only.

fix: Fix ruamel import #3430

Merged
merged 2 commits into from
Mar 9, 2021
Merged

fix: Fix ruamel import #3430

merged 2 commits into from
Mar 9, 2021

Conversation

rushtehrani
Copy link
Contributor

@rushtehrani rushtehrani commented Mar 7, 2021

This PR fixes the following error when the ruamel.yaml version is greater than 0.11.4:

ModuleNotFoundError: No module named 'ruamel'

It also makes the code consistent with other code that uses this module.

@J-shang
Copy link
Contributor

J-shang commented Mar 8, 2021

@rushtehrani Hi, thanks for your pr, but we don't meet this issue with ruamel.yaml == 0.16.12, could you show your ruamel.yaml version? Let's check if the version range of ruamel.yaml should be restricted.

And in some scenarios we will meet error using import ruamel.yaml as yaml, FYI.
#3276

@J-shang J-shang self-requested a review March 8, 2021 08:28
@rushtehrani
Copy link
Contributor Author

rushtehrani commented Mar 8, 2021

Hi @J-shang

@rushtehrani Hi, thanks for your pr, but we don't meet this issue with ruamel.yaml == 0.16.12, could you show your ruamel.yaml version? Let's check if the version range of ruamel.yaml should be restricted.

The version I was having issues with is 0.15.80, I think at some point they changed the name of the PyPi package from ruamel_yaml to ruamel.yaml.

And in some scenarios we will meet error using import ruamel.yaml as yaml, FYI.
#3276

Yes, I believe this is due to the name change in the most recent versions.

Note that import ruamel.yaml as yaml format is used in a few other places as well so I think #3276 might be an issue there too?

@J-shang
Copy link
Contributor

J-shang commented Mar 9, 2021

@rushtehrani Hi, you are right, I find the doc https://yaml.readthedocs.io/en/latest/api.html , and this pr will be merged. Thanks for your contribution and if there is any other issue, welcome to communicate with us.

@J-shang J-shang merged commit ea83801 into microsoft:master Mar 9, 2021
@rushtehrani rushtehrani deleted the patch-1 branch March 9, 2021 15:47
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants