Closed jorisvandenbossche closed 3 weeks ago
_See test report for an extended history of previous test failures. This is useful for diagnosing flaky tests._
29 files ± 0 29 suites ±0 11h 20m 2s :stopwatch: + 1h 29m 32s 4 054 tests - 5 3 954 :white_check_mark: + 10 97 :zzz: - 9 3 :x: - 2 55 841 runs +7 583 53 677 :white_check_mark: +7 355 2 160 :zzz: +247 4 :x: - 2
For more details on these failures, see this check.
Results for commit 5032d663. ± Comparison against base commit cbc21dff.
:recycle: This comment has been updated with latest results.
Ah, the assert was there just to satisfy the type checker ..
I added a type: ignore
, but could also add a cast(constructor, Callable)
or something like that if that is preferred
I am testing the p2p shuffle in dask-geopandas (https://github.com/geopandas/dask-geopandas/pull/295), and this fix was needed to get it running.
Pandas does not require that the
_constructor_sliced
attribute for subclasses is a class (type) itself, it should just be a callable to construct the subclassed Series object (that is also how it is used here: it's only used on the line below as a callableworker_for = constructor(worker_for)
). So this assertion is wrong (and not necessary anyway IMO, if this attribute would do something wrong, that's a problem with the subclass in general)I haven't added a test for now (it would require to add a dummy pandas / dask collection subclass boilerplate (given you don't want to depend on an external package like dask-geopandas I think), but that seems a bit much for this simple change).