Skip to content

Conversation

@dgw
Copy link
Member

@dgw dgw commented May 25, 2020

Description

  • New warning_in parameter to @deprecated decorator to allow documenting & decorating a deprecated function all at once even if it shouldn't warn until some future version of Sopel
  • tools.get_input will become unnecessary in Sopel 8.0 (it's a py2 compatibility shim), so it's now deprecated—but won't emit warnings until we actually do drop py2 in Sopel 8

Checklist

  • I have read CONTRIBUTING.md
  • I can and do license this contribution under the EFLv2
  • No issues are reported by make qa (runs make quality and make test)
  • I have tested the functionality of the things this change touches

Notes

Yeah, this is a messy diff. We probably should have just moved @deprecated to the top last time there was an issue with using it to decorate something defined earlier in the same file, but didn't. Viewing this one commit-by-commit will help.

dgw added 2 commits May 25, 2020 12:01
Passing this optional parameter suppresses the warning output on Sopel
versions lower than it, allowing for multi-stage deprecation timelines.
@dgw dgw added the Tweak label May 25, 2020
@dgw dgw added this to the 7.1.0 milestone May 25, 2020
@dgw dgw requested a review from a team May 25, 2020 17:25
`tools.get_input()` won't be needed any more in Sopel 8 (we'll drop py2
support), so it's now marked as deprecated using the new `warning_in`
argument to suppress printed warnings until plugins can safely assume
they'll only be run on Python 3.
@dgw dgw force-pushed the deprecate-tools.get_input branch from a7d0ff4 to c9ca1c9 Compare May 25, 2020 17:28
@dgw dgw merged commit 7144d57 into master May 26, 2020
@dgw dgw deleted the deprecate-tools.get_input branch May 26, 2020 20:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants