-
-
Notifications
You must be signed in to change notification settings - Fork 403
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Transition web
-> tools.web
#1616
Conversation
81ef252
to
dea135a
Compare
The import updates are straightforward, touching as little as possible. Some of them could be streamlined, I'm sure (especially with @Exirel's righteous push toward making imports consistent, and using relative imports where appropriate), but I stuck with the lowest-impact changes possible. Refactoring stuff to call |
Once you're good with the conflict, I'll add my review. As far as I can see, it should be all good to me. |
6f04dbf
to
623c230
Compare
We'll pretend that second force-push didn't happen. x) @Exirel, when things clear up for you at work, I think this is ready now. 😸 |
The deprecated functions remain available only from `sopel.web`, to be left behind as plugin authors transition their code to the new import location. Nothing imported from `sopel.web` should break. In the new `tools.web` module, both `USER_AGENT` and `DEFAULT_HEADERS` should be all-caps, so they really do look like constants. `web.ca_certs` appears to have been irrelevant for ages now. Left it in the old import location just in case some silly module is using it for something (don't know what; it'll always be `None` now), and it will go away when `sopel.web` is deleted completely in Sopel 8.0.. Removed imports of `ssl` module and all the gymnastics about getting `match_hostname` from backports if needed, since nothing in `web` calls on the `ssl` module directly any more. Not even the wrapper functions.
623c230
to
ad27c8f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everything's looking good to me.
Is sopel.web
part of the documentation, and if so, sopel.tools.web
might want to be?
But that doesn't mean that |
Suit yourself, I already approved the PR anyway! ;-) |
New PR done: #1669. This one is now on the short list of "Approved" PRs I can merge Soon™. |
This is not ready (both merge-conflicted and unfinished), but I'm shamelessly stealing PR number 1616 because it's a cool number. I should have opened a WIP PR for this weeks/months ago, anyway.
I've been talking about this for a while, and already wrote the migration guide section on it a while back. It's definitely happening… once I have a chance to rebase & finish this.