Closed brigadier closed 7 months ago
I'm using pyyaml 6.0.1 on python 3.12, still encountering the bug
This isn't really a bug- it's consistent and correct behavior for roundtripping values in YAML 1.1 (which is all PyYAML currently supports). The default emitter config won't quote string values unless not quoting them would cause a similarly-configured loader to treat them as a non-string. The default 1.1 type configuration recognizes strings matching 0[0-7]+
as octal ints, so strings matching that need to be quoted to prevent the loader seeing them as octals, but 0[89]
do not.
Result:
Is this supposed to be so? I'm on python 3.8, pyyaml v. 5.3.1