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

conda config --set show_channel_urls yes doesn't work anymore #2732

Closed
jankatins opened this issue Jun 16, 2016 · 13 comments · Fixed by #2734
Closed

conda config --set show_channel_urls yes doesn't work anymore #2732

jankatins opened this issue Jun 16, 2016 · 13 comments · Fixed by #2734
Labels
locked [bot] locked due to inactivity type::bug describes erroneous operation, use severity::* to classify the type
Milestone

Comments

@jankatins
Copy link

This is happening since the latest conda update:

λ conda config --set show_channel_urls yes
Error: Key: show_channel_urls; yes is not a YAML boolean.

It happens with both conda 4.1.1 (local windows py 3.5) and 4.1.0 (appveyor, https://ci.appveyor.com/project/mdboom/matplotlib/build/1.0.1774) and it worked with 4.0.8 (https://ci.appveyor.com/project/mdboom/matplotlib/build/1.0.1765/job/bkldg98f8p087xmf)

@kalefranz
Copy link
Contributor

This one is CC @mcg1969

@kalefranz kalefranz added the type::bug describes erroneous operation, use severity::* to classify the type label Jun 16, 2016
@kalefranz kalefranz added this to the 4.1 milestone Jun 16, 2016
@mcg1969
Copy link
Contributor

mcg1969 commented Jun 16, 2016

I didn't mess with the section of code. I don't mind fixing it, don't get me wrong, but I am guessing that this is a difference between our old YAML library and our new one

@mcg1969
Copy link
Contributor

mcg1969 commented Jun 16, 2016

Try using true/false instead of yes/no... @msarahan?

@kalefranz
Copy link
Contributor

Ahhhh, interesting. I thought I had tested for that. But we can change
the ruamel_yaml version back to using yaml 1.1 (if it isn't already), and
then yes/no should work for yaml booleans.

On Thu, Jun 16, 2016 at 5:33 PM, Michael C. Grant notifications@github.com
wrote:

Try using true/false instead of yes/no... @msarahan
https://github.com/msarahan?


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#2732 (comment), or mute
the thread
https://github.com/notifications/unsubscribe/ABWks12m0vAh-7R3sO7oVkpihlF1YwIhks5qMc8tgaJpZM4I33Ze
.

Kale J. Franz, PhD
Conda Tech Lead
kfranz@continuum.io kfranz@continuum.io
@kalefranz https://twitter.com/kalefranz

http://continuum.io/ http://continuum.io/
http://continuum.io/
221 W 6th St | Suite 1550 | Austin, TX 78701

@mcg1969
Copy link
Contributor

mcg1969 commented Jun 16, 2016

I think the ship is sailed on the new library. I think we have to work around it

@mcg1969
Copy link
Contributor

mcg1969 commented Jun 16, 2016

Looks like YAML 1.2 drops Yes/No and On/Off support: http://yaml.readthedocs.io/en/latest/pyyaml.html

@mcg1969
Copy link
Contributor

mcg1969 commented Jun 16, 2016

Good news, we can fix

@mcg1969
Copy link
Contributor

mcg1969 commented Jun 16, 2016

Changing version="1.2" to version="1.1" on line 298 of utils.py restores this behavior. I'm concerned we may be breaking other things though by doing this, so my inclination is to create a yaml_bool function to wrap around the output of yaml.load in cases like this.

@mcg1969
Copy link
Contributor

mcg1969 commented Jun 16, 2016

Even better: drop the use of yaml.load to parse the boolean strings in cli/main_config.py in the first place.

@kalefranz
Copy link
Contributor

@mcg1969 I don't think I have any issues at all setting the yaml version to 1.1. @msarahan any thoughts?

@mcg1969
Copy link
Contributor

mcg1969 commented Jun 17, 2016

Well, keep in mind, this code concerns itself with the config command line, not the reading of the .condarc files. I have no problem with the idea of staying at YAML 1.2 for the file itself, but being more liberal on the command line. We've set a precedent of accepting "yes" on the command line, we should honor that.

@mcg1969
Copy link
Contributor

mcg1969 commented Jun 17, 2016

So then the question is: why is YAML even involved here? Because the code chose to use yaml.load() to parse the command-line strings! I see no reason to do that anyway.

@github-actions
Copy link

Hi there, thank you for your contribution to Conda!

This issue has been automatically locked since it has not had recent activity after it was closed.

Please open a new issue if needed.

@github-actions github-actions bot added the locked [bot] locked due to inactivity label Nov 21, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 21, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
locked [bot] locked due to inactivity type::bug describes erroneous operation, use severity::* to classify the type
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants