Bug#1001489: twodict: (autopkgtest) needs update for python3.10: 'collections' has no attribute 'KeysView'

2022-02-06 Thread Andrey Rahmatullin

I was looking at this bug report and while the patch is provided (and is
trivial), the package had its only maintainer upload in 2018, the last
upstream release was in 2016 (though one can say the software is perfect,
as it's just 270 lines of code), and it has popcon 9. So maybe it's better
to not spend effort on it.

-- 
WBR, wRAR


signature.asc
Description: PGP signature


Bug#1001489: twodict: (autopkgtest) needs update for python3.10: 'collections' has no attribute 'KeysView'

2021-12-11 Thread Steve Langasek
Package: twodict
Version: 1.2-2
Followup-For: Bug #1001489
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu jammy ubuntu-patch
Control: tags -1 patch

Please find attached a 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 twodict-1.2/debian/patches/python-3.10.patch 
twodict-1.2/debian/patches/python-3.10.patch
--- twodict-1.2/debian/patches/python-3.10.patch1969-12-31 
16:00:00.0 -0800
+++ twodict-1.2/debian/patches/python-3.10.patch2021-12-11 
10:50:51.0 -0800
@@ -0,0 +1,19 @@
+Description: Compatibility with python 3.10
+Author: Steve Langasek 
+Bug-Debian: https://bugs.debian.org/1001489
+Last-Update: 2021-12-11
+Forwarded: no
+
+Index: twodict-1.2/twodict.py
+===
+--- twodict-1.2.orig/twodict.py
 twodict-1.2/twodict.py
+@@ -6,7 +6,7 @@
+ """
+ 
+ import sys
+-import collections
++import collections.abc as collections
+ 
+ 
+ __all__ = ["TwoWayOrderedDict"]
diff -Nru twodict-1.2/debian/patches/series twodict-1.2/debian/patches/series
--- twodict-1.2/debian/patches/series   1969-12-31 16:00:00.0 -0800
+++ twodict-1.2/debian/patches/series   2021-12-11 10:49:49.0 -0800
@@ -0,0 +1 @@
+python-3.10.patch


Bug#1001489: twodict: (autopkgtest) needs update for python3.10: 'collections' has no attribute 'KeysView'

2021-12-10 Thread Paul Gevers

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

Dear maintainer(s),

We are in the transition of adding python3.10 to the supported Python 
versions [0]. With a recent upload of python3-defaults the autopkgtest 
of twodict 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
twodictfrom testing1.2-2
all others from testingfrom testing

I copied some of the output at the bottom of this report.

Currently this regression is blocking the migration of python3-defaults 
to testing [1]. https://docs.python.org/3/whatsnew/3.10.html lists 
what's new in Python3.10, it may help to identify what needs to be 
updated. 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.

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

Paul

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

https://ci.debian.net/data/autopkgtest/testing/amd64/t/twodict/17446747/log.gz

Testing with python3.10:
Traceback (most recent call last):
  File "", line 1, in 
  File "/usr/lib/python3/dist-packages/twodict.py", line 25, in 
class DictKeysView(collections.KeysView):
AttributeError: module 'collections' has no attribute 'KeysView'
autopkgtest [14:18:28]: test autodep8-python3



OpenPGP_signature
Description: OpenPGP digital signature