Skip to content

Conversation

@Exirel
Copy link
Contributor

@Exirel Exirel commented Jul 30, 2021

Description

Tick one more box off #1738 by adding a deprecation warning at import time.

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

@Exirel Exirel added the Tweak label Jul 30, 2021
@Exirel Exirel added this to the 8.0.0 milestone Jul 30, 2021
@dgw
Copy link
Member

dgw commented Jul 30, 2021

Feel like I probably already know the answer, but: We can't reliably extract the stack frame that caused the import, can we?

I did some experiments on my own version of this little tweak, before you opened this PR, and found that the relevant stack_frame argument to deprecated() varied depending on where I added the module import and/or what kind of plugin it was in (core vs. entry-point, say). 😦

@Exirel
Copy link
Contributor Author

Exirel commented Jul 30, 2021

I did some experiments

We did the same thing, and I didn't find a solution. After consideration, I decided it wasn't worth it.

Copy link
Member

@dgw dgw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I could nitpick the order of arguments to deprecated if I felt like being mean, but it's meaningless. You gave up on getting the correct stack frame to display sooner than I did, and I can admit that being stubborn cost me the chance to open this PR first. 😜

@dgw dgw merged commit b6fd3cb into sopel-irc:master Sep 27, 2021
@Exirel Exirel deleted the module-is-deprecated branch December 31, 2021 21:19
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.

2 participants