You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Technically this isn't any more specific than a scalar, so it round-trips just fine per the spec. However, I know there's difference between YAML 1.1 and 1.2. Anyway, most parsers, in particular that used by Kubernetes, interprets Y as a boolean, which caused problems for me. The output should have quotes around the Y to keep it a string.
Tested with pyyaml 6.0.1.
The text was updated successfully, but these errors were encountered:
Also note that pyyaml.org/wiki/PyYAMLDocumentation links to the YAML 1.1 spec for the syntax, but is otherwise not explicit about the spec version. The only version that the above behavior conforms to is YAML 1.2.2+, in which true and false are the only boolean values.
$ python -c 'import yaml; print(yaml.safe_dump(yaml.safe_load(""" foo: "Y" """)))' foo: Y
Technically this isn't any more specific than a scalar, so it round-trips just fine per the spec. However,I know there's difference between YAML 1.1 and 1.2. Anyway, most parsers, in particular that used by Kubernetes, interprets Y as a boolean, which caused problems for me. The output should have quotes around the Y to keep it a string.Tested with pyyaml 6.0.1.
The text was updated successfully, but these errors were encountered: