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

use ruamel.yaml #660

Merged
merged 3 commits into from
Apr 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion conda.recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ requirements:
run:
- conda >=4.6,<23.1.0
- python
- ruamel_yaml >=0.11.14,<0.16
- ruamel.yaml >=0.11.14,<0.18
- conda-standalone
- pillow >=3.1 # [win or osx]
- nsis >=3.08 # [win]
Expand Down
4 changes: 2 additions & 2 deletions constructor/construct.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
from functools import partial
from os.path import dirname

from constructor.exceptions import UnableToParse, UnableToParseMissingJinja2, YamlParsingError
from ruamel import yaml

from .utils import yaml
from constructor.exceptions import UnableToParse, UnableToParseMissingJinja2, YamlParsingError

# list of tuples (key name, required, type, description)
KEYS = [
Expand Down
7 changes: 2 additions & 5 deletions constructor/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,7 @@
from os.path import basename, isdir, isfile, islink, normpath
from shutil import rmtree

try:
import yaml
except ImportError:
import ruamel_yaml as yaml
from ruamel import yaml

logger = logging.getLogger(__name__)

Expand Down Expand Up @@ -111,7 +108,7 @@ def add_condarc(info):
if channel_alias:
condarc['channel_alias'] = channel_alias
if isinstance(condarc, dict):
condarc = yaml.dump(condarc)
condarc = yaml.dump(condarc, default_flow_style=False)
yield '# ----- add condarc'
if info['_platform'].startswith('win'):
yield 'Var /Global CONDARC'
Expand Down
19 changes: 19 additions & 0 deletions news/660-ruamel-yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
### Enhancements

* <news item>

### Bug fixes

* <news item>

### Deprecations

* <news item>

### Docs

* <news item>

### Other

* Drop `ruamel_yaml` and use `ruamel.yaml` instead. (#633 via #660)
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
},
install_requires=[
"conda >=4.6,<23.1.0",
"ruamel_yaml",
"ruamel.yaml",
"pillow >=3.1 ; platform_system=='Windows' or platform_system=='Darwin'",
# non-python dependency: "nsis >=3.01 ; platform_system=='Windows'",
],
Expand Down