Document PyYAML.Yandex-3.11.1 package rationale and audience

Issue #40 new
Jeff Kowalczyk
created an issue

PyPI currently hosts PyYAML.Yandex-3.11.1, newer than PyYAML-3.1. It would be helpful to document:

  • What issue(s) does PyYAML.Yandex-3.11.1 fix?

  • How to track the commit history etc. for PyYAML.Yandex-3.11.1?

  • Is PyYAML.Yandex-3.11.1 the new canonical package/repository, and will it receive future updates?

The following is the diff between PyYAML-3.11 (a) and PyYAML.Yandex-3.11.1 (b)

diff --git a/PKG-INFO b/PKG-INFO
index e74f9f7..1e29280 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,12 +1,12 @@
 Metadata-Version: 1.1
-Name: PyYAML
-Version: 3.11
+Name: PyYAML.Yandex
+Version: 3.11.1
 Summary: YAML parser and emitter for Python
 Home-page: http://pyyaml.org/wiki/PyYAML
 Author: Kirill Simonov
 Author-email: xi@resolvent.net
 License: MIT
-Download-URL: http://pyyaml.org/download/pyyaml/PyYAML-3.11.tar.gz
+Download-URL: http://pyyaml.org/download/pyyaml/PyYAML.Yandex-3.11.1.tar.gz
 Description: YAML is a data serialization format designed for human readability
         and interaction with scripting languages.  PyYAML is a YAML parser
         and emitter for Python.
diff --git a/ext/_yaml.c b/ext/_yaml.c
deleted file mode 100644
index f4a5bc5..0000000
(snip contents)
--- a/ext/_yaml.c
+++ /dev/null
diff --git a/lib/yaml/constructor.py b/lib/yaml/constructor.py
index 635faac..7241863 100644
--- a/lib/yaml/constructor.py
+++ b/lib/yaml/constructor.py
@@ -59,8 +59,11 @@ class BaseConstructor(object):
             old_deep = self.deep_construct
             self.deep_construct = True
         if node in self.recursive_objects:
-            raise ConstructorError(None, None,
+            obj = self.recursive_objects[node]
+            if obj is None :
+                raise ConstructorError(None, None,
                     "found unconstructable recursive node", node.start_mark)
+            return obj
         self.recursive_objects[node] = None
         constructor = None
         tag_suffix = None
@@ -92,6 +95,7 @@ class BaseConstructor(object):
             generator = data
             data = generator.next()
             if self.deep_construct:
+                self.recursive_objects[node] = data
                 for dummy in generator:
                     pass
             else:
diff --git a/lib3/yaml/constructor.py b/lib3/yaml/constructor.py
index 981543a..e20bbf9 100644
--- a/lib3/yaml/constructor.py
+++ b/lib3/yaml/constructor.py
@@ -57,8 +57,11 @@ class BaseConstructor:
             old_deep = self.deep_construct
             self.deep_construct = True
         if node in self.recursive_objects:
-            raise ConstructorError(None, None,
+            obj = self.recursive_objects[node]
+            if obj is None :
+                raise ConstructorError(None, None,
                     "found unconstructable recursive node", node.start_mark)
+            return obj
         self.recursive_objects[node] = None
         constructor = None
         tag_suffix = None
@@ -90,6 +93,7 @@ class BaseConstructor:
             generator = data
             data = next(generator)
             if self.deep_construct:
+                self.recursive_objects[node] = data
                 for dummy in generator:
                     pass
             else:
diff --git a/setup.py b/setup.py
index 727c3e0..79e422b 100644
--- a/setup.py
+++ b/setup.py
@@ -1,6 +1,6 @@

-NAME = 'PyYAML'
-VERSION = '3.11'
+NAME = 'PyYAML.Yandex'
+VERSION = '3.11.1'
 DESCRIPTION = "YAML parser and emitter for Python"
 LONG_DESCRIPTION = """\
 YAML is a data serialization format designed for human readability
@@ -167,8 +167,7 @@ class build_ext(_build_ext):
             return
         try:
             _build_ext.run(self)
-        except DistutilsPlatformError:
-            exc = sys.exc_info()[1]
+        except Exception as exc:
             if optional:
                 log.warn(str(exc))
                 log.warn("skipping build_ext")