Source: dask
Version: 2024.5.2+dfsg-1
Severity: serious
User: debian-pyt...@lists.debian.org
Usertags: python3.13

Hi Maintainer

dask's autopkgtests fail with Python 3.13 [1].  I've copied what I
hope is the relevant part of the log below.

Regards
Graham


[1] https://ci.debian.net/packages/d/dask/testing/amd64/


1130s =================================== FAILURES
===================================
1130s ____________
test_delayed_with_dataclass_with_set_init_false_field _____________
1130s
1130s expr = 
test_delayed_with_dataclass_with_set_init_false_field.<locals>.ADataClass(a=Delayed('int-c3de5259-d6c8-47c1-98bc-124018dec41c'),
b=4)
1130s
1130s     def unpack_collections(expr):
1130s         """Normalize a python object and merge all sub-graphs.
1130s
1130s         - Replace ``Delayed`` with their keys
1130s         - Convert literals to things the schedulers can handle
1130s         - Extract dask graphs from all enclosed values
1130s
1130s         Parameters
1130s         ----------
1130s         expr : object
1130s             The object to be normalized. This function knows how to handle
1130s             dask collections, as well as most builtin python types.
1130s
1130s         Returns
1130s         -------
1130s         task : normalized task to be run
1130s         collections : a tuple of collections
1130s
1130s         Examples
1130s         --------
1130s         >>> import dask
1130s         >>> a = delayed(1, 'a')
1130s         >>> b = delayed(2, 'b')
1130s         >>> task, collections = unpack_collections([a, b, 3])
1130s         >>> task
1130s         ['a', 'b', 3]
1130s         >>> collections
1130s         (Delayed('a'), Delayed('b'))
1130s
1130s         >>> task, collections = unpack_collections({a: 1, b: 2})
1130s         >>> task
1130s         (<class 'dict'>, [['a', 1], ['b', 2]])
1130s         >>> collections
1130s         (Delayed('a'), Delayed('b'))
1130s         """
1130s         if isinstance(expr, Delayed):
1130s             return expr._key, (expr,)
1130s
1130s         if is_dask_collection(expr):
1130s             finalized = finalize(expr)
1130s             return finalized._key, (finalized,)
1130s
1130s         if type(expr) is type(iter(list())):
1130s             expr = list(expr)
1130s         elif type(expr) is type(iter(tuple())):
1130s             expr = tuple(expr)
1130s         elif type(expr) is type(iter(set())):
1130s             expr = set(expr)
1130s
1130s         typ = type(expr)
1130s
1130s         if typ in (list, tuple, set):
1130s             args, collections = unzip((unpack_collections(e) for
e in expr), 2)
1130s             args = list(args)
1130s             collections = tuple(unique(concat(collections), key=id))
1130s             # Ensure output type matches input type
1130s             if typ is not list:
1130s                 args = (typ, args)
1130s             return args, collections
1130s
1130s         if typ is dict:
1130s             args, collections = unpack_collections([[k, v] for
k, v in expr.items()])
1130s             return (dict, args), collections
1130s
1130s         if typ is slice:
1130s             args, collections = unpack_collections([expr.start,
expr.stop, expr.step])
1130s             return (slice, *args), collections
1130s
1130s         if is_dataclass(expr):
1130s             args, collections = unpack_collections(
1130s                 [
1130s                     [f.name, getattr(expr, f.name)]
1130s                     for f in fields(expr)
1130s                     if hasattr(expr, f.name)  # if init=False,
field might not exist
1130s                 ]
1130s             )
1130s             if not collections:
1130s                 return expr, ()
1130s             try:
1130s                 _fields = {
1130s                     f.name: getattr(expr, f.name)
1130s                     for f in fields(expr)
1130s                     if hasattr(expr, f.name)
1130s                 }
1130s >               replace(expr, **_fields)
1130s
1130s /usr/lib/python3/dist-packages/dask/delayed.py:143:

Reply via email to