<commit_before>diff --git a/Lib/_hack.py b/Lib/_hack.py
new file mode 100644
index 0000000..b8f294a
--- /dev/null
+++ b/Lib/_hack.py
@@ -0,0 +1,63 @@
+import sys
+import os
+import posix
+import stat
+import zipfile
+import errno
+
+
+if zipfile.is_zipfile(sys.executable):
+    exe_zip = zipfile.ZipFile(sys.executable, 'r')
+    exe_names = exe_zip.namelist()
+zip_cache = {}
+
+
+def cached(func):
+    cache = zip_cache.setdefault(func, {})
+    def wrapped(*args):
+        ent = cache.get(args)
+        if ent is None:
+            ent = func(*args)
+            cache[args] = ent
+        return ent
+    return wrapped
+
+
+@cached
+def _get_inzip_path(filename, exc):
+    if not zipfile.is_zipfile(sys.executable):
+        raise exc(errno.ENOENT, filename)
+    inzip_path = filename[len(sys.executable):].lstrip('/')
+    if inzip_path not in exe_names:
+        # try a directory
+        inzip_path = inzip_path + '/'
+        if inzip_path not in exe_names:
+            raise exc(errno.ENOENT, filename)
+    is_dir = inzip_path.endswith('/')
+    return inzip_path, is_dir
+
+
+def get_file(filename):
+    inzip_path, _ = _get_inzip_path(filename, IOError)
+    return exe_zip.open(inzip_path)
+
+
+@cached
+def stat_file(filename):
+    inzip_path, is_dir = _get_inzip_path(filename, OSError)
+    info = exe_zip.getinfo(inzip_path)
+    stat_result = list(os.stat(sys.executable))
+    stat_result[6] = info.file_size
+    if is_dir:
+        stat_result[0] &= ~(stat.S_IFREG | stat.S_IFLNK)
+        stat_result[0] |= stat.S_IFDIR
+    return posix.stat_result(stat_result)
+
+
+@cached
+def listdir(directory):
+    fixed_directory = directory.rstrip('/') + '/'
+    inzip_path, is_dir = _get_inzip_path(fixed_directory, OSError)
+    if not is_dir:
+        raise OSError(errno.ENOTDIR, directory)
+    return [n[len(inzip_path):] for n in exe_names if n != inzip_path and n.startswith(inzip_path)]
diff --git a/Modules/makesetup b/Modules/makesetup
index 8862c36..2afec2d 100755
--- a/Modules/makesetup
+++ b/Modules/makesetup
@@ -176,6 +176,7 @@ sed -e 's/[ 	]*#.*//' -e '/^[ 	]*$/d' |
 			*.c++)		srcs="$srcs $arg";;
 			*.cxx)		srcs="$srcs $arg";;
 			*.cpp)		srcs="$srcs $arg";;
+			*.S)		srcs="$srcs $arg";;
 			\$*)		libs="$libs $arg"
 					cpps="$cpps $arg";;
 			*.*)		echo 1>&2 "bad word $arg in $line"
@@ -206,6 +207,7 @@ sed -e 's/[ 	]*#.*//' -e '/^[ 	]*$/d' |
 			*.cxx) obj=`basename $src .cxx`.o; cc='$(CXX)';;
 			*.cpp) obj=`basename $src .cpp`.o; cc='$(CXX)';;
 			*.m)   obj=`basename $src .m`.o; cc='$(CC)';; # Obj-C
