summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthon van der Neut <anthon@mnt.org>2018-12-06 18:37:27 +0100
committerAnthon van der Neut <anthon@mnt.org>2018-12-06 18:37:27 +0100
commit4bb9b8178f2c25341ce797b6ff90b6f8078f26e6 (patch)
tree0303c7f7cb526b19c1b7ba5149277a1b49d46d7b
parent702a0ce64bb990e5c442f8d3dcaf05c72a3ff255 (diff)
downloadruamel.yaml-4bb9b8178f2c25341ce797b6ff90b6f8078f26e6.tar.gz
fix issue #244 dumping methods of metaclass derived classes0.15.81
*When this change indeed resolves your problem, please **Close** this issue*. *(You can do so using the WorkFlow pull-down (close to the top right of this page))*
-rw-r--r--CHANGES4
-rw-r--r--README.rst8
-rw-r--r--__init__.py4
-rw-r--r--_doc/_static/pypi.svg2
-rw-r--r--_test/test_z_data.py3
-rw-r--r--representer.py1
6 files changed, 16 insertions, 6 deletions
diff --git a/CHANGES b/CHANGES
index 9d17020..b10d621 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,7 @@
+[0, 15, 81]: 2018-12-06
+ - fix issue saving methods of metaclass derived classes (reported and fix provided
+ by `Douglas Raillard <https://bitbucket.org/DouglasRaillard/>`__)
+
[0, 15, 80]: 2018-11-26
- fix issue emitting BEL character when round-tripping invalid folded input
(reported by Isaac on `StackOverflow <https://stackoverflow.com/a/53471217/1307905>`__)
diff --git a/README.rst b/README.rst
index 61f7b52..d59281f 100644
--- a/README.rst
+++ b/README.rst
@@ -4,8 +4,8 @@ ruamel.yaml
``ruamel.yaml`` is a YAML 1.2 loader/dumper package for Python.
-:version: 0.15.80
-:updated: 2018-11-26
+:version: 0.15.81
+:updated: 2018-12-06
:documentation: http://yaml.readthedocs.io
:repository: https://bitbucket.org/ruamel/
:pypi: https://pypi.org/project/ruamel.yaml/
@@ -54,6 +54,10 @@ ChangeLog
.. should insert NEXT: at the beginning of line for next key (with empty line)
+0.15.81 (2018-12-06):
+ - fix issue dumping methods of metaclass derived classes (reported and fix provided
+ by `Douglas Raillard <https://bitbucket.org/DouglasRaillard/>`__)
+
0.15.80 (2018-11-26):
- fix issue emitting BEL character when round-tripping invalid folded input
(reported by Isaac on `StackOverflow <https://stackoverflow.com/a/53471217/1307905>`__)
diff --git a/__init__.py b/__init__.py
index 8033a8b..4300f70 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, 80),
- __version__='0.15.80',
+ version_info=(0, 15, 81),
+ __version__='0.15.81',
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
diff --git a/_doc/_static/pypi.svg b/_doc/_static/pypi.svg
index 7c76e41..62a44e9 100644
--- a/_doc/_static/pypi.svg
+++ b/_doc/_static/pypi.svg
@@ -1 +1 @@
-<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="86" height="20"><linearGradient id="b" x2="0" y2="100%"><stop offset="0" stop-color="#bbb" stop-opacity=".1"/><stop offset="1" stop-opacity=".1"/></linearGradient><clipPath id="a"><rect width="86" height="20" rx="3" fill="#fff"/></clipPath><g clip-path="url(#a)"><path fill="#555" d="M0 0h33v20H0z"/><path fill="#007ec6" d="M33 0h53v20H33z"/><path fill="url(#b)" d="M0 0h86v20H0z"/></g><g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="110"> <text x="175" y="150" fill="#010101" fill-opacity=".3" transform="scale(.1)" textLength="230">pypi</text><text x="175" y="140" transform="scale(.1)" textLength="230">pypi</text><text x="585" y="150" fill="#010101" fill-opacity=".3" transform="scale(.1)" textLength="430">0.15.80</text><text x="585" y="140" transform="scale(.1)" textLength="430">0.15.80</text></g> </svg>
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="86" height="20"><linearGradient id="b" x2="0" y2="100%"><stop offset="0" stop-color="#bbb" stop-opacity=".1"/><stop offset="1" stop-opacity=".1"/></linearGradient><clipPath id="a"><rect width="86" height="20" rx="3" fill="#fff"/></clipPath><g clip-path="url(#a)"><path fill="#555" d="M0 0h33v20H0z"/><path fill="#007ec6" d="M33 0h53v20H33z"/><path fill="url(#b)" d="M0 0h86v20H0z"/></g><g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="110"> <text x="175" y="150" fill="#010101" fill-opacity=".3" transform="scale(.1)" textLength="230">pypi</text><text x="175" y="140" transform="scale(.1)" textLength="230">pypi</text><text x="585" y="150" fill="#010101" fill-opacity=".3" transform="scale(.1)" textLength="430">0.15.81</text><text x="585" y="140" transform="scale(.1)" textLength="430">0.15.81</text></g> </svg>
diff --git a/_test/test_z_data.py b/_test/test_z_data.py
index b0464ba..ca75ca6 100644
--- a/_test/test_z_data.py
+++ b/_test/test_z_data.py
@@ -192,7 +192,8 @@ class TestYAMLData(object):
assert data is not None
typ = 'rt'
print('type:', typ)
- print('data:', data.value, end='')
+ if data is not None:
+ print('data:', data.value, end='')
print('output:', output.value if output is not None else output)
if typ == 'rt':
self.round_trip(data, output, yaml_version=yaml_version)
diff --git a/representer.py b/representer.py
index 7ce810e..d1fd739 100644
--- a/representer.py
+++ b/representer.py
@@ -639,6 +639,7 @@ if PY2:
Representer.add_multi_representer(object, Representer.represent_object)
+Representer.add_multi_representer(type, Representer.represent_name)
from ruamel.yaml.comments import (
CommentedMap,