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

lifetime: circular dependency #77

Closed
bari12 opened this issue Nov 8, 2017 · 0 comments
Closed

lifetime: circular dependency #77

bari12 opened this issue Nov 8, 2017 · 0 comments

Comments

@bari12
Copy link
Member

bari12 commented Nov 8, 2017

Hi
I find a import problems about /opt/rucio/lib/rucio/tests/test_lifetime.py
This test will send request to trigger lib/rucio/web/rest/lifetime_exception.py
but it seems a circular import occurs in this .py ?
 

(.venv) [root@rucio-test03 rucio]# python -i lib/rucio/web/rest/lifetime_exception.py
Traceback (most recent call last):
  File "lib/rucio/web/rest/lifetime_exception.py", line 17, in <module>
    from rucio.api.lifetime_exception import list_exceptions, add_exception, update_exception
  File "/opt/rucio/lib/rucio/api/lifetime_exception.py", line 14, in <module>
    from rucio.core import lifetime_exception
  File "/opt/rucio/lib/rucio/core/lifetime_exception.py", line 22, in <module>
    import rucio.common.policy
  File "/opt/rucio/lib/rucio/common/policy.py", line 23, in <module>
    import rucio.core.did
  File "/opt/rucio/lib/rucio/core/did.py", line 35, in <module>
    import rucio.core.rule
  File "/opt/rucio/lib/rucio/core/rule.py", line 32, in <module>
    import rucio.core.lock  # import get_replica_locks, get_files_and_replica_locks_of_dataset
  File "/opt/rucio/lib/rucio/core/lock.py", line 27, in <module>
    from rucio.core.lifetime_exception import define_eol
ImportError: cannot import name define_eol

 
In python shell:
 

>>> import rucio.core.lifetime_exception
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/opt/rucio/lib/rucio/core/lifetime_exception.py", line 22, in <module>
    import rucio.common.policy
  File "/opt/rucio/lib/rucio/common/policy.py", line 23, in <module>
    import rucio.core.did
  File "/opt/rucio/lib/rucio/core/did.py", line 35, in <module>
    import rucio.core.rule
  File "/opt/rucio/lib/rucio/core/rule.py", line 32, in <module>
    import rucio.core.lock  # import get_replica_locks, get_files_and_replica_locks_of_dataset
  File "/opt/rucio/lib/rucio/core/lock.py", line 27, in <module>
    from rucio.core.lifetime_exception import define_eol
ImportError: cannot import name define_eol

 
Best RegardEdward Wu
ASGC

Migrated from JIRA RUCIO-2835

@bari12 bari12 added this to the 1.12.4 milestone Nov 8, 2017
@bari12 bari12 modified the milestones: 1.13.3, 1.13.4 Nov 13, 2017
@bari12 bari12 modified the milestones: 1.13.4, 1.14.1 Nov 28, 2017
bari12 added a commit that referenced this issue Dec 1, 2017
…ency__Fix__77

lifetime: circular dependency; Fix #77
bari12 added a commit that referenced this issue Dec 1, 2017
…ency__Fix__77

lifetime: circular dependency; Fix #77
rucio pushed a commit that referenced this issue Feb 6, 2018
rucio pushed a commit that referenced this issue Feb 6, 2018
rucio pushed a commit that referenced this issue Feb 6, 2018
…ency__Fix__77

lifetime: circular dependency; Fix #77
yuyiguo pushed a commit to yuyiguo/rucio that referenced this issue Sep 20, 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