From 0524e017799a7423f2de9503e29a71e1079fd5fe Mon Sep 17 00:00:00 2001 From: Phil Sphicas Date: Tue, 8 Sep 2020 23:57:49 +0000 Subject: [PATCH] Accelerate YAML operations with LibYAML Patch PyYAML (via the pylibyaml library) to automatically enable the LibYAML parser and emitter, which are faster than the Python versions. https://pypi.org/project/pylibyaml/ Change-Id: Ic48d2234ca3107404d9f883ca6038a12ca06a408 --- Pipfile | 1 + Pipfile.lock | 7 +++++++ pegleg/__init__.py | 1 + requirements.txt | 1 + tests/__init__.py | 1 + 5 files changed, 11 insertions(+) diff --git a/Pipfile b/Pipfile index 479a5835..547861eb 100644 --- a/Pipfile +++ b/Pipfile @@ -24,6 +24,7 @@ cryptography = "~=2.3.1" python-dateutil = "~=2.7.3" GitPython = "~=2.1.11" docker = ">=3.7.2" +pylibyaml = "~=0.1" PyYAML = "~=5.1" deckhand = {git = "https://opendev.org/airship/deckhand.git",ref = "e7ba6828a0a1ca27fae596f6e0ee5a857f28001d"} shipyard-client = {git = "https://opendev.org/airship/shipyard.git",ref = "70410cc478e6aec4abad88c84d68684edfedb376",subdirectory = "src/bin/shipyard_client"} diff --git a/Pipfile.lock b/Pipfile.lock index 072c2b62..bde42946 100644 --- a/Pipfile.lock +++ b/Pipfile.lock @@ -793,6 +793,13 @@ "markers": "sys_platform != 'win32' and sys_platform != 'darwin' and sys_platform != 'sunos5'", "version": "==0.9.6" }, + "pylibyaml": { + "hashes": [ + "sha256:3b58dea061903c04689e35fab63ec149f7cf5e82f0808bd3425fb3ab3950623e" + ], + "index": "pypi", + "version": "==0.1.0" + }, "pyparsing": { "hashes": [ "sha256:c203ec8783bf771a155b207279b9bccb8dea02d8f0c9e5f8ead507bc3246ecc1", diff --git a/pegleg/__init__.py b/pegleg/__init__.py index e69de29b..7faf876b 100644 --- a/pegleg/__init__.py +++ b/pegleg/__init__.py @@ -0,0 +1 @@ +import pylibyaml # noqa: F401 # patch pyyaml to use libyaml bindings diff --git a/requirements.txt b/requirements.txt index b4e0ecaa..5c61a5ac 100644 --- a/requirements.txt +++ b/requirements.txt @@ -83,6 +83,7 @@ pycodestyle==2.0.0 pycparser==2.20; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3' pyflakes==1.2.3 pyinotify==0.9.6; sys_platform != 'win32' and sys_platform != 'darwin' and sys_platform != 'sunos5' +pylibyaml==0.1.0 pyparsing==2.4.7; python_version >= '2.6' and python_version not in '3.0, 3.1, 3.2, 3.3' pyperclip==1.8.0 python-barbicanclient==4.7.0 diff --git a/tests/__init__.py b/tests/__init__.py index e69de29b..7faf876b 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -0,0 +1 @@ +import pylibyaml # noqa: F401 # patch pyyaml to use libyaml bindings