Valentin Lorentz
74f86654b1
Remove fallbacks for old Python versions.
2022-01-01 18:11:36 +01:00
Valentin Lorentz
db7ef3f025
all: Add generic 'The Limnoria Contributors' to copyright notices.
...
No need to bother with details (that are all outdated / out of sync
anyway), just look up the git history.
2021-08-01 21:54:49 +02:00
Valentin Lorentz
759fca5eba
Switch names of TimeoutDict and ExpiringDict.
...
For consistency, as TimeoutQueue has guaranteed deletion after the timeout,
like the new TimeoutDict (ex-ExpiringDict).
2020-05-10 08:42:25 +02:00
Valentin Lorentz
d205a9b5f8
Fediverse: Use ExpiringDict instead of TimeoutDict for the cache, it guarantees expiry after the timeout.
2020-05-10 08:34:36 +02:00
Valentin Lorentz
da328b4985
Expire batches that never ended to avoid leaking memory.
2020-05-06 20:39:21 +02:00
Valentin Lorentz
9891b0fca4
Replace failUnless/failIf with assertTrue/assertFalse.
...
The old names are deprecated.
2020-01-26 11:14:18 +01:00
Valentin Lorentz
fcb342cb2c
test: Mock calls to time.sleep()
...
The tests now take 7 seconds instead of 30.
2019-12-15 20:20:42 +01:00
Valentin Lorentz
a8b6698849
Add config supybot.reply.format.list.maximumItems to limit the size of format('%L', ...).
2019-11-23 18:48:58 +01:00
Valentin Lorentz
88524beada
ChannelLogger + Karka + all DB plugins: Sanitize channel names when used in filenames.
2019-09-06 20:42:13 +02:00
Valentin Lorentz
6d938e0999
Fix test for pypy 3.
2019-02-07 22:10:24 +01:00
Valentin Lorentz
233deee0d3
Fix previous commit for py2 and pypy.
2019-02-07 21:35:39 +01:00
Valentin Lorentz
969b9ed341
Make utils.python.collect_extra_debug_data support objects with __slots__.
2019-02-07 21:00:56 +01:00
Valentin Lorentz
7adc958dd6
Fix SyntaxWarnings on Python 3.8
2019-01-06 18:06:44 +01:00
Valentin Lorentz
11bbc89c9d
Properly handle multiple hosts in supybot.servers.http.hosts4.
...
See ebb48a4808
(which I reverted).
2017-10-28 09:50:12 +02:00
Valentin Lorentz
c587900c6f
Make normalizeWhitespace remove \r as well.
2015-08-30 15:44:07 +02:00
Valentin Lorentz
c3a2c800f1
Remove need for 2to3.
2015-08-11 16:50:23 +02:00
Valentin Lorentz
17bf893437
Fix imports.
2015-08-09 09:21:12 +02:00
Valentin Lorentz
216c5d213f
Replace sys.version_info[0] usages with minisix.PY{2,3}.
2015-08-09 00:23:03 +02:00
Valentin Lorentz
078eb9bad8
Fix Python 2 compatiblity.
2015-08-08 23:21:12 +02:00
Valentin Lorentz
be118c3338
Remove use of fix_dict fixer.
2015-08-08 23:08:49 +02:00
Valentin Lorentz
a39a6d247d
Fix previous commit
2015-05-14 07:46:18 +00:00
Valentin Lorentz
ded7dc8e6f
Fix Python 2.6 compatibility of previous commit.
2015-05-14 07:33:26 +00:00
Valentin Lorentz
3f9118a1a6
utils.str.format: Add support for sets for %L + add test case. Closes GH-1104
2015-05-14 07:14:29 +00:00
Valentin Lorentz
c6cb948996
Fix Python 2.6 compatibility.
2014-07-31 19:53:00 +00:00
Valentin Lorentz
00aaf79ef8
Add test for union with TruncatableSet.
2014-07-31 15:50:26 +02:00
Valentin Lorentz
94fbea6266
Add utils.structures.TruncatableSet.
2014-07-31 14:24:47 +02:00
Valentin Lorentz
35a62b4e77
Continue accelerating the 2to3 step (remove fix_ws_comma, fix_xreadlines, and fix_zip).
2014-01-21 10:40:18 +01:00
Valentin Lorentz
c23f25545f
Fix core tests for Python 3 (actually imported + fixes).
2013-08-10 15:18:04 +02:00
Valentin Lorentz
3dba9088b0
Merge remote-tracking branch 'supybot/master' into testing
...
Conflicts:
INSTALL
plugins/ChannelLogger/README.txt
plugins/ChannelStats/README.txt
plugins/Google/plugin.py
plugins/Google/test.py
plugins/Plugin/test.py
plugins/Web/test.py
setup.py
src/callbacks.py
src/ircdb.py
src/irclib.py
src/utils/str.py
test/test_irclib.py
2013-01-01 21:11:24 +01:00
James McCoy
82ecf36fcd
Update my name/contact information
...
Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
2012-09-01 10:16:48 -04:00
Valentin Lorentz
16aeaaa4fe
Use the 'reverse' parameter of sorted() instead of 'mycmp'.
2012-08-05 14:49:47 +02:00
Valentin Lorentz
602f1c7ecb
utils/str.py: Use classes Multiple* instead of lambda functions.
...
As in Python 3, functions are bound to a class when assigned to an attribute,
lambda functions get two parameters, unless they are decorated with classmethod().
And there is no reason to ask plugin developpers use this decorator, while we
avoid them doing this (more over, it is not obvious to debug if they forgot it).
2012-08-04 13:52:02 +02:00
Valentin Lorentz
fa35a07941
Add utils.str.multipleRemover.
2012-08-04 11:27:50 +02:00
Valentin Lorentz
fffccb4600
Add utils.str.multipleReplacer.
2012-08-04 11:27:41 +02:00
James McCoy
8b73f78b3e
Merge branch 'maint/0.83.4'
...
Conflicts:
plugins/Misc/plugin.py
src/ircutils.py
Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
2011-11-13 15:26:19 -05:00
Valentin Lorentz
be585ecea9
Merge remote-tracking branch 'supybot/maint/0.83.4' into testing
...
Conflicts:
src/ircutils.py
2011-08-23 16:41:52 +02:00
James Vega
543e78828b
Add utils.net.isIPV4, with utils.net.isIP checking v4 or v6
...
Signed-off-by: James Vega <jamessan@users.sourceforge.net>
2011-06-06 21:44:15 -04:00
James Vega
f7cedae9ad
Update ircutils.standardSubstitute to use string.Template
...
In the process, deprecate utils.str.perlVariableSubstitute.
Since string.Template doesn't support callable values though, we also
sub-class IrcDict and override __getitem__ to call the value if it is
callable.
Signed-off-by: James Vega <jamessan@users.sourceforge.net>
2009-10-15 22:16:29 -04:00
Jeremy Fincher
43129239d6
Added Seen.since, which lets a user see messages which were sent since the last time he parted a channel.
2009-07-01 15:40:58 -05:00
Jeremy Fincher
757991afc9
Added basic CacheDict with simple test.
2009-04-02 11:28:57 -05:00
James Vega
0c42ea111a
Fix our RE parsing to handle multiple backslashes before the separator
...
This also adds support for using brace pairs ({}, [], (), <>) as the
separators for m//.
2009-03-11 13:37:27 -04:00
James Vega
5c197471c6
Fix the tests for mircColor and sorted (Thanks dcraven)
2007-05-08 18:40:48 +00:00
James Vega
a3e4fc5b1d
Change the modeline to use softtabstop instead of tabstop.
2006-02-11 15:52:51 +00:00
Jeremy Fincher
5b8400e158
Removed utils.iter.one, which was dumb, because iterators have a .next() method that does the same thing.
2005-07-08 09:14:45 +00:00
Jeremy Fincher
b369039507
Added utils.iter.one, to grab one value from an iterable.
2005-06-12 04:54:15 +00:00
Jeremy Fincher
b5f1e2a3e7
Added utils.iter.limited, an iterable that limits the number of elements that can be taken from another iterable.
2005-05-30 19:19:11 +00:00
James Vega
7bfc9cbdd3
utils/str: Rename nth to ordinal and have it return the full string instead of just the ordinal ending.
2005-05-09 17:20:43 +00:00
James Vega
9971e991fe
Fix the modelines.
2005-03-23 20:07:45 +00:00
Jeremy Fincher
6b19504515
Changed the utils.iter.choice test to work bettar.
2005-03-14 18:55:11 +00:00
James Vega
aefcd594df
Move structures to utils/
2005-03-12 18:01:47 +00:00