Skip to content
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

safety: fix safeify_url() exception on python 3.11 #2646

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

half-duplex
Copy link
Member

Description

Fixes #2644, or at least makes it not an uncaught exception.

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 lint and make test)
  • I have tested the functionality of the things this change touches

@half-duplex half-duplex added the Bugfix Generally, PRs that reference (and fix) one or more issue(s) label Nov 21, 2024
sopel/builtins/safety.py Outdated Show resolved Hide resolved
@half-duplex
Copy link
Member Author

Also removed the depluralizing on "1 of 1 engines" since both dgw and I think always-plural is a little less weird there, but that's up for debate.

Copy link
Contributor

@Exirel Exirel left a comment

Choose a reason for hiding this comment

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

Good @ removing pluralization of the error message.

sopel/builtins/safety.py Outdated Show resolved Hide resolved
@dgw dgw requested a review from Exirel November 22, 2024 03:05
@dgw dgw added this to the 8.0.2 milestone Nov 22, 2024
@dgw
Copy link
Member

dgw commented Jan 9, 2025

Someone reported another breaking form ([https://www.example.com]) on IRC last night, and I just reconfirmed this PR's fixed behavior. It does indeed fix both the original problem reported in #2644 and this new variant. (Maybe it's not technically a "variant", since the Actual Problem™ is "things inside [square brackets] that aren't IPv6 addresses", but I'm still calling it one.)

I am ready to ship this soon, and even cut an 8.0.2 release since we haven't really gotten any other bug reports against 8.0.1, but things are blocked on getting #2647 or another solution approved & merged so the CI tests will still work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bugfix Generally, PRs that reference (and fix) one or more issue(s)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

safety: safeify_url() function can't handle (invalid) URLs with [hostname] placeholder
3 participants