great-expectations / great_expectations

Always know what to expect from your data.
https://docs.greatexpectations.io/
Apache License 2.0
9.86k stars 1.52k forks source link

import great expectation fails on MacOS (M1) #9968

Closed Auric-Manteo closed 1 month ago

Auric-Manteo commented 4 months ago

Describe the bug Importing the great expectation module on MacOS fails.

To Reproduce Import great expectation with import great_expectation Stacktrace:

import great_expectations as ge

File "/usr/local/lib/python3.9/site-packages/great_expectations/init.py", line 6, in from great_expectations.data_context.migrator.cloud_migrator import CloudMigrator File "/usr/local/lib/python3.9/site-packages/great_expectations/data_context/init.py", line 1, in from great_expectations.data_context.data_context import ( File "/usr/local/lib/python3.9/site-packages/great_expectations/data_context/data_context/init.py", line 1, in from great_expectations.data_context.data_context.abstract_data_context import ( File "/usr/local/lib/python3.9/site-packages/great_expectations/data_context/data_context/abstract_data_context.py", line 61, in from great_expectations.core.datasource_dict import CacheableDatasourceDict File "/usr/local/lib/python3.9/site-packages/great_expectations/core/datasource_dict.py", line 13, in from great_expectations.datasource.fluent import Datasource as FluentDatasource File "/usr/local/lib/python3.9/site-packages/great_expectations/datasource/fluent/init.py", line 5, in from great_expectations.datasource.fluent.interfaces import ( File "/usr/local/lib/python3.9/site-packages/great_expectations/datasource/fluent/interfaces.py", line 370, in class Datasource( File "/usr/local/lib/python3.9/site-packages/great_expectations/datasource/fluent/metadatasource.py", line 32, in new cls = super().new(meta_cls, cls_name, bases, cls_dict) File "/usr/local/lib/python3.9/site-packages/pydantic/v1/main.py", line 178, in new annotations = resolve_annotations(namespace.get('annotations', {}), namespace.get('module', None)) File "/usr/local/lib/python3.9/site-packages/pydantic/v1/typing.py", line 400, in resolve_annotations value = _eval_type(value, base_globals, None) File "/usr/local/lib/python3.9/typing.py", line 292, in _eval_type return t._evaluate(globalns, localns, recursive_guard) File "/usr/local/lib/python3.9/typing.py", line 553, in evaluate type = _type_check( File "/usr/local/lib/python3.9/typing.py", line 158, in _type_check raise TypeError(f"{arg} is not valid as type argument") TypeError: typing.ClassVar[typing.Sequence[typing.Type[great_expectations.datasource.fluent.interfaces.DataAsset]]] is not valid as type argument

Expected behavior The import does not raise any error.

Environment (please complete the following information):

Additional context I get the error when importing the module on MacOS. It works fine on Ubuntu with the exact same subdependencies (I compared the result of pip freeze).

Output of pip freeze:

agate==1.7.0
alembic==1.13.1
altair==4.2.2
anyio==4.3.0
argon2-cffi==23.1.0
argon2-cffi-bindings==21.2.0
arrow==1.3.0
asn1crypto==1.5.1
asttokens==2.4.1
async-lru==2.0.4
attrs==23.2.0
Babel==2.15.0
beautifulsoup4==4.12.3
bleach==6.1.0
boto3==1.26.165
botocore==1.29.165
certifi==2024.2.2
cffi==1.16.0
charset-normalizer==3.3.2
click==8.1.7
colorama==0.4.6
coloredlogs==14.0
comm==0.2.2
cramjam==2.8.3
croniter==2.0.5
cryptography==42.0.7
dagster==1.7.2
dagster-dbt==0.23.2
dagster-docker==0.23.2
dagster-pipes==1.7.2
dagster-postgres==0.23.2
dagster-slack==0.23.2
dbt-core==1.5.0
dbt-extractor==0.4.1
dbt-postgres==1.5.0
dbt-redshift==1.5.12
debugpy==1.8.1
decorator==5.1.1
defusedxml==0.7.1
docker==7.0.0
docker-image-py==0.1.12
docstring_parser==0.16
entrypoints==0.4
exceptiongroup==1.2.1
executing==2.0.1
fastjsonschema==2.19.1
fastparquet==0.8.3
fqdn==1.5.1
fsspec==2024.5.0
future==1.0.0
great-expectations==0.18.12
greenlet==3.0.3
grpcio==1.63.0
grpcio-health-checking==1.48.2
h11==0.14.0
hologram==0.0.16
httpcore==1.0.5
httpx==0.27.0
humanfriendly==10.0
idna==3.7
importlib_metadata==7.1.0
ipykernel==6.29.4
ipython==8.18.1
ipywidgets==8.1.2
isodate==0.6.1
isoduration==20.11.0
jedi==0.19.1
Jinja2==3.1.2
jmespath==1.0.1
json5==0.9.25
jsonpatch==1.33
jsonpointer==2.4
jsonschema==4.22.0
jsonschema-specifications==2023.12.1
jupyter-events==0.10.0
jupyter-lsp==2.2.5
jupyter_client==8.6.1
jupyter_core==5.7.2
jupyter_server==2.14.0
jupyter_server_terminals==0.5.3
jupyterlab==4.1.8
jupyterlab_pygments==0.3.0
jupyterlab_server==2.27.1
jupyterlab_widgets==3.0.10
leather==0.4.0
Logbook==1.5.3
lxml==5.2.2
makefun==1.15.2
Mako==1.3.5
markdown-it-py==3.0.0
MarkupSafe==2.1.5
marshmallow==3.21.2
mashumaro==3.6
matplotlib-inline==0.1.7
mdurl==0.1.2
minimal-snowplow-tracker==0.0.2
mistune==3.0.2
more-itertools==10.2.0
msgpack==1.0.8
mysql-connector-python==8.0.31
nbclient==0.10.0
nbconvert==7.16.4
nbformat==5.10.4
nest-asyncio==1.6.0
networkx==2.8.8
notebook==7.1.3
notebook_shim==0.2.4
numpy==1.26.4
orjson==3.10.3
overrides==7.7.0
packaging==24.0
pandas==1.3.5
pandocfilters==1.5.1
parsedatetime==2.4
parso==0.8.4
pathspec==0.11.2
pendulum==2.1.2
pexpect==4.9.0
platformdirs==4.2.2
prometheus_client==0.20.0
prompt-toolkit==3.0.43
protobuf==3.20.1
psutil==5.9.8
psycopg2-binary==2.9.6
ptyprocess==0.7.0
pure-eval==0.2.2
pyarrow==16.0.0
pycparser==2.22
pydantic==1.10.12
Pygments==2.18.0
pyOpenSSL==24.1.0
pyparsing==3.1.2
python-dateutil==2.8.2
python-dotenv==1.0.1
python-json-logger==2.0.7
python-slugify==8.0.4
pytimeparse==1.1.8
pytz==2024.1
pytzdata==2020.1
PyYAML==6.0.1
pyzmq==26.0.3
redshift-connector==2.0.913
referencing==0.35.1
regex==2024.5.15
requests==2.31.0
rfc3339-validator==0.1.4
rfc3986-validator==0.1.1
rich==13.7.1
rpds-py==0.18.1
ruamel.yaml==0.17.17
ruamel.yaml.clib==0.2.8
s3transfer==0.6.2
scipy==1.13.0
scramp==1.4.5
Send2Trash==1.8.3
sh==1.12.14
shellingham==1.5.4
six==1.16.0
slack_sdk==3.27.2
sniffio==1.3.1
soupsieve==2.5
SQLAlchemy==2.0.30
sqlglot==23.15.8
sqlglotrs==0.2.5
sqlparse==0.4.3
stack-data==0.6.3
structlog==24.1.0
tabulate==0.9.0
terminado==0.18.1
text-unidecode==1.3
tinycss2==1.3.0
tomli==2.0.1
toolz==0.12.1
toposort==1.10
tornado==6.4
tqdm==4.66.4
traitlets==5.14.3
typer==0.12.3
types-python-dateutil==2.9.0.20240316
typing_extensions==4.11.0
tzlocal==5.2
universal_pathlib==0.2.2
uri-template==1.3.0
urllib3==1.26.18
watchdog==4.0.0
wcwidth==0.2.13
webcolors==1.13
webencodings==0.5.1
websocket-client==1.8.0
Werkzeug==2.3.8
widgetsnbextension==4.0.10
zipp==3.18.1
MHenn1g commented 1 month ago

🔝 I second that (M2)

molliemarie commented 1 month ago

Hello @Auric-Manteo. With the launch of Great Expectations Core (GX 1.0), we are closing old issues posted regarding previous versions. Moving forward, we will focus our resources on supporting and improving GX Core (version 1.0 and beyond). If you find that an issue you previously reported still exists in GX Core, we encourage you to resubmit it against the new version. With more resources dedicated to community support, we aim to tackle new issues swiftly. For specific details on what is GX-supported vs community-supported, you can reference our integration and support policy.

To get started on your transition to GX Core, check out the GX Core quickstart (click “Full example code” tab to see a code example).

You can also join our upcoming community meeting on August 28th at 9am PT (noon ET / 4pm UTC) for a comprehensive rundown of everything GX Core, plus Q&A as time permits. Go to https://greatexpectations.io/meetup and click “follow calendar” to follow the GX community calendar.

Thank you for being part of the GX community and thank you for submitting this issue. We're excited about this new chapter and look forward to your feedback on GX Core. 🤗