Skip to content

Commit

Permalink
Merge pull request #2522 from SnoopJ/bugfix/prerelease-deprecation-no…
Browse files Browse the repository at this point in the history
…tices

lifecycle: issue deprecation notices in pre-releases
  • Loading branch information
dgw authored Oct 16, 2023
2 parents 981ceea + 5862023 commit a91ed84
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions sopel/lifecycle.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,10 @@ def decorator(func):

@functools.wraps(func)
def deprecated_func(*args, **kwargs):
if not (warning_in and
parse_version(warning_in) >= parse_version(__version__)):
warn_ver = warning_in and parse_version(warning_in).release
this_ver = parse_version(__version__).release

if not (warn_ver and warn_ver >= this_ver):
original_frame = inspect.stack()[-stack_frame]
mod = inspect.getmodule(original_frame[0])
module_name = None
Expand Down

0 comments on commit a91ed84

Please sign in to comment.