Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ImportError due to Circular Import in auto-discover Process with django-unicorn #334

Closed
allieus opened this issue Nov 7, 2023 · 3 comments

Comments

@allieus
Copy link

allieus commented Nov 7, 2023

I've encountered an issue while using the django-unicorn library where a circular import occurs during the auto-discover process. Specifically, the code import typing within django-unicorn/components/typing.py appears to reference itself, which leads to an ImportError.

image

Would it be feasible to introduce a configuration option in the settings of django-unicorn to allow specific apps to be excluded from the auto-discover process? Implementing this feature could offer a more flexible way to manage imports and help avoid circular reference issues like the one I've encountered.

@EmilStenstrom
Copy link
Owner

EmilStenstrom commented Nov 7, 2023

This repo is not about django-unicorn, that's a separate project!

@allieus
Copy link
Author

allieus commented Nov 11, 2023

I understand that this is a separate project. However, when using django-components in conjunction with django-unicorn, the components folder in django-unicorn seems to trigger the error mentioned above during the autodiscover process of django-components.

I wonder if it might be beneficial for django-components' autodiscover function to have the capability to exclude components folders that do not comply with the rules of django-components. This is why I am raising this issue.

Thank you. :-)

@EmilStenstrom
Copy link
Owner

I wonder if actually fixing the error would be easier in this case? The error message you post is because django-unicorn is written for a later version of Python than the one you use. That should be something that's easy to fix right?

@EmilStenstrom EmilStenstrom closed this as not planned Won't fix, can't repro, duplicate, stale Dec 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants