jmcarp / flask-apispec

MIT License
655 stars 157 forks source link

Import error in v0.11.3 #239

Closed synapticarbors closed 2 years ago

synapticarbors commented 2 years ago

In building flask-apispec for conda-forge, I'm seeing the following error on our CI (https://dev.azure.com/conda-forge/feedstock-builds/_build/results?buildId=548922&view=logs&j=656edd35-690f-5c53-9ba3-09c10d0bea97&t=e5c8ab1d-8ff9-5cae-b332-e15ae582ed2d&l=463):

import: 'flask_apispec'
Traceback (most recent call last):
  File "/home/conda/feedstock_root/build_artifacts/flask-apispec_1660137944571/test_tmp/run_test.py", line 2, in <module>
    import flask_apispec
  File "/home/conda/feedstock_root/build_artifacts/flask-apispec_1660137944571/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pl/lib/python3.10/site-packages/flask_apispec/__init__.py", line 2, in <module>
    from flask_apispec.extension import FlaskApiSpec
  File "/home/conda/feedstock_root/build_artifacts/flask-apispec_1660137944571/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pl/lib/python3.10/site-packages/flask_apispec/extension.py", line 7, in <module>
    from flask_apispec import ResourceMeta
ImportError: cannot import name 'ResourceMeta' from partially initialized module 'flask_apispec' (most likely due to a circular import) (/home/conda/feedstock_root/build_artifacts/flask-apispec_1660137944571/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pl/lib/python3.10/site-packages/flask_apispec/__init__.py)
Tests failed for flask-apispec-0.11.3-pyhd8ed1ab_0.tar.bz2 - moving package to /home/conda/feedstock_root/build_artifacts/broken
WARNING:conda_build.build:Tests failed for flask-apispec-0.11.3-pyhd8ed1ab_0.tar.bz2 - moving package to /home/conda/feedstock_root/build_artifacts/broken

This is new as of v0.11.3. The previous version built without issue.

stufisher commented 2 years ago

Looks like the imports got isorted: https://github.com/jmcarp/flask-apispec/commit/0f5065cb6158875dfec4edf9dd2c4e7848580c61

stufisher commented 2 years ago

Really sorry to ping you again @sloria :(

sloria commented 2 years ago

Ah sorry about that. Fix released in 0.11.4