From 4f1ad1c392bd557405e9901c5b8750d12a4f1260 Mon Sep 17 00:00:00 2001 From: Anthon van der Neut Date: Thu, 15 Oct 2020 15:37:04 +0200 Subject: explain round-tripping --- _doc/basicuse.ryd | 10 ++-------- _doc/overview.ryd | 5 +++-- 2 files changed, 5 insertions(+), 10 deletions(-) (limited to '_doc') diff --git a/_doc/basicuse.ryd b/_doc/basicuse.ryd index 0b0acf5..ca5139b 100644 --- a/_doc/basicuse.ryd +++ b/_doc/basicuse.ryd @@ -15,12 +15,6 @@ data = dict(a=1) Basic Usage *********** -*This is the new (0.15+) interface for ``ruamel.yaml``, it is still in -the process of being fleshed out*. Please pin your dependency to -``ruamel.yaml<0.15`` for production software. - ------- - You load a YAML document using:: --- !python | from ruamel.yaml import YAML @@ -33,8 +27,8 @@ in this ``doc`` can be a file pointer (i.e. an object that has the ``.read()`` method, a string or a ``pathlib.Path()``. ``typ='safe'`` accomplishes the same as what ``safe_load()`` did before: loading of a document without resolving unknown tags. Provide ``pure=True`` to -enforce using the pure Python implementation (faster C libraries will be used -when possible/available) +enforce using the pure Python implementation, otherwise the faster C libraries will be used +when possible/available but these behave slightly different (and sometimes more like a YAML 1.1 loader). Dumping works in the same way:: --- !code | diff --git a/_doc/overview.ryd b/_doc/overview.ryd index 86b7f10..38b9b52 100644 --- a/_doc/overview.ryd +++ b/_doc/overview.ryd @@ -10,8 +10,9 @@ Overview derivative of Kirill Simonov's `PyYAML 3.11 `_. -``ruamel.yaml`` supports `YAML 1.2`_ and has round-trip loaders and dumpers -that preserves, among others: +``ruamel.yaml`` supports `YAML 1.2`_ and has round-trip loaders and dumpers. +A round-trip is a YAML load-modify-save sequence and ruamel.yaml tries to +preserve, among others: - comments - block style and key ordering are kept, so you can diff the round-tripped -- cgit v1.2.1