summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthon van der Neut <anthon@mnt.org>2017-07-04 23:17:27 +0200
committerAnthon van der Neut <anthon@mnt.org>2017-07-04 23:17:27 +0200
commit14183966ee4d729c7aa26274ced720d36e9f8fa4 (patch)
tree1eba15c4fc7fa3c6618ac7c4f9a822de2a95b1e6
parent2f32798da642a6db67437b73486d2bca8c45bbd2 (diff)
downloadruamel.yaml-14183966ee4d729c7aa26274ced720d36e9f8fa4.tar.gz
added pure to YAML0.15.18
-rw-r--r--CHANGES7
-rw-r--r--README.rst7
-rw-r--r--__init__.py5
-rw-r--r--_doc/api.rst4
-rw-r--r--main.py2
5 files changed, 20 insertions, 5 deletions
diff --git a/CHANGES b/CHANGES
index a0f3f3d..6c0dd0c 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,10 @@
+[0, 15, 18]: 2017-07-04
+ - missing ``pure`` attribute on ``YAML`` useful for implementing `!include` tag
+ constructor for `including YAML files in a YAML file
+ <https://stackoverflow.com/a/44913652/1307905>`_
+ - some documentation improvements
+ - trigger of doc build on new revision
+
[0, 15, 17]: 2017-07-03
- support for Unicode supplementary Plane **output** with allow_unicode
(input was already supported, triggered by
diff --git a/README.rst b/README.rst
index 174f8f0..fcccc2d 100644
--- a/README.rst
+++ b/README.rst
@@ -32,6 +32,13 @@ ChangeLog
.. should insert NEXT: at the beginning of line for next key
+0.15.18 (2017-07-04):
+ - missing ``pure`` attribute on ``YAML`` useful for implementing `!include` tag
+ constructor for `including YAML files in a YAML file
+ <https://stackoverflow.com/a/44913652/1307905>`_
+ - some documentation improvements
+ - trigger of doc build on new revision
+
0.15.17 (2017-07-03):
- support for Unicode supplementary Plane **output**
(input was already supported, triggered by
diff --git a/__init__.py b/__init__.py
index 916f7c3..a40d008 100644
--- a/__init__.py
+++ b/__init__.py
@@ -7,8 +7,8 @@ if False: # MYPY
_package_data = dict(
full_package_name='ruamel.yaml',
- version_info=(0, 15, 18, 'dev'),
- __version__='0.15.18.dev',
+ version_info=(0, 15, 18),
+ __version__='0.15.18',
author='Anthon van der Neut',
author_email='a.van.der.neut@ruamel.eu',
description='ruamel.yaml is a YAML parser/emitter that supports roundtrip preservation of comments, seq/map flow style, and map key order', # NOQA
@@ -51,6 +51,7 @@ _package_data = dict(
deps='ruamel.std.pathlib',
fl8excl='_test/lib',
),
+ rtfd=47359,
) # type: Dict[Any, Any]
diff --git a/_doc/api.rst b/_doc/api.rst
index 9c97dd9..f6ff28c 100644
--- a/_doc/api.rst
+++ b/_doc/api.rst
@@ -100,7 +100,7 @@ Dumping
Controls
++++++++
-On your `YAML()` instance you can set attributes e.g with::
+On your ``YAML()`` instance you can set attributes e.g with::
yaml = YAML(typ='safe', pure=True)
yaml.allow_unicode = False
@@ -108,7 +108,7 @@ On your `YAML()` instance you can set attributes e.g with::
available attributes include:
``unicode_supplementary``
- Defaults to ``True`` if Unicode chars larger than 2 bytes. Set to ``False`` to
+ Defaults to ``True`` if Python's Unicode size is larger than 2 bytes. Set to ``False`` to
enforce output of the form ``\U0001f601`` (ignored if ``allow_unicode`` is ``False``)
Transparent usage of new and old API
diff --git a/main.py b/main.py
index 1c5ec70..b0f847b 100644
--- a/main.py
+++ b/main.py
@@ -60,6 +60,7 @@ class YAML(object):
"one was given ({!r})".format(self.__class__.__name__, _kw))
self.typ = 'rt' if typ is None else typ
+ self.pure = pure
self.plug_ins = [] # type: List[Any]
for pu in ([] if plug_ins is None else plug_ins) + self.official_plug_ins():
file_name = pu.replace('/', '.')
@@ -340,7 +341,6 @@ class YAML(object):
# type: (Any, StreamType, Any, Any) -> Any
"""
Serialize a sequence of Python objects into a YAML stream.
- If stream is None, return the produced string instead.
"""
if not hasattr(stream, 'write') and hasattr(stream, 'open'):
# pathlib.Path() instance