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 4 years ago: enavarro_suse liked this project.
  • over 4 years ago: cdywan liked this project.
  • over 4 years ago: okurz liked this project.
  • over 4 years ago: tinita added keyword "python" to this project.
  • over 4 years ago: tinita added keyword "yaml" to this project.
  • over 4 years ago: tinita started this project.
  • over 4 years ago: tinita originated this project.

  • Comments

    Be the first to comment!

    Similar Projects

    Bring to Cockpit + System Roles capabilities from YAST by miguelpc

    Bring to Cockpit + System Roles features from YAST

    Cockpit and System Roles have been added to SLES 16 There are several capabilities in YAST that are not yet present in Cockpit and System Roles We will follow the principle of "automate first, UI later" being System Roles the automation component and Cockpit the UI one.

    Goals

    The idea is to implement service configuration in System Roles and then add an UI to manage these in Cockpit. For some capabilities it will be required to have an specific Cockpit Module as they will interact with a reasource already configured.

    Resources

    A plan on capabilities missing and suggested implementation is available here: https://docs.google.com/spreadsheets/d/1ZhX-Ip9MKJNeKSYV3bSZG4Qc5giuY7XSV0U61Ecu9lo/edit

    Linux System Roles: https://linux-system-roles.github.io/