Bug#1001295: dominate: needs update for python3.10: 'Callable' from 'collections' is removed

2021-12-10 Thread Steve Langasek
Package: dominate
Version: 2.3.1-2
Followup-For: Bug #1001295
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu jammy ubuntu-patch
Control: tags -1 patch

Please find attached a trivial patch for this issue.

-- 
Steve Langasek   Give me a lever long enough and a Free OS
Debian Developer   to set it on, and I can move the world.
Ubuntu Developer   https://www.debian.org/
slanga...@ubuntu.com vor...@debian.org
diff -Nru dominate-2.3.1/debian/patches/python-3.10.patch 
dominate-2.3.1/debian/patches/python-3.10.patch
--- dominate-2.3.1/debian/patches/python-3.10.patch 1969-12-31 
16:00:00.0 -0800
+++ dominate-2.3.1/debian/patches/python-3.10.patch 2021-12-10 
12:19:46.0 -0800
@@ -0,0 +1,20 @@
+Description: compatibility with python 3.10
+Author: Steve Langasek 
+Bug-Debian: https://bugs.debian.org/1001295
+Last-Update: 2021-12-10
+Forwarded: no
+
+Index: dominate-2.3.1/dominate/dom_tag.py
+===
+--- dominate-2.3.1.orig/dominate/dom_tag.py
 dominate-2.3.1/dominate/dom_tag.py
+@@ -20,7 +20,8 @@
+ 
+ import copy
+ import numbers
+-from collections import defaultdict, namedtuple, Callable
++from collections import defaultdict, namedtuple
++from collections.abc import Callable
+ from functools import wraps
+ import threading
+ 
diff -Nru dominate-2.3.1/debian/patches/series 
dominate-2.3.1/debian/patches/series
--- dominate-2.3.1/debian/patches/series1969-12-31 16:00:00.0 
-0800
+++ dominate-2.3.1/debian/patches/series2021-12-10 12:18:37.0 
-0800
@@ -0,0 +1 @@
+python-3.10.patch


Bug#1001295: dominate: needs update for python3.10: 'Callable' from 'collections' is removed

2021-12-07 Thread Paul Gevers

Source: dominate
Version: 2.3.1-2
Severity: serious
X-Debbugs-CC: debian...@lists.debian.org
Tags: sid bookworm
User: debian...@lists.debian.org
Usertags: needs-update
Control: affects -1 src:python3-defaults

Dear maintainer(s),

With a recent upload of python3-defaults the autopkgtest of dominate 
fails in testing when that autopkgtest is run with the binary packages 
of python3-defaults from unstable. It passes when run with only packages 
from testing. In tabular form:


   passfail
python3-defaults   from testing3.9.8-1
dominate   from testing2.3.1-2
all others from testingfrom testing

I copied some of the output at the bottom of this report. 
https://docs.python.org/3.9/library/collections.html says:

"""
Deprecated since version 3.3, will be removed in version 3.10: Moved 
Collections Abstract Base Classes to the collections.abc module. For 
backwards compatibility, they continue to be visible in this module 
through Python 3.9.

"""
Time to move on.

Currently this regression is blocking the migration of python3-defaults 
to testing [1].


More information about this bug and the reason for filing it can be found on
https://wiki.debian.org/ContinuousIntegration/RegressionEmailInformation

Paul

[1] https://qa.debian.org/excuses.php?package=python3-defaults

https://ci.debian.net/data/autopkgtest/testing/amd64/d/dominate/17344293/log.gz

Testing with python3.10:
Traceback (most recent call last):
  File "", line 1, in 
  File "/usr/lib/python3/dist-packages/dominate/__init__.py", line 4, 
in 

from .document import document
  File "/usr/lib/python3/dist-packages/dominate/document.py", line 19, 
in 

from . import tags
  File "/usr/lib/python3/dist-packages/dominate/tags.py", line 21, in 


from .dom_tag  import dom_tag, attr
  File "/usr/lib/python3/dist-packages/dominate/dom_tag.py", line 23, 
in 

from collections import defaultdict, namedtuple, Callable
ImportError: cannot import name 'Callable' from 'collections' 
(/usr/lib/python3.10/collections/__init__.py)

autopkgtest [20:14:07]: test autodep8-python3



OpenPGP_signature
Description: OpenPGP digital signature