Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
src/sage/__init__.py: Move 'import zlib' to src/sage/cpython/__init__.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthias Koeppe committed Sep 8, 2021
1 parent 949d787 commit f77a98e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
4 changes: 0 additions & 4 deletions src/sage/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@
# See https://trac.sagemath.org/ticket/29705

import sys
# Make sure that the correct zlib library is loaded. This is needed
# to prevent the system zlib to be loaded instead of the Sage one.
# See https://trac.sagemath.org/ticket/23122
import zlib

# IPython calls this when starting up
def load_ipython_extension(*args):
Expand Down
9 changes: 9 additions & 0 deletions src/sage/cpython/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# sage.cpython is an ordinary package, not a namespace package.

# This package is imported very early, which is why workarounds/monkey-patching
# are done in this file.

# Make sure that the correct zlib library is loaded. This is needed
# to prevent the system zlib to be loaded instead of the Sage one.
# See https://trac.sagemath.org/ticket/23122
import zlib as _zlib

0 comments on commit f77a98e

Please sign in to comment.