Skip to content
This repository was archived by the owner on Jan 30, 2023. It is now read-only.

Commit 264aa53

Browse files
committed
Fix lazy_import as well
1 parent cfd791c commit 264aa53

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

src/sage/all.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@
102102

103103
################ end setup warnings ###############################
104104

105+
import sage.misc.lazy_import
105106
lazy_import_lock = sage.misc.lazy_import.lock()
106107
lazy_import_lock.__enter__()
107108

@@ -117,8 +118,6 @@
117118
from time import sleep
118119
from functools import reduce # in order to keep reduce in python3
119120

120-
import sage.misc.lazy_import
121-
122121
from sage.misc.all import * # takes a while
123122
from sage.typeset.all import *
124123
from sage.repl.all import *

src/sage/misc/lazy_import.pyx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,15 +120,15 @@ def lock():
120120
GuardState.LOCKED
121121
"""
122122
global startup_state
123-
guard_state = GuardState.RUNNING
123+
guard_state = GuardState.LOCKED
124124
yield
125-
guard_state = GuardState.FINISHED
125+
guard_state = GuardState.UNLOCKED
126126

127127
cdef list imports_resolved_during_locked = []
128128

129129
def _get_imports_resolved_during_locked():
130130
"""
131-
Return all lazy imports that were resolved while the layz import guard
131+
Return all lazy imports that were resolved while the lazy import guard
132132
has been locked.
133133
Only used for integration tests.
134134

0 commit comments

Comments
 (0)