Skip to content

Commit

Permalink
Add deprecation warning for Python 3.7
Browse files Browse the repository at this point in the history
  • Loading branch information
ml-evs committed May 9, 2022
1 parent 6133cf1 commit b821a7b
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions optimade/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,19 @@
__version__ = "0.16.12"
__api_version__ = "1.1.0"

import sys

if sys.version_info.minor == 7:
import warnings

warnings.filterwarnings(
action="once",
message=r"v0\.17 of the `optimade` package.*",
category=DeprecationWarning,
append=False,
)
warnings.warn(
"v0.17 of the `optimade` package will be the last to support Python 3.7. "
"Please upgrade to Python 3.8+ to use v0.18 and later versions of `optimade`.",
DeprecationWarning,
)

0 comments on commit b821a7b

Please sign in to comment.