aboutsummaryrefslogtreecommitdiffhomepage
path: root/libs/_yaml
diff options
context:
space:
mode:
authorJeff Byrnes <[email protected]>2023-11-28 16:12:04 -0500
committerGitHub <[email protected]>2023-11-28 16:12:04 -0500
commit55c5384f9cd3b168167343a8177a07732cf1af94 (patch)
treed8e44cd8ffe8564929cdd9925b95ed8e0aac9692 /libs/_yaml
parentcb2023d94e0603aa28c258c4f201300285a74b68 (diff)
downloadbazarr-55c5384f9cd3b168167343a8177a07732cf1af94.tar.gz
bazarr-55c5384f9cd3b168167343a8177a07732cf1af94.zip
Updated to apprise v1.6.0
Changelog: https://github.com/caronc/apprise/releases Highlights: * v1.6.0 * Notifiarr * v1.5.0 * Pushy * PushDeer * PushMe * RSyslog * v1.4.5 * WhatsApp * Burst SMS
Diffstat (limited to 'libs/_yaml')
-rw-r--r--libs/_yaml/__init__.py33
1 files changed, 33 insertions, 0 deletions
diff --git a/libs/_yaml/__init__.py b/libs/_yaml/__init__.py
new file mode 100644
index 000000000..7baa8c4b6
--- /dev/null
+++ b/libs/_yaml/__init__.py
@@ -0,0 +1,33 @@
+# This is a stub package designed to roughly emulate the _yaml
+# extension module, which previously existed as a standalone module
+# and has been moved into the `yaml` package namespace.
+# It does not perfectly mimic its old counterpart, but should get
+# close enough for anyone who's relying on it even when they shouldn't.
+import yaml
+
+# in some circumstances, the yaml module we imoprted may be from a different version, so we need
+# to tread carefully when poking at it here (it may not have the attributes we expect)
+if not getattr(yaml, '__with_libyaml__', False):
+ from sys import version_info
+
+ exc = ModuleNotFoundError if version_info >= (3, 6) else ImportError
+ raise exc("No module named '_yaml'")
+else:
+ from yaml._yaml import *
+ import warnings
+ warnings.warn(
+ 'The _yaml extension module is now located at yaml._yaml'
+ ' and its location is subject to change. To use the'
+ ' LibYAML-based parser and emitter, import from `yaml`:'
+ ' `from yaml import CLoader as Loader, CDumper as Dumper`.',
+ DeprecationWarning
+ )
+ del warnings
+ # Don't `del yaml` here because yaml is actually an existing
+ # namespace member of _yaml.
+
+__name__ = '_yaml'
+# If the module is top-level (i.e. not a part of any specific package)
+# then the attribute should be set to ''.
+# https://docs.python.org/3.8/library/types.html
+__package__ = ''