Bug#1001488: toolz: (autopkgtest) needs update for python3.10: Missing introspection for the following callables

2021-12-11 Thread Diane Trout
On Sat, 2021-12-11 at 10:48 -0800, Steve Langasek wrote:
> Package: toolz
> Version: 0.11.1-1
> Followup-For: Bug #1001488
> 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.
> 

Upstream announced 0.11.2 is supposed to be compatible with Python 3.10
and they handled anext in a different way from your patch, the tests
run on my system both at build time and in autopkgtests (amd64) with
Python 3.10

https://github.com/pytoolz/toolz/commit/da81b1e8ab96b22ed81e6414099aba066633f3ff

I'm pushed the new version which should fix this bug.

Diane



Bug#1001488: toolz: (autopkgtest) needs update for python3.10: Missing introspection for the following callables

2021-12-11 Thread Steve Langasek
Package: toolz
Version: 0.11.1-1
Followup-For: Bug #1001488
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 toolz-0.11.1/debian/patches/python-3.10.patch 
toolz-0.11.1/debian/patches/python-3.10.patch
--- toolz-0.11.1/debian/patches/python-3.10.patch   1969-12-31 
16:00:00.0 -0800
+++ toolz-0.11.1/debian/patches/python-3.10.patch   2021-12-11 
10:47:23.0 -0800
@@ -0,0 +1,18 @@
+Description: compatibility with python 3.10
+Author: Steve Langasek 
+Bug-Debian: https://bugs.debian.org/1001488
+Last-Update: 2021-12-11
+Forwarded: no
+
+Index: toolz-0.11.1/toolz/tests/test_inspect_args.py
+===
+--- toolz-0.11.1.orig/toolz/tests/test_inspect_args.py
 toolz-0.11.1/toolz/tests/test_inspect_args.py
+@@ -396,6 +396,7 @@
+ add_blacklist(builtins, 'NoneType')
+ add_blacklist(builtins, '__metaclass__')
+ add_blacklist(builtins, 'sequenceiterator')
++add_blacklist(builtins, 'anext')
+ 
+ def is_missing(modname, name, func):
+ if name.startswith('_') and not name.startswith('__'):
diff -Nru toolz-0.11.1/debian/patches/series toolz-0.11.1/debian/patches/series
--- toolz-0.11.1/debian/patches/series  1969-12-31 16:00:00.0 -0800
+++ toolz-0.11.1/debian/patches/series  2021-12-11 10:45:46.0 -0800
@@ -0,0 +1 @@
+python-3.10.patch


Bug#1001488: toolz: (autopkgtest) needs update for python3.10: Missing introspection for the following callables

2021-12-10 Thread Paul Gevers

Source: toolz
Version: 0.11.1-1
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 toolz 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
toolz  from testing0.11.1-1
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.


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/toolz/17446745/log.gz

Testing with python3.10:
= test session starts 
==

platform linux -- Python 3.10.1, pytest-6.2.5, py-1.10.0, pluggy-0.13.0
rootdir: /tmp/autopkgtest-lxc.ua55b3g2/downtmp/autopkgtest_tmp
collected 179 items

tests/test_curried.py .. 
 [  5%]
tests/test_curried_doctests.py . 
 [  6%]
tests/test_dicttoolz.py ... 
 [ 32%]
tests/test_functoolz.py .. 
 [ 53%]
tests/test_inspect_args.py ..F.. 
 [ 63%]
tests/test_itertoolz.py  
[ 89%]
.. 
 [ 91%]
tests/test_recipes.py .. 
 [ 92%]
tests/test_serialization.py . 
 [ 97%]
tests/test_signatures.py ... 
 [ 98%]
tests/test_tlz.py . 
 [ 99%]
tests/test_utils.py . 
 [100%]


=== FAILURES 
===
___ test_introspect_builtin_modules 



def test_introspect_builtin_modules():
mods = [builtins, functools, itertools, operator, toolz,
toolz.functoolz, toolz.itertoolz, toolz.dicttoolz, 
toolz.recipes]

blacklist = set()
def add_blacklist(mod, attr):
if hasattr(mod, attr):
blacklist.add(getattr(mod, attr))
add_blacklist(builtins, 'basestring')
add_blacklist(builtins, 'NoneType')
add_blacklist(builtins, '__metaclass__')
add_blacklist(builtins, 'sequenceiterator')
def is_missing(modname, name, func):
if name.startswith('_') and not name.startswith('__'):
return False
if name.startswith('__pyx_unpickle_') or 
name.endswith('_cython__'):

return False
try:
if issubclass(func, BaseException):
return False
except TypeError:
pass
try:
return (callable(func)
and func.__module__ is not None
and modname in func.__module__
and is_partial_args(func, (), {}) is not True
and func not in blacklist)
except AttributeError:
return False
missing = {}
for mod in mods:
modname = mod.__name__
for name, func in vars(mod).items():
if is_missing(modname, name, func):
if modname not in missing:
missing[modname] = []
missing[modname].append(name)
if missing:
messages = []
for modname, names in sorted(missing.items()):
msg = '{}:\n{}'.format(modname, '\n 
'.join(sorted(names)))

messages.append(msg)
message = 'Missing introspection for the following 
callables:\n\n'

  raise AssertionError(message + '\n\n'.join(messages))
E   AssertionError: Missing introspection for the following 
callables:

E   E   builtins:
E   anext

/usr/lib/python3/dist-packages/toolz/tests/test_inspect_args.py:433: 
AssertionError
=== warnings summary 
===

../../../../usr/lib/python3/dist-packages/toolz/compatibility.py:2
  /usr/lib/python3/dist-packages/toolz/compatibility.py:2: 
DeprecationWarning: The toolz.compatibility module is no longer needed 
in Python 3 and has been deprecated. Please import these utilities