#1154942 python3-enaml: Package not installable: failing autopkgtests everywhere

Package:
python3-enaml
Source:
python3-enaml
Description:
Declarative DSL for building rich user interfaces in Python
Submitter:
Stuart Prescott
Date:
2026-11-23 05:29:01 UTC
Severity:
normal
#1154942#5
Date:
2026-11-23 05:26:57 UTC
From:
To:
Dear Maintainer,

python3-enaml 0.19.0-2+b1 fails to install on all architectures in unstable
on ci.debian.net (and also when tested locally here):

//---

Unpacking python3-enaml (0.19.0-2+b1)…
Setting up python3-enaml (0.19.0-2+b1)…
Traceback (most recent call last):
  File "<frozen runpy>", line 201, in _run_module_as_main
  File "<frozen runpy>", line 87, in _run_code
  File "/usr/lib/python3/dist-packages/enaml/compile.py", line 51, in <module>
    main()
    ~~~~^^
  File "/usr/lib/python3/dist-packages/enaml/compile.py", line 47, in main
    py_compile.main()
    ~~~~~~~~~~~~~~~^^
  File "/usr/lib/python3.15/py_compile.py", line 200, in main
    compile(filename, cfilename, doraise=True)
    ~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: compile() got multiple values for argument 'doraise'
dpkg: error processing package python3-enaml (--configure):
 installed python3-enaml package postinst maintainer script subprocess failed with exit status 1
Processing triggers for man-db (2.13.3-1)…
Not building database; man-db/auto-update is not 'true'.
Errors were encountered while processing:
 python3-enaml
Error: Sub-process /usr/bin/dpkg returned an error code (1)
---//

Rebuilding the package in sid again does not solve that problem (it has
already been binNMUd for the Python 3.15 transition).

Upstream's unmerged "Add support for Python 3.15" PR touches hundreds of
files, indicating quite some substantial work needed for Python 3.15.

https://github.com/nucleic/enaml/pull/630

 616 files changed, 23722 insertions(+), 18059 deletions(-)

Additionally, the standard `pycompile.py` module has changed between
Python 3.14 and 3.15 which means that the monkeypatched setup in the
Debian patch to create the enaml.compile module no longer works.

//---

$ diff -U3 /usr/lib/python3.14/py_compile.py /usr/lib/python3.15/py_compile.py
--- /usr/lib/python3.14/py_compile.py   2026-10-26 15:12:11.000000000 +0000
+++ /usr/lib/python3.15/py_compile.py   2026-10-26 15:10:10.000000000 +0000
@@ -177,7 +177,7 @@
     import argparse

     description = 'A simple command-line interface for py_compile module.'
-    parser = argparse.ArgumentParser(description=description, color=True)
+    parser = argparse.ArgumentParser(description=description)
     parser.add_argument(
         '-q', '--quiet',
         action='store_true',
@@ -194,8 +194,10 @@
     else:
         filenames = args.filenames
     for filename in filenames:
+        cfilename = (None if sys.implementation.cache_tag
+                     else f"{filename.rpartition('.')[0]}.pyc")
         try:
-            compile(filename, doraise=True)
+            compile(filename, cfilename, doraise=True)
         except PyCompileError as error:
             if args.quiet:
                 parser.exit(1)
---//

The change to how `compile` is used is the most relevant item here; the
monkeypatched compile function from d/patches/Add-enaml-compile.patch
has an incompatible method signature of:

  def compile(filename, doraise=False, quiet=0)

So, probably multiple steps to getting ready for fixing this RC bug for
Python 3.15:

* upstream seems to not be ready for Python 3.15
* the Debian patches are not compatible with Python 3.15

regards
Stuart