#15985: Python 3 preparation: Fix implicit relative imports (from sibling
modules)
----------------------------+----------------------------
Reporter: wluebbe | Owner:
Type: defect | Status: new
Priority: major | Milestone: sage-6.2
Component: distribution | Keywords: python3
Merged in: | Authors:
Reviewers: | Report Upstream: N/A
Work issues: | Branch:
Commit: | Dependencies:
Stopgaps: |
----------------------------+----------------------------
Python 3 accepts only absolute imports and explicit relative imports.
To be Python 2 compatible all affected modules need {{{from __future__
import absolute_import}}}.
{{{lib2to3/fixes/fix_import.py}}} does not add this __future__
import.[[br]]
Therefore we intend to use an enhanced fixer from
{{{https://pypi.python.org/pypi/future/0.11.3}}}.[[br]]
The latest development version also handles imports of pyx modules.
Changes according to {{{libfuturize/fixes/fix_absolute_imports.py}}}:
{{{
If spam is being imported from the local directory, this import:
from spam import eggs
becomes:
from .spam import eggs
and this import:
import spam
becomes:
from . import spam
}}}
This ticket is tracked as a dependency of meta-ticket ticket:15980.
--
Ticket URL: <http://trac.sagemath.org/ticket/15985>
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.