scverse / pytometry

Flow & mass cytometry analytics.
https://pytometry.readthedocs.io/en/latest/index.html
Apache License 2.0
42 stars 9 forks source link

Python 3.11 import crashes with TypeError: descriptor '__call__' for 'type' objects doesn't apply to a 'property' object #79

Closed Zethson closed 2 months ago

Zethson commented 2 months ago

Report

import pytrometry as pm

results in for Python 3.11+ (works with 3.10)

------------------
import pytometry as pm
------------------

---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
Cell In[7], line 1
----> 1 import pytometry as pm

File /opt/hostedtoolcache/Python/3.11.10/x64/lib/python3.11/site-packages/pytometry/__init__.py:56
      1 """Flow & mass cytometry analytics.
      2 
      3 Import the package::
   (...)
     51 
     52 """
     54 __version__ = "0.1.5"  # denote a pre-release for 0.1.0 with 0.1a1
---> 56 from . import plotting as pl
     57 from . import preprocessing as pp
     58 from . import read_write as io

File /opt/hostedtoolcache/Python/3.11.10/x64/lib/python3.11/site-packages/pytometry/plotting/__init__.py:2
      1 from ._histogram import plotdata
----> 2 from ._scatter_density import scatter_density

File /opt/hostedtoolcache/Python/3.11.10/x64/lib/python3.11/site-packages/pytometry/plotting/_scatter_density.py:4
      1 from typing import Literal  # noqa: TYP001
      2 from typing import List, Optional, Tuple, Union
----> 4 import datashader as ds
      5 import matplotlib.pyplot as plt
      6 import numpy as np

File /opt/hostedtoolcache/Python/3.11.10/x64/lib/python3.11/site-packages/datashader/__init__.py:9
      5 import param
      6 __version__ = str(param.version.Version(fpath=__file__, archive_commit="$Format:%h$",
      7                                         reponame="datashader"))
----> 9 from .core import Canvas                                 # noqa (API import)
     10 from .reductions import *                                # noqa (API import)
     11 from .glyphs import Point                                # noqa (API import)

File /opt/hostedtoolcache/Python/3.11.10/x64/lib/python3.11/site-packages/datashader/core.py:10
      8 import numpy as np
      9 import pandas as pd
---> 10 import dask.dataframe as dd
     11 import dask.array as da
     12 from packaging.version import Version
File /opt/hostedtoolcache/Python/3.11.10/x64/lib/python3.11/inspect.py:3011, in Signature.from_callable(cls, obj, follow_wrapped, globals, locals, eval_str)
   3007 @classmethod
   3008 def from_callable(cls, obj, *,
   3009                   follow_wrapped=True, globals=None, locals=None, eval_str=False):
   3010     """Constructs Signature for the given callable object."""
-> 3011     return _signature_from_callable(obj, sigcls=cls,
   3012                                     follow_wrapper_chains=follow_wrapped,
   3013                                     globals=globals, locals=locals, eval_str=eval_str)

File /opt/hostedtoolcache/Python/3.11.10/x64/lib/python3.11/inspect.py:2599, in _signature_from_callable(obj, follow_wrapper_chains, skip_bound_arg, globals, locals, eval_str, sigcls)
   2597     call = getattr_static(type(obj), '__call__', None)
   2598     if call is not None:
-> 2599         call = _descriptor_get(call, obj)
   2600         return _get_signature_of(call)
   2602 raise ValueError('callable {!r} is not supported by signature'.format(obj))

File /opt/hostedtoolcache/Python/3.11.10/x64/lib/python3.11/inspect.py:2432, in _descriptor_get(descriptor, obj)
   2430 if get is _sentinel:
   2431     return descriptor
-> 2432 return get(descriptor, obj, type(obj))

TypeError: descriptor '__call__' for 'type' objects doesn't apply to a 'property' object

Version information

No response

Zethson commented 2 months ago

This comes from datashader.

Zethson commented 2 months ago

This is the actual issue: https://github.com/dask/dask/issues/11038. For some reason my CI installs a not up to date Dask version.

Zethson commented 2 months ago

Ahh, Pandas 1.5.3 :scream:

mbuttner commented 2 months ago

The new release 0.1.6 uses pandas > 2.0