omextra 0.0.0.dev472__py3-none-any.whl → 0.0.0.dev492__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,16 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2019 Masaaki Goshima
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
6
+ documentation files (the "Software"), to deal in the Software without restriction, including without limitation the
7
+ rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit
8
+ persons to whom the Software is furnished to do so, subject to the following conditions:
9
+
10
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the
11
+ Software.
12
+
13
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
14
+ WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
15
+ COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
16
+ OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,29 @@
1
+ """
2
+ A *manual*, near-direct, 'lite'-compatible translation of go-yaml (see LICENSE file):
3
+
4
+ https://github.com/goccy/go-yaml/tree/25e5d9094248e480434ca87d9119e3d9ce7ac1d7
5
+
6
+ The primary reasons for.. doing this.. are as follows:
7
+
8
+ - Most importantly for '@omlish-lite' usage - yaml parsing is, whether we like it or not, here to stay for things like
9
+ docker-compose - and reading these files in amalgamated scripts like omdev.ci and omdev.pyproject is a hard
10
+ requirement for them.
11
+
12
+ Currently they require a system dependency on pyyaml, which violates amalg/lite isolation, and nearly defeats the
13
+ whole point of it. An alternative is relying on some system utility (as they already rely om some very basic shell
14
+ utilities), but there is no remotely standard or common yaml-to-json utility.
15
+
16
+ An obvious alternative would be shamefully implement the '10% of yaml that covers 95% of usecases' with a garbage
17
+ pile of regexes, but this codebase itself already uses anchors in its compose.yml, at which point (given the
18
+ potential failure modes of automated infra machinery) that's extremely not acceptable.
19
+
20
+ - Additionally, as giant yaml files are so pervasive these days, it's useful to be able to programmatically parse and
21
+ manipulate them with full, perfect preservation of all stylistic choices, whitespace, comments, etc. This is already
22
+ partially done here by wrapping pyyaml nodes, but it's not complete and very fragile.
23
+
24
+ It should remain symmetry with the go-yaml codebase to allow for backporting of updates. Specifically:
25
+ - The layout of the code in the source files, down to the order of their contents, is nearly identical
26
+ - Its code is 'go-flavored' - for example it returns 'YamlErrorOr' rather than raises exceptions
27
+
28
+ It's not yet ready for production use - see the TODO file.
29
+ """