aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/python/PyYAML
diff options
context:
space:
mode:
authormaxim-yurchuk <maxim-yurchuk@yandex-team.com>2024-10-09 12:29:46 +0300
committermaxim-yurchuk <maxim-yurchuk@yandex-team.com>2024-10-09 13:14:22 +0300
commit9731d8a4bb7ee2cc8554eaf133bb85498a4c7d80 (patch)
treea8fb3181d5947c0d78cf402aa56e686130179049 /contrib/python/PyYAML
parenta44b779cd359f06c3ebbef4ec98c6b38609d9d85 (diff)
downloadydb-9731d8a4bb7ee2cc8554eaf133bb85498a4c7d80.tar.gz
publishFullContrib: true for ydb
<HIDDEN_URL> commit_hash:c82a80ac4594723cebf2c7387dec9c60217f603e
Diffstat (limited to 'contrib/python/PyYAML')
-rw-r--r--contrib/python/PyYAML/py2/.yandex_meta/yamaker.yaml4
-rw-r--r--contrib/python/PyYAML/py2/patches/01-arcadia.patch23
-rw-r--r--contrib/python/PyYAML/py2/yaml/__init__.pxd0
-rw-r--r--contrib/python/PyYAML/py3/.yandex_meta/yamaker.yaml4
-rw-r--r--contrib/python/PyYAML/py3/patches/01-fix-for-yson.patch5
-rw-r--r--contrib/python/PyYAML/py3/yaml/__init__.pxd0
6 files changed, 36 insertions, 0 deletions
diff --git a/contrib/python/PyYAML/py2/.yandex_meta/yamaker.yaml b/contrib/python/PyYAML/py2/.yandex_meta/yamaker.yaml
new file mode 100644
index 0000000000..0fa01f7e79
--- /dev/null
+++ b/contrib/python/PyYAML/py2/.yandex_meta/yamaker.yaml
@@ -0,0 +1,4 @@
+requirements:
+ - contrib/libs/yaml
+mark_as_cython_c:
+ - yaml/_yaml.pyx
diff --git a/contrib/python/PyYAML/py2/patches/01-arcadia.patch b/contrib/python/PyYAML/py2/patches/01-arcadia.patch
new file mode 100644
index 0000000000..b32080a215
--- /dev/null
+++ b/contrib/python/PyYAML/py2/patches/01-arcadia.patch
@@ -0,0 +1,23 @@
+--- contrib/python/PyYAML/py2/yaml/scanner.py (index)
++++ contrib/python/PyYAML/py2/yaml/scanner.py (working tree)
+@@ -26,6 +26,8 @@
+
+ __all__ = ['Scanner', 'ScannerError']
+
++import sys
++
+ from error import MarkedYAMLError
+ from tokens import *
+
+@@ -1220,7 +1222,10 @@ class Scanner(object):
+ "expected escape sequence of %d hexdecimal numbers, but found %r" %
+ (length, self.peek(k).encode('utf-8')), self.get_mark())
+ code = int(self.prefix(length), 16)
+- chunks.append(unichr(code))
++ if code <= sys.maxunicode:
++ chunks.append(unichr(code))
++ else:
++ chunks.append(('\\U%08x' % code).decode('unicode-escape'))
+ self.forward(length)
+ elif ch in u'\r\n\x85\u2028\u2029':
+ self.scan_line_break()
diff --git a/contrib/python/PyYAML/py2/yaml/__init__.pxd b/contrib/python/PyYAML/py2/yaml/__init__.pxd
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/contrib/python/PyYAML/py2/yaml/__init__.pxd
diff --git a/contrib/python/PyYAML/py3/.yandex_meta/yamaker.yaml b/contrib/python/PyYAML/py3/.yandex_meta/yamaker.yaml
new file mode 100644
index 0000000000..0fa01f7e79
--- /dev/null
+++ b/contrib/python/PyYAML/py3/.yandex_meta/yamaker.yaml
@@ -0,0 +1,4 @@
+requirements:
+ - contrib/libs/yaml
+mark_as_cython_c:
+ - yaml/_yaml.pyx
diff --git a/contrib/python/PyYAML/py3/patches/01-fix-for-yson.patch b/contrib/python/PyYAML/py3/patches/01-fix-for-yson.patch
new file mode 100644
index 0000000000..424fbf8a6a
--- /dev/null
+++ b/contrib/python/PyYAML/py3/patches/01-fix-for-yson.patch
@@ -0,0 +1,5 @@
+--- contrib/python/PyYAML/py3/yaml/representer.py (index)
++++ contrib/python/PyYAML/py3/yaml/representer.py (working tree)
+@@ -148 +148 @@ class SafeRepresenter(BaseRepresenter):
+- return self.represent_scalar('tag:yaml.org,2002:str', data)
++ return self.represent_scalar('tag:yaml.org,2002:str', str(data))
diff --git a/contrib/python/PyYAML/py3/yaml/__init__.pxd b/contrib/python/PyYAML/py3/yaml/__init__.pxd
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/contrib/python/PyYAML/py3/yaml/__init__.pxd