Opened 3 years ago

Closed 3 years ago

#28034 closed defect (invalid)

py3 failure in repl/

Reported by: jhpalmieri Owned by:
Priority: major Milestone: sage-duplicate/invalid/wontfix
Component: python3 Keywords:
Cc: Merged in:
Authors: Reviewers:
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges


sage -t --long src/sage/repl/
File "src/sage/repl/", line 350, in sage.repl.ipython_extension.SageMagics.cython
Failed example:
    def f():
Expected nothing
    ModuleNotFoundError                       Traceback (most recent call last)
    <ipython-input-1-22d07b1a6610> in <module>()
    ----> 2 get_ipython().run_cell_magic('cython', '', "def f():\n    print('test')")
    /Users/palmieri/Desktop/Sage_stuff/sage_builds/PYTHON3/sage-8.8.rc2/local/lib/python3.7/site-packages/IPython/core/ in run_cell_magic(self, magic_name, line, cell)
       2115             magic_arg_s = self.var_expand(line, stack_depth)
       2116             with self.builtin_trap:
    -> 2117                 result = fn(magic_arg_s, cell)
       2118             return result
    <decorator-gen-118> in cython(self, line, cell)
    /Users/palmieri/Desktop/Sage_stuff/sage_builds/PYTHON3/sage-8.8.rc2/local/lib/python3.7/site-packages/IPython/core/ in <lambda>(f, *a, **k)
        186     # but it's overkill for just that one bit of state.
        187     def magic_deco(arg):
    --> 188         call = lambda f, *a, **k: f(*a, **k)
        190         if callable(arg):
    /Users/palmieri/Desktop/Sage_stuff/sage_builds/PYTHON3/sage-8.8.rc2/local/lib/python3.7/site-packages/sage/repl/ in cython(self, line, cell)
        357         """
        358         from sage.misc.cython import cython_compile
    --> 359         return cython_compile(cell)
        361     @cell_magic
    /Users/palmieri/Desktop/Sage_stuff/sage_builds/PYTHON3/sage-8.8.rc2/local/lib/python3.7/site-packages/sage/misc/ in cython_compile(code, **kwds)
        649     with open(tmpfile,'w') as f:
        650         f.write(code)
    --> 651     return cython_import_all(tmpfile, get_globals(), **kwds)
    /Users/palmieri/Desktop/Sage_stuff/sage_builds/PYTHON3/sage-8.8.rc2/local/lib/python3.7/site-packages/sage/misc/ in cython_import_all(filename, globals, **kwds)
        539       code
        540     """
    --> 541     m = cython_import(filename, **kwds)
        542     for k, x in iteritems(m.__dict__):
        543         if k[0] != '_':
    /Users/palmieri/Desktop/Sage_stuff/sage_builds/PYTHON3/sage-8.8.rc2/local/lib/python3.7/site-packages/sage/misc/ in cython_import(filename, **kwds)
        519     try:
        520         sys.path.append(build_dir)
    --> 521         return builtins.__import__(name)
        522     finally:
        523         sys.path = oldpath
    ModuleNotFoundError: No module named '_Users_palmieri__sage_temp_John_iMac_2017_63635_tmp_eevd___2_pyx_0'
File "src/sage/repl/", line 355, in sage.repl.ipython_extension.SageMagics.cython
Failed example:
Exception raised:
    Traceback (most recent call last):
      File "/Users/palmieri/Desktop/Sage_stuff/sage_builds/PYTHON3/sage-8.8.rc2/local/lib/python3.7/site-packages/sage/doctest/", line 681, in _run
        self.compile_and_execute(example, compiler, test.globs)
      File "/Users/palmieri/Desktop/Sage_stuff/sage_builds/PYTHON3/sage-8.8.rc2/local/lib/python3.7/site-packages/sage/doctest/", line 1105, in compile_and_execute
        exec(compiled, globs)
      File "<doctest sage.repl.ipython_extension.SageMagics.cython[3]>", line 1, in <module>
    NameError: name 'f' is not defined
1 item had failures:
   2 of   5 in sage.repl.ipython_extension.SageMagics.cython
    [80 tests, 2 failures, 5.91 s]
sage -t --long src/sage/repl/  # 2 doctests failed

Change History (4)

comment:1 Changed 3 years ago by jhpalmieri

Is this a real problem? Does anyone else see it? I see it on one OS X machine but not another one.

comment:2 Changed 3 years ago by jhpalmieri

  • Milestone changed from sage-8.9 to sage-duplicate/invalid/wontfix
  • Status changed from new to needs_review

I upgraded the computer and I no longer see this problem. Let's close this.

comment:3 Changed 3 years ago by klee

  • Status changed from needs_review to positive_review

I don't see the problem both on my mac and ubuntu.

comment:4 Changed 3 years ago by chapoton

  • Resolution set to invalid
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.