Skip to content

Commit

Permalink
Fix v2 import Deprecation warning (#346)
Browse files Browse the repository at this point in the history
Fixes this nonsensical warning:

> E   DeprecationWarning: Accessing `petab.v2` is deprecated and will be removed in the next major release. Please use `petab.v1.v2` instead.
  • Loading branch information
dweindl authored Dec 18, 2024
1 parent 6a433e0 commit cc33da2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions petab/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ def __getattr__(name):
return attr
if name == "v1":
return importlib.import_module("petab.v1")
if name == "v2":
return importlib.import_module("petab.v2")
if name != "__path__":
warn(
f"Accessing `petab.{name}` is deprecated and will be removed in "
Expand Down

0 comments on commit cc33da2

Please sign in to comment.