Open
Description
... or how to get rid of the no(rway) problem
Issue to track necessary changes for supporting the YAML 1.2 Core schema.
Suggested steps
- Add a test for YAML 1.1 types that can be easily extended for 1.2 testing Add a test for YAML 1.1 types #483
- Move around methods from SafeLoader to BaseLoader, and add methods to load a whole group of tags, so that users can choose tags in a more modular way
- Add methods for loading 1.2 Core tags. Since 1.1 and 1.2 share some tags, the previous step will be helpful to save some code
(The same has to be done for the Dumper/Representer of course)
Support for the YAML 1.2 Core and JSON schemas [Take 2] #555
Users will then be able to explicitly choose between the classic, default 1.1 SafeLoader and the Core Loader.
Ideally things like merge keys and other tags (that are now on by default and can't be turned off) can be chosen optionally.
Related issues
The following issues/PRs are more or less related to 1.2, and some can simply be fixed when the users have the possibility to choose 1.2 Core instead of 1.1.
- The branch 1.2 is dead #19
- provide option (preferably this would be the default) to ignore yes/no/Yes/No/on/off/etc. as booleans #53
- Plain equal sign (=) as node content results in an error #89
- quoting strings composed of digits #98
- YAML 1.2 support #116
- ValueError on "._" input #168
- Numbers in scientific notation without dot are parsed as string #173
- Fix resolving scientific notation #174
- y|Y|n|N not Recognised as Booleans #247
- Adds y and n to YAML Boolean Values #248
- Include options in loader #414
- The loader transforms 'on' key to True #470
- Bug in pyyaml found by fuzzing #473
- Strings with a number ending in eight or nine are dumped as integers #524
- Inconsistent quoting for strings representing zero-padded numbers ending with 8 or 9. #577
- Octal numbers processed as strings #608
- PyYAML interprets yes, no, on, off as Boolean #613
- Numbers separated by colon parse unpredictably #661
- Support and option to allow underscores in integers #667
- Compatibility with Github actions #679
- Handle top level yaml property
on
#696 - yaml.safeload() is not reading values correctly. #697
- '0008' and '0009' strings are not single-quoted when dumping. #740
- Preserve single quote in output #741
- Yaml with a key called "on" parsed as True #744
- bug? some string constants are getting printed as ints #773
- yaml dump outputs not-to-spec keys #774
- Inconsistent/Wrong Type casting when using yaml.dump/safe_dump #794
- "on: true" gets parsed as "True: True" when using safe_load #807
- Seemingly random quoting of keys #826
- Keys being renamed by safe_load #840
- Incorrect tag attribution #855