Michael Shoemaker
10/05/2022, 2:58 PMImportError while loading conftest '/home/gary/prefect/tests/conftest.py'.
tests/conftest.py:32: in <module>
import prefect
src/prefect/__init__.py:23: in <module>
from prefect.flows import flow, Flow
src/prefect/flows.py:36: in <module>
from prefect.context import PrefectObjectRegistry, registry_from_script
src/prefect/context.py:34: in <module>
from prefect.client import OrionClient
src/prefect/client.py:55: in <module>
from prefect.orion.api.server import ORION_API_VERSION, create_app
src/prefect/orion/api/__init__.py:1: in <module>
from . import (
src/prefect/orion/api/block_documents.py:19: in <module>
from prefect.orion import models, schemas
src/prefect/orion/models/__init__.py:1: in <module>
from . import (
src/prefect/orion/models/block_schemas.py:12: in <module>
from prefect.blocks.core import Block
src/prefect/blocks/__init__.py:3: in <module>
import prefect.blocks.notifications
src/prefect/blocks/notifications.py:26: in <module>
class SlackWebhook(NotificationBlock):
pydantic/main.py:283: in pydantic.main.ModelMetaclass.__new__
???
../anaconda3/lib/python3.9/abc.py:106: in __new__
cls = super().__new__(mcls, name, bases, namespace, **kwargs)
src/prefect/utilities/dispatch.py:99: in _register_subclass_of_base_type
register_type(cls)
src/prefect/utilities/dispatch.py:154: in register_type
key = get_dispatch_key(cls)
src/prefect/utilities/dispatch.py:76: in get_dispatch_key
dispatch_key = dispatch_key()
src/prefect/blocks/core.py:127: in __dispatch_key__
return block_schema_to_key(cls._to_block_schema())
src/prefect/blocks/core.py:263: in _to_block_schema
return BlockSchema(
pydantic/main.py:340: in pydantic.main.BaseModel.__init__
???
pydantic/main.py:1076: in pydantic.main.validate_model
???
pydantic/fields.py:884: in pydantic.fields.ModelField.validate
???
pydantic/fields.py:1101: in pydantic.fields.ModelField._validate_singleton
???
pydantic/fields.py:1148: in pydantic.fields.ModelField._apply_validators
???
pydantic/class_validators.py:318: in pydantic.class_validators._generic_validator_basic.lambda13
???
pydantic/main.py:690: in pydantic.main.BaseModel.validate
???
E DeprecationWarning: `copy_on_model_validation` should be a string: 'deep', 'shallow' or 'none'
Khuyen Tran
10/05/2022, 3:02 PMMichael Shoemaker
10/05/2022, 3:07 PM# Clone the repository and switch to the 'orion' branch
git clone <https://github.com/PrefectHQ/prefect.git>
cd prefect
git checkout orion
# Install the package with development dependencies
pip install -e ".[dev]"
# Setup pre-commit hooks for required formatting
pre-commit install
# Run tests
pytest
Found here. https://docs.prefect.io/contributing/overview/ Had to resolve some dependencies, but after that running the install went smooth. The errors appear when I execute
pytest
I'll try to debug with the thread you provided now.....more to come.Zanie
10/05/2022, 3:13 PMcopy_on_model_validation
?Michael Shoemaker
10/05/2022, 3:15 PMKhuyen Tran
10/05/2022, 3:15 PMgit checkout main
instead of git checkout orion
as mentioned in the doc right?Michael Shoemaker
10/05/2022, 3:16 PMZanie
10/05/2022, 3:16 PMmain
branchMichael Shoemaker
10/05/2022, 3:16 PMZanie
10/05/2022, 3:16 PMorion
branch is out of date and not compatible with the latest PydanticKhuyen Tran
10/05/2022, 3:17 PMZanie
10/05/2022, 3:17 PMMichael Shoemaker
10/05/2022, 3:21 PMZanie
10/05/2022, 3:30 PMKhuyen Tran
10/05/2022, 5:05 PM