Your message dated Sat, 24 Oct 2026 19:51:43 +0000
with message-id <[email protected]>
and subject line Bug#1145159: fixed in python-typeguard 4.6.0-1
has caused the Debian Bug report #1145159,
regarding python-typeguard: FTBFS building against python 3.15
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
1145159: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1145159
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: src:python-typeguard
Version: 4.4.4-3
User: [email protected]
Usertags: python3.15
Tags: patch

Hi!

While rebuilding the python related packages against the python version
3.15rc1 we found that python-typeguard fails to build from source[1].

The compatibility support for python 3.15 was added in the release 4.6.0
of python-typeguard, I'm attaching a backported version of the patch
that addes the compatibility support.

Please consider including this patch in your next upload or updating the
package to the new upstream releas.

Happy hacking,

[1]: 
https://debusine.debian.net/debian/r-python-python3.15/work-request/1081155/
--
"Can you imagine what I would do if I could do all I can?" -- Sun Tzu
Saludos /\/\ /\ >< `/
commit 2e63076a7bbdee0558f3a03f5a66e9f83b4e2241
Author: Tomáš Hrnčiar <[email protected]>
Date:   Sat May 23 13:04:39 2026 +0200

    Fixed compatibility with Python 3.15 (#554)

Index: python-typeguard/src/typeguard/_importhook.py
===================================================================
--- python-typeguard.orig/src/typeguard/_importhook.py
+++ python-typeguard/src/typeguard/_importhook.py
@@ -47,8 +47,8 @@ def _call_with_frames_removed(
     return f(*args, **kwargs)
 
 
-def optimized_cache_from_source(path: str, debug_override: bool | None = None) -> str:
-    return cache_from_source(path, debug_override, optimization=OPTIMIZATION)
+def optimized_cache_from_source(path: str) -> str:
+    return cache_from_source(path, optimization=OPTIMIZATION)
 
 
 class TypeguardLoader(SourceFileLoader):
@@ -56,6 +56,7 @@ class TypeguardLoader(SourceFileLoader):
     def source_to_code(
         data: Buffer | str | ast.Module | ast.Expression | ast.Interactive,
         path: Buffer | str | PathLike[str] = "<string>",
+        fullname: str | None = None,
     ) -> CodeType:
         if isinstance(data, (ast.Module, ast.Expression, ast.Interactive)):
             tree = data
@@ -65,12 +66,21 @@ class TypeguardLoader(SourceFileLoader):
             else:
                 source = decode_source(data)
 
-            tree = _call_with_frames_removed(
-                ast.parse,
-                source,
-                path,
-                "exec",
-            )
+            if sys.version_info >= (3, 15):
+                tree = _call_with_frames_removed(
+                    ast.parse,
+                    source,
+                    path,
+                    "exec",
+                    module=fullname,
+                )
+            else:
+                tree = _call_with_frames_removed(
+                    ast.parse,
+                    source,
+                    path,
+                    "exec",
+                )
 
         tree = TypeguardTransformer().visit(tree)
         ast.fix_missing_locations(tree)
@@ -84,9 +94,14 @@ class TypeguardLoader(SourceFileLoader):
             print(ast.unparse(tree), file=sys.stderr)
             print("----------------------------------------------", file=sys.stderr)
 
-        return _call_with_frames_removed(
-            compile, tree, path, "exec", 0, dont_inherit=True
-        )
+        if sys.version_info >= (3, 15):
+            return _call_with_frames_removed(
+                compile, tree, path, "exec", 0, dont_inherit=True, module=fullname
+            )
+        else:
+            return _call_with_frames_removed(
+                compile, tree, path, "exec", 0, dont_inherit=True
+            )
 
     def exec_module(self, module: ModuleType) -> None:
         # Use a custom optimization marker – the import lock should make this monkey
Index: python-typeguard/tests/dummymodule.py
===================================================================
--- python-typeguard.orig/tests/dummymodule.py
+++ python-typeguard/tests/dummymodule.py
@@ -17,7 +17,6 @@ from typing import (
     TypeVar,
     Union,
     no_type_check,
-    no_type_check_decorator,
     overload,
 )
 
@@ -41,6 +40,7 @@ P = ParamSpec("P")
 
 
 if sys.version_info <= (3, 13):
+    from typing import no_type_check_decorator
 
     @no_type_check_decorator
     def dummy_decorator(func):

--- End Message ---
--- Begin Message ---
Source: python-typeguard
Source-Version: 4.6.0-1
Done: Colin Watson <[email protected]>

We believe that the bug you reported is fixed in the latest version of
python-typeguard, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Colin Watson <[email protected]> (supplier of updated python-typeguard 
package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Sat, 24 Oct 2026 20:25:20 +0100
Source: python-typeguard
Architecture: source
Version: 4.6.0-1
Distribution: unstable
Urgency: medium
Maintainer: Debian Python Team <[email protected]>
Changed-By: Colin Watson <[email protected]>
Closes: 1145159
Changes:
 python-typeguard (4.6.0-1) unstable; urgency=medium
 .
   * Team upload.
   * New upstream release:
     - Fix compatibility with Python 3.15 (closes: #1145159).
Checksums-Sha1:
 7300fec07c4bf83203b0692e5314f59a1ff05812 2511 python-typeguard_4.6.0-1.dsc
 5ccfaeb847a1b1e06266a6ec571a06bc0a31d139 78029 
python-typeguard_4.6.0.orig.tar.gz
 2be57863a835d7de94ffec47845f3da9eeba6a7b 3216 
python-typeguard_4.6.0-1.debian.tar.xz
 e42c852efd27ca4d828d05fc547aaa74d87344c7 188864 
python-typeguard_4.6.0-1.git.tar.xz
 04be36880d7c140a4cbcbc324a1cf665daa296e7 17768 
python-typeguard_4.6.0-1_source.buildinfo
Checksums-Sha256:
 0d9a5cd0b894dfd96e50c63105749567bd01763ffff785105328aaf86462b967 2511 
python-typeguard_4.6.0-1.dsc
 f2d45f36dd11f507f895aff2f8bd1bf4c58197cdbfa9cd72e9e5f09855dd2ba6 78029 
python-typeguard_4.6.0.orig.tar.gz
 3f9e9795d591bd0b336cf236aa0e3c20693a4102566ad74b23ec0d1bc603b59c 3216 
python-typeguard_4.6.0-1.debian.tar.xz
 39989c44561ef6d56718d16f3f66d4072c1cf12bdfd4a75f4196d6302f8b533c 188864 
python-typeguard_4.6.0-1.git.tar.xz
 713c695e80b0395fb20ad0490ce3c5211fd8030c8c65855999200753472e9871 17768 
python-typeguard_4.6.0-1_source.buildinfo
Files:
 a4ed4fda2274c8b8aa757ccc57493a64 2511 python optional 
python-typeguard_4.6.0-1.dsc
 07bb5e58822213a5031facc50cd82f5a 78029 python optional 
python-typeguard_4.6.0.orig.tar.gz
 8769eaa89a8d002b20ac1e081c8dff00 3216 python optional 
python-typeguard_4.6.0-1.debian.tar.xz
 65e12bc04ac1f5364caf8394537a1d72 188864 python None 
python-typeguard_4.6.0-1.git.tar.xz
 7403875e8238a2cbf8fdae43adcacaec 17768 python optional 
python-typeguard_4.6.0-1_source.buildinfo
Git-Tag-Info: tag=583393124004bbf3dbad914f5546d18c5caaa0d4 
fp=ac0a4ff12611b6fccf01c111393587d97d86500b
Git-Tag-Tagger: Colin Watson <[email protected]>

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEN02M5NuW6cvUwJcqYG0ITkaDwHkFAmrdBuEACgkQYG0ITkaD
wHl2Tg//QM5vr2RJhepU+q29zU2r+OBGWcptK0c05a4BMwfwgnIlqC1mYJQEmSGN
FNJezjih1unAuiA+bQ3PLhuo8E4N7AMpzHuU1tbiYg2pbp30iGclrT8y2GY5l766
4Zke6UfyDj3xIBLvJ4mUY1QRyVJkcN/GJlbnmCzaKipmG80MkzkG1xyHbmmCuYVa
8WKuLRJym4HDb4kcg71mXKIkjm4FJS2gOe8Gf4mM6nBC1bzduhJSMfrLztIKhEpK
mE5HCzC9Znyl712HjpQwH9LMZ53lS5Ja5H4PAWvRaD271fHh6OUaC5iGtrtmvXRC
lkx+la+e9DFtWzPWW+1cMZh3yoY1G4q+XmFmkCVXtE0o8C/hbUITHyH95EOSg7Dw
JvTZlMaMQmgv127+T9k6psCEnCf0mXNIoAmPav6hr0cFsZzxB3g/2rm0tsZi+MrA
EmZNL4I92aMEiQZ/AAg5C64np8QvDEo4qj8A9jaRlxIKB1jZyeweyMRhZ4E1a9Q+
L33o7roaGQYdXTXIudEq3wZ6SNG288mqfJ4Q4U1uW0n5pHhwdtuXL20w28cW8LBP
AqweHq226vjV/un0wI8NoHnsJuQQwGE831oBLrcDzla6YCGlBIaaGEYAKMGolFMq
wWddSK/YDsjux0m1CcLLJa2/rY1g5bJXi1JchxFF8fO9vHXlhiY=
=MSOS
-----END PGP SIGNATURE-----

Attachment: pgpORFogZcqjW.pgp
Description: PGP signature


--- End Message ---

Reply via email to