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

Package polars dependencies are not aligned #15

Open
ion-elgreco opened this issue Jun 11, 2024 · 2 comments
Open

Package polars dependencies are not aligned #15

ion-elgreco opened this issue Jun 11, 2024 · 2 comments

Comments

@ion-elgreco
Copy link

Errors out with polars==0.20.10

File [~/.venv/lib/python3.11/site-packages/polars_istr/_utils.py:30](https://vscode-remote+wsl-002bubuntu-002d22-002e04.vscode-resource.vscode-cdn.net/home/ion//~/.venv/lib/python3.11/site-packages/polars_istr/_utils.py:30), in pl_plugin(lib, symbol, args, kwargs, is_elementwise, returns_scalar, changes_length, cast_to_supertype)
     27 if tuple(int(x) for x in pl.__version__.split(".")) < (0, 20, 16):
     28     # This will eventually be deprecated?
     29     first = str_to_expr(args[0])
---> 30     return first.register_plugin(
     31         lib=lib,
     32         symbol=symbol,
     33         args=[str_to_expr(x) for x in args[1:]],
     34         kwargs=kwargs,
     35         is_elementwise=is_elementwise,
     36         returns_scalar=returns_scalar,
     37         changes_length=changes_length,
     38         cast_to_supertype=cast_to_supertype,
     39     )
     41 from polars.plugins import register_plugin_function
     43 return register_plugin_function(
     44     plugin_path=lib,
     45     args=[str_to_expr(x) for x in args],
   (...)
     51     cast_to_supertype=cast_to_supertype,
     52 )

TypeError: Expr.register_plugin() got an unexpected keyword argument 'cast_to_supertype'
@abstractqqq
Copy link
Owner

Apparently if we do expr.register_plugin, the argument's name is cast_to_supertypes, and if we do register_plugin_function, then it is cast_to_supertype without the s lol! Thanks for point it out!

@ion-elgreco
Copy link
Author

@abstractqqq damn haha

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

No branches or pull requests

2 participants