-
Notifications
You must be signed in to change notification settings - Fork 16
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
Use named arguments in DaskFinder.find_spec #90
base: main
Are you sure you want to change the base?
Conversation
Follow the base class argument names as in `MetaPathFinder.find_spec` per https://docs.python.org/3.13/library/importlib.html#importlib.abc.MetaPathFinder.find_spec This allows find_spec callers to use keyword arguments for `path` and `target`.
This fixes the following import error for Cirq due to mismatched arguments of # in fresh venv for Python 3.12
$ pip install cirq-core rapids-dask-dependency
$ python -c "import cirq"
...
File "/tmp/t312/lib/python3.12/site-packages/cirq/_import.py", line 66, in find_spec
spec = self.finder.find_spec(fullname, path=path, target=target)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: DaskFinder.find_spec() got an unexpected keyword argument 'path'
$ pip uninstall rapids-dask-dependency
$ python -c "import cirq"
# works as expected
xref: googlecolab/colabtools#5141 |
Thanks for this fix @pavoljuhas! Do you know what version of RAPIDS is installed on the systems where this issue is being experienced? That changes the branch that we would merge this change into. |
The Colab environment where it shows has rapids_dask_dependency version 24.12.0. Thank you for quick response! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes looks good to me. Also not sure exactly which branch this should go to
Use named arguments in DaskFinder.find_spec
Follow the base class argument names as in
MetaPathFinder.find_spec
perhttps://docs.python.org/3.13/library/importlib.html#importlib.abc.MetaPathFinder.find_spec
This allows
find_spec
callers to use keyword arguments forpath
andtarget
.