sopel-irc / sopel

:robot::speech_balloon: An easy-to-use and highly extensible IRC Bot framework. Formerly Willie.
https://sopel.chat
Other
950 stars 405 forks source link

build, meta: drop Python 3.7 support, checks, and CI job #2500

Closed dgw closed 11 months ago

dgw commented 11 months ago

Description

This fulfills the last "Finally letting the dead snakes lie." part of the 8.0.0 milestone's description. Python 3.7 was officially EOL'd as of a month ago, on June 27.

Checklist

Conflict notes

@SnoopJ and @Exirel arrived at similar conclusions for dealing with aliases in plugins/rules.py; this has a conflict with 098d8c309058dc794dd04d0d464598482ca94505, but the approaches are quite similar. That and b0693b7b0da1047aa0f509a30f9d15ef6b71065d are both from #2471, which touched a bunch of stuff (so I knew the risk of conflicts with this relatively long-lived housekeeping branch was inevitable).

The only other little conflict is more directly my fault. While I set @SnoopJ loose on my todo list for #2471 to get it done faster, #2480—specifically, 85f8b82d3917135e309b6ce4efc601d4c79560a7—is all me. 🙈

Guess I have to rebase this one, huh? Damn, I love merging branches that diverged long before master because the history graph looks cool, but sometimes it's just not meant to be. 😅

Special thanks

…to the other maintainers for humoring me when I said I wanted to reach #2500 and make this PR a numerical milestone as well as a development one. You're all awesome for tossing in extra issues & PRs to get us here! ❤️

dgw commented 11 months ago
  • [x] No issues are reported by make qa (runs make quality and make test)
    • (As of when I prepped the patch.)

Well, now the latest version of pyflakes (updated from 3.0.1 to 3.1.0) raises "F811 Redefinition of unused name" for:

https://github.com/sopel-irc/sopel/blob/e63afba333ea47ca02248e83b495544bc8b256f0/sopel/plugins/rules.py#L1782

The name execute_handler is defined earlier, but never used:

https://github.com/sopel-irc/sopel/blob/e63afba333ea47ca02248e83b495544bc8b256f0/sopel/plugins/rules.py#L1766

Upstream seems to consider this as "Working as intended" (PyCQA/pyflakes#780), so I guess we'll have to if: ... else: this one now. 🙁

dgw commented 11 months ago

Having whittled down most of the open threads from @SnoopJ and myself, I figured it's worth seeing if Exi has free time later this week(end) to chime in.

SnoopJ commented 11 months ago
  • I think importlib_metadata can be removed from a few more places, unless 3.8 doesn't have importlib.metadata.EntryPoint()

It does have EntryPoint but I believe the behavior of entry_points() changes subtly between 3.9 and 3.10 which keeps the dependency around? I don't know the details myself, but see this comment

dgw commented 11 months ago
  • modules/tld.py has a "py<3.5" comment

My pattern missed that because of the <, whoops. Thanks.

dgw commented 11 months ago

I decided to throw replacing importlib_metadata usage under test/ at the CI for fun. Nothing broke on 3.8/3.9, so 🚀 I guess.