Merged
Conversation
Closed
50aa1c6 to
b62eea1
Compare
skshetry
commented
Aug 29, 2022
tests/conftest.py
Outdated
| def __getattr__(self, name): | ||
| return Module() | ||
|
|
||
| sys.modules["hydra.conf"] = Module() |
Collaborator
Author
There was a problem hiding this comment.
Carbon copy to @daavoo since you are working in hydra.
Collaborator
Author
There was a problem hiding this comment.
Nothing breaks in the tests, or gets skipped AFAICT, so we are not using hydra.conf. It just gets imported transitively and breaks.
We don't have aiohttp support yet, due to which we have to install without cythonized extension. Similarly, there has been some changes in how dataclasses disallows some mutable arguments to be set as a class property, due to which `hydra.conf` fails to import in 3.11. See python/cpython#29867. For now, I have patched the module and avoid importing as a pytest-plugin. dvc-hdfs/pyarrow is not there yet, we'll usually see a release 2-3 months after official reelase. dvc-hdfs is skipped in 3.11 in extras_requires. `--set-params` will return a nice error message if hydra cannot be imported in 3.11. I decided to only patch that in tests.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
hydra.conffails to import in 3.11. See bpo-44674: Use unhashability as a proxy for mutability for default dataclass __init__ arguments. python/cpython#29867. For now, have patched the module and avoid importing as a pytest-plugin.--set-paramswill return a nice error message if hydra cannot be imported in 3.11. I decided to only patch that in tests.Note, if you want to use dvc with 3.11, you can install it with:
AIOHTTP_NO_EXTENSIONS=1 pip install -e ".[dev]"