@@ -498,18 +498,18 @@ def __sympy_debug():
498
498
]
499
499
500
500
501
- #=======================================================================
502
- #
503
- # XXX: The names below were importable before sympy 1.6 using
504
- #
505
- # from sympy import *
506
- #
507
- # This happened implicitly because there was no __all__ defined in this
508
- # __init__.py file. Not every package is imported. The list matches what
509
- # would have been imported before. It is possible that these packages will
510
- # not be imported by a star-import from sympy in future.
511
- #
512
- #=======================================================================
501
+ #===========================================================================#
502
+ # #
503
+ # XXX: The names below were importable before sympy 1.6 using #
504
+ # #
505
+ # from sympy import * #
506
+ # #
507
+ # This happened implicitly because there was no __all__ defined in this #
508
+ # __init__.py file. Not every package is imported. The list matches what #
509
+ # would have been imported before. It is possible that these packages will #
510
+ # not be imported by a star-import from sympy in future. #
511
+ # #
512
+ #===========================================================================#
513
513
514
514
515
515
__all__ .extend ([
@@ -538,22 +538,43 @@ def __sympy_debug():
538
538
])
539
539
540
540
541
- #=======================================================================
542
- #
543
- # XXX: The names listed in _DEPREACTED_IMPORTS below were importable before
544
- # sympy 1.6 using
545
- #
546
- # from sympy import *
547
- #
548
- # This happened implicitly because there was no __all__ defined in this
549
- # __init__.py file. The plan is to remove them but for now they remain
550
- # importable but will give a deprecation warning when used. In future these
551
- # names will be removed and will not be importable from here.
552
- #
553
- #=======================================================================
541
+ #===========================================================================#
542
+ # #
543
+ # XXX: The names listed in _DEPRECATED_IMPORTS below were importable before #
544
+ # sympy 1.6 using #
545
+ # #
546
+ # from sympy import * #
547
+ # #
548
+ # This happened implicitly because there was no __all__ defined in this #
549
+ # __init__.py file. The plan is to remove them but for now they remain #
550
+ # importable but will give a deprecation warning when used. In future these #
551
+ # names will be removed and will not be importable from here. #
552
+ # #
553
+ #===========================================================================#
554
554
555
555
556
556
class DeprecatedImportModule :
557
+ # Add a docstring that someone can see if calling help on these objects
558
+ """Deprecated imported module object.
559
+
560
+ See https://github.com/sympy/sympy/pull/19316
561
+
562
+ This is a wrapper around a module that has been imported incorrectly.
563
+ Previously this module was importable using
564
+
565
+ from sympy import *
566
+
567
+ or (for example)
568
+
569
+ from sympy import add
570
+
571
+ However it was unintentional that this module would be imported in that
572
+ way and it will be removed in a future sympy version. If you do need to
573
+ use this module then the correct way to import it is to give its full
574
+ module path e.g.
575
+
576
+ import sympy.core.add as add
577
+ """
557
578
558
579
from sympy .utilities .exceptions import SymPyDeprecationWarning as Warn
559
580
import sys
0 commit comments