Closed strogdon closed 2 years ago
What the heck is this supposed to be
ModuleNotFoundError: No module named '_home_steven__sage_temp_hp_probook_29214_tmp_ivnug8nt_pyx_0'
I am assuming it is taken from from a sage temporary path in your personal home. And that your machine is called "hp probook". This is a cython call so it is probably trying to compile something there, but those _
are probably a wrong substitution.
So, the folder up to hp_probook
exists where _ -> /
and __ ->
/. but that folder is empty. I will try from the sage prompt.
Yes, after hp_probook
, that would be random string named folders or files that get cleaned up when sage shuts down.
From the sage prompt:
sage: cython('''
....: class A:
....: def __init__(self):
....: "some init doc"
....: pass
....: class B:
....: "some class doc"
....: class A(A):
....: pass
....: ''')
---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
<ipython-input-1-8e3b671afc30> in <module>
----> 1 cython('''
2 class A:
3 def __init__(self):
4 "some init doc"
5 pass
/usr/lib/python3.9/site-packages/sage/misc/lazy_import.pyx in sage.misc.lazy_import.LazyImpo
358 True
359 """
--> 360 return self.get_object()(*args, **kwds)
361
362 def __repr__(self):
/usr/lib/python3.9/site-packages/sage/misc/cython.py in cython_compile(code, **kwds)
657 with open(tmpfile, 'w') as f:
658 f.write(code)
--> 659 return cython_import_all(tmpfile, get_globals(), **kwds)
660
661
/usr/lib/python3.9/site-packages/sage/misc/cython.py in cython_import_all(filename, globals,
547 code
548 """
--> 549 m = cython_import(filename, **kwds)
550 for k, x in m.__dict__.items():
551 if k[0] != '_':
/usr/lib/python3.9/site-packages/sage/misc/cython.py in cython_import(filename, **kwds)
527 try:
528 sys.path.append(build_dir)
--> 529 return builtins.__import__(name)
530 finally:
531 sys.path = oldpath
ModuleNotFoundError: No module named '_home_steven__sage_temp_hp_probook_6078_tmp_b3nfqdcz_p
The incomplete line should be
/usr/lib/python3.9/site-packages/sage/misc/lazy_import.pyx in sage.misc.lazy_import.LazyImport.__call__ (/var/tmp/portage/sci-mathematics/sage-9999/work/sage-9999/src-python3_9/build/cythonized/sage/misc/lazy_import.c:4036)()
Using --verbose
in the doctest
Trying (line 2102): cython('''
class A:
def __init__(self):
"some init doc"
pass
class B:
"some class doc"
class A(A):
pass
''')
Expecting nothing
**********************************************************************
File "/usr/lib/python3.9/site-packages/sage/misc/sageinspect.py", line 2102, in sage.misc.sageinspect._sage_getsourcelines_name_with_dot
Failed example:
cython('''
class A:
def __init__(self):
"some init doc"
pass
class B:
"some class doc"
class A(A):
pass
''')
Exception raised:
Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/sage/doctest/forker.py", line 714, in _run
self.compile_and_execute(example, compiler, test.globs)
File "/usr/lib/python3.9/site-packages/sage/doctest/forker.py", line 1133, in compile_and_execute
exec(compiled, globs)
File "<doctest sage.misc.sageinspect._sage_getsourcelines_name_with_dot[3]>", line 1, in <module>
cython('''
File "sage/misc/lazy_import.pyx", line 360, in sage.misc.lazy_import.LazyImport.__call__ (/var/tmp/portage/sci-mathematics/sage-9999/work/sage-9999/src-python3_9/build/cythonized/sage/misc/lazy_import.c:4036)
return self.get_object()(*args, **kwds)
File "/usr/lib/python3.9/site-packages/sage/misc/cython.py", line 659, in cython_compile
return cython_import_all(tmpfile, get_globals(), **kwds)
File "/usr/lib/python3.9/site-packages/sage/misc/cython.py", line 549, in cython_import_all
m = cython_import(filename, **kwds)
File "/usr/lib/python3.9/site-packages/sage/misc/cython.py", line 529, in cython_import
return builtins.__import__(name)
ModuleNotFoundError: No module named '_home_steven__sage_temp_hp_probook_6241_tmp_y5w8993i_pyx_0'
On vanilla (9.3.beta9) I see (different gentoo machine):
sage: cython('''
....: class A:
....: def __init__(self):
....: "some init doc"
....: pass
....: class B:
....: "some class doc"
....: class A(A):
....: pass
....: ''')
/usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible ///usr/lib/libm.so when searching for -lm
/usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible ///usr/lib/libm.a when searching for -lm
/usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible ///usr/lib/libpthread.so when searching for -lpthread
/usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible ///usr/lib/libpthread.a when searching for -lpthread
/usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible ///usr/lib/libc.so when searching for -lc
/usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible ///usr/lib/libc.a when searching for -lc
Perhaps Gentoo gcc-10 issue? But you don't have any problem.
Do you have a multilib (both 64 and 32bits) enabled? This looks like hardcoded 32bit library path being searched first.
I do have multilib enabled for gcc
and glibc
, thought not explicitly enabled except from perhaps my default profile. I just noticed this and have not previously had a problem. I should probably use -multilib. On vanilla 9.3.beta7 the sageinspect.py passed, but was probably built with gcc-9. I did not test vanilla 9.3.beta8.
On vanilla I am expecting multilib install to be probed when using cython, but not in sage-on-gentoo because of https://github.com/cschwan/sage-on-gentoo/blob/master/sci-mathematics/sage/sage-9999.ebuild#L199 and later. I talked to Matthias Koeppe about it during sage days so that will probably get fixed but not before 9.4 I would think.
Is it possible that this issue is mulitilb-related? I doctested sageinspect.py (9.3.beta9) on prefix without an issue. It is curious that cython seems to be forefront.
That section is related to https://trac.sagemath.org/ticket/16309 which I cannot pretend I quite understand so far.
Both machines have multilib
enabled only when building gcc
and glibc
.
machine 1 (some components may be built with gcc-9, sage and cython built with gcc-10) $ uname -a Linux hp-envy 5.4.38-gentoo #7 SMP Sat Jan 16 21:46:51 MST 2021 x86_64 Intel(R) Core(TM) i7-7500U CPU @ 2.70GHz GenuineIntel GNU/Linux
sageinspect.py passes.
machine 2 (entirely built with gcc-10) $ uname -a Linux hp-probook 5.4.97-gentoo-x86_64 #16 SMP Mon Mar 15 21:41:09 MDT 2021 x86_64 AMD Ryzen 7 4700U with Radeon Graphics AuthenticAMD GNU/Linux
This is the machine where I have this issue.
Some data points (testsuite for cython w/ py3.9 and gcc-10) machine 1
Doctest: cyfunction.inspect_isfunction ... FAIL
Doctest: cyfunction.inspect_isfunction ... FAIL
FAIL: inspect_isfunction (cyfunction)
FAIL: inspect_isfunction (cyfunction)
FAILED (failures=2, skipped=76)
machine 2
Doctest: cyfunction.inspect_isfunction ... FAIL
Doctest: cyfunction.inspect_isfunction ... FAIL
Doctest: reload_ext_module.test_reload ... FAIL
Doctest: reload_ext_module.test_reload ... FAIL
FAIL: inspect_isfunction (cyfunction)
FAIL: inspect_isfunction (cyfunction)
FAIL: test_reload (reload_ext_module)
FAIL: test_reload (reload_ext_module)
FAILED (failures=4, skipped=76)
This works:
sage: from sage.misc.sageinspect import sage_getsource
sage: cython('''
....: class A:
....: def __init__(self):
....: "some init doc"
....: pass
....: from sage.misc.nested_class import NestedClassMetaclass
....: class B:
....: "some class doc"
....: class A(A):
....: pass
....: ''')
sage:
sage: B.A.__name__
'A'
sage: B.A.__qualname__
'B.A'
sage: sage_getsource(B.A)
' class A(A):\n pass\n\n'
sage:
which includes the line from sage.misc.nested_class import NestedClassMetaclass
. That line was included here and deleted here as not being needed.
This is out of my league.
The above does not resolve other issues in sageinspect.py
.
Well it obviously worked once (see above). But sometimes it will work and sometimes it will fail. Very strange. It may not be related the added line.
Well, it is out of my league too. Need to walk away from it for a little bit to think.
A simple example:
sage: cython('''
....: ''')
---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
<ipython-input-1-ac456857e025> in <module>
----> 1 cython('''
2 ''')
/usr/lib/python3.9/site-packages/sage/misc/lazy_import.pyx in sage.misc.lazy_import.LazyImport.__call__ (/var/tmp/portage/sci-mathematics/sage-9999/work/sage-9999/src-python3_9/build/cythonized/sage/misc/lazy_import.c:4036)()
358 True
359 """
--> 360 return self.get_object()(*args, **kwds)
361
362 def __repr__(self):
/usr/lib/python3.9/site-packages/sage/misc/cython.py in cython_compile(code, **kwds)
657 with open(tmpfile, 'w') as f:
658 f.write(code)
--> 659 return cython_import_all(tmpfile, get_globals(), **kwds)
660
661
/usr/lib/python3.9/site-packages/sage/misc/cython.py in cython_import_all(filename, globals, **kwds)
547 code
548 """
--> 549 m = cython_import(filename, **kwds)
550 for k, x in m.__dict__.items():
551 if k[0] != '_':
/usr/lib/python3.9/site-packages/sage/misc/cython.py in cython_import(filename, **kwds)
527 try:
528 sys.path.append(build_dir)
--> 529 return builtins.__import__(name)
530 finally:
531 sys.path = oldpath
ModuleNotFoundError: No module named '_home_steven__sage_temp_hp_probook_16698_tmp_q1g_lxlm_pyx_0'
and
$ tree ~/.sage/temp/hp-probook/16698/
/home/steven/.sage/temp/hp-probook/16698/
├── ecl
├── spyx
│ └── _home_steven__sage_temp_hp_probook_16698_tmp_q1g_lxlm_pyx
│ ├── build
│ │ └── temp.linux-x86_64-3.9
│ │ └── home
│ │ └── steven
│ ├── _home_steven__sage_temp_hp_probook_16698_tmp_q1g_lxlm_pyx_0.c
│ ├── _home_steven__sage_temp_hp_probook_16698_tmp_q1g_lxlm_pyx_0.cpython-39-x86_64-linux-gnu.so
│ ├── _home_steven__sage_temp_hp_probook_16698_tmp_q1g_lxlm_pyx_0.err
│ ├── _home_steven__sage_temp_hp_probook_16698_tmp_q1g_lxlm_pyx_0.html
│ ├── _home_steven__sage_temp_hp_probook_16698_tmp_q1g_lxlm_pyx_0.lis
│ └── _home_steven__sage_temp_hp_probook_16698_tmp_q1g_lxlm_pyx_0.pyx
└── tmp_q1g_lxlm.pyx
So the module appears to be there but something is missing. Perhaps latency between read/write or path not set?
After sleeping on it a little bit I want to review the situation a bit. Are the following facts correct
So far, I only see this on a new install of s-o-g on a freshly installed gentoo laptop. I don't see the issue on a recently installed prefix nor on an older installed gentoo.
I am musing that there is a runtime dependency that we are missing and that's why there are failures on the new machine. It may be something that only recently was an explicit dependency of something used by sage but not anymore.
I have been able to get the simple example I mentioned above to occasionally work. But so far it will not work twice in succession.
This almost reminds me of something not being thread safe
, i.e. the generation of the module is done on one thread and the loading of that module on another thread. And the treads are not communicating.
An interesting observation. But I would expect other things to fail. I have trouble picturing something that would be uniquely affecting this doctest.
I'm able to patch cython.py
to see that the .pyx
file is generated, it is cythonized to create the .so
file, the .so
file is present on my system and still it fails to load. I'm able to manually load it after things fail. And occasionally there is no failure, i.e. the module can be found and loaded. Are you aware of a hardware issue that could be a contribution? It is a new laptop/processor.
Hum, that would be a very tricky hardware problem. With all those symptoms I can only think of some kind of race conditions in the file system, so possibly hard drive which I am assuming is solid state. If it was that, an interesting check would be to run the test suite with a different DOT_SAGE
, possibly pointing it to somewhere on /dev/shm
.
Same failure if I write to /dev/shm
.
Another data point. This always works
sage: cython('''
....: ''', create_local_so_file=True)
The module is written not only under ~/.sage/temp/
but also in the local folder. The name of the module is much shorter than when create_local_so_file=False
. So maybe a parsing problem?
Parsing feels definitely part of the problem. I mentioned it earlier. I just pushed 9.3.rc0 I doubt there is anything in there that would fix the issue but it needs to be tried.
Stll present with 9.3.rc0
.
I installed vanilla on the offending laptop and I have the same issue (the ld stuff is because of my gcc)
sage: cython('''
....: ''')
/usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible ///usr/lib/libm.so when searching for -lm
/usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible ///usr/lib/libm.a when searching for -lm
/usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible ///usr/lib/libpthread.so when searching for -lpthread
/usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible ///usr/lib/libpthread.a when searching for -lpthread
/usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible ///usr/lib/libc.so when searching for -lc
/usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible ///usr/lib/libc.a when searching for -lc
---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
<ipython-input-1-e3fd0203ef75> in <module>
----> 1 cython('''
2 ''')
/local/sage-git/sage/local/lib/python3.9/site-packages/sage/misc/lazy_import.pyx in sage.misc.lazy_import.LazyImport.__call__ (build/cythonized/sage/misc/lazy_import.c:4032)()
358 True
359 """
--> 360 return self.get_object()(*args, **kwds)
361
362 def __repr__(self):
/local/sage-git/sage/local/lib/python3.9/site-packages/sage/misc/cython.py in cython_compile(code, **kwds)
657 with open(tmpfile, 'w') as f:
658 f.write(code)
--> 659 return cython_import_all(tmpfile, get_globals(), **kwds)
660
661
/local/sage-git/sage/local/lib/python3.9/site-packages/sage/misc/cython.py in cython_import_all(filename, globals, **kwds)
547 code
548 """
--> 549 m = cython_import(filename, **kwds)
550 for k, x in m.__dict__.items():
551 if k[0] != '_':
/local/sage-git/sage/local/lib/python3.9/site-packages/sage/misc/cython.py in cython_import(filename, **kwds)
527 try:
528 sys.path.append(build_dir)
--> 529 return builtins.__import__(name)
530 finally:
531 sys.path = oldpath
ModuleNotFoundError: No module named '_home_steven__sage_temp_hp_probook_5515_tmp_9qct6xma_pyx_0'
This usually works
sage: cython('''
....: ''', create_local_so_file=True)
/usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible ///usr/lib/libm.so when searching for -lm
/usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible ///usr/lib/libm.a when searching for -lm
/usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible ///usr/lib/libpthread.so when searching for -lpthread
/usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible ///usr/lib/libpthread.a when searching for -lpthread
/usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible ///usr/lib/libc.so when searching for -lc
/usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible ///usr/lib/libc.a when searching for -lc
sage:
although if done enough times in a row it will fail.
sage: cython('''
....: ''', create_local_so_file=True)
/usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible ///usr/lib/libm.so when searching for -lm
/usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible ///usr/lib/libm.a when searching for -lm
/usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible ///usr/lib/libpthread.so when searching for -lpthread
/usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible ///usr/lib/libpthread.a when searching for -lpthread
/usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible ///usr/lib/libc.so when searching for -lc
/usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible ///usr/lib/libc.a when searching for -lc
---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
<ipython-input-8-9468c4ca8fdc> in <module>
----> 1 cython('''
2 ''', create_local_so_file=True)
/local/sage-git/sage/local/lib/python3.9/site-packages/sage/misc/lazy_import.pyx in sage.misc.lazy_import.LazyImport.__call__ (build/cythonized/sage/misc/lazy_import.c:4032)()
358 True
359 """
--> 360 return self.get_object()(*args, **kwds)
361
362 def __repr__(self):
/local/sage-git/sage/local/lib/python3.9/site-packages/sage/misc/cython.py in cython_compile(code, **kwds)
657 with open(tmpfile, 'w') as f:
658 f.write(code)
--> 659 return cython_import_all(tmpfile, get_globals(), **kwds)
660
661
/local/sage-git/sage/local/lib/python3.9/site-packages/sage/misc/cython.py in cython_import_all(filename, globals, **kwds)
547 code
548 """
--> 549 m = cython_import(filename, **kwds)
550 for k, x in m.__dict__.items():
551 if k[0] != '_':
/local/sage-git/sage/local/lib/python3.9/site-packages/sage/misc/cython.py in cython_import(filename, **kwds)
527 try:
528 sys.path.append(build_dir)
--> 529 return builtins.__import__(name)
530 finally:
531 sys.path = oldpath
ModuleNotFoundError: No module named 'tmp_mwggf0hd'
Which vanilla components have to be rebuilt to allow for https://github.com/cschwan/sage-on-gentoo/blob/master/sci-mathematics/sage/sage-9999.ebuild#L199? Perhaps it's more complicated than just patching and rebuilding. I have tried make
and ./sage -f sagelib
after applying the sed
change with no success. I'm trying to doctest vanilla without the results being cluttered with the ld
warnings. As a last resort perhaps make distclean && make
?
./sage -b
after the change should be sufficient for a rebuild/re-install of a changed component. Thinking about it, there must be something more to get rid of those ld
warnings from a vanilla sage. In fact, while it is necessary in sage-on-distros to have the sed
(or equivalent) to avoid them, in vanilla that particular set of ld
warnings may come from some other component with "polluted" -L
flags. It is not just looking at /usr/lib
but ///usr/lib
which seems to imply it was /$A/$B/usr/lib
and that coincidentally A
and B
are empty.
Perhaps forget about this. A change to the patched file, cython.py
should not really affect things, but the change appears in a cached
function. And I didn't think about the -L
flags.
I have opened https://trac.sagemath.org/ticket/31626 for this issue since I see it with vanilla Sage. I removed the ld
chatter warnings by fixing sage_conf.py
as suggested here
See trac ticket #28928 and sage-release comment. The comment relates to a, not specified, forking issue in Windows.
A shot in the dark? I noticed from https://github.com/cschwan/sage-on-gentoo/issues/629#issuecomment-803407239 that the first item in the backtrace from lazy_import.pyx
is
--> 360 return self.get_object()(*args, **kwds)
The get_object
function from lazy_import.pyx
reads
cdef inline get_object(self):
"""
Faster, Cython-only partially-inlined version of ``_get_object``.
"""
if likely(self._object is not None):
return self._object
return self._get_object()
The likely
construct/macro can be optimized in the kernel. Now on the machine where I have issues I have in my kernel config
┌────────────────────── General architecture-dependent options ───────────────────────┐
│ Arrow keys navigate the menu. <Enter> selects submenus ---> (or empty submenus │
│ ----). Highlighted letters are hotkeys. Pressing <Y> includes, <N> excludes, <M> │
│ modularizes features. Press <Esc><Esc> to exit, <?> for Help, </> for Search. │
│ Legend: [*] built-in [ ] excluded <M> module < > module capable │
│ ┌─────────────────────────────────────────────────────────────────────────────────┐ │
│ │ < > OProfile system profiling │ │
│ │ [ ] Kprobes │ │
│ │ [ ] Optimize very unlikely/likely branches │ │
│ │ [*] Stack Protector buffer overflow detection │ │
│ │ [*] Strong Stack Protector │ │
│ │ [*] Use a virtually-mapped stack │ │
│ │ [ ] Perform full reference count validation at the expense of speed │ │
│ │ [ ] Locking event counts collection │ │
│ │ GCOV-based kernel profiling ---> │ │
│ │ [*] GCC plugins --->
while on the machine with no issue I have Kprobes
and unlikely/likely optimization
built in. Is it possible that this is the issue?
Rebuilding the kernel with Kprobes
and unlikely/likely optimization
and then (./sage -f sagelib && make) seemed to resolve things with vanilla
./sage -t src/sage/misc/cython.py
Running doctests with ID 2021-04-12-14-38-18-4c565e5e.
Git branch: develop
Using --optional=build,dochtml,gentoo,pip,sage,sage_spkg
Doctesting 1 file.
sage -t --warn-long 95.4 --random-seed=0 src/sage/misc/cython.py
[49 tests, 4.16 s]
----------------------------------------------------------------------
All tests passed!
Doctested the wrong file! It should have been
./sage -t src/sage/misc/sageinspect.py
which still fails. I suspect the kernel changes only affect building the kernel.
OK, this is insane. I can see how this could be useful but I think it is completely insane that it would be needed at runtime. This is a kernel debugging and profiling infrastructure. You should be able to do without.
OK I miss your last email. It still fails.
This hack fixes things here
diff --git a/src/sage/misc/cython.py b/src/sage/misc/cython.py
index e72c97f5c3..f77d7d956b 100644
--- a/src/sage/misc/cython.py
+++ b/src/sage/misc/cython.py
@@ -523,6 +523,8 @@ def cython_import(filename, **kwds):
"""
name, build_dir = cython(filename, **kwds)
+ build_dir = build_dir + '/'
+
oldpath = sys.path
try:
sys.path.append(build_dir)
$ sage -t /usr/lib/python3.9/site-packages/sage/misc/sageinspect.py
Running doctests with ID 2021-04-23-20-47-33-49e98fe2.
Using --optional=dochtml,sage
Doctesting 1 file.
sage -t --warn-long 95.9 --random-seed=0 /usr/lib/python3.9/site-packages/sage/misc/sageinspect.py
[340 tests, 113.15 s]
----------------------------------------------------------------------
All tests passed!
----------------------------------------------------------------------
Total time for all tests: 113.4 seconds
cpu time: 110.8 seconds
cumulative wall time: 113.1 seconds
See trac ticket.
The mind boggles. Something is either not behaving as expected or not used as it should. Cursory inspection of the code did not help. All I know is that the fix above is not windows safe.
See https://trac.sagemath.org/ticket/31626#comment:8 for an update.
No movement on https://trac.sagemath.org/ticket/31626. I think the resent proposal there is reasonable. There should NEVER be a ModuleNotFoundError
. The proposal insures it will not occur. Perhaps s-o-g can do this? I patch here for each beta/rc so that cython code can be created from the sage prompt and sageinspect.py
passes.
Yes, I can adopt that.
I am not sure I would care to much about any overhead. But either patch should get in soon.
It only took a year but finally https://trac.sagemath.org/ticket/31626 has been resolved. The s-o-g patch for this issue will not be needed in the next beta (9.7.beta6).
I noticed, and it is merged in the vbraun branch.
I have the rather lengthy failure:
Since this is a new install from scratch something could be missing.