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

Commit

Permalink
deprecation warning for imports via cirruslib
Browse files Browse the repository at this point in the history
  • Loading branch information
jkeifer committed Dec 22, 2021
1 parent e36253d commit 5c016a7
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/cirruslib/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import warnings

warnings.warn(
"Imports via 'cirruslib' will be removed in a future cirrus version. "
"Update all imports to instead use 'cirrus.lib'.",
DeprecationWarning,
)
4 changes: 4 additions & 0 deletions src/cirruslib/catalog.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import importlib
import sys
module = __name__.split('.')[-1]
sys.modules[__name__] = importlib.import_module(f'cirrus.lib.{module}')
4 changes: 4 additions & 0 deletions src/cirruslib/errors.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import importlib
import sys
module = __name__.split('.')[-1]
sys.modules[__name__] = importlib.import_module(f'cirrus.lib.{module}')
4 changes: 4 additions & 0 deletions src/cirruslib/logging.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import importlib
import sys
module = __name__.split('.')[-1]
sys.modules[__name__] = importlib.import_module(f'cirrus.lib.{module}')
4 changes: 4 additions & 0 deletions src/cirruslib/statedb.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import importlib
import sys
module = __name__.split('.')[-1]
sys.modules[__name__] = importlib.import_module(f'cirrus.lib.{module}')
4 changes: 4 additions & 0 deletions src/cirruslib/transfer.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import importlib
import sys
module = __name__.split('.')[-1]
sys.modules[__name__] = importlib.import_module(f'cirrus.lib.{module}')
4 changes: 4 additions & 0 deletions src/cirruslib/utils.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import importlib
import sys
module = __name__.split('.')[-1]
sys.modules[__name__] = importlib.import_module(f'cirrus.lib.{module}')

0 comments on commit 5c016a7

Please sign in to comment.