Add support for Python3.11#5359
Conversation
|
Fix a dependency conflicts. |
|
Switching the operator from |
|
Sorry for I didn't go through a lot of tests. I am pretty new to this lib. This seems an error for omegaconf(any version) which is not compatible for Python 3.11's dataclasses. I fix this by change code in Just like below: from dataclasses import _MISSING_TYPE
...
...
@staticmethod
def _create_impl( # noqa F811
obj: Any = _EMPTY_MARKER_, parent: Optional[BaseContainer] = None
) -> Union[DictConfig, ListConfig]:
try:
...
...
if isinstance(obj, type):
raise ValidationError(
f"Input class '{obj.__name__}' is not a structured config. "
"did you forget to decorate it as a dataclass?"
)
# Add a judgement for missing type
elif isinstance(obj, _MISSING_TYPE):
return DictConfig(content={}, parent=parent)
else:
raise ValidationError(
f"Object of unsupported type: '{type(obj).__name__}'"
)It looks like I need to improve compatibility with other libraries first. |
fix the default factory for 'decoder' in DecoderConfig
|
excuse me, did this work, at least when in sync with the updates on the base branch? |
|
this is background for the omegaconf and hydra-cor pinned requirements: |
do this face 'NameError: name "EMPTY_MARKER" is not defined', why? |
Before submitting
What does this PR do?
Fixes #5012 (issue).
This PR updates supports for Python 3.11 and also add the adaptation of hydra by updating the version of hydra to 1.3.2.
PR review
Anyone in the community is free to review the PR once the tests have passed.
If we didn't discuss your PR in Github issues there's a high chance it will not be merged.
Did you have fun?
Sure!