aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrobot-contrib <robot-contrib@yandex-team.com>2024-10-23 11:17:28 +0300
committerrobot-contrib <robot-contrib@yandex-team.com>2024-10-23 11:32:51 +0300
commitc6f758ce0e2950907f1cf3bb151ec9c68f5db6c5 (patch)
tree45c719c9fa8d650fccb79a50547a216c9af2f57a
parent4d0b1eac3d46d4d0c4514b1c2294b09b9b45f6db (diff)
downloadydb-c6f758ce0e2950907f1cf3bb151ec9c68f5db6c5.tar.gz
Update contrib/python/MarkupSafe/py3 to 3.0.1
commit_hash:03c49aa6f7a0e78d4425f817755608236df5f25e
-rw-r--r--contrib/python/MarkupSafe/py3/.dist-info/METADATA2
-rw-r--r--contrib/python/MarkupSafe/py3/markupsafe/__init__.py4
-rw-r--r--contrib/python/MarkupSafe/py3/markupsafe/_speedups.c6
-rw-r--r--contrib/python/MarkupSafe/py3/ya.make2
4 files changed, 8 insertions, 6 deletions
diff --git a/contrib/python/MarkupSafe/py3/.dist-info/METADATA b/contrib/python/MarkupSafe/py3/.dist-info/METADATA
index d92149c3c5..cbf0cfef4f 100644
--- a/contrib/python/MarkupSafe/py3/.dist-info/METADATA
+++ b/contrib/python/MarkupSafe/py3/.dist-info/METADATA
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: MarkupSafe
-Version: 3.0.0
+Version: 3.0.1
Summary: Safely add untrusted strings to HTML/XML markup.
Maintainer-email: Pallets <contact@palletsprojects.com>
License: Copyright 2010 Pallets
diff --git a/contrib/python/MarkupSafe/py3/markupsafe/__init__.py b/contrib/python/MarkupSafe/py3/markupsafe/__init__.py
index 0afddc0c39..fee8dc7acc 100644
--- a/contrib/python/MarkupSafe/py3/markupsafe/__init__.py
+++ b/contrib/python/MarkupSafe/py3/markupsafe/__init__.py
@@ -34,7 +34,9 @@ def escape(s: t.Any, /) -> Markup:
"""
# If the object is already a plain string, skip __html__ check and string
# conversion. This is the most common use case.
- if s.__class__ is str:
+ # Use type(s) instead of s.__class__ because a proxy object may be reporting
+ # the __class__ of the proxied value.
+ if type(s) is str:
return Markup(_escape_inner(s))
if hasattr(s, "__html__"):
diff --git a/contrib/python/MarkupSafe/py3/markupsafe/_speedups.c b/contrib/python/MarkupSafe/py3/markupsafe/_speedups.c
index 50f1ac1dd6..73c2955827 100644
--- a/contrib/python/MarkupSafe/py3/markupsafe/_speedups.c
+++ b/contrib/python/MarkupSafe/py3/markupsafe/_speedups.c
@@ -160,11 +160,11 @@ escape_unicode(PyObject *self, PyObject *s)
switch (PyUnicode_KIND(s)) {
case PyUnicode_1BYTE_KIND:
- return escape_unicode_kind1(s);
+ return escape_unicode_kind1((PyUnicodeObject*) s);
case PyUnicode_2BYTE_KIND:
- return escape_unicode_kind2(s);
+ return escape_unicode_kind2((PyUnicodeObject*) s);
case PyUnicode_4BYTE_KIND:
- return escape_unicode_kind4(s);
+ return escape_unicode_kind4((PyUnicodeObject*) s);
}
assert(0); /* shouldn't happen */
return NULL;
diff --git a/contrib/python/MarkupSafe/py3/ya.make b/contrib/python/MarkupSafe/py3/ya.make
index e8dcc16c61..7b942e706a 100644
--- a/contrib/python/MarkupSafe/py3/ya.make
+++ b/contrib/python/MarkupSafe/py3/ya.make
@@ -2,7 +2,7 @@
PY3_LIBRARY()
-VERSION(3.0.0)
+VERSION(3.0.1)
LICENSE(BSD-3-Clause)