Hi
This is the first time that I'm trying to contribute to sympy code. 
After adding just one line to `sets.py`, I can not import `sympy` anymore. 
This is the line that I added:

from sympy.geometry.point import Point

My guess is that this is caused by a circular import. 
What is the right way of dealing with this situation?
- Am I for some reason not supposed to import `Point` into `sets`? or, 
- Should I import right in the function where I need to use `Point`? or, 
- Are there other parts of the code which need to be refactored? or, 
- This does not have anything to do with circular imports?

This is the error that I receive:

>>> import sympy
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "sympy/__init__.py", line 60, in <module>
    from .polys import *
  File "sympy/polys/__init__.py", line 5, in <module>
    from . import polytools
  File "sympy/polys/polytools.py", line 54, in <module>
    from sympy.polys.domains import FF, QQ, ZZ
  File "sympy/polys/domains/__init__.py", line 9, in <module>
    from . import finitefield
  File "sympy/polys/domains/finitefield.py", line 7, in <module>
    from sympy.polys.domains.groundtypes import SymPyInteger
  File "sympy/polys/domains/groundtypes.py", line 13, in <module>
    from .pythonrational import PythonRational
  File "sympy/polys/domains/pythonrational.py", line 13, in <module>
    from sympy.printing.defaults import DefaultPrinting
  File "sympy/printing/__init__.py", line 8, in <module>
    from .ccode import ccode, print_ccode
  File "sympy/printing/ccode.py", line 21, in <module>
    from sympy.sets.fancysets import Range
  File "sympy/sets/__init__.py", line 1, in <module>
    from .sets import (Set, Interval, Union, EmptySet, FiniteSet, 
ProductSet,
  File "sympy/sets/sets.py", line 25, in <module>
    from sympy.geometry.point import Point
  File "sympy/geometry/__init__.py", line 13, in <module>
    from sympy.geometry.point import Point, Point2D, Point3D
  File "sympy/geometry/point.py", line 28, in <module>
    from sympy.simplify import nsimplify, simplify
  File "sympy/simplify/__init__.py", line 7, in <module>
    from .simplify import (simplify, hypersimp, hypersimilar,
  File "sympy/simplify/simplify.py", line 15, in <module>
    from sympy.functions import (
  File "sympy/functions/__init__.py", line 8, in <module>
    from sympy.functions.combinatorial.factorials import (factorial, 
factorial2,
  File "sympy/functions/combinatorial/__init__.py", line 1, in <module>
    from . import factorials
  File "sympy/functions/combinatorial/factorials.py", line 16, in <module>
    from sympy.polys.polytools import poly_from_expr
ImportError: cannot import name poly_from_expr

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" 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 https://groups.google.com/group/sympy.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/87ae4d96-bdf1-4558-b15b-bb7f85314a59%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to