-
-
Notifications
You must be signed in to change notification settings - Fork 654
Closed
Milestone
Description
To make sage
a namespace package, we need to get rid of src/sage/__init__.py
.
It currently contains:
- definition of
__all__
(no longer needed; has no effect on completion, neither in plain python3 nor IPython) - definition of
__version__
(unused) - preloading of
zlib
(introduced in Wrong zlib library might be loaded #23122) - Move load_ipython_extension from sage.__init__ to sage.repl.__init__ #32489:
load_ipython_extension
(introduced in Do not import IPython at startup #18726): This function is defined in modulesage
so that%load_ext sage
works (see http://www.slabbe.org/blogue/categorie/ipython/); we forgot to define the corresponding function that would make%unload_ext sage
work - Remove monkey patching of inspect.isfunction in sage.__init__ #32479: monkey patching of
inspect.isfunction
to support Cython functions (introduced in Add IPython support for Cython functions #25373) - monkey patching of
importlib.machinery.ExtensionFileLoader
(introduced in Fix Cython tracebacks on Python 3 #24681); the quest to get an upstream fix merged was apparently abandoned - bpo-32797: linecache should search for sources if loader doesn't find them python/cpython#6653 - monkey patching of sqlite on Cygwin (introduced in Cygwin: system sqlite3 modifies DLL search order #30157)
In this ticket we remove the ones that are not needed any more, and some others to another module init. #32479 and #32489 will take care of the leftovers.
CC: @kiwifb @jhpalmieri @embray
Component: refactoring
Author: Matthias Koeppe
Branch/Commit: af6642f
Reviewer: François Bissey
Issue created by migration from https://trac.sagemath.org/ticket/31420