+			*.S)   obj=`basename $src .S`.o; cc='$(CC)';;
 			*)     continue;;
 			esac
 			obj="$srcdir/$obj"
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c
index 4fc3ef7..b70a63d 100644<commit_msg>tmp fix for django-debug-toolbar<commit_after>diff --git a/Lib/_hack.py b/Lib/_hack.py
new file mode 100644
index 0000000..b8f294a
--- /dev/null
+++ b/Lib/_hack.py
@@ -0,0 +1,63 @@
+import sys
+import os
+import posix
+import stat
+import zipfile
+import errno
+
+
+if zipfile.is_zipfile(sys.executable):
+    exe_zip = zipfile.ZipFile(sys.executable, 'r')
+    exe_names = exe_zip.namelist()
+zip_cache = {}
+
+
+def cached(func):
+    cache = zip_cache.setdefault(func, {})
+    def wrapped(*args):
+        ent = cache.get(args)
+        if ent is None:
+            ent = func(*args)
+            cache[args] = ent
+        return ent
+    return wrapped
+
+
+@cached
+def _get_inzip_path(filename, exc):
+    if not zipfile.is_zipfile(sys.executable):
+        raise exc(errno.ENOENT, filename)
+    inzip_path = filename[len(sys.executable):].lstrip('/')
+    if inzip_path not in exe_names:
+        # try a directory
+        inzip_path = inzip_path + '/'
+        if inzip_path not in exe_names:
+            raise exc(errno.ENOENT, filename)
+    is_dir = inzip_path.endswith('/')
+    return inzip_path, is_dir
+
+
+def get_file(filename):
+    inzip_path, _ = _get_inzip_path(filename, IOError)
+    return exe_zip.open(inzip_path)
+
+
+@cached
+def stat_file(filename):
+    inzip_path, is_dir = _get_inzip_path(filename, OSError)
+    info = exe_zip.getinfo(inzip_path)
+    stat_result = list(os.stat(sys.executable))
+    stat_result[6] = info.file_size
+    if is_dir:
+        stat_result[0] &= ~(stat.S_IFREG | stat.S_IFLNK)
+        stat_result[0] |= stat.S_IFDIR
+    return posix.stat_result(stat_result)
+
+
+@cached
+def listdir(directory):
+    fixed_directory = directory.rstrip('/') + '/'
+    inzip_path, is_dir = _get_inzip_path(fixed_directory, OSError)
+    if not is_dir:
+        raise OSError(errno.ENOTDIR, directory)
+    return [n[len(inzip_path):] for n in exe_names if n != inzip_path and n.startswith(inzip_path)]
diff --git a/Lib/inspect.py b/Lib/inspect.py
index b08e145..271eff9 100644
--- a/Lib/inspect.py
+++ b/Lib/inspect.py
@@ -456,6 +456,9 @@ def getsourcefile(object):
     # or it is in the linecache
     if filename in linecache.cache:
         return filename
+    # a workaround for packages like django debug toolbar
+    if filename.startswith('<pyrun>'):
+        return filename
 
 def getabsfile(object, _filename=None):
     """Return an absolute path to the source or compiled file for an object.
diff --git a/Modules/makesetup b/Modules/makesetup
index 8862c36..2afec2d 100755
--- a/Modules/makesetup
+++ b/Modules/makesetup
@@ -176,6 +176,7 @@ sed -e 's/[ 	]*#.*//' -e '/^[ 	]*$/d' |
 			*.c++)		srcs="$srcs $arg";;
 			*.cxx)		srcs="$srcs $arg";;
 			*.cpp)		srcs="$srcs $arg";;
+			*.S)		srcs="$srcs $arg";;
 			\$*)		libs="$libs $arg"
 					cpps="$cpps $arg";;
 			*.*)		echo 1>&2 "bad word $arg in $line"
@@ -206,6 +207,7 @@ sed -e 's/[ 	]*#.*//' -e '/^[ 	]*$/d' |
 			*.cxx) obj=`basename $src .cxx`.o; cc='$(CXX)';;
 			*.cpp) obj=`basename $src .cpp`.o; cc='$(CXX)';;
 			*.m)   obj=`basename $src .m`.o; cc='$(CC)';; # Obj-C
+			*.S)   obj=`basename $src .S`.o; cc='$(CC)';;
 			*)     continue;;
 			esac
 			obj="$srcdir/$obj"
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c
index 4fc3ef7..b70a63d 100644
{'fraction_non_alphanumeric': 0.18255410540227987, 'fraction_numerical': 0.026928795638526352, 'mean_word_length': 3.104406779661017, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 6, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 2, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2197273', 'n_tokens_mistral': 2681, 'n_tokens_neox': 2477, 'n_words': 497}