Closed
Conversation
Pyupgrade would update `Dict[str, Any]` to `dict[str, Any]` which
isn't allowed in Python 3.8, breaking the tests with an obscure error:
```
ImportError while loading conftest '/Users/fokkodriesprong/Desktop/iceberg/python/tests/conftest.py'.
../conftest.py:34: in <module>
from iceberg import schema
../../src/iceberg/schema.py:47: in <module>
class Schema(IcebergBaseModel):
pydantic/main.py:188: in pydantic.main.ModelMetaclass.__new__
???
pydantic/typing.py:419: in pydantic.typing.resolve_annotations
???
/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/typing.py:270: in _eval_type
return t._evaluate(globalns, localns)
/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/typing.py:518: in _evaluate
eval(self.__forward_code__, globalns, localns),
E TypeError: 'type' object is not subscriptable
```
Therefore we should disable them (until we go to Python 3.9 :)
Contributor
Author
|
It seems to be something specific to my branch |
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.
Pyupgrade would update
Dict[str, Any]todict[str, Any]whichisn't allowed in Python 3.8, breaking the tests with an obscure error:
Therefore we should disable them (until we go to Python 3.9 :)