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

DeprecationWarnings with Python 3.12 #49

Open
glatterf42 opened this issue Feb 13, 2024 · 1 comment
Open

DeprecationWarnings with Python 3.12 #49

glatterf42 opened this issue Feb 13, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@glatterf42
Copy link
Member

glatterf42 commented Feb 13, 2024

As mentioned in #41, we can get rid of the DeprecationWarnings for Python 3.12 by updating dateutil and pandera. Both seem to already include the necessary fixes on their main branches, but need to publish new releases (>2.8.2 and >0.18.0, respectively) unless we want to specify their github/main versions as our requirements. We might get notified about new releases by following up on these branches:

@glatterf42 glatterf42 added the enhancement New feature or request label Feb 13, 2024
@glatterf42
Copy link
Member Author

With dask v2024.2.0, we are seeing another DeprecationWarning:

.venv/lib/python3.12/site-packages/pandera/typing/dask.py:9
  /home/fridolin/ixmp4/.venv/lib/python3.12/site-packages/pandera/typing/dask.py:9: DeprecationWarning: The current Dask DataFrame implementation is deprecated. 
  In a future release, Dask DataFrame will use new implementation that
  contains several improvements including a logical query planning.
  The user-facing DataFrame API will remain unchanged.
  
  The new implementation is already available and can be enabled by
  installing the dask-expr library:
  
      $ pip install dask-expr
  
  and turning the query planning option on:
  
      >>> import dask
      >>> dask.config.set({'dataframe.query-planning': True})
      >>> import dask.dataframe as dd
  
  API documentation for the new implementation is available at
  https://docs.dask.org/en/stable/dask-expr-api.html
  
  Any feedback can be reported on the Dask issue tracker
  https://github.com/dask/dask/issues 
  
    import dask.dataframe as dd

Curiously, we use dask.dataframe as dd here:

ixmp4/ixmp4/data/db/base.py

Lines 302 to 303 in 6f71751

# https://github.com/dask/dask/issues/9710
dd.from_pandas(df, chunksize=512_000) # type: ignore

But the error message doesn't point us there. Instead, it almost looks like it refers to pandera's usage of dask.dataframe again (though if the user-facing API remains the same, why bother?). Either way, the topic has been raised with dask and they are reworking the DeprecationWarning, it seems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant