Valentin Lorentz
ef08ea1930
Fix debug logging in some (weird) cases.
2013-02-07 18:34:29 +01:00
nyuszika7h
15796454cf
Merge remote-tracking branch 'progval/testing' into testing
2013-02-05 18:42:26 +01:00
nyuszika7h
e491e14bc3
Final fix for SASL and py3k
2013-02-03 18:50:20 +01:00
Valentin Lorentz
d753df9d0c
Print extra debug data in the logs.
2013-02-03 17:46:39 +01:00
nyuszika7h
4170a873b2
Fix previous commit (yet again)
2013-02-03 15:58:45 +01:00
nyuszika7h
66e46e5143
Fix previous commit (again)
2013-02-03 15:30:28 +01:00
nyuszika7h
4b10ea3329
Fix previous commit
2013-02-03 15:14:03 +01:00
nyuszika7h
f1198fb4e8
irclib.py: Fix SASL on py3k
2013-02-03 15:08:36 +01:00
Valentin Lorentz
20ad495483
src/test.py: Why would a test server create a socket?
2013-02-02 19:51:47 +01:00
Valentin Lorentz
13a633eea4
Prevent traceback if supybot.replies.genericNoCapability is empty.
2013-02-02 19:47:14 +01:00
Valentin Lorentz
05d23d1a06
Remove unreachable code.
2013-02-02 19:47:05 +01:00
Valentin Lorentz
77f614be86
utils.web.HtmlToText: Convert html entities.
2013-02-01 20:50:46 +01:00
Valentin Lorentz
fa36e48075
core: Document irclib.Irc.addCallback.
2013-02-01 20:38:53 +01:00
Valentin Lorentz
75f19a9f50
core: Add docstring to commands.wrap.
2013-02-01 20:38:18 +01:00
Valentin Lorentz
39b534246f
Fix http server's tests.
2013-02-01 20:38:01 +01:00
Valentin Lorentz
b589c2dc2b
core: Document IrcMsg tags.
2013-01-31 20:48:16 +01:00
Valentin Lorentz
9507bf1655
Remove non-ascii char (again).
2013-01-31 20:47:57 +01:00
Valentin Lorentz
bab69bb31e
Remove useless non-ascii character.
2013-01-31 19:24:05 +01:00
Valentin Lorentz
7588472f36
Fix 'Transport endpoint not connected' errors. Closes GH-437.
2013-01-31 16:47:17 +01:00
Valentin Lorentz
2ace534bdb
utils.str: Prevent issue with tokens like '\x80' in Python 3.
2013-01-23 15:48:24 +01:00
Valentin Lorentz
6c0497d34e
Fix traceback when utils.str.dqrepr is given a unicode object.
2013-01-23 13:53:37 +01:00
Valentin Lorentz
30c5519acb
Final encoding fix. It now work on IRC and unit tests pass, both with Python 2 & 3.
2013-01-22 21:02:04 +01:00
Valentin Lorentz
a4a595b39a
Partial fix of encoding handling.
...
This fixes mostly everything, except a little bit from the test framework. I'm just saving this in case my computer or I is destroyed in an alien invasion, because this commit is worth hours of debugging.
2013-01-22 20:35:11 +01:00
Valentin Lorentz
164d85d9fe
core: Fix the test framework after update of the HTTP server.
2013-01-21 20:20:26 +01:00
Valentin Lorentz
84a87e4307
Merge pull request #442 from Athemis/master
...
Follow-up of pull-request #440
2013-01-20 11:03:19 -08:00
Alexander Ralph Michael Minges
bbdd55bea2
Add fallback decoding if chardet fails to guess the correct encoding
2013-01-20 17:07:58 +01:00
Valentin Lorentz
6d15d263f0
Merge remote-tracking branch 'athemis/master' into testing
2013-01-20 15:16:53 +01:00
Valentin Lorentz
d809db2cc6
Fix bold of 'getpass' question. Closes GH-426.
2013-01-20 12:39:36 +01:00
Alexander Ralph Michael Minges
4316e5936e
Use chardet to guess the character encoding when on python3
2013-01-15 20:55:42 +01:00
Valentin Lorentz
c1f19b3353
Fix locales path resolution with Python 3.
2013-01-11 18:29:04 +01:00
Valentin Lorentz
726558115d
core: Prevent infinite recursion with Pypy.
2013-01-06 20:24:02 +01:00
Valentin Lorentz
a5292ae3b4
core: Fix issue with Python 2.6 (cStringIO is buggy).
2013-01-06 11:34:32 +01:00
Valentin Lorentz
52e91d5f9c
src/test.py: Implement assertIn for old Python versions.
2013-01-05 21:16:30 +01:00
Valentin Lorentz
2bcffdf523
src/test.py: Implement assertIs for old Python versions.
2013-01-05 21:13:36 +01:00
Valentin Lorentz
fdb7a764d4
core & Filter & Owner: Fix Python 2.6 compatibibility.
2013-01-05 20:51:36 +01:00
Valentin Lorentz
e3e2b23215
src/test.py: Encode strings only if they are not already using unicode.
2013-01-05 20:04:46 +01:00
Valentin Lorentz
bc7051e515
core: Fix tests of plugins using user id for checking capabilities.
2013-01-05 19:06:49 +01:00
Valentin Lorentz
7edbb7b6c3
core: Fix tests using invalid hostmask.
2013-01-05 17:27:20 +01:00
Valentin Lorentz
fe39d35b2f
core: Fix normalizeWhitespace handling of new lines.
2013-01-04 22:28:44 +01:00
Valentin Lorentz
29e13a9061
Fix 'more' wrapping for long words; bug introduced in 169392e5
.
2013-01-04 22:16:08 +01:00
Valentin Lorentz
e86768b61a
Misc: Fix testTell.
2013-01-04 22:01:36 +01:00
Valentin Lorentz
28dc3dd3ac
core: Fix normalizeWhitespace.
2013-01-04 20:25:25 +01: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
Valentin Lorentz
79eeb8eb95
Revert "irclib: Apply changes to supybot.protocols.irc.maxHistoryLength immediately."
...
This reverts commit 1d2eefe880
.
IrcState instances are created more than five times a second! Imagine how much
memory is used (hint: 300MB five minutes after startup).
We should first try to reduce this amount.
2012-12-27 16:06:01 +00:00
Valentin Lorentz
1d2eefe880
irclib: Apply changes to supybot.protocols.irc.maxHistoryLength immediately.
2012-12-27 12:24:24 +00:00
Valentin Lorentz
cab1830140
utils.structures: Prevent a RingBuffer from being bigger than the new size, when calling resize().
2012-12-27 12:22:14 +00:00
Valentin Lorentz
7b3ef56116
Fix mysterious bug when connecting/disconnecting.
2012-12-26 19:58:39 +01:00
Valentin Lorentz
6cbc6a14dd
Rename all 'locale' directories to 'locales'.
...
Firstly, these directories contains more than one locale. Secondly, it conflicts with the 'locale' python module.
2012-12-26 15:43:35 +01:00
Valentin Lorentz
84148988b3
Fix tests broken by 6a06ca991
.
2012-12-26 15:37:52 +01:00
Valentin Lorentz
790f0eea35
socket: Fix compatibility issue with Python 3 (introduced in 8cf094a
).
2012-12-26 15:03:57 +01:00
Valentin Lorentz
6a06ca9911
core: Initialize list of bans when joining a channel.
2012-12-23 17:19:25 +01:00
Valentin Lorentz
097ea23dfc
Fix handling of PluginNotFoundException in i18n.
2012-12-22 00:06:26 +00:00
Valentin Lorentz
d58ad0c86f
Reload translation of command helps when language changes.
2012-12-21 20:08:34 +01:00
Valentin Lorentz
989c674c58
Reset translation dict when reloading a locale.
2012-12-21 19:19:03 +01:00
Valentin Lorentz
30c56ae19f
Add support for arguments to addPeriodicEvent callbacks.
2012-12-19 19:48:46 +01:00
Valentin Lorentz
97b48abaa2
i18n: Initialize translations in __init__.
2012-12-19 17:04:39 +00:00
Daniel Folkinshteyn
620a90f4a7
core: make network.channels and channel keys private by default. Otherwise these can reveal secret information.
2012-12-18 18:37:11 +01:00
Valentin Lorentz
72bc227e1b
registry: Fix Json unserialization.
2012-12-15 22:00:23 +01:00
Valentin Lorentz
ad3f58efc2
Add the content of the new value of a config var, when it is not compatible with this config type.
2012-12-12 18:47:03 +01:00
Valentin Lorentz
d9f7e0e818
Add editable() method to registry.Json.
2012-12-08 21:13:54 +01:00
Valentin Lorentz
d8bd1f6f92
Add registry.Json.
2012-12-08 20:59:36 +01:00
Valentin Lorentz
4e8c35dd0c
Add context() method to registry.Value objects. Closes GH-430.
...
This method returns a context objet, for use with the 'with' statement.
2012-12-08 20:05:51 +01:00
Valentin Lorentz
69c60ca1f5
Remove debug output.
2012-12-08 05:16:00 +00:00
Valentin Lorentz
8cf094a628
Socket: Use select.select() instead of checking sockets one by one. Closes GH-431. Closes GH-420.
2012-12-07 21:41:50 +01:00
Valentin Lorentz
7d22d3dc36
Prevent NameError if ssl module can't be imported.
2012-12-07 01:48:05 +00:00
Valentin Lorentz
93586d71f4
Add support for extended banmasks. Closes GH-105.
2012-12-02 19:04:48 +01:00
Valentin Lorentz
d9f2235aed
callbacks.py: Fix error with commands like @echo "¡".
2012-11-07 19:20:26 +01:00
Valentin Lorentz
25855e5547
Fix crash when loading user with two nicks or more.
2012-11-07 19:00:41 +01:00
Valentin Lorentz
5f1c21c644
Remove temporary files.
2012-11-04 01:29:37 +01:00
Valentin Lorentz
e9755a6486
Add fix missing in previous commit.
2012-11-04 01:28:24 +01:00
Valentin Lorentz
59d6d4da03
commands.py: Fix name conflict.
2012-10-29 20:16:08 +01:00
Valentin Lorentz
fba70d15bc
Add configuration variable conf.supybot.capabilities.private.
...
This variable is a list of capabilities that are considered as 'private',
ie. the bot won't tell anyone but admins that a user has it, nor will the
bot give a list of users with this capability.
2012-10-29 20:15:14 +01:00
Valentin Lorentz
929090c279
conf.py: Prevent traceback if server address is an IPv6 address.
2012-10-27 17:59:05 +02:00
Valentin Lorentz
85eb0b4b0d
Fix 3a78300971
.
2012-10-23 16:15:13 +00:00
Valentin Lorentz
3a78300971
Add support for authentication scheme.
...
This commit closes http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=690879
2012-10-20 20:23:32 +02:00
Valentin Lorentz
d3da0c2efc
commands.py: Add 'channelOrGlobal' converter.
2012-10-18 19:30:35 +02:00
Valentin Lorentz
6b881d6509
Socket driver: Apply supybot.drivers.poll as soon as modified (do not require reconnect).
2012-10-10 19:39:28 +02:00
Valentin Lorentz
42957a6a69
Socket driver: Fix typo.
2012-10-07 13:55:01 +02:00
Valentin Lorentz
156b3d93e1
Socket driver: Add support for Socks proxies.
2012-10-07 13:13:08 +02:00
Valentin Lorentz
364a3e50e8
src/ircmsgs.py: Assert string parameters are actually strings.
...
This prevents a plugin from sending another object and messing with outFilter methods of other plugins.
2012-10-06 21:12:40 +00:00
Valentin Lorentz
784b8c37f8
httpserver: Add support for multiple hosts and IPv6. Closes GH-387.
2012-09-30 18:54:30 +02:00
Valentin Lorentz
c77c513e24
httpserver.py: Replace weird space by regular one.
2012-09-19 18:59:44 +00:00
skizzhg
84931cd0ea
conf.py: Fix typo.
2012-09-10 18:10:18 +02:00
Valentin Lorentz
f63148849c
src/test.py: Fix encoding issues with assertResponse being given an utf8 string.
2012-09-10 17:04:57 +02:00
Daniel Folkinshteyn
5bb6fdcd52
core: avoid casting data to string if it is already an instance of basestring, in irc.reply.
...
Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
2012-09-05 20:11:53 -04:00
Valentin Lorentz
eaf6877700
httpserver: Add favicon support.
2012-09-03 10:35:54 +02: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
James McCoy
232aa86a1e
Merge branch 'maint/0.83.4'
2012-09-01 09:13:52 -04:00
Daniel Folkinshteyn
2c051bab9f
core: force inet_aton argument to string to prevent occasional error on reconnect.
...
it /should/ always be a string anyway, but sometimes things break with
a TypeError that it is an int instead of the expected string and hangs
up the bot.
2012-08-30 11:32:48 +02:00
James McCoy
c74e8f35ab
Fix regression in parsing 004 messages
...
This was introduced in commit 4232e40e26
Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
2012-08-26 12:59:41 -04:00
Valentin Lorentz
d2ab53cd19
Fix parsing of 004 message. (Broken in d9531d2d
).
2012-08-25 20:17:15 +02:00
Valentin Lorentz
3739def69d
Merge branch 'py3k-backport' into testing
2012-08-13 13:01:58 +00:00
Valentin Lorentz
d2b33a3794
Fix compatibility with Python 2.6.
2012-08-13 13:01:50 +00:00
Valentin Lorentz
5dfba06aae
Prevent irc.replies from replying in private since fc9daa9
.
2012-08-10 13:10:14 +00:00
Valentin Lorentz
fc9daa9953
Make supybot.reply.oneToOne channel-specific.
2012-08-10 12:27:25 +00:00
Valentin Lorentz
19708c55cc
Fix typo in 5f94da8660
.
2012-08-08 19:51:11 +00:00
Valentin Lorentz
45bf9db03c
Merge branch 'py3k-backport' into testing
...
This branch provides support of Python 3 via 2to3 (without dropping
Python 2 support).
2012-08-08 21:46:29 +02:00
Valentin Lorentz
5f94da8660
Fix test.assertHelp for commands with long help (XX more messages).
2012-08-08 21:41:25 +02:00
Valentin Lorentz
e3d170d9fe
Add support for network-specific umodes.
2012-08-06 15:59:00 +02:00
Valentin Lorentz
3dc8e04195
utils.web.urlencode: Encode data into bytes.
2012-08-05 16:57:40 +02:00
Valentin Lorentz
1b6be5842f
src/cdb.py: Use 'future' division and decode/encode data from/to the disk.
2012-08-05 16:57:18 +02:00
Valentin Lorentz
535593d555
src/dbi.py: Use open() instead of file().
2012-08-05 16:56:07 +02:00
Valentin Lorentz
14200e002a
Rename cdb.open to cdb.open_db and open cdb files in binary mode.
2012-08-05 15:47:30 +02:00
Valentin Lorentz
0e450a5eff
src/callbacks.py: Use unicode_escape if running Python 3.
2012-08-05 14:22:53 +02:00
Valentin Lorentz
089be4c8a5
src/i18n.py: Use 'str' as a base class instead of 'unicode'.
2012-08-05 13:48:11 +02:00
Valentin Lorentz
041893aaf9
Socket driver: encode strings just before sending them.
2012-08-05 13:47:48 +02:00
Valentin Lorentz
306105abad
src/i18n.py: Fix encoding issue with Python 3.
2012-08-05 13:37:37 +02:00
Valentin Lorentz
f1165333e5
src/registry.py: Fix encoding issues with Python 3.
2012-08-05 13:28:16 +02:00
Valentin Lorentz
32a7da6f51
Add 2to3 fixer to process utils.gen.IterableMap correctly.
2012-08-05 12:32:57 +02:00
Valentin Lorentz
393f78c573
Use a boolean instead of hacky reference comparison in utils.iter.choice.
2012-08-05 09:59:42 +02:00
Valentin Lorentz
4ffaff0638
Don't use utils.str.chars anymore.
2012-08-05 09:54:34 +02:00
Valentin Lorentz
0c99a65afa
src/conf.py: Use classic comparison instead of str.translate.
2012-08-04 22:47:16 +02:00
Valentin Lorentz
0b7e4e5ce5
src/registry.py: Fix encoding issue with Python 3.
2012-08-04 22:46:52 +02:00
Valentin Lorentz
e89dcf867a
Remove unused import of UserDict.
2012-08-04 22:39:22 +02:00
Valentin Lorentz
fff9b837fb
Import ifilter from itertools instead of utils.iter.
2012-08-04 22:38:11 +02:00
Valentin Lorentz
1a64f1052a
Use MultipleReplace for utils.str.soundex.
2012-08-04 22:36:40 +02:00
Valentin Lorentz
9edda206ea
Remove utils.str.chars.
2012-08-04 22:33:08 +02:00
Valentin Lorentz
3838ab5314
Remove unused imports of new.
2012-08-04 22:31:59 +02:00
Valentin Lorentz
ced2e7b72d
Implement seed, tell, and flush to AtomicFile.
2012-08-04 21:24:17 +02:00
Valentin Lorentz
7f0e1115b5
Make world.py py3k-friendly.
2012-08-04 18:06:49 +02:00
Valentin Lorentz
c4dfa55d65
Use HTMLParser instead of deprecated sgmllib in utils.web.
2012-08-04 18:02:45 +02:00
Valentin Lorentz
9ae90c3869
Make utils.structures.CacheDict subclass collections.MutableMapping instead of deprecated UserDict.DictMixin.
2012-08-04 17:46:28 +02:00
Valentin Lorentz
6514db9b3f
Prevent name clashes in utils.structures.
2012-08-04 17:42:08 +02:00
Valentin Lorentz
452c706092
Make utils.str.perlRoToReplacer less ambiguous.
2012-08-04 17:36:15 +02:00
Valentin Lorentz
8af6761275
Use 'unicode_escape' in utils.str.dqrepr if running Python 3.
2012-08-04 17:33:17 +02:00
Valentin Lorentz
0a4a12243d
Prevent name clash in utils.iter.startswith.
2012-08-04 17:26:59 +02:00
Valentin Lorentz
b8fe420ef3
Use 'ast' instead of 'compiler' in utils.gen.safeEval.
2012-08-04 17:24:08 +02:00
Valentin Lorentz
d3d93da602
utils.gen.saltHash: encode string before hashing it.
2012-08-04 17:12:23 +02:00
Valentin Lorentz
ab978a8c31
Remove utils/gen.py dependency on deprecated libraries (new and UserDict).
2012-08-04 17:09:32 +02:00
Valentin Lorentz
caaf290c9b
utils/gen.py: Import imap from itertools instead of utils.iter.
2012-08-04 17:03:51 +02:00
Valentin Lorentz
9de7316f02
Change utils.file.AtomicFile into a wrapper instead of a subclass.
2012-08-04 17:01:36 +02:00
Valentin Lorentz
174a5a4b1f
Encode strings before hashing them in utils.file.mktemp.
2012-08-04 16:39:33 +02:00
Valentin Lorentz
54917f581a
Drop dependency on deprecated httplib.HTTP in test framework.
2012-08-04 16:32:15 +02:00
Valentin Lorentz
b5c99b1ce1
Fix capability checks.
2012-08-04 15:57:51 +02:00
Valentin Lorentz
8211aab92e
Fix issue typo in schedule.removeEvent.
2012-08-04 15:57:47 +02:00
Valentin Lorentz
4bf39f773f
Use the codecs module in src/registry.py.
2012-08-04 15:48:30 +02:00
Valentin Lorentz
69c18aed08
Make NonExistentRegistryEntry subclass AttributeError.
2012-08-04 15:11:45 +02:00
Valentin Lorentz
7d73a7dc0a
src/questions.py: Don't use the 'is' operator to compare strings.
2012-08-04 15:05:04 +02:00
Valentin Lorentz
b338c54592
src/log.py: Support for Python 3 logging module.
2012-08-04 15:04:43 +02:00
Valentin Lorentz
fa8950b4a4
Make type checks in ircutils.safeArgument compatible with Python 3.
2012-08-04 14:52:17 +02:00
Valentin Lorentz
66e4243a14
Use 'future' division in src/ircutils.py.
2012-08-04 14:18:53 +02:00
Valentin Lorentz
df2d976818
Use utils.str.MultipleReplacer instead of str.maketrans.
2012-08-04 14:04:15 +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
17eb6c497f
ircmsgs: use classic comparisons instead of str.translate to ensure channel key validity.
2012-08-04 13:31:26 +02:00
Valentin Lorentz
e23fa611d6
Call other.__eq__ in irclib.Irc.__eq__ instead of using the == comparator.
...
Here, this operator is not reflexive, and Python 3 calls the second members resulting in a stack overflow.
2012-08-04 13:25:47 +02:00
Valentin Lorentz
1cb657ddb2
Import imap directly from itertools instead of utils.iter.
2012-08-04 13:21:37 +02:00
Valentin Lorentz
d52e501ae8
Use open() instead of file().
2012-08-04 13:13:16 +02:00
Valentin Lorentz
505fd580f8
Use unicode in src/i18n.py
2012-08-04 12:09:11 +02:00
Valentin Lorentz
d28fa0cbdf
Make Socket driver compatible with py3k.
2012-08-04 12:00:02 +02:00
Valentin Lorentz
139f5b4943
Make src/callbacks.py more py3k-friendly.
2012-08-04 11:38:12 +02:00