Commit Graph

11761 Commits

Author SHA1 Message Date
Valentin Lorentz
862fca1602 conf: Use imports instead of sys.modules to detect module availability
`conf.supybot.databases()` may be called without any plugin supporting
sqlite3 being loaded yet, which causes `sqlite3` to be missing from
`sys.modules`; so it wouldn't be used by plugins loaded afterward.
2022-03-06 13:39:47 +01:00
Valentin Lorentz
d58d8d4a71 conf: Prioritize sqlite3 over sqlalchemy in supybot.databases
It's usually a better choice for plugins that implement both
2022-03-06 13:39:41 +01:00
Valentin Lorentz
9e995d8ac2 conf: Remove 'sqlite' module from supybot.databases
It is wholy replaced by 'sqlite3', now
2022-03-06 13:39:19 +01:00
PeGaSuS
80b26c013d
Fix typo in conf.py (#1501)
Fixed typo that lead to a wrong variable name being pointed out
2022-03-06 12:30:02 +01:00
Valentin Lorentz
66d986e820 Web: Add overrides to support Youtube and Reddit; remove Twitter from tests. 2022-03-03 22:16:53 +01:00
Valentin Lorentz
76f7eced5d Fediverse: Update tests broken by previous commit 2022-02-19 21:18:24 +01:00
Valentin Lorentz
78bdc469e4 htmlToText: Don't replace inline element tags with spaces
They are not meant to be displayed like this, so they look weird sometimes.
For example, Mastodon splits long links between spans, so the Fediverse plugin
always displayed them broken.
2022-02-19 21:00:51 +01:00
Valentin Lorentz
bc76f7ead4 Fix utils.time.iana_timezone on python < 3.9 2022-02-17 12:18:13 +01:00
Valentin Lorentz
4e60d8812d Misc: Make @last handle --regexp in a single process for all messages
Spawning one process for each message was a little silly, considering
there can be thousands of messages.

Plus, some instances do reach the timeout after running for a few weeks,
so we really need to fix this.

Ideally, `regexp_wrapper` should also be removed from other plugins
(Todo, Notes, ...) as they have the same issues, but this will do for
now.
2022-02-16 21:27:28 +01:00
Valentin Lorentz
4b892c2b1d all: Update .pot and .po files 2022-02-06 00:14:47 +01:00
Valentin Lorentz
f13d275076 sandbox/update_pot.py: Run msgmerge as well 2022-02-06 00:12:42 +01:00
Valentin Lorentz
24f0e21319 sandbox/update_pot.py: Also generate .pot file for the core 2022-02-06 00:11:20 +01:00
Valentin Lorentz
736430de5b Modernize sandbox/update_plugins_messagespot.py 2022-02-05 23:51:04 +01:00
Valentin Lorentz
5b7b2bd85b Fix chmods 2022-02-05 23:37:39 +01:00
Valentin Lorentz
dacaefda24 supybot-plugin-create: Create setup.py 2022-02-05 17:32:11 +01:00
Valentin Lorentz
498290f1cd wizard: Fix mixup of sasl username and password 2022-02-03 19:56:59 +01:00
James Lu
0ed743bb8e Format: allow empty substrings in 'replace'
This allows for easy substring removal without having to use regex.
2022-01-28 17:50:31 -08:00
Valentin Lorentz
c7fa33b8be setup.py: Use the website's URL instead of the repo's 2022-01-26 19:03:47 +01:00
Valentin Lorentz
da549e4fde Geography: Print current UTC offset next to timezones. 2022-01-16 20:45:41 +01:00
Valentin Lorentz
880efbbd27 Merge branch 'geography' into testing 2022-01-16 19:44:22 +01:00
Valentin Lorentz
1643cb1b09 registry.Regexp: Better safeguard against misuses of _setValue() 2022-01-11 20:38:44 +01:00
Valentin Lorentz
28b28fe3cf Config: Fix crash happening since the previous commit 2022-01-11 20:38:14 +01:00
Valentin Lorentz
dcca9f9637 RSS: Make feed announces actually network-specific
.getSpecific() always returned the  channel-specific but non-network-specific var,
unless the channel-specific and network-specific one was manually set.
2022-01-11 20:13:39 +01:00
Valentin Lorentz
40155ede22 Fix syntax DeprecationWarning. 2022-01-09 14:10:15 +01:00
Valentin Lorentz
74f86654b1 Remove fallbacks for old Python versions. 2022-01-01 18:11:36 +01:00
Valentin Lorentz
181e34baf9 setup.py + CI: Remove support for Python 3.4 and 3.5 2022-01-01 17:49:12 +01:00
Valentin Lorentz
7fade191c3 Google: Update suggestions in the deprecation warning
1. DDG is now built-in
2. GoogleCSE is actually limited to site-specific search
2021-12-23 20:09:49 +01:00
Valentin Lorentz
caa5aa3d84 Config: Replace inconsistent terminology 2021-12-19 21:11:26 +01:00
Valentin Lorentz
3f77c53ed5 utils/structures: Fix typos, remove unused code 2021-12-19 20:53:11 +01:00
Valentin Lorentz
8053d74e71 setup.py: Fix typo 2021-12-18 19:38:49 +01:00
Valentin Lorentz
ac379eb44c supybot-wizard: Ask for SASL username and password 2021-12-18 18:37:46 +01:00
Valentin Lorentz
d1191d1c89 setup.py: Remove 3.4 and 4.5 from the classifiers 2021-12-18 18:37:26 +01:00
Valentin Lorentz
49c7c30627 setup.py: Remove reference to supybot from the short description 2021-12-18 18:36:48 +01:00
Valentin Lorentz
e223b507dd utils.time: Add support for timezones without a slash.
eg. UTC, CET, ...
2021-12-07 23:30:16 +01:00
Valentin Lorentz
ed9dffdd7f supybot-plugin-doc: Remove extra space + regenerate all READMEs. 2021-12-04 03:19:12 +01:00
Valentin Lorentz
2d2241787f supybot-plugin-doc: Fix exceptions raised while exiting the script. 2021-12-04 03:08:09 +01:00
Valentin Lorentz
828fff9cc0 supybot-plugin-doc: Add missing newlines + regenerate all READMEs. 2021-12-04 02:50:28 +01:00
Valentin Lorentz
ef0cd48bd1 registry: Better explain String.__str__ 2021-12-03 18:03:27 +01:00
Valentin Lorentz
fba5ed5fa4 Fix crash caused by registry.Json.__str__ returning non-str objects 2021-12-03 18:02:14 +01:00
Valentin Lorentz
f1824fc7db Config: Fix crash when reseting registry.Pattern 2021-12-03 17:28:05 +01:00
Valentin Lorentz
baa8cda814 Fix bypassed cache invalidation checks, causing '@config reload' to be partially ignored
`registry.Value.__call__()` is a wrapper around access to
`registry.Value.value`, that checks if the value was set before the latest
call to `registry.open_registry`; and updates the `value` if needed.

When accessing `registry.Value.value` directly, this cache can't be
invalidated, causing the old value to still be used, until the next call
to `registry.Value.__call__()`.
2021-12-03 16:56:06 +01:00
Valentin Lorentz
c0d033ff84 Math: Fix crash in @convert on small/large single-digit numbers
str() converts them to the exponent notation, which makes split('.')[1]
crash, since there is no decimal part in the exponent notation when there
is a single significant digit.
2021-11-28 18:00:58 +01:00
Valentin Lorentz
2d5c80736d MessageParser: Fix crash (and unexpected behavior) when matching backslashes
Closes GH-1497.
2021-11-26 00:55:44 +01:00
Valentin Lorentz
068488c546 Fix sdists created by newer setuptools versions.
This caused the PyPI package to be broken since I upgraded
my computer from Debian bullseye
2021-11-20 14:41:42 +01:00
Valentin Lorentz
dd3678e481 Remove Travis badges 2021-11-19 09:53:31 +01:00
Valentin Lorentz
63a97fc147 Owner: Ignore commands when they are in a chathistory batch. 2021-11-18 13:17:39 +01:00
Valentin Lorentz
2236c7552a irclib: Request draft/account-registration
Servers might reject the REGISTER command if it's not ACKed.
2021-11-17 23:26:06 +01:00
Valentin Lorentz
d2091e8f71 Geography: Always prefer IANA timezones over UTC offsets
Even if the UTC offsets are given on a more specific entity,
they are usually worthless to us (eg. DST).
2021-11-11 19:07:36 +01:00
Valentin Lorentz
76b9d6f0ce Geography: Properly handle missing timezones 2021-11-09 23:38:31 +01:00
Valentin Lorentz
93a407a9ac Geography: Add 'localtime' command 2021-11-09 23:10:59 +01:00