You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
pycycle says No worries, no cycles here! but in fact it misses some.
This is how it explodes in runtime:
$ ipython
Python 3.8.0 (default, Oct 16 2019, 16:00:06)
Type 'copyright', 'credits' or 'license' for more information
IPython 7.11.1 -- An enhanced Interactive Python. Type '?' for help.
In [1]: from octomachinery.github.api.app_client import GitHubApp
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
<ipython-input-1-1b4597177f26> in <module>
----> 1 from octomachinery.github.api.app_client import GitHubApp
~/.pyenv/versions/chronographer-github-app-py3.8.0-pyenv-venv/lib/python3.8/site-packages/octomachinery/github/api/app_client.py in <module>
1011# pylint: disable=relative-beyond-top-level
---> 12 from ...app.routing import WEBHOOK_EVENTS_ROUTER
13# pylint: disable=relative-beyond-top-level14from ...app.routing.abc import OctomachineryRouterBase
~/.pyenv/versions/chronographer-github-app-py3.8.0-pyenv-venv/lib/python3.8/site-packages/octomachinery/app/__init__.py in <module>
1"""GitHub App infra."""2
----> 3 from .server.runner import run # noqa: F401
~/.pyenv/versions/chronographer-github-app-py3.8.0-pyenv-venv/lib/python3.8/site-packages/octomachinery/app/server/runner.py in <module>
18from .config import WebServerConfig
19# pylint: disable=relative-beyond-top-level
---> 20 from .machinery import run_forever as run_server_forever
2122
~/.pyenv/versions/chronographer-github-app-py3.8.0-pyenv-venv/lib/python3.8/site-packages/octomachinery/app/server/machinery.py in <module>
910# pylint: disable=relative-beyond-top-level
---> 11 from ...github.api.app_client import GitHubApp
12# pylint: disable=relative-beyond-top-level13from ...utils.asynctools import auto_cleanup_aio_tasks
ImportError: cannot import name 'GitHubApp' from partially initialized module 'octomachinery.github.api.app_client' (most likely due to a circular import) (~/.pyenv/versions/chronographer-github-app-py3.8.0-pyenv-venv/lib/python3.8/site-packages/octomachinery/github/api/app_client.py)
The text was updated successfully, but these errors were encountered:
Just looking through the code and I had the same question when I couldn't understand how it was handling relative imports (which in python2 can look the same as regular imports). Seems like it doesn't
I haven't tried to debug it but it's reproducible with this version of my project: https://github.com/sanitizers/octomachinery/tree/4cd3455d6d5f62b94bd1fd2ce78658cbce3eb18a
pycycle says
No worries, no cycles here!
but in fact it misses some.This is how it explodes in runtime:
$ ipython
The text was updated successfully, but these errors were encountered: