Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backport Python import error patch to 2024.2.1 #11069

Open
jtilly opened this issue Apr 25, 2024 · 0 comments
Open

Backport Python import error patch to 2024.2.1 #11069

jtilly opened this issue Apr 25, 2024 · 0 comments
Labels
needs triage Needs a response from a contributor

Comments

@jtilly
Copy link

jtilly commented Apr 25, 2024

Currently,

micromamba create dask -n dask=2024.2.1

will result in a broken version of dask (because it will pull in the latest Python, see #11038):

Python 3.12.3 | packaged by conda-forge | (main, Apr 15 2024, 18:35:20) [Clang 16.0.6 ] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import dask.dataframe as dd

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/private/tmp/dask/lib/python3.12/site-packages/dask/dataframe/__init__.py", line 100, in <module>
    from dask.dataframe import backends, dispatch, rolling
  File "/private/tmp/dask/lib/python3.12/site-packages/dask/dataframe/backends.py", line 15, in <module>
    from dask.dataframe.core import DataFrame, Index, Scalar, Series, _Frame
  File "/private/tmp/dask/lib/python3.12/site-packages/dask/dataframe/core.py", line 36, in <module>
    from dask.dataframe import methods
  File "/private/tmp/dask/lib/python3.12/site-packages/dask/dataframe/methods.py", line 34, in <module>
    from dask.dataframe.utils import is_dataframe_like, is_index_like, is_series_like
  File "/private/tmp/dask/lib/python3.12/site-packages/dask/dataframe/utils.py", line 20, in <module>
    from dask.dataframe import (  # noqa: F401 register pandas extension types
  File "/private/tmp/dask/lib/python3.12/site-packages/dask/dataframe/_dtypes.py", line 9, in <module>
    from dask.dataframe.extensions import make_array_nonempty, make_scalar
  File "/private/tmp/dask/lib/python3.12/site-packages/dask/dataframe/extensions.py", line 8, in <module>
    from dask.dataframe.accessor import (
  File "/private/tmp/dask/lib/python3.12/site-packages/dask/dataframe/accessor.py", line 126, in <module>
    class DatetimeAccessor(Accessor):
  File "/private/tmp/dask/lib/python3.12/site-packages/dask/dataframe/accessor.py", line 81, in __init_subclass__
    _bind_property(cls, pd_cls, attr, min_version)
  File "/private/tmp/dask/lib/python3.12/site-packages/dask/dataframe/accessor.py", line 35, in _bind_property
    setattr(cls, attr, property(derived_from(pd_cls, version=min_version)(func)))
                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/private/tmp/dask/lib/python3.12/site-packages/dask/utils.py", line 987, in wrapper
    method.__doc__ = _derived_from(
                     ^^^^^^^^^^^^^^
  File "/private/tmp/dask/lib/python3.12/site-packages/dask/utils.py", line 940, in _derived_from
    method_args = get_named_args(method)
                  ^^^^^^^^^^^^^^^^^^^^^^
  File "/private/tmp/dask/lib/python3.12/site-packages/dask/utils.py", line 701, in get_named_args
    s = inspect.signature(func)
        ^^^^^^^^^^^^^^^^^^^^^^^
  File "/private/tmp/dask/lib/python3.12/inspect.py", line 3310, in signature
    return Signature.from_callable(obj, follow_wrapped=follow_wrapped,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/private/tmp/dask/lib/python3.12/inspect.py", line 3054, in from_callable
    return _signature_from_callable(obj, sigcls=cls,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/private/tmp/dask/lib/python3.12/inspect.py", line 2642, in _signature_from_callable
    call = _descriptor_get(call, obj)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/private/tmp/dask/lib/python3.12/inspect.py", line 2467, in _descriptor_get
    return get(descriptor, obj, type(obj))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: descriptor '__call__' for 'type' objects doesn't apply to a 'property' object

Would you be open to backporting

#11035
#11039

to 2024.2.1 (and releasing it as 2024.2.2)?

2024.2.1 is the last version of dask that doesn't force the query planner on us (and supports pandas <2.0) and it would be great if it worked with the latest Python releases.

I'm happy to do the work (though I guess most of the work will be the actual release -- including distributed, etc).

Alternatively, I could just add a patch to the conda recipe in the feedstock repo, which would be sufficient for me and would also ensure that

micromamba create dask -n dask=2024.2.1

installs a working version of dask.

Edit: For a proposal to patch via the recipe, see conda-forge/dask-core-feedstock#202

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs triage Needs a response from a contributor
Projects
None yet
Development

No branches or pull requests

1 participant