Hochfrequenz / ahbicht

Python Package that parses Condition Expressions from Anwendungshandbüchers ("AHB")
MIT License
4 stars 0 forks source link

Upgrade to Sphinx7 runs into circular import? #335

Closed hf-kklein closed 9 months ago

hf-kklein commented 1 year ago

Running Sphinx v7.2.4 Creating file /home/runner/work/ahbicht/ahbicht/docs/api/ahbicht.rst. Creating file /home/runner/work/ahbicht/ahbicht/docs/api/ahbicht.content_evaluation.rst. Creating file /home/runner/work/ahbicht/ahbicht/docs/api/ahbicht.expressions.rst. Creating file /home/runner/work/ahbicht/ahbicht/docs/api/ahbicht.json_serialization.rst. Creating file /home/runner/work/ahbicht/ahbicht/docs/api/ahbicht.validation.rst. Creating file /home/runner/work/ahbicht/ahbicht/docs/api/modules.rst. loading intersphinx inventory from http://www.sphinx-doc.org/en/stable/objects.inv... loading intersphinx inventory from https://docs.python.org/3.10/objects.inv... intersphinx inventory has moved: http://www.sphinx-doc.org/en/stable/objects.inv -> https://www.sphinx-doc.org/en/master/objects.inv [autosummary] generating autosummary for: api/ahbicht.content_evaluation.rst, api/ahbicht.expressions.rst, api/ahbicht.json_serialization.rst, api/ahbicht.rst, api/ahbicht.validation.rst, api/modules.rst, index.rst

Warning, treated as error: Failed to import ahbicht.expressions.ahb_expression_evaluation. Possible hints:

  • AttributeError: module 'ahbicht.expressions' has no attribute 'ahb_expression_evaluation'
  • ImportError: cannot import name 'evaluate_ahb_expression_tree' from partially initialized module 'ahbicht.expressions.ahb_expression_evaluation' (most likely due to a circular import) (/home/runner/work/ahbicht/ahbicht/docs/../src/ahbicht/expressions/ahb_expression_evaluation.py)

https://github.com/Hochfrequenz/ahbicht/pull/334

I can reproduce locally but do not know how to fix.

hf-kklein commented 9 months ago

to reproduce:

tox -re docs

This problem was introduced in e9b73d27868b94b5cf1f1be56afbde56ca421989 (my fault)