Project Description

PyYAML is a YAML processor in python, and it was one of the first libraries written for YAML. It is used by tools like Ansible or Saltstack.

It was written when YAML 1.1 came out, but was never updated for the new Schema introduced by YAML 1.2.

Look here for an overview of Schemas/Types in YAML 1.1 and 1.2

As you can see there, in YAML 1.1 many strings are recognized as booleans. One promiment one is NO, the country code for Norway, which is read as a boolean False, when unquoted.

This was improved in YAML 1.2 by reducing the number of boolean strings, but so far not implemented by many libraries.

I have been working on a lot of YAML related stuff in the past years, and YAML 1.2 support for PyYAML is something which is requested regularly.

Goal for this Hackweek

I want to add support for the YAML 1.2 Core and JSON Schemas.

Luckily the corresponding test data is already there.

At the end of hackweek, it should be possible to create a PyYAML loader class that loads a YAML 1.2 document.

The branch I'm working on: yaml12

Help

If you are a PyYAML user and know a bit about custom loaders, you can help by discussing the API for the new methods.

You can reach me in our internal chat or in freenode#pyyaml

Resources

Progress

Some weeks ago I already added the test data for the existing YAML 1.1 types, so that adding the tests for the 1.2 Schemas wasn't much work.

I made already progress on Tuesday and Wednesday, so tests are already running successfully, but the challenge now is to create a good API, that is flexible and easy.

On Thursday and Friday I fixed minor issues and updated the related PRs:

Then I created a draft PR:

This will probably take a while until it gets merged (or rejected). Happy for feedback!

Looking for hackers with the skills:

python yaml

This project is part of:

Hack Week 20

Activity

  • over 1 year ago: enavarro_suse liked this project.
  • over 1 year ago: cdywan liked this project.
  • over 1 year ago: okurz liked this project.
  • over 1 year ago: tinita added keyword "python" to this project.
  • over 1 year ago: tinita added keyword "yaml" to this project.
  • over 1 year ago: tinita started this project.
  • over 1 year ago: tinita originated this project.

  • Comments

    Be the first to comment!

    Similar Projects

    Script that loads dummy data into HANA database for testing purposes. by rangelino

    [comment]: # (Please use the project descriptio...


    Rewrite libkdumpfile Python binding using CFFI by ptesarik

    Project Description

    The [libkdumpfile](ht...


    OMEMO Hexchat plugin by dknorr

    [comment]: # (Please use the project descriptio...


    Video For Linux 2 Camera monitor, frame capture, day/night exposure control and timelapse generator in python by dmair

    Use the V4L2 API in a PySide qt6.3 application ...


    web-based testing tracker for aquarist-labs's s3gw by jluis

    [comment]: # (Please use the project descriptio...


    Improve yamltidy by tinita

    Project Description

    [yamltidy](https://pe...