#15985: Python 3 preparation: Fix implicit relative imports (from sibling 
modules)
-------------------------------------+-------------------------------------
       Reporter:  wluebbe            |        Owner:
           Type:  enhancement        |       Status:  needs_work
       Priority:  major              |    Milestone:  sage-6.2
      Component:  distribution       |   Resolution:
       Keywords:  python3            |    Merged in:
        Authors:                     |    Reviewers:
Report Upstream:  N/A                |  Work issues:
         Branch:                     |       Commit:
  u/wluebbe/ticket/15985             |  502ac5c98586116e74521bde30fb4c84edb507f5
   Dependencies:                     |     Stopgaps:
-------------------------------------+-------------------------------------
Changes (by wluebbe):

 * status:  needs_review => needs_work


Comment:

 Ticket needs work :-(

 make failed while building html-doc:
 {{{
 byte-compiling /home/wluebbe/sage-6.2.beta4/local/lib/python2.7/site-
 packages/sage/probability/random_variable.py to random_variable.pyc
 running install_egg_info
 Removing /home/wluebbe/sage-6.2.beta4/local/lib/python2.7/site-
 packages/sage-6.2.beta5-py2.7.egg-info
 Writing /home/wluebbe/sage-6.2.beta4/local/lib/python2.7/site-
 packages/sage-6.2.beta5-py2.7.egg-info

 real    10m2.009s
 user    35m33.530s
 sys     0m48.657s
 [ -f local/etc/sage-started.txt ] || local/bin/sage-starts
 build/pipestatus "./sage --docbuild --no-pdf-links all html  2>&1" "tee -a
 logs/dochtml.log"
 Traceback (most recent call last):
   File "/home/wluebbe/sage-6.2.beta4/src/doc/common/builder.py", line
 1465, in <module>
     import sage.all
   File "/home/wluebbe/sage-6.2.beta4/local/lib/python2.7/site-
 packages/sage/all.py", line 87, in <module>
     from sage.misc.all       import *         # takes a while
   File "/home/wluebbe/sage-6.2.beta4/local/lib/python2.7/site-
 packages/sage/misc/all.py", line 94, in <module>
     from .functional import (additive_order,
   File "/home/wluebbe/sage-6.2.beta4/local/lib/python2.7/site-
 packages/sage/misc/functional.py", line 37, in <module>
     from sage.rings.complex_double import CDF
   File "integer.pxd", line 9, in init sage.rings.complex_double
 (sage/rings/complex_double.c:17880)
   File "integer.pyx", line 179, in init sage.rings.integer
 (sage/rings/integer.c:40148)
   File "/home/wluebbe/sage-6.2.beta4/local/lib/python2.7/site-
 packages/sage/rings/infinity.py", line 203, in <module>
     import sage.rings.rational
   File "fast_arith.pxd", line 5, in init sage.rings.rational
 (sage/rings/rational.c:29096)
   File "fast_arith.pyx", line 51, in init sage.rings.fast_arith
 (sage/rings/fast_arith.c:8036)
   File "integer_ring.pyx", line 65, in init sage.rings.integer_ring
 (sage/rings/integer_ring.c:12457)
   File "/home/wluebbe/sage-6.2.beta4/local/lib/python2.7/site-
 packages/sage/rings/rational_field.py", line 54, in <module>
     from . import rational
 ImportError: cannot import name rational
 make: *** [doc-html] Error 1
 }}}

 The problem occurs while trying to import the cython module
 {{{ration.pyx}}}. But {{{rational.so}}}is in the same subdir. So the
 explicit relative import should succeed.
 {{{
 wluebbe@Willis-Ubuntu:~/sage-6.2.beta4/local/lib/python2.7/site-
 packages/sage/rings$ ls -l ratio*
 -rw-r--r-- 1 wluebbe wluebbe   28433 Apr  1 10:58 rational_field.py
 -rw-r--r-- 1 wluebbe wluebbe   34240 Apr  1 11:08 rational_field.pyc
 -rwxr-xr-x 1 wluebbe wluebbe 1666692 Apr  1 11:06 rational.so
 }}}

--
Ticket URL: <http://trac.sagemath.org/ticket/15985#comment:3>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.

Reply via email to