Bug#1001292: deepdiff: needs update for python3.10: 'Mapping' from 'collections' is removed

2021-12-22 Thread Louis-Philippe Véronneau
This package is also pretty old, as upstream is at 5.6.0.

It seems upstream tests for 3.10 in their CI and it passes? I would
argue the "right" course of action here, instead of adding a
Debian-specific patch, would be to update the package to the latest
upstream version.

Cheers,

-- 
  ⢀⣴⠾⠻⢶⣦⠀
  ⣾⠁⢠⠒⠀⣿⡁  Louis-Philippe Véronneau
  ⢿⡄⠘⠷⠚⠋   po...@debian.org / veronneau.org
  ⠈⠳⣄


OpenPGP_signature
Description: OpenPGP digital signature


Bug#1001292: deepdiff: needs update for python3.10: 'Mapping' from 'collections' is removed

2021-12-10 Thread Steve Langasek
Package: deepdiff
Version: 3.3.0-2
Followup-For: Bug #1001292
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 deepdiff-3.3.0/debian/patches/python-3.10.patch 
deepdiff-3.3.0/debian/patches/python-3.10.patch
--- deepdiff-3.3.0/debian/patches/python-3.10.patch 1969-12-31 
16:00:00.0 -0800
+++ deepdiff-3.3.0/debian/patches/python-3.10.patch 2021-12-10 
12:15:00.0 -0800
@@ -0,0 +1,51 @@
+Description: Compatibility with python 3.10
+Author: Steve Langasek 
+Bug-Debian: https://bugs.debian.org/1001292
+Last-Update: 2021-12-10
+Forwarded: no
+
+Index: deepdiff-3.3.0/deepdiff/diff.py
+===
+--- deepdiff-3.3.0.orig/deepdiff/diff.py
 deepdiff-3.3.0/deepdiff/diff.py
+@@ -16,8 +16,8 @@
+ 
+ from decimal import Decimal
+ 
+-from collections import Mapping
+-from collections import Iterable
++from collections.abc import Mapping
++from collections.abc import Iterable
+ 
+ from deepdiff.helper import py3, strings, bytes_type, numbers, 
ListItemRemovedOrAdded, notpresent, IndexedHash, Verbose
+ from deepdiff.model import RemapDict, ResultDict, TextResult, TreeResult, 
DiffLevel
+Index: deepdiff-3.3.0/deepdiff/contenthash.py
+===
+--- deepdiff-3.3.0.orig/deepdiff/contenthash.py
 deepdiff-3.3.0/deepdiff/contenthash.py
+@@ -3,8 +3,8 @@
+ from __future__ import absolute_import
+ from __future__ import print_function
+ import sys
+-from collections import Iterable
+-from collections import MutableMapping
++from collections.abc import Iterable
++from collections.abc import MutableMapping
+ from collections import defaultdict
+ from decimal import Decimal
+ from hashlib import sha1
+Index: deepdiff-3.3.0/deepdiff/search.py
+===
+--- deepdiff-3.3.0.orig/deepdiff/search.py
 deepdiff-3.3.0/deepdiff/search.py
+@@ -6,8 +6,8 @@
+ from __future__ import absolute_import
+ from __future__ import print_function
+ import sys
+-from collections import Iterable
+-from collections import MutableMapping
++from collections.abc import Iterable
++from collections.abc import MutableMapping
+ import logging
+ 
+ from deepdiff.helper import py3, strings, numbers, items
diff -Nru deepdiff-3.3.0/debian/patches/series 
deepdiff-3.3.0/debian/patches/series
--- deepdiff-3.3.0/debian/patches/series1969-12-31 16:00:00.0 
-0800
+++ deepdiff-3.3.0/debian/patches/series2021-12-10 12:14:03.0 
-0800
@@ -0,0 +1 @@
+python-3.10.patch


Bug#1001292: deepdiff: needs update for python3.10: 'Mapping' from 'collections' is removed

2021-12-07 Thread Paul Gevers

Source: deepdiff
Version: 3.3.0-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 deepdiff 
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
deepdiff   from testing3.3.0-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/deepdiff/17344291/log.gz

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

from .diff import DeepDiff
  File "/usr/lib/python3/dist-packages/deepdiff/diff.py", line 19, in 


from collections import Mapping
ImportError: cannot import name 'Mapping' from 'collections' 
(/usr/lib/python3.10/collections/__init__.py)

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



OpenPGP_signature
Description: OpenPGP digital signature