summaryrefslogtreecommitdiffstats
path: root/contrib/python
diff options
context:
space:
mode:
authorrobot-piglet <[email protected]>2026-06-20 00:01:03 +0300
committerrobot-piglet <[email protected]>2026-06-20 00:55:00 +0300
commit2de0b6bb84cbe9a784cc3f08df94b5f2e018a29e (patch)
tree1b738025d1631c8efd00c3737dad418d680a5bc6 /contrib/python
parent2e3fb3708eb600304b22a3ca6f0601676ab5354a (diff)
Intermediate changes
commit_hash:0e608e74da3df89e48c3278b986ef72b314572dd
Diffstat (limited to 'contrib/python')
-rw-r--r--contrib/python/multidict/multidict/_multilib/hashtable.h4
-rwxr-xr-xcontrib/python/multidict/patches/02-disable-ndebug.sh20
2 files changed, 22 insertions, 2 deletions
diff --git a/contrib/python/multidict/multidict/_multilib/hashtable.h b/contrib/python/multidict/multidict/_multilib/hashtable.h
index ece41c43fa8..1a7e46e3557 100644
--- a/contrib/python/multidict/multidict/_multilib/hashtable.h
+++ b/contrib/python/multidict/multidict/_multilib/hashtable.h
@@ -86,7 +86,7 @@ GROWTH_RATE(MultiDictObject *md)
return md->used * 3;
}
-#ifndef NDEBUG
+#if 0
static inline int
_md_check_consistency(MultiDictObject *md, bool update);
static inline int
@@ -1901,7 +1901,7 @@ md_clear(MultiDictObject *md)
return 0;
}
-#ifndef NDEBUG
+#if 0
static inline int
_md_check_consistency(MultiDictObject *md, bool update)
diff --git a/contrib/python/multidict/patches/02-disable-ndebug.sh b/contrib/python/multidict/patches/02-disable-ndebug.sh
new file mode 100755
index 00000000000..6b0c0d203d9
--- /dev/null
+++ b/contrib/python/multidict/patches/02-disable-ndebug.sh
@@ -0,0 +1,20 @@
+#!/bin/sh
+# Disable the _md_check_consistency debug helpers in hashtable.h.
+#
+# Upstream gates these blocks behind `#ifndef NDEBUG`. Under the Arcadia build
+# NDEBUG is not always defined, so the asserts compile in and break the build.
+# Replacing the guard with `#if 0` keeps the blocks permanently disabled.
+#
+# Both `#ifndef NDEBUG` occurrences in this header guard the same helper, so an
+# unconditional replacement is safe.
+# See NOCDEV-18704, DEVTOOLSSUPPORT-88661, NOCDEVDUTY-5981
+set -e
+
+# macOS ships BSD sed (incompatible `-i` syntax); use GNU sed (gsed) there.
+if [ "$(uname)" = "Darwin" ]; then
+ SED=gsed
+else
+ SED=sed
+fi
+
+"$SED" -i 's/^#ifndef NDEBUG$/#if 0/' multidict/_multilib/hashtable.h