<@ULVA73B9P> when I upgrade from prefect 3.6.16 to...
# ask-marvin
f
@Marvin when I upgrade from prefect 3.6.16 to 3.6.17, I have this error when I run my tests : platform darwin -- Python 3.14.2, pytest-9.0.3, pluggy-1.6.0 rootdir: /Users/florent/OMI/git/iguazu configfile: pyproject.toml plugins: metadata-3.1.1, html-4.2.0, anyio-4.13.0 collected 121 items / 6 errors =================================================================================================================================== ERRORS ==================================================================================================================================== ___________________________________________________________________________________________________________ ERROR collecting tests/blocks/test_papi_credentials.py ____________________________________________________________________________________________________________ ImportError while importing test module '/Users/florent/OMI/git/iguazu/tests/blocks/test_papi_credentials.py'. Hint: make sure your test modules/packages have valid Python names. Traceback: ../../../.pyenv/versions/3.14.2/lib/python3.14/importlib/__init__.py88 in import_module return _bootstrap._gcd_import(name[level:], package, level) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ tests/blocks/test_papi_credentials.py2 in <module> from prefect.blocks.core import Block ../../../Library/Caches/pypoetry/virtualenvs/iguazu-zSPJHTsc-py3.14/lib/python3.14/site-packages/prefect/blocks/__init__.py3 in <module> import prefect.blocks.notifications as notifications ../../../Library/Caches/pypoetry/virtualenvs/iguazu-zSPJHTsc-py3.14/lib/python3.14/site-packages/prefect/blocks/notifications.py12 in <module> from prefect.blocks.abstract import NotificationBlock, NotificationError ../../../Library/Caches/pypoetry/virtualenvs/iguazu-zSPJHTsc-py3.14/lib/python3.14/site-packages/prefect/blocks/abstract.py20 in <module> from prefect.blocks.core import Block ../../../Library/Caches/pypoetry/virtualenvs/iguazu-zSPJHTsc-py3.14/lib/python3.14/site-packages/prefect/blocks/core.py27 in <module> from griffe import Docstring, DocstringSection, DocstringSectionKind, Parser, parse E ModuleNotFoundError: No module named 'griffe' ------------------------------------------------------------------------------------------------------------------------------- Captured stderr ------------------------------------------------------------------------------------------------------------------------------- Failed to initialize plugins: No module named 'griffe' _____________________________________________________________________________________________________________ ERROR collecting tests/blocks/test_papi_request.py ______________________________________________________________________________________________________________ ImportError while importing test module '/Users/florent/OMI/git/iguazu/tests/blocks/test_papi_request.py'. Hint: make sure your test modules/packages have valid Python names. Traceback: ../../../.pyenv/versions/3.14.2/lib/python3.14/importlib/__init__.py88 in import_module return _bootstrap._gcd_import(name[level:], package, level) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ tests/blocks/test_papi_request.py2 in <module> from prefect.blocks.core import Block ../../../Library/Caches/pypoetry/virtualenvs/iguazu-zSPJHTsc-py3.14/lib/python3.14/site-packages/prefect/blocks/__init__.py3 in <module> import prefect.blocks.notifications as notifications ../../../Library/Caches/pypoetry/virtualenvs/iguazu-zSPJHTsc-py3.14/lib/python3.14/site-packages/prefect/blocks/notifications.py12 in <module> from prefect.blocks.abstract import NotificationBlock, NotificationError ../../../Library/Caches/pypoetry/virtualenvs/iguazu-zSPJHTsc-py3.14/lib/python3.14/site-packages/prefect/blocks/abstract.py20 in <module> from prefect.blocks.core import Block ../../../Library/Caches/pypoetry/virtualenvs/iguazu-zSPJHTsc-py3.14/lib/python3.14/site-packages/prefect/blocks/core.py27 in <module> from griffe import Docstring, DocstringSection, DocstringSectionKind, Parser, parse E ModuleNotFoundError: No module named 'griffe'
m
thought for 213.7 seconds
This looks like a dependency resolution/install issue, not a code change in
prefect.blocks.core
. What changed in 3.6.17 - Prefect still imports
griffe
from
prefect.blocks.core
-
griffe
is still a required dependency, not an optional extra - The main change appears to be that Prefect widened the allowed
griffe
range in 3.6.17 So the error:
Copy code
text
ModuleNotFoundError: No module named 'griffe'
usually means your environment ended up with
prefect==3.6.17
installed without
griffe
actually being present. Why you’re seeing it You're on: - Python
3.14.2
- Poetry-managed env Given that, the most likely cause is that your lockfile / virtualenv got into a weird state during the upgrade, and Poetry didn’t fully materialize the transitive dependency. Quick checks Run these in the same Poetry env as your tests:
Copy code
bash
poetry run python -c "import griffe; print(griffe.__file__)"
poetry show griffe
poetry show prefect
If
griffe
is missing, that confirms it. Recommended fixes 1. Refresh the lock/install cleanly
Copy code
bash
poetry lock
poetry install --sync
2. If that still fails, recreate the env:
Copy code
bash
poetry env remove --all
poetry install
3. As a workaround, explicitly add `griffe`:
Copy code
bash
poetry add griffe
If you want to be conservative, you can pin below 2.0:
Copy code
bash
poetry add "griffe>=0.49,<2.0"
Why that workaround helps Prefect 3.6.17 should bring
griffe
transitively, but explicitly adding it avoids resolver/env drift and gets your tests unblocked quickly. One more note You're testing on Python 3.14.2. If this only happens on 3.14 and not on 3.12/3.13, that would be useful signal too. Prefect 3.6.17 itself still expects
griffe
to be importable. If you want, I can help you inspect your
pyproject.toml
/
poetry.lock
and suggest the smallest safe dependency change.