From 566e841977e367691782acad95c344b36b1353d5 Mon Sep 17 00:00:00 2001 From: Valentin Lorentz Date: Mon, 20 Jan 2014 11:35:28 +0100 Subject: [PATCH 01/36] Update documentation of ircdb.checkCapability (used in the Sphinx doc). --- src/ircdb.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/ircdb.py b/src/ircdb.py index bfa1f1994..73dfb0288 100644 --- a/src/ircdb.py +++ b/src/ircdb.py @@ -1057,6 +1057,20 @@ def checkCapability(hostmask, capability, users=users, channels=channels, ignoreOwner=False, ignoreChannelOp=False, ignoreDefaultAllow=False): """Checks that the user specified by name/hostmask has the capability given. + + ``users`` and ``channels`` default to ``ircdb.users`` and + ``ircdb.channels``. + + ``ignoreOwner``, ``ignoreChannelOp``, and ``ignoreDefaultAllow`` are + used to override default behavior of the capability system in special + cases (actually, in the AutoMode plugin): + + * ``ignoreOwner`` disables the behavior "owners have all capabilites" + * ``ignoreChannelOp`` disables the behavior "channel ops have all + channel capabilities" + * ``ignoreDefaultAllow`` disables the behavior "if a user does not have + a capability or the associated anticapability, then they have the + capability" """ if world.testing and (not isinstance(hostmask, str) or '@' not in hostmask or From a277ace2bffe20ec7b594d33d06f85f9547afbf9 Mon Sep 17 00:00:00 2001 From: Valentin Lorentz Date: Mon, 20 Jan 2014 13:59:25 +0100 Subject: [PATCH 02/36] Set list of fixers explicitely. --- setup.py | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/setup.py b/setup.py index e75e71143..36648d3fb 100644 --- a/setup.py +++ b/setup.py @@ -148,10 +148,24 @@ try: def log_debug(self, msg, *args): log.debug(msg, *args) - fixer_names = get_fixers_from_package('lib2to3.fixes') - fixer_names.remove('lib2to3.fixes.fix_import') - fixer_names += get_fixers_from_package('2to3') - r = DistutilsRefactoringTool(fixer_names, options=options) + fixer_names = ['fix_apply', 'fix_basestring', 'fix_buffer', + 'fix_callable', 'fix_dict', 'fix_except', 'fix_exec', + 'fix_execfile', 'fix_exitfunc', 'fix_filter', + 'fix_funcattrs', 'fix_future', 'fix_getcwdu', + 'fix_has_key', 'fix_idioms', 'fix_imports', 'fix_imports2', + 'fix_input', 'fix_intern', 'fix_isinstance', + 'fix_itertools', 'fix_itertools_imports', 'fix_long', + 'fix_map', 'fix_metaclass', 'fix_methodattrs', 'fix_ne', + 'fix_next', 'fix_nonzero', 'fix_numliterals', + 'fix_operator', 'fix_paren', 'fix_print', 'fix_raise', + 'fix_raw_input', 'fix_reduce', 'fix_renames', 'fix_repr', + 'fix_set_literal', 'fix_standarderror', 'fix_sys_exc', + 'fix_throw', 'fix_tuple_params', 'fix_types', + 'fix_unicode', 'fix_urllib', 'fix_ws_comma', 'fix_xrange', + 'fix_xreadlines', 'fix_zip'] + fixers = list(map(lambda x:'lib2to3.fixes.'+x, fixer_names)) + fixers += get_fixers_from_package('2to3') + r = DistutilsRefactoringTool(fixers, options=options) r.refactor(files, write=True) except ImportError: # 2.x From 4652c9ce51e3693a3b64378d05cde7d037a7213a Mon Sep 17 00:00:00 2001 From: Valentin Lorentz Date: Mon, 20 Jan 2014 14:49:47 +0100 Subject: [PATCH 03/36] Start accelerating the 2to3 step (remove fix_apply, fix_buffer, fix_callable, fix_exec, fix_execfile, fix_exitfunc, fix_filter, fix_funcattrs, fix_future, fix_getcwdu, and fix_has_key). --- plugins/Channel/plugin.py | 4 ++-- plugins/Dict/local/dictclient.py | 2 +- plugins/Google/plugin.py | 2 +- plugins/RSS/plugin.py | 6 ++++-- plugins/Topic/plugin.py | 2 +- plugins/Utilities/plugin.py | 2 +- setup.py | 9 ++++----- src/drivers/Socket.py | 4 ++-- src/i18n.py | 10 ++++++---- src/ircdb.py | 2 +- src/plugin.py | 4 ++-- src/utils/str.py | 2 +- 12 files changed, 26 insertions(+), 23 deletions(-) diff --git a/plugins/Channel/plugin.py b/plugins/Channel/plugin.py index fd591ad28..bdbc5e191 100644 --- a/plugins/Channel/plugin.py +++ b/plugins/Channel/plugin.py @@ -808,7 +808,7 @@ class Channel(callbacks.Plugin): 'called %s.'), plugin.name(), command) elif command: # findCallbackForCommand - if filter(None, irc.findCallbacksForArgs([command])): + if list(filter(None, irc.findCallbacksForArgs([command]))): s = '-%s' % command else: failMsg = format(_('No plugin or command named %s could be ' @@ -847,7 +847,7 @@ class Channel(callbacks.Plugin): 'called %s.'), plugin.name(), command) elif command: # findCallbackForCommand - if filter(None, irc.findCallbacksForArgs([command])): + if list(filter(None, irc.findCallbacksForArgs([command]))): s = '-%s' % command else: failMsg = format(_('No plugin or command named %s could be ' diff --git a/plugins/Dict/local/dictclient.py b/plugins/Dict/local/dictclient.py index 64cef4097..fa11a7008 100644 --- a/plugins/Dict/local/dictclient.py +++ b/plugins/Dict/local/dictclient.py @@ -149,7 +149,7 @@ class Connection: if not hasattr(self, 'dbobjs'): self.dbobjs = {} - if self.dbobjs.has_key(dbname): + if dbname in self.dbobjs: return self.dbobjs[dbname] # We use self.dbdescs explicitly since we don't want to diff --git a/plugins/Google/plugin.py b/plugins/Google/plugin.py index 2fe2bbdcd..e648e8f4d 100644 --- a/plugins/Google/plugin.py +++ b/plugins/Google/plugin.py @@ -162,7 +162,7 @@ class Google(callbacks.PluginRegexp): data = self.search(text, msg.args[0], {'smallsearch': True}) if data['responseData']['results']: url = data['responseData']['results'][0]['unescapedUrl'] - if opts.has_key('snippet'): + if 'snippet' in opts: snippet = data['responseData']['results'][0]['content'] snippet = " | " + utils.web.htmlToText(snippet, tagReplace='') else: diff --git a/plugins/RSS/plugin.py b/plugins/RSS/plugin.py index 6bf887a9a..e2929e531 100644 --- a/plugins/RSS/plugin.py +++ b/plugins/RSS/plugin.py @@ -181,7 +181,8 @@ class RSS(callbacks.Plugin): #oldresults = self.cachedFeeds[url] #oldheadlines = self.getHeadlines(oldresults) oldheadlines = self.cachedHeadlines[url] - oldheadlines = filter(lambda x: t - x[3] < self.registryValue('announce.cachePeriod'), oldheadlines) + oldheadlines = list(filter(lambda x: t - x[3] < + self.registryValue('announce.cachePeriod'), oldheadlines)) except KeyError: oldheadlines = [] newresults = self.getFeed(url) @@ -198,7 +199,7 @@ class RSS(callbacks.Plugin): for (i, headline) in enumerate(newheadlines): if normalize(headline) in oldheadlinesset: newheadlines[i] = None - newheadlines = filter(None, newheadlines) # Removes Nones. + newheadlines = list(filter(None, newheadlines)) # Removes Nones. number_of_headlines = len(oldheadlines) oldheadlines.extend(newheadlines) self.cachedHeadlines[url] = oldheadlines @@ -228,6 +229,7 @@ class RSS(callbacks.Plugin): channelnewheadlines = filter(filter_whitelist, channelnewheadlines) if len(blacklist) != 0: channelnewheadlines = filter(filter_blacklist, channelnewheadlines) + channelnewheadlines = list(channelnewheadlines) if len(channelnewheadlines) == 0: return bold = self.registryValue('bold', channel) diff --git a/plugins/Topic/plugin.py b/plugins/Topic/plugin.py index d83593d92..dc1065868 100644 --- a/plugins/Topic/plugin.py +++ b/plugins/Topic/plugin.py @@ -105,7 +105,7 @@ addConverter('topicNumber', getTopicNumber) addConverter('canChangeTopic', canChangeTopic) def splitTopic(topic, separator): - return filter(None, topic.split(separator)) + return list(filter(None, topic.split(separator))) datadir = conf.supybot.directories.data() filename = conf.supybot.directories.data.dirize('Topic.pickle') diff --git a/plugins/Utilities/plugin.py b/plugins/Utilities/plugin.py index 8d0452603..50f49cf4e 100644 --- a/plugins/Utilities/plugin.py +++ b/plugins/Utilities/plugin.py @@ -75,7 +75,7 @@ class Utilities(callbacks.Plugin): nested commands to run, but only the output of the last one to be returned. """ - args = filter(None, args) + args = list(filter(None, args)) if args: irc.reply(args[-1]) else: diff --git a/setup.py b/setup.py index 36648d3fb..070c43c0d 100644 --- a/setup.py +++ b/setup.py @@ -148,11 +148,10 @@ try: def log_debug(self, msg, *args): log.debug(msg, *args) - fixer_names = ['fix_apply', 'fix_basestring', 'fix_buffer', - 'fix_callable', 'fix_dict', 'fix_except', 'fix_exec', - 'fix_execfile', 'fix_exitfunc', 'fix_filter', - 'fix_funcattrs', 'fix_future', 'fix_getcwdu', - 'fix_has_key', 'fix_idioms', 'fix_imports', 'fix_imports2', + fixer_names = ['fix_basestring', + 'fix_dict', 'fix_except', + 'fix_funcattrs', + 'fix_idioms', 'fix_imports', 'fix_imports2', 'fix_input', 'fix_intern', 'fix_isinstance', 'fix_itertools', 'fix_itertools_imports', 'fix_long', 'fix_map', 'fix_metaclass', 'fix_methodattrs', 'fix_ne', diff --git a/src/drivers/Socket.py b/src/drivers/Socket.py index 7045df269..b49c52e74 100644 --- a/src/drivers/Socket.py +++ b/src/drivers/Socket.py @@ -82,7 +82,7 @@ class SocketDriver(drivers.IrcDriver, drivers.ServersMixin): self.writeCheckTime = None self.nextReconnectTime = None self.resetDelay() - if self.networkGroup.get('ssl').value and not globals().has_key('ssl'): + if self.networkGroup.get('ssl').value and 'ssl' not in globals(): drivers.log.error('The Socket driver can not connect to SSL ' 'servers for your Python version. Try the ' 'Twisted driver instead, or install a Python' @@ -304,7 +304,7 @@ class SocketDriver(drivers.IrcDriver, drivers.ServersMixin): self.conn.settimeout(max(10, conf.supybot.drivers.poll()*10)) try: if getattr(conf.supybot.networks, self.irc.network).ssl(): - assert globals().has_key('ssl') + assert 'ssl' in globals() certfile = getattr(conf.supybot.networks, self.irc.network) \ .certfile() if not certfile: diff --git a/src/i18n.py b/src/i18n.py index f1aa9d5a4..28d7c5860 100644 --- a/src/i18n.py +++ b/src/i18n.py @@ -131,7 +131,7 @@ def reloadLocales(): i18nSupybot = None def PluginInternationalization(name='supybot'): # This is a proxy that prevents having several objects for the same plugin - if i18nClasses.has_key(name): + if name in i18nClasses: return i18nClasses[name] else: return _PluginInternationalization(name) @@ -276,8 +276,10 @@ class _PluginInternationalization: load its functions.""" if self.name != 'supybot': return + path = self._getL10nCodePath() try: - execfile(self._getL10nCodePath()) + with open(path) as fd: + exec(compile(fd.read(), path, 'exec')) except IOError: # File doesn't exist pass @@ -302,7 +304,7 @@ class _PluginInternationalization: if self.name != 'supybot': return if hasattr(self, '_l10nFunctions') and \ - self._l10nFunctions.has_key(name): + name in self._l10nFunctions: return self._l10nFunctions[name] def internationalizeFunction(self, name): @@ -351,7 +353,7 @@ def internationalizeDocstring(obj): Only useful for commands (commands' docstring is displayed on IRC)""" if obj.__doc__ == None: return obj - if sys.modules[obj.__module__].__dict__.has_key('_'): + if '_' in sys.modules[obj.__module__].__dict__: internationalizedCommands.update({hash(obj): obj}) try: obj.__doc__=sys.modules[obj.__module__]._.__call__(obj.__doc__) diff --git a/src/ircdb.py b/src/ircdb.py index 73dfb0288..1cf3fe4b7 100644 --- a/src/ircdb.py +++ b/src/ircdb.py @@ -334,7 +334,7 @@ class IrcUser(object): knownHostmasks.add(mask) return True return False - uniqued = filter(uniqueHostmask, reversed(self.auth)) + uniqued = list(filter(uniqueHostmask, reversed(self.auth))) self.auth = list(reversed(uniqued)) else: raise ValueError, 'secure flag set, unmatched hostmask' diff --git a/src/plugin.py b/src/plugin.py index 324a38792..5d63800c2 100644 --- a/src/plugin.py +++ b/src/plugin.py @@ -54,8 +54,8 @@ def loadPluginModule(name, ignoreDeprecation=False): log.warning('Invalid plugin directory: %s; removing.', dir) conf.supybot.directories.plugins().remove(dir) if name not in files: - matched_names = filter(lambda x: re.search(r'(?i)^%s$' % (name,), x), - files) + search = lambda x: re.search(r'(?i)^%s$' % (name,), x) + matched_names = list(filter(search, files)) if len(matched_names) == 1: name = matched_names[0] else: diff --git a/src/utils/str.py b/src/utils/str.py index 0e9c18947..8b8aacfef 100644 --- a/src/utils/str.py +++ b/src/utils/str.py @@ -218,7 +218,7 @@ def perlReToReplacer(s): g = False if 'g' in flags: g = True - flags = filter('g'.__ne__, flags) + flags = list(filter('g'.__ne__, flags)) if isinstance(flags, list): flags = ''.join(flags) r = perlReToPythonRe(sep.join(('', regexp, flags))) From d1649a44acbd2cfbf3ef20c07ffcd3b6098d182d Mon Sep 17 00:00:00 2001 From: Valentin Lorentz Date: Mon, 20 Jan 2014 15:13:01 +0100 Subject: [PATCH 04/36] Continue accelerating the 2to3 step (remove fix_idioms, fix_imports2, fix_input, fix_intern, fix_isinstance, fix_ne, fix_next, and fix_raw_input). --- plugins/Dict/local/dictclient.py | 4 ++-- plugins/Filter/plugin.py | 2 +- plugins/Misc/plugin.py | 2 +- plugins/Nickometer/plugin.py | 2 +- plugins/String/plugin.py | 2 +- setup.py | 9 ++++----- src/cdb.py | 4 ++-- src/conf.py | 2 +- src/ircutils.py | 4 ++-- src/questions.py | 5 ++++- src/shlex.py | 6 +++--- src/utils/__init__.py | 2 +- src/utils/iter.py | 6 +++--- src/utils/structures.py | 18 +++++++++--------- 14 files changed, 35 insertions(+), 33 deletions(-) diff --git a/plugins/Dict/local/dictclient.py b/plugins/Dict/local/dictclient.py index fa11a7008..8c54f7407 100644 --- a/plugins/Dict/local/dictclient.py +++ b/plugins/Dict/local/dictclient.py @@ -73,7 +73,7 @@ class Connection: """Used when expecting multiple lines of text -- gets the block part only. Does not get any codes or anything! Returns a string.""" data = [] - while 1: + while True: line = self.rfile.readline().decode('utf8').strip() if line == '.': break @@ -194,7 +194,7 @@ class Connection: if code != 150: raise Exception, "Unknown code %d" % code - while 1: + while True: code, text = self.getresultcode() if code != 151 or code is None: break diff --git a/plugins/Filter/plugin.py b/plugins/Filter/plugin.py index 0dc8732c6..31921d28d 100644 --- a/plugins/Filter/plugin.py +++ b/plugins/Filter/plugin.py @@ -416,7 +416,7 @@ class Filter(callbacks.Plugin): if sys.version_info[0] < 3: text = text.decode('utf-8') colors = utils.iter.cycle(['04', '07', '08', '03', '02', '12', '06']) - L = [self._color(c, fg=colors.next()) for c in text] + L = [self._color(c, fg=next(colors)) for c in text] if sys.version_info[0] < 3: L = [c.encode('utf-8') for c in L] irc.reply(''.join(L) + '\x03') diff --git a/plugins/Misc/plugin.py b/plugins/Misc/plugin.py index 8cea01705..781098d59 100644 --- a/plugins/Misc/plugin.py +++ b/plugins/Misc/plugin.py @@ -450,7 +450,7 @@ class Misc(callbacks.Plugin): if skipfirst: # Drop the first message only if our current channel is the same as # the channel we've been instructed to look at. - iterable.next() + next(iterable) predicates = list(utils.iter.flatten(predicates.itervalues())) # Make sure the user can't get messages from channels they aren't in def userInChannel(m): diff --git a/plugins/Nickometer/plugin.py b/plugins/Nickometer/plugin.py index c7370a4bc..fd7d596a9 100644 --- a/plugins/Nickometer/plugin.py +++ b/plugins/Nickometer/plugin.py @@ -145,7 +145,7 @@ class Nickometer(callbacks.Plugin): '%s consecutive non-alphas ' % len(match)) # Remove balanced brackets ... - while 1: + while True: nickInitial = nick nick=re.sub('^([^()]*)(\()(.*)(\))([^()]*)$', '\1\3\5', nick, 1) nick=re.sub('^([^{}]*)(\{)(.*)(\})([^{}]*)$', '\1\3\5', nick, 1) diff --git a/plugins/String/plugin.py b/plugins/String/plugin.py index 8f001340c..212c12cab 100644 --- a/plugins/String/plugin.py +++ b/plugins/String/plugin.py @@ -216,7 +216,7 @@ class String(callbacks.Plugin): encryption. """ chars = utils.iter.cycle(password) - ret = [chr(ord(c) ^ ord(chars.next())) for c in text] + ret = [chr(ord(c) ^ ord(next(chars))) for c in text] irc.reply(''.join(ret)) xor = wrap(xor, ['something', 'text']) diff --git a/setup.py b/setup.py index 070c43c0d..656300e75 100644 --- a/setup.py +++ b/setup.py @@ -151,13 +151,12 @@ try: fixer_names = ['fix_basestring', 'fix_dict', 'fix_except', 'fix_funcattrs', - 'fix_idioms', 'fix_imports', 'fix_imports2', - 'fix_input', 'fix_intern', 'fix_isinstance', + 'fix_imports', 'fix_itertools', 'fix_itertools_imports', 'fix_long', - 'fix_map', 'fix_metaclass', 'fix_methodattrs', 'fix_ne', - 'fix_next', 'fix_nonzero', 'fix_numliterals', + 'fix_map', 'fix_metaclass', 'fix_methodattrs', + 'fix_nonzero', 'fix_numliterals', 'fix_operator', 'fix_paren', 'fix_print', 'fix_raise', - 'fix_raw_input', 'fix_reduce', 'fix_renames', 'fix_repr', + 'fix_reduce', 'fix_renames', 'fix_repr', 'fix_set_literal', 'fix_standarderror', 'fix_sys_exc', 'fix_throw', 'fix_tuple_params', 'fix_types', 'fix_unicode', 'fix_urllib', 'fix_ws_comma', 'fix_xrange', diff --git a/src/cdb.py b/src/cdb.py index 150860239..17eecf27a 100644 --- a/src/cdb.py +++ b/src/cdb.py @@ -118,7 +118,7 @@ def make(dbFilename, readFilename=None): else: readfd = open(readFilename, 'rb') maker = Maker(dbFilename) - while 1: + while True: (initchar, key, value) = _readKeyValue(readfd) if initchar is None: break @@ -318,7 +318,7 @@ class ReaderWriter(utils.IterableMap): adds = {} try: fd = open(self.journalName, 'r') - while 1: + while True: (initchar, key, value) = _readKeyValue(fd) if initchar is None: break diff --git a/src/conf.py b/src/conf.py index 9b3b0441f..5e1214295 100644 --- a/src/conf.py +++ b/src/conf.py @@ -839,7 +839,7 @@ class Databases(registry.SpaceSeparatedListOfStrings): def __call__(self): v = super(Databases, self).__call__() if not v: - v = ['anydbm', 'cdb', 'flat', 'pickle'] + v = ['anydbm', 'dbm', 'cdb', 'flat', 'pickle'] if 'sqlite' in sys.modules: v.insert(0, 'sqlite') if 'sqlite3' in sys.modules: diff --git a/src/ircutils.py b/src/ircutils.py index 428db6269..241cd3450 100644 --- a/src/ircutils.py +++ b/src/ircutils.py @@ -87,13 +87,13 @@ def splitHostmask(hostmask): assert isUserHostmask(hostmask) nick, rest = hostmask.split('!', 1) user, host = rest.split('@', 1) - return (intern(nick), intern(user), intern(host)) + return (sys.intern(nick), sys.intern(user), sys.intern(host)) def joinHostmask(nick, ident, host): """nick, user, host => hostmask Joins the nick, ident, host into a user hostmask.""" assert nick and ident and host - return intern('%s!%s@%s' % (nick, ident, host)) + return sys.intern('%s!%s@%s' % (nick, ident, host)) _rfc1459trans = utils.str.MultipleReplacer(dict(zip( string.ascii_uppercase + r'\[]~', diff --git a/src/questions.py b/src/questions.py index 998a9b3e0..9a9d8d172 100644 --- a/src/questions.py +++ b/src/questions.py @@ -76,7 +76,10 @@ def expect(prompt, possibilities, recursed=False, default=None, if useBold: prompt += ansi.RESET print >>fd, ansi.BOLD, - s = raw_input(prompt) + if sys.version_info[0] >= 3: + s = input(prompt) + else: + s = raw_input(prompt) s = s.strip() print >>fd if possibilities: diff --git a/src/shlex.py b/src/shlex.py index dcfbbe658..fa2f7e11e 100644 --- a/src/shlex.py +++ b/src/shlex.py @@ -96,7 +96,7 @@ class shlex: def read_token(self): "Read a token from the input stream (no pushback or inclusions)" - while 1: + while True: nextchar = self.instream.read(1) if nextchar == '\n': self.lineno = self.lineno + 1 @@ -190,7 +190,7 @@ class shlex: if newfile[0] == '"': newfile = newfile[1:-1] # This implements cpp-like semantics for relative-path inclusion. - if type(self.infile) == type("") and not os.path.isabs(newfile): + if isinstance(self.infile, basestring) and not os.path.isabs(newfile): newfile = os.path.join(os.path.dirname(self.infile), newfile) return (newfile, open(newfile, "r")) @@ -210,7 +210,7 @@ if __name__ == '__main__': file = sys.argv[1] with open(file) as fd: lexer = shlex(fd, file) - while 1: + while True: tt = lexer.get_token() if tt: print "Token: " + repr(tt) diff --git a/src/utils/__init__.py b/src/utils/__init__.py index 4e26f8d60..6d1de1002 100644 --- a/src/utils/__init__.py +++ b/src/utils/__init__.py @@ -44,7 +44,7 @@ def join(L): def split(s): fd = StringIO.StringIO(s) reader = csv.reader(fd) - return reader.next() + return next(reader) csv.join = join csv.split = split diff --git a/src/utils/iter.py b/src/utils/iter.py index f4039341e..1416859b5 100644 --- a/src/utils/iter.py +++ b/src/utils/iter.py @@ -48,7 +48,7 @@ def len(iterable): return i def trueCycle(iterable): - while 1: + while True: yielded = False for x in iterable: yield x @@ -141,7 +141,7 @@ def startswith(long_, short): shortI = iter(short) try: while True: - if shortI.next() != longI.next(): + if next(shortI) != next(longI): return False except StopIteration: return True @@ -151,7 +151,7 @@ def limited(iterable, limit): iterable = iter(iterable) try: while i: - yield iterable.next() + yield next(iterable) i -= 1 except StopIteration: raise ValueError, 'Expected %s elements in iterable (%r), got %s.' % \ diff --git a/src/utils/structures.py b/src/utils/structures.py index 3b2910397..25c4ceff1 100644 --- a/src/utils/structures.py +++ b/src/utils/structures.py @@ -70,7 +70,7 @@ class RingBuffer(object): self.maxSize == other.maxSize and len(self) == len(other): iterator = iter(other) for elt in self: - otherelt = iterator.next() + otherelt = next(iterator) if not elt == otherelt: return False return True @@ -100,7 +100,7 @@ class RingBuffer(object): def __getitem__(self, idx): if self.full: oidx = idx - if type(oidx) == types.SliceType: + if isinstance(oidx, types.SliceType): L = [] for i in xrange(*slice.indices(oidx, len(self))): L.append(self[i]) @@ -112,7 +112,7 @@ class RingBuffer(object): idx = (idx + self.i) % len(self.L) return self.L[idx] else: - if type(idx) == types.SliceType: + if isinstance(idx, types.SliceType): L = [] for i in xrange(*slice.indices(idx, len(self))): L.append(self[i]) @@ -123,7 +123,7 @@ class RingBuffer(object): def __setitem__(self, idx, elt): if self.full: oidx = idx - if type(oidx) == types.SliceType: + if isinstance(oidx, types.SliceType): range_ = xrange(*slice.indices(oidx, len(self))) if len(range_) != len(elt): raise ValueError, 'seq must be the same length as slice.' @@ -137,7 +137,7 @@ class RingBuffer(object): idx = (idx + self.i) % len(self.L) self.L[idx] = elt else: - if type(idx) == types.SliceType: + if isinstance(idx, types.SliceType): range_ = xrange(*slice.indices(idx, len(self))) if len(range_) != len(elt): raise ValueError, 'seq must be the same length as slice.' @@ -212,7 +212,7 @@ class queue(object): if len(self) == len(other): otheriter = iter(other) for elt in self: - otherelt = otheriter.next() + otherelt = next(otheriter) if not (elt == otherelt): return False return True @@ -225,7 +225,7 @@ class queue(object): def __getitem__(self, oidx): if len(self) == 0: raise IndexError, 'queue index out of range' - if type(oidx) == types.SliceType: + if isinstance(oidx, types.SliceType): L = [] for i in xrange(*slice.indices(oidx, len(self))): L.append(self[i]) @@ -242,7 +242,7 @@ class queue(object): def __setitem__(self, oidx, value): if len(self) == 0: raise IndexError, 'queue index out of range' - if type(oidx) == types.SliceType: + if isinstance(oidx, types.SliceType): range_ = xrange(*slice.indices(oidx, len(self))) if len(range_) != len(value): raise ValueError, 'seq must be the same length as slice.' @@ -263,7 +263,7 @@ class queue(object): self.back[idx-len(self.front)] = value def __delitem__(self, oidx): - if type(oidx) == types.SliceType: + if isinstance(oidx, types.SliceType): range_ = xrange(*slice.indices(oidx, len(self))) for i in range_: del self[i] From 529b8f8d99013ffecca306700429b73cf3709429 Mon Sep 17 00:00:00 2001 From: Valentin Lorentz Date: Mon, 20 Jan 2014 15:19:06 +0100 Subject: [PATCH 05/36] Continue accelerating the 2to3 step (remove fix_nonzero, fix_operator, and fix_paren). --- setup.py | 4 ++-- src/irclib.py | 3 ++- src/utils/gen.py | 3 ++- src/utils/structures.py | 6 ++++-- 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/setup.py b/setup.py index 656300e75..38ab779d4 100644 --- a/setup.py +++ b/setup.py @@ -154,8 +154,8 @@ try: 'fix_imports', 'fix_itertools', 'fix_itertools_imports', 'fix_long', 'fix_map', 'fix_metaclass', 'fix_methodattrs', - 'fix_nonzero', 'fix_numliterals', - 'fix_operator', 'fix_paren', 'fix_print', 'fix_raise', + 'fix_numliterals', + 'fix_print', 'fix_raise', 'fix_reduce', 'fix_renames', 'fix_repr', 'fix_set_literal', 'fix_standarderror', 'fix_sys_exc', 'fix_throw', 'fix_tuple_params', 'fix_types', diff --git a/src/irclib.py b/src/irclib.py index d640ffc36..a7cac3acf 100644 --- a/src/irclib.py +++ b/src/irclib.py @@ -205,8 +205,9 @@ class IrcMsgQueue(object): msg in self.lowpriority or \ msg in self.highpriority - def __nonzero__(self): + def __bool__(self): return bool(self.highpriority or self.normal or self.lowpriority) + __nonzero__ = __bool__ def __len__(self): return len(self.highpriority)+len(self.lowpriority)+len(self.normal) diff --git a/src/utils/gen.py b/src/utils/gen.py index 42df662ea..e675b5c7e 100644 --- a/src/utils/gen.py +++ b/src/utils/gen.py @@ -239,10 +239,11 @@ class IterableMap(object): ret += 1 return ret - def __nonzero__(self): + def __bool__(self): for _ in self.iteritems(): return True return False + __nonzero__ = __bool__ class InsensitivePreservingDict(collections.MutableMapping): diff --git a/src/utils/structures.py b/src/utils/structures.py index 25c4ceff1..0d9652d00 100644 --- a/src/utils/structures.py +++ b/src/utils/structures.py @@ -76,8 +76,9 @@ class RingBuffer(object): return True return False - def __nonzero__(self): + def __bool__(self): return len(self) > 0 + __nonzero__ = __bool__ def __contains__(self, elt): return elt in self.L @@ -196,8 +197,9 @@ class queue(object): def __len__(self): return len(self.front) + len(self.back) - def __nonzero__(self): + def __bool__(self): return bool(self.back or self.front) + __nonzero__ = __bool__ def __contains__(self, elt): return elt in self.front or elt in self.back From c1c23f66f45220a312a4230595cc83a5d757202a Mon Sep 17 00:00:00 2001 From: Valentin Lorentz Date: Mon, 20 Jan 2014 15:31:09 +0100 Subject: [PATCH 06/36] Continue accelerating the 2to3 step (remove fix_print). --- plugins/Math/test.py | 6 +++--- plugins/Misc/test.py | 4 ++-- plugins/News/test.py | 12 ++++++------ plugins/Web/test.py | 6 +++--- setup.py | 2 +- src/ircdb.py | 6 +++--- src/ircutils.py | 3 ++- src/log.py | 6 +++--- src/questions.py | 12 ++++++------ src/registry.py | 4 ++-- src/shlex.py | 38 +++++++++++++++++++------------------- src/test.py | 16 ++++++++-------- src/utils/gen.py | 4 +++- 13 files changed, 61 insertions(+), 58 deletions(-) diff --git a/plugins/Math/test.py b/plugins/Math/test.py index 9c22e30d3..bce6b77f9 100644 --- a/plugins/Math/test.py +++ b/plugins/Math/test.py @@ -89,9 +89,9 @@ class MathTestCase(PluginTestCase): self.assertError('base 4 4') self.assertError('base 10 12 A') - print - print "If we have not fixed a bug with Math.base, the following ", - print "tests will hang the test-suite." + print() + print("If we have not fixed a bug with Math.base, the following ") + print("tests will hang the test-suite.") self.assertRegexp('base 2 10 [base 10 2 -12]', '-12') self.assertRegexp('base 16 2 [base 2 16 -110101]', '-110101') diff --git a/plugins/Misc/test.py b/plugins/Misc/test.py index ddc42d23c..b3bf8aff7 100644 --- a/plugins/Misc/test.py +++ b/plugins/Misc/test.py @@ -131,8 +131,8 @@ class MiscTestCase(ChannelPluginTestCase): if network: def testVersion(self): - print '*** This test should start passing when we have our '\ - 'threaded issues resolved.' + print('*** This test should start passing when we have our '\ + 'threaded issues resolved.') self.assertNotError('version') def testSource(self): diff --git a/plugins/News/test.py b/plugins/News/test.py index 1181a0cca..7904f6582 100644 --- a/plugins/News/test.py +++ b/plugins/News/test.py @@ -48,10 +48,10 @@ class NewsTestCase(ChannelPluginTestCase): self.assertRegexp('news', 'subject.*subject2') self.assertNotError('add 5 subject3: foo3') self.assertRegexp('news', 'subject3') - print - print 'Sleeping to expire the news item (testAddnews)' + print() + print('Sleeping to expire the news item (testAddnews)') time.sleep(6) - print 'Done sleeping.' + print('Done sleeping.') self.assertNotRegexp('news', 'subject3') def testNews(self): @@ -77,10 +77,10 @@ class NewsTestCase(ChannelPluginTestCase): self.assertRegexp('old', 'No old news') self.assertNotError('add 5 foo: bar') self.assertRegexp('old', 'No old news') - print - print 'Sleeping to expire the news item (testOldnews)' + print() + print('Sleeping to expire the news item (testOldnews)') time.sleep(6) - print 'Done sleeping.' + print('Done sleeping.') self.assertNotError('old') diff --git a/plugins/Web/test.py b/plugins/Web/test.py index d60ba9d5f..ba39e3e83 100644 --- a/plugins/Web/test.py +++ b/plugins/Web/test.py @@ -65,9 +65,9 @@ class WebTestCase(ChannelPluginTestCase): # part of it. self.assertRegexp('title http://www.n-e-r-d.com/', 'N.*E.*R.*D') # Checks that the parser doesn't hang on invalid tags - print - print "If we have not fixed a bug with the parser, the following", - print "test will hang the test-suite." + print() + print("If we have not fixed a bug with the parser, the following") + print("test will hang the test-suite.") self.assertNotError( 'title http://www.youtube.com/watch?v=x4BtiqPN4u8') diff --git a/setup.py b/setup.py index 38ab779d4..e18c0c318 100644 --- a/setup.py +++ b/setup.py @@ -155,7 +155,7 @@ try: 'fix_itertools', 'fix_itertools_imports', 'fix_long', 'fix_map', 'fix_metaclass', 'fix_methodattrs', 'fix_numliterals', - 'fix_print', 'fix_raise', + 'fix_raise', 'fix_reduce', 'fix_renames', 'fix_repr', 'fix_set_literal', 'fix_standarderror', 'fix_sys_exc', 'fix_throw', 'fix_tuple_params', 'fix_types', diff --git a/src/ircdb.py b/src/ircdb.py index 1cf3fe4b7..d4553bceb 100644 --- a/src/ircdb.py +++ b/src/ircdb.py @@ -1144,9 +1144,9 @@ class DefaultCapabilities(registry.SpaceSeparatedListOfStrings): def setValue(self, v, allowDefaultOwner=conf.allowDefaultOwner): registry.SpaceSeparatedListOfStrings.setValue(self, v) if '-owner' not in self.value and not allowDefaultOwner: - print '*** You must run supybot with the --allow-default-owner' - print '*** option in order to allow a default capability of owner.' - print '*** Don\'t do that, it\'s dumb.' + print('*** You must run supybot with the --allow-default-owner') + print('*** option in order to allow a default capability of owner.') + print('*** Don\'t do that, it\'s dumb.') self.value.add('-owner') conf.registerGlobalValue(conf.supybot, 'capabilities', diff --git a/src/ircutils.py b/src/ircutils.py index 241cd3450..9ff8c9abb 100644 --- a/src/ircutils.py +++ b/src/ircutils.py @@ -36,6 +36,7 @@ work in an IRC-case-insensitive fashion), and numerous other things. """ from __future__ import division +from __future__ import print_function import re import sys @@ -51,7 +52,7 @@ from itertools import imap def debug(s, *args): """Prints a debug string. Most likely replaced by our logging debug.""" - print '***', s % args + print('***', s % args) userHostmaskRe = re.compile(r'^\S+!\S+@\S+$') def isUserHostmask(s): diff --git a/src/log.py b/src/log.py index c5cfdbbe3..b850512d5 100644 --- a/src/log.py +++ b/src/log.py @@ -95,9 +95,9 @@ class StdoutStreamHandler(logging.StreamHandler): # We check for ERROR there because otherwise, tracebacks (which are # already wrapped by Python itself) wrap oddly. if not isinstance(record.levelname, basestring): - print record - print record.levelname - print utils.stackTrace() + print(record) + print(record.levelname) + print(utils.stackTrace()) prefixLen = len(record.levelname) + 1 # ' ' s = textwrap.fill(s, width=78, subsequent_indent=' '*prefixLen) s.rstrip('\r\n') diff --git a/src/questions.py b/src/questions.py index 9a9d8d172..61abb19a8 100644 --- a/src/questions.py +++ b/src/questions.py @@ -29,7 +29,7 @@ """Handles interactive questions; useful for wizards and whatnot.""" - +from __future__ import print_function import sys import textwrap @@ -44,8 +44,8 @@ useBold = False def output(s, unformatted=True, fd=sys.stdout): if unformatted: s = textwrap.fill(utils.str.normalizeWhitespace(s), width=65) - print >>fd, s - print >>fd + print(s, file=fd) + print('', file=fd) def expect(prompt, possibilities, recursed=False, default=None, acceptEmpty=False, fd=sys.stdout): @@ -75,13 +75,13 @@ def expect(prompt, possibilities, recursed=False, default=None, prompt = prompt.strip() + ' ' if useBold: prompt += ansi.RESET - print >>fd, ansi.BOLD, + print(ansi.BOLD, end=' ', file=fd) if sys.version_info[0] >= 3: s = input(prompt) else: s = raw_input(prompt) s = s.strip() - print >>fd + print(file=fd) if possibilities: if s in possibilities: return s @@ -143,7 +143,7 @@ def getpass(prompt=None, secondPrompt=None): output(_('Passwords don\'t match.')) else: break - print + print('') return password diff --git a/src/registry.py b/src/registry.py index 1bce02c13..5a445275b 100644 --- a/src/registry.py +++ b/src/registry.py @@ -42,11 +42,11 @@ _ = i18n.PluginInternationalization() def error(s): """Replace me with something better from another module!""" - print '***', s + print('***', s) def exception(s): """Ditto!""" - print '***', s, 'A bad exception.' + print('***', s, 'A bad exception.') class RegistryException(Exception): pass diff --git a/src/shlex.py b/src/shlex.py index fa2f7e11e..6dbd1dfc9 100644 --- a/src/shlex.py +++ b/src/shlex.py @@ -31,13 +31,13 @@ class shlex: self.filestack = [] self.source = None if self.debug: - print 'shlex: reading from %s, line %d' \ - % (self.instream, self.lineno) + print('shlex: reading from %s, line %d' \ + % (self.instream, self.lineno)) def push_token(self, tok): "Push a token onto the stack popped by the get_token method" if self.debug >= 1: - print "shlex: pushing token " + `tok` + print("shlex: pushing token " + `tok`) self.pushback = [tok] + self.pushback def push_source(self, newstream, newfile=None): @@ -48,9 +48,9 @@ class shlex: self.lineno = 1 if self.debug: if newfile is not None: - print 'shlex: pushing to file %s' % (self.infile,) + print('shlex: pushing to file %s' % (self.infile,)) else: - print 'shlex: pushing to stream %s' % (self.instream,) + print('shlex: pushing to stream %s' % (self.instream,)) def pop_source(self): "Pop the input source stack." @@ -58,8 +58,8 @@ class shlex: (self.infile, self.instream, self.lineno) = self.filestack[0] self.filestack = self.filestack[1:] if self.debug: - print 'shlex: popping to %s, line %d' \ - % (self.instream, self.lineno) + print('shlex: popping to %s, line %d' \ + % (self.instream, self.lineno)) self.state = ' ' def get_token(self): @@ -68,7 +68,7 @@ class shlex: tok = self.pushback[0] self.pushback = self.pushback[1:] if self.debug >= 1: - print "shlex: popping token " + `tok` + print("shlex: popping token " + `tok`) return tok # No pushback. Get a token. raw = self.read_token() @@ -89,9 +89,9 @@ class shlex: # Neither inclusion nor EOF if self.debug >= 1: if raw: - print "shlex: token=" + `raw` + print("shlex: token=" + `raw`) else: - print "shlex: token=EOF" + print("shlex: token=EOF") return raw def read_token(self): @@ -101,8 +101,8 @@ class shlex: if nextchar == '\n': self.lineno = self.lineno + 1 if self.debug >= 3: - print "shlex: in state", repr(self.state), \ - "I see character:", repr(nextchar) + print("shlex: in state", repr(self.state), \ + "I see character:", repr(nextchar)) if self.state is None: self.token = '' # past end of file break @@ -112,7 +112,7 @@ class shlex: break elif nextchar in self.whitespace: if self.debug >= 2: - print "shlex: I see whitespace in whitespace state" + print("shlex: I see whitespace in whitespace state") if self.token: break # emit current token else: @@ -147,7 +147,7 @@ class shlex: self.backslash = False elif not nextchar: # end of file if self.debug >= 2: - print "shlex: I see EOF in quotes state" + print("shlex: I see EOF in quotes state") # XXX what error should be raised here? raise ValueError, "No closing quotation" elif self.state == 'a': @@ -156,7 +156,7 @@ class shlex: break elif nextchar in self.whitespace: if self.debug >= 2: - print "shlex: I see whitespace in word state" + print("shlex: I see whitespace in word state") self.state = ' ' if self.token: break # emit current token @@ -170,7 +170,7 @@ class shlex: else: self.pushback = [nextchar] + self.pushback if self.debug >= 2: - print "shlex: I see punctuation in word state" + print("shlex: I see punctuation in word state") self.state = ' ' if self.token: break # emit current token @@ -180,9 +180,9 @@ class shlex: self.token = '' if self.debug > 1: if result: - print "shlex: raw token=" + `result` + print("shlex: raw token=" + `result`) else: - print "shlex: raw token=EOF" + print("shlex: raw token=EOF") return result def sourcehook(self, newfile): @@ -213,6 +213,6 @@ if __name__ == '__main__': while True: tt = lexer.get_token() if tt: - print "Token: " + repr(tt) + print("Token: " + repr(tt)) else: break diff --git a/src/test.py b/src/test.py index 57f7ed25b..a1d9f269b 100644 --- a/src/test.py +++ b/src/test.py @@ -147,8 +147,8 @@ class PluginTestCase(SupyTestCase): for cb in self.irc.callbacks: cbModule = sys.modules[cb.__class__.__module__] if hasattr(cbModule, 'deprecated') and cbModule.deprecated: - print - print 'Ignored, %s is deprecated.' % cb.name() + print('') + print('Ignored, %s is deprecated.' % cb.name()) run = False if run: originalRunTest() @@ -238,7 +238,7 @@ class PluginTestCase(SupyTestCase): if timeout is None: timeout = self.timeout if self.myVerbose: - print # Extra newline, so it's pretty. + print('') # Extra newline, so it's pretty. prefixChars = conf.supybot.reply.whenAddressedBy.chars() if not usePrefixChar and query[0] in prefixChars: query = query[1:] @@ -246,7 +246,7 @@ class PluginTestCase(SupyTestCase): query = query.encode('utf8') # unicode->str msg = ircmsgs.privmsg(to, query, prefix=frm) if self.myVerbose: - print 'Feeding: %r' % msg + print('Feeding: %r' % msg) self.irc.feedMsg(msg) fed = time.time() response = self.irc.takeMsg() @@ -255,7 +255,7 @@ class PluginTestCase(SupyTestCase): drivers.run() response = self.irc.takeMsg() if self.myVerbose: - print 'Response: %r' % response + print('Response: %r' % response) return response def getMsg(self, query, **kwargs): @@ -433,7 +433,7 @@ class ChannelPluginTestCase(PluginTestCase): if timeout is None: timeout = self.timeout if self.myVerbose: - print # Newline, just like PluginTestCase. + print('') # Newline, just like PluginTestCase. prefixChars = conf.supybot.reply.whenAddressedBy.chars() if query[0] not in prefixChars and usePrefixChar: query = prefixChars[0] + query @@ -441,7 +441,7 @@ class ChannelPluginTestCase(PluginTestCase): query = query.encode('utf8') # unicode->str msg = ircmsgs.privmsg(to, query, prefix=frm) if self.myVerbose: - print 'Feeding: %r' % msg + print('Feeding: %r' % msg) self.irc.feedMsg(msg) fed = time.time() response = self.irc.takeMsg() @@ -466,7 +466,7 @@ class ChannelPluginTestCase(PluginTestCase): else: ret = None if self.myVerbose: - print 'Returning: %r' % ret + print('Returning: %r' % ret) return ret def feedMsg(self, query, to=None, frm=None, private=False): diff --git a/src/utils/gen.py b/src/utils/gen.py index e675b5c7e..c2b3e6648 100644 --- a/src/utils/gen.py +++ b/src/utils/gen.py @@ -28,6 +28,8 @@ # POSSIBILITY OF SUCH DAMAGE. ### +from __future__ import print_function + import os import sys import ast @@ -345,7 +347,7 @@ def callTracer(fd=None, basename=True): filename = code.co_filename if basename: filename = os.path.basename(filename) - print >>fd, '%s: %s(%s)' % (filename, funcname, lineno) + print('%s: %s(%s)' % (filename, funcname, lineno), file=fd) return tracer # vim:set shiftwidth=4 softtabstop=4 expandtab textwidth=79: From 2fda69b4d6a07591d88033561ea84bc455c86bea Mon Sep 17 00:00:00 2001 From: Valentin Lorentz Date: Mon, 20 Jan 2014 15:43:55 +0100 Subject: [PATCH 07/36] Continue accelerating the 2to3 step (remove fix_raise). --- plugins/Alias/plugin.py | 24 ++++++++++---------- plugins/Config/plugin.py | 4 ++-- plugins/Dict/local/dictclient.py | 22 +++++++++--------- plugins/Google/plugin.py | 2 +- plugins/Karma/plugin.py | 2 +- plugins/Math/local/convertcore.py | 12 +++++----- plugins/MoobotFactoids/plugin.py | 2 +- plugins/Network/plugin.py | 3 +-- plugins/Owner/plugin.py | 4 ++-- plugins/RSS/plugin.py | 4 ++-- plugins/Services/config.py | 3 +-- plugins/ShrinkUrl/config.py | 5 ++--- plugins/ShrinkUrl/plugin.py | 12 +++++----- plugins/User/plugin.py | 2 +- plugins/__init__.py | 4 ++-- setup.py | 1 - src/callbacks.py | 26 +++++++++++----------- src/cdb.py | 10 ++++----- src/commands.py | 6 ++--- src/dbi.py | 8 +++---- src/dynamicScope.py | 2 +- src/ircdb.py | 29 ++++++++++++------------ src/ircmsgs.py | 4 ++-- src/ircutils.py | 7 +++--- src/log.py | 5 ++--- src/plugin.py | 16 ++++++------- src/registry.py | 13 +++++------ src/shlex.py | 2 +- src/test.py | 20 ++++++++--------- src/utils/file.py | 6 ++--- src/utils/gen.py | 8 +++---- src/utils/iter.py | 4 ++-- src/utils/net.py | 2 +- src/utils/python.py | 2 +- src/utils/seq.py | 2 +- src/utils/str.py | 37 ++++++++++++++----------------- src/utils/structures.py | 24 ++++++++++---------- src/utils/web.py | 14 ++++++------ 38 files changed, 171 insertions(+), 182 deletions(-) diff --git a/plugins/Alias/plugin.py b/plugins/Alias/plugin.py index 187e5674a..6d818a0ae 100644 --- a/plugins/Alias/plugin.py +++ b/plugins/Alias/plugin.py @@ -57,13 +57,13 @@ def getChannel(msg, args=()): 'variable ' \ 'supybot.reply.requireChannelCommandsToBeSentInChannel ' \ 'to False.' - raise callbacks.Error, s + raise callbacks.Error(s) return args.pop(0) elif ircutils.isChannel(msg.args[0]): return msg.args[0] else: - raise callbacks.Error, 'Command must be sent in a channel or ' \ - 'include a channel in its arguments.' + raise callbacks.Error('Command must be sent in a channel or ' \ + 'include a channel in its arguments.') def getArgs(args, required=1, optional=0, wildcard=0): if len(args) < required: @@ -163,12 +163,12 @@ def makeNewAlias(name, alias): biggestAt = findBiggestAt(original) wildcard = '$*' in original if biggestAt and wildcard: - raise AliasError, 'Can\'t mix $* and optional args (@1, etc.)' + raise AliasError('Can\'t mix $* and optional args (@1, etc.)') if original.count('$*') > 1: - raise AliasError, 'There can be only one $* in an alias.' + raise AliasError('There can be only one $* in an alias.') testTokens = callbacks.tokenize(original) if testTokens and isinstance(testTokens[0], list): - raise AliasError, 'Commands may not be the result of nesting.' + raise AliasError('Commands may not be the result of nesting.') def f(self, irc, msg, args): alias = original.replace('$nick', msg.nick) if '$channel' in original: @@ -333,21 +333,21 @@ class Alias(callbacks.Plugin): realName = callbacks.canonicalName(name) if name != realName: s = format(_('That name isn\'t valid. Try %q instead.'), realName) - raise AliasError, s + raise AliasError(s) name = realName if self.isCommandMethod(name): if realName not in self.aliases: s = 'You can\'t overwrite commands in this plugin.' - raise AliasError, s + raise AliasError(s) if name in self.aliases: (currentAlias, locked, _) = self.aliases[name] if locked and currentAlias != alias: - raise AliasError, format('Alias %q is locked.', name) + raise AliasError(format('Alias %q is locked.', name)) try: f = makeNewAlias(name, alias) f = types.MethodType(f, self) except RecursiveAlias: - raise AliasError, 'You can\'t define a recursive alias.' + raise AliasError('You can\'t define a recursive alias.') if '.' in name or '|' in name: aliasGroup = self.registryValue('escapedaliases', value=False) confname = escapeAlias(name) @@ -374,9 +374,9 @@ class Alias(callbacks.Plugin): else: conf.supybot.plugins.Alias.aliases.unregister(name) else: - raise AliasError, 'That alias is locked.' + raise AliasError('That alias is locked.') else: - raise AliasError, 'There is no such alias.' + raise AliasError('There is no such alias.') @internationalizeDocstring def add(self, irc, msg, args, name, alias): diff --git a/plugins/Config/plugin.py b/plugins/Config/plugin.py index 3aaa07c3f..ce88f381a 100644 --- a/plugins/Config/plugin.py +++ b/plugins/Config/plugin.py @@ -51,7 +51,7 @@ _ = PluginInternationalization('Config') def getWrapper(name): parts = registry.split(name) if not parts or parts[0] not in ('supybot', 'users'): - raise InvalidRegistryName, name + raise InvalidRegistryName(name) group = getattr(conf, parts.pop(0)) while parts: try: @@ -60,7 +60,7 @@ def getWrapper(name): # that we have a useful error message for the user. except (registry.NonExistentRegistryEntry, registry.InvalidRegistryName): - raise registry.InvalidRegistryName, name + raise registry.InvalidRegistryName(name) return group def getCapability(name): diff --git a/plugins/Dict/local/dictclient.py b/plugins/Dict/local/dictclient.py index 8c54f7407..c6f48f4f6 100644 --- a/plugins/Dict/local/dictclient.py +++ b/plugins/Dict/local/dictclient.py @@ -65,8 +65,8 @@ class Connection: code, text = self.getresultcode() if code < 200 or code >= 300: - raise Exception, "Got '%s' when 200-class response expected" % \ - line + raise Exception("Got '%s' when 200-class response expected" % \ + line) return [code, text] def get100block(self): @@ -86,8 +86,8 @@ class Connection: finalcode]""" code, text = self.getresultcode() if code < 100 or code >= 200: - raise Exception, "Got '%s' when 100-class response expected" % \ - code + raise Exception("Got '%s' when 100-class response expected" % \ + code) bodylines = self.get100block().split("\n") @@ -157,7 +157,7 @@ class Connection: if dbname != '*' and dbname != '!' and \ not dbname in self.dbdescs.keys(): - raise Exception, "Invalid database name '%s'" % dbname + raise Exception("Invalid database name '%s'" % dbname) self.dbobjs[dbname] = Database(self, dbname) return self.dbobjs[dbname] @@ -181,7 +181,7 @@ class Connection: if database != '*' and database != '!' and \ not database in self.getdbdescs(): - raise Exception, "Invalid database '%s' specified" % database + raise Exception("Invalid database '%s' specified" % database) self.sendcommand("DEFINE " + enquote(database) + " " + enquote(word)) code = self.getresultcode()[0] @@ -192,7 +192,7 @@ class Connection: # No definitions. return [] if code != 150: - raise Exception, "Unknown code %d" % code + raise Exception("Unknown code %d" % code) while True: code, text = self.getresultcode() @@ -217,10 +217,10 @@ class Connection: self.getstratdescs() # Prime the cache self.getdbdescs() # Prime the cache if not strategy in self.getstratdescs().keys(): - raise Exception, "Invalid strategy '%s'" % strategy + raise Exception("Invalid strategy '%s'" % strategy) if database != '*' and database != '!' and \ not database in self.getdbdescs().keys(): - raise Exception, "Invalid database name '%s'" % database + raise Exception("Invalid database name '%s'" % database) self.sendcommand("MATCH %s %s %s" % (enquote(database), enquote(strategy), @@ -230,7 +230,7 @@ class Connection: # No Matches return [] if code != 152: - raise Exception, "Unexpected code %d" % code + raise Exception("Unexpected code %d" % code) retval = [] @@ -239,7 +239,7 @@ class Connection: retval.append(Definition(self, self.getdbobj(matchdict), dequote(matchword))) if self.getresultcode()[0] != 250: - raise Exception, "Unexpected end-of-list code %d" % code + raise Exception("Unexpected end-of-list code %d" % code) return retval class Database: diff --git a/plugins/Google/plugin.py b/plugins/Google/plugin.py index e648e8f4d..17d033e1c 100644 --- a/plugins/Google/plugin.py +++ b/plugins/Google/plugin.py @@ -120,7 +120,7 @@ class Google(callbacks.PluginRegexp): headers=headers).decode('utf8') data = json.loads(text) if data['responseStatus'] != 200: - raise callbacks.Error, _('We broke The Google!') + raise callbacks.Error(_('We broke The Google!')) return data def formatData(self, data, bold=True, max=0, onetoone=False): diff --git a/plugins/Karma/plugin.py b/plugins/Karma/plugin.py index 42c03ac95..713a3f128 100644 --- a/plugins/Karma/plugin.py +++ b/plugins/Karma/plugin.py @@ -167,7 +167,7 @@ class SqliteKarmaDB(object): elif kind == 'active': orderby = 'added+subtracted' else: - raise ValueError, 'invalid kind' + raise ValueError('invalid kind') sql = """SELECT name, %s FROM karma ORDER BY %s DESC LIMIT %s""" % \ (orderby, orderby, limit) db = self._getDb(channel) diff --git a/plugins/Math/local/convertcore.py b/plugins/Math/local/convertcore.py index 75d38fa11..f64420127 100644 --- a/plugins/Math/local/convertcore.py +++ b/plugins/Math/local/convertcore.py @@ -937,12 +937,12 @@ class UnitGroup: while tmpList: count += 1 if count > 5000: - raise UnitDataError, 'Circular unit definition' + raise UnitDataError('Circular unit definition') unit = tmpList.pop(0) if unit.equiv == '!': self.reducedList.append(copy.copy(unit)) elif not unit.equiv: - raise UnitDataError, 'Invalid conversion for "%s"' % unit.name + raise UnitDataError('Invalid conversion for "%s"' % unit.name) else: if unit.fromEqn: self.linear = 0 @@ -1029,7 +1029,7 @@ class UnitGroup: except OverflowError: return 1e9999 except: - raise UnitDataError, 'Bad equation for %s' % self.unitList[0].name + raise UnitDataError('Bad equation for %s' % self.unitList[0].name) def convertStr(self, num, toGroup): "Return formatted string of converted number" @@ -1063,7 +1063,7 @@ class UnitData(dict): lines = f.readlines() f.close() except IOError: - raise UnitDataError, 'Can not read "units.dat" file' + raise UnitDataError('Can not read "units.dat" file') for i in range(len(lines)): # join continuation lines delta = 1 while lines[i].rstrip().endswith('\\'): @@ -1087,7 +1087,7 @@ class UnitData(dict): self.sortedKeys.sort() if len(self.sortedKeys) < len(units): - raise UnitDataError, 'Duplicate unit names found' + raise UnitDataError('Duplicate unit names found') return (types, typeUnits) @@ -1132,7 +1132,7 @@ class Unit: self.toEqn = self.toEqn.strip() self.fromEqn = self.fromEqn.strip() except AttributeError: - raise UnitDataError, 'Bad equation for "%s"' % self.name + raise UnitDataError('Bad equation for "%s"' % self.name) else: # split factor and equiv unit for linear parts = self.equiv.split(None, 1) if len(parts) > 1 and re.search('[^\d\.eE\+\-\*/]', parts[0]) \ diff --git a/plugins/MoobotFactoids/plugin.py b/plugins/MoobotFactoids/plugin.py index 2208277d8..32026c016 100755 --- a/plugins/MoobotFactoids/plugin.py +++ b/plugins/MoobotFactoids/plugin.py @@ -376,7 +376,7 @@ class MoobotFactoids(callbacks.Plugin): self.log.debug('Invalid tokens for {add,replace}Factoid: %s.', tokens) s = _('Missing an \'is\' or \'_is_\'.') - raise ValueError, s + raise ValueError(s) (key, newfact) = map(' '.join, utils.iter.split(p, tokens, maxsplit=1)) key = self._sanitizeKey(key) return (key, newfact) diff --git a/plugins/Network/plugin.py b/plugins/Network/plugin.py index 9e7750152..0abe49a68 100644 --- a/plugins/Network/plugin.py +++ b/plugins/Network/plugin.py @@ -50,8 +50,7 @@ class Network(callbacks.Plugin): if irc: return irc else: - raise callbacks.Error, \ - 'I\'m not currently connected to %s.' % network + raise callbacks.Error('I\'m not currently connected to %s.' % network) @internationalizeDocstring def connect(self, irc, msg, args, opts, network, server, password): diff --git a/plugins/Owner/plugin.py b/plugins/Owner/plugin.py index 56234b829..f4b285593 100644 --- a/plugins/Owner/plugin.py +++ b/plugins/Owner/plugin.py @@ -169,8 +169,8 @@ class Owner(callbacks.Plugin): (server, port) = group.servers()[0] except (registry.NonExistentRegistryEntry, IndexError): if serverPort is None: - raise ValueError, 'connect requires a (server, port) ' \ - 'if the network is not registered.' + raise ValueError('connect requires a (server, port) ' \ + 'if the network is not registered.') conf.registerNetwork(network, password, ssl) serverS = '%s:%s' % serverPort conf.supybot.networks.get(network).servers.append(serverS) diff --git a/plugins/RSS/plugin.py b/plugins/RSS/plugin.py index e2929e531..5238ce865 100644 --- a/plugins/RSS/plugin.py +++ b/plugins/RSS/plugin.py @@ -286,7 +286,7 @@ class RSS(callbacks.Plugin): raise results['bozo_exception'] except feedparser.sgmllib.SGMLParseError: self.log.exception('Uncaught exception from feedparser:') - raise callbacks.Error, 'Invalid (unparsable) RSS feed.' + raise callbacks.Error('Invalid (unparsable) RSS feed.') except socket.timeout: return error('Timeout downloading feed.') except Exception, e: @@ -366,7 +366,7 @@ class RSS(callbacks.Plugin): self.locks[url] = threading.RLock() if self.isCommandMethod(name): s = format('I already have a command in this plugin named %s.',name) - raise callbacks.Error, s + raise callbacks.Error(s) def f(self, irc, msg, args): args.insert(0, url) self.rss(irc, msg, args) diff --git a/plugins/Services/config.py b/plugins/Services/config.py index 45d606e6a..67dd6014e 100644 --- a/plugins/Services/config.py +++ b/plugins/Services/config.py @@ -58,8 +58,7 @@ def configure(advanced): class ValidNickOrEmptyString(registry.String): def setValue(self, v): if v and not ircutils.isNick(v): - raise registry.InvalidRegistryValue, \ - 'Value must be a valid nick or the empty string.' + raise registry.InvalidRegistryValue('Value must be a valid nick or the empty string.') registry.String.setValue(self, v) class ValidNickSet(conf.ValidNicks): diff --git a/plugins/ShrinkUrl/config.py b/plugins/ShrinkUrl/config.py index 5bf421e79..675f6e28a 100644 --- a/plugins/ShrinkUrl/config.py +++ b/plugins/ShrinkUrl/config.py @@ -62,9 +62,8 @@ class ShrinkCycle(registry.SpaceSeparatedListOfStrings): if L: self.lastIndex = (self.lastIndex + 1) % len(L) return L[self.lastIndex] - raise ValueError, \ - 'No services have been configured for rotation. ' \ - 'See conf.supybot.plugins.ShrinkUrl.serviceRotation.' + raise ValueError('No services have been configured for rotation. ' \ + 'See conf.supybot.plugins.ShrinkUrl.serviceRotation.') ShrinkUrl = conf.registerPlugin('ShrinkUrl') conf.registerChannelValue(ShrinkUrl, 'shrinkSnarfer', diff --git a/plugins/ShrinkUrl/plugin.py b/plugins/ShrinkUrl/plugin.py index 3417c7ab6..26772e5ec 100644 --- a/plugins/ShrinkUrl/plugin.py +++ b/plugins/ShrinkUrl/plugin.py @@ -182,7 +182,7 @@ class ShrinkUrl(callbacks.PluginRegexp): self.db.set('ln', url, text) return text else: - raise ShrinkError, text + raise ShrinkError(text) @internationalizeDocstring def ln(self, irc, msg, args, url): @@ -207,7 +207,7 @@ class ShrinkUrl(callbacks.PluginRegexp): text = utils.web.getUrl('http://tinyurl.com/api-create.php?url=' + url) text = text.decode() if text.startswith('Error'): - raise ShrinkError, text[5:] + raise ShrinkError(text[5:]) self.db.set('tiny', url, text) return text @@ -236,7 +236,7 @@ class ShrinkUrl(callbacks.PluginRegexp): data = utils.web.urlencode({'long_url': url}) text = utils.web.getUrl(self._xrlApi, data=data).decode() if text.startswith('ERROR:'): - raise ShrinkError, text[6:] + raise ShrinkError(text[6:]) self.db.set('xrl', quotedurl, text) return text @@ -271,7 +271,7 @@ class ShrinkUrl(callbacks.PluginRegexp): self.db.set('goo', url, googl) return googl else: - raise ShrinkError, text + raise ShrinkError(text) def goo(self, irc, msg, args, url): """ @@ -301,7 +301,7 @@ class ShrinkUrl(callbacks.PluginRegexp): self.db.set('ur1', url, ur1ca) return ur1ca else: - raise ShrinkError, text + raise ShrinkError(text) def ur1(self, irc, msg, args, url): """ @@ -325,7 +325,7 @@ class ShrinkUrl(callbacks.PluginRegexp): except KeyError: text = utils.web.getUrl(self._x0Api % url).decode() if text.startswith('ERROR:'): - raise ShrinkError, text[6:] + raise ShrinkError(text[6:]) self.db.set('x0', url, text) return text diff --git a/plugins/User/plugin.py b/plugins/User/plugin.py index daf415e58..384ef930d 100644 --- a/plugins/User/plugin.py +++ b/plugins/User/plugin.py @@ -45,7 +45,7 @@ _ = PluginInternationalization('User') class User(callbacks.Plugin): def _checkNotChannel(self, irc, msg, password=' '): if password and irc.isChannel(msg.args[0]): - raise callbacks.Error, conf.supybot.replies.requiresPrivacy() + raise callbacks.Error(conf.supybot.replies.requiresPrivacy()) @internationalizeDocstring def list(self, irc, msg, args, optlist, glob): diff --git a/plugins/__init__.py b/plugins/__init__.py index cdda215dc..597a52b72 100644 --- a/plugins/__init__.py +++ b/plugins/__init__.py @@ -83,7 +83,7 @@ def DB(filename, types): return types[type](fn, *args, **kwargs) except KeyError: continue - raise NoSuitableDatabase, types.keys() + raise NoSuitableDatabase(types.keys()) return MakeDB def makeChannelFilename(filename, channel=None, dirname=None): @@ -503,7 +503,7 @@ class PeriodicFileDownloader(object): periodicFiles = None def __init__(self): if self.periodicFiles is None: - raise ValueError, 'You must provide files to download' + raise ValueError('You must provide files to download') self.lastDownloaded = {} self.downloadedCounter = {} for filename in self.periodicFiles: diff --git a/setup.py b/setup.py index e18c0c318..9ffbbe9d6 100644 --- a/setup.py +++ b/setup.py @@ -155,7 +155,6 @@ try: 'fix_itertools', 'fix_itertools_imports', 'fix_long', 'fix_map', 'fix_metaclass', 'fix_methodattrs', 'fix_numliterals', - 'fix_raise', 'fix_reduce', 'fix_renames', 'fix_repr', 'fix_set_literal', 'fix_standarderror', 'fix_sys_exc', 'fix_throw', 'fix_tuple_params', 'fix_types', diff --git a/src/callbacks.py b/src/callbacks.py index 420f94e2d..a437aa29b 100644 --- a/src/callbacks.py +++ b/src/callbacks.py @@ -315,11 +315,11 @@ class Tokenizer(object): while True: token = lexer.get_token() if not token: - raise SyntaxError, _('Missing "%s". You may want to ' + raise SyntaxError(_('Missing "%s". You may want to ' 'quote your arguments with double ' 'quotes in order to prevent extra ' 'brackets from being evaluated ' - 'as nested commands.') % self.right + 'as nested commands.') % self.right) elif token == self.right: return ret elif token == self.left: @@ -345,26 +345,26 @@ class Tokenizer(object): # for strings like 'foo | bar', where a pipe stands alone as a # token, but shouldn't be treated specially. if not args: - raise SyntaxError, _('"|" with nothing preceding. I ' + raise SyntaxError(_('"|" with nothing preceding. I ' 'obviously can\'t do a pipe with ' - 'nothing before the |.') + 'nothing before the |.')) ends.append(args) args = [] elif token == self.left: args.append(self._insideBrackets(lexer)) elif token == self.right: - raise SyntaxError, _('Spurious "%s". You may want to ' + raise SyntaxError(_('Spurious "%s". You may want to ' 'quote your arguments with double ' 'quotes in order to prevent extra ' 'brackets from being evaluated ' - 'as nested commands.') % self.right + 'as nested commands.') % self.right) else: args.append(self._handleToken(token)) if ends: if not args: - raise SyntaxError, _('"|" with nothing following. I ' + raise SyntaxError(_('"|" with nothing following. I ' 'obviously can\'t do a pipe with ' - 'nothing after the |.') + 'nothing after the |.')) args.append(ends.pop()) while ends: args[-1].append(ends.pop()) @@ -385,7 +385,7 @@ def tokenize(s, channel=None): ret = Tokenizer(brackets=brackets,pipe=pipe,quotes=quotes).tokenize(s) return ret except ValueError, e: - raise SyntaxError, str(e) + raise SyntaxError(str(e)) def formatCommand(command): return ' '.join(command) @@ -399,7 +399,7 @@ def checkCommandCapability(msg, cb, commandName): if ircdb.checkCapability(msg.prefix, capability): log.info('Preventing %s from calling %s because of %s.', msg.prefix, pluginCommand, capability) - raise RuntimeError, capability + raise RuntimeError(capability) try: antiPlugin = ircdb.makeAntiCapability(plugin) antiCommand = ircdb.makeAntiCapability(commandName) @@ -497,7 +497,7 @@ class RichReplyMethods(object): def _error(self, s, Raise=False, **kwargs): if Raise: - raise Error, s + raise Error(s) else: return self.error(s, **kwargs) @@ -598,7 +598,7 @@ class ReplyIrcProxy(RichReplyMethods): def error(self, s, msg=None, **kwargs): if 'Raise' in kwargs and kwargs['Raise']: if s: - raise Error, s + raise Error(s) else: raise ArgumentError if msg is None: @@ -992,7 +992,7 @@ class NestedCommandsIrcProxy(ReplyIrcProxy): self.repliedTo = True if Raise: if s: - raise Error, s + raise Error(s) else: raise ArgumentError if s: diff --git a/src/cdb.py b/src/cdb.py index 17eecf27a..b10b3ca56 100644 --- a/src/cdb.py +++ b/src/cdb.py @@ -80,7 +80,7 @@ def open_db(filename, mode='r', **kwargs): maker.finish() return ReaderWriter(filename, **kwargs) else: - raise ValueError, 'Invalid flag: %s' % mode + raise ValueError('Invalid flag: %s' % mode) def shelf(filename, *args, **kwargs): """Opens a new shelf database object.""" @@ -257,7 +257,7 @@ class Reader(utils.IterableMap): try: return self.default except AttributeError: - raise KeyError, key + raise KeyError(key) def findall(self, key): ret = [] @@ -377,7 +377,7 @@ class ReaderWriter(utils.IterableMap): def __getitem__(self, key): if key in self.removals: - raise KeyError, key + raise KeyError(key) else: try: return self.adds[key] @@ -386,7 +386,7 @@ class ReaderWriter(utils.IterableMap): def __delitem__(self, key): if key in self.removals: - raise KeyError, key + raise KeyError(key) else: if key in self.adds and key in self.cdb: self._journalRemoveKey(key) @@ -398,7 +398,7 @@ class ReaderWriter(utils.IterableMap): elif key in self.cdb: self._journalRemoveKey(key) else: - raise KeyError, key + raise KeyError(key) self.mods += 1 self._flushIfOverLimit() diff --git a/src/commands.py b/src/commands.py index 3ee2ff546..a6f3f2e2c 100644 --- a/src/commands.py +++ b/src/commands.py @@ -121,7 +121,7 @@ def process(f, *args, **kwargs): p.join(timeout) if p.is_alive(): p.terminate() - raise ProcessTimeoutError, "%s aborted due to timeout." % (p.name,) + raise ProcessTimeoutError("%s aborted due to timeout." % (p.name,)) try: v = q.get(block=False) except Queue.Empty: @@ -799,7 +799,7 @@ def getConverter(name): try: return wrappers[name] except KeyError, e: - raise UnknownConverter, str(e) + raise UnknownConverter(str(e)) def callConverter(name, irc, msg, args, state, *L): getConverter(name)(irc, msg, args, state, *L) @@ -1024,7 +1024,7 @@ class State(object): self.errored = True return getattr(dynamic.irc, attr) else: - raise AttributeError, attr + raise AttributeError(attr) def essence(self): st = State(self.types) diff --git a/src/dbi.py b/src/dbi.py index fbeeeea30..5a0c809a5 100644 --- a/src/dbi.py +++ b/src/dbi.py @@ -142,7 +142,7 @@ class DirMapping(MappingInterface): try: os.remove(self._makeFilename(id)) except EnvironmentError, e: - raise NoRecordError, id + raise NoRecordError(id) class FlatfileMapping(MappingInterface): def __init__(self, filename, maxSize=10**6): @@ -154,7 +154,7 @@ class FlatfileMapping(MappingInterface): try: self.currentId = int(strId) except ValueError: - raise Error, 'Invalid file for FlatfileMapping: %s' % filename + raise Error('Invalid file for FlatfileMapping: %s' % filename) except EnvironmentError, e: # File couldn't be opened. self.maxSize = int(math.log10(maxSize)) @@ -209,7 +209,7 @@ class FlatfileMapping(MappingInterface): (lineId, s) = self._splitLine(line) if lineId == strId: return s - raise NoRecordError, id + raise NoRecordError(id) finally: fd.close() @@ -295,7 +295,7 @@ class CdbMapping(MappingInterface): try: return self.db[str(id)] except KeyError: - raise NoRecordError, id + raise NoRecordError(id) # XXX Same as above. def set(self, id, s): diff --git a/src/dynamicScope.py b/src/dynamicScope.py index e1fd97fd2..322cf7e57 100644 --- a/src/dynamicScope.py +++ b/src/dynamicScope.py @@ -36,7 +36,7 @@ class DynamicScope(object): if name in f.f_locals: return f.f_locals f = f.f_back - raise NameError, name + raise NameError(name) def __getattr__(self, name): try: diff --git a/src/ircdb.py b/src/ircdb.py index d4553bceb..b82cdffc0 100644 --- a/src/ircdb.py +++ b/src/ircdb.py @@ -80,7 +80,7 @@ def unAntiCapability(capability): """Takes an anticapability and returns the non-anti form.""" assert isCapability(capability), 'got %s' % capability if not isAntiCapability(capability): - raise ValueError, '%s is not an anti capability' % capability + raise ValueError('%s is not an anti capability' % capability) if isChannelCapability(capability): (channel, capability) = fromChannelCapability(capability) return ','.join((channel, capability[1:])) @@ -290,8 +290,7 @@ class IrcUser(object): """Adds a hostmask to the user's hostmasks.""" assert ircutils.isUserHostmask(hostmask), 'got %s' % hostmask if len(unWildcardHostmask(hostmask)) < 3: - raise ValueError, \ - 'Hostmask must contain at least 3 non-wildcard characters.' + raise ValueError('Hostmask must contain at least 3 non-wildcard characters.') self.hostmasks.add(hostmask) def removeHostmask(self, hostmask): @@ -337,7 +336,7 @@ class IrcUser(object): uniqued = list(filter(uniqueHostmask, reversed(self.auth))) self.auth = list(reversed(uniqued)) else: - raise ValueError, 'secure flag set, unmatched hostmask' + raise ValueError('secure flag set, unmatched hostmask') def clearAuth(self): """Unsets a user's authenticated hostmask.""" @@ -492,7 +491,7 @@ class IrcChannel(object): class Creator(object): def badCommand(self, command, rest, lineno): - raise ValueError, 'Invalid command on line %s: %s' % (lineno, command) + raise ValueError('Invalid command on line %s: %s' % (lineno, command)) class IrcUserCreator(Creator): u = None @@ -503,12 +502,12 @@ class IrcUserCreator(Creator): def user(self, rest, lineno): if self.u.id is not None: - raise ValueError, 'Unexpected user command on line %s.' % lineno + raise ValueError('Unexpected user command on line %s.' % lineno) self.u.id = int(rest) def _checkId(self): if self.u.id is None: - raise ValueError, 'Unexpected user description without user.' + raise ValueError('Unexpected user description without user.') def name(self, rest, lineno): self._checkId() @@ -571,12 +570,12 @@ class IrcChannelCreator(Creator): def channel(self, rest, lineno): if self.name is not None: - raise ValueError, 'Unexpected channel command on line %s' % lineno + raise ValueError('Unexpected channel command on line %s' % lineno) IrcChannelCreator.name = rest def _checkId(self): if self.name is None: - raise ValueError, 'Unexpected channel description without channel.' + raise ValueError('Unexpected channel description without channel.') def lobotomized(self, rest, lineno): self._checkId() @@ -697,14 +696,14 @@ class UsersDictionary(utils.IterableMap): self._hostmaskCache[id] = set([s]) return id elif len(ids) == 0: - raise KeyError, s + raise KeyError(s) else: log.error('Multiple matches found in user database. ' 'Removing the offending hostmasks.') for (id, hostmask) in ids.iteritems(): log.error('Removing %q from user %s.', hostmask, id) self.users[id].removeHostmask(hostmask) - raise DuplicateHostmask, 'Ids %r matched.' % ids + raise DuplicateHostmask('Ids %r matched.' % ids) else: # Not a hostmask, must be a name. s = s.lower() try: @@ -716,7 +715,7 @@ class UsersDictionary(utils.IterableMap): self._nameCache[id] = s return id else: - raise KeyError, s + raise KeyError(s) def getUser(self, id): """Returns a user given its id, name, or hostmask.""" @@ -775,7 +774,7 @@ class UsersDictionary(utils.IterableMap): self.nextId = max(self.nextId, user.id) try: if self.getUserId(user.name) != user.id: - raise DuplicateHostmask, hostmask + raise DuplicateHostmask(hostmask) except KeyError: pass for hostmask in user.hostmasks: @@ -788,10 +787,10 @@ class UsersDictionary(utils.IterableMap): # raise an exception. So instead, we'll raise an # exception, but be nice and give the offending hostmask # back at the same time. - raise DuplicateHostmask, hostmask + raise DuplicateHostmask(hostmask) for otherHostmask in u.hostmasks: if ircutils.hostmaskPatternEqual(hostmask, otherHostmask): - raise DuplicateHostmask, hostmask + raise DuplicateHostmask(hostmask) self.invalidateCache(user.id) self.users[user.id] = user if flush: diff --git a/src/ircmsgs.py b/src/ircmsgs.py index 700b81576..325802f4a 100644 --- a/src/ircmsgs.py +++ b/src/ircmsgs.py @@ -85,7 +85,7 @@ class IrcMsg(object): def __init__(self, s='', command='', args=(), prefix='', msg=None): assert not (msg and s), 'IrcMsg.__init__ cannot accept both s and msg' if not s and not command and not msg: - raise MalformedIrcMsg, 'IRC messages require a command.' + raise MalformedIrcMsg('IRC messages require a command.') self._str = None self._repr = None self._hash = None @@ -109,7 +109,7 @@ class IrcMsg(object): self.args = s.split() self.command = self.args.pop(0) except (IndexError, ValueError): - raise MalformedIrcMsg, repr(originalString) + raise MalformedIrcMsg(repr(originalString)) else: if msg is not None: if prefix: diff --git a/src/ircutils.py b/src/ircutils.py index 9ff8c9abb..c032799c3 100644 --- a/src/ircutils.py +++ b/src/ircutils.py @@ -48,6 +48,7 @@ import functools from cStringIO import StringIO as sio from . import utils +from . import minisix from itertools import imap def debug(s, *args): @@ -88,13 +89,13 @@ def splitHostmask(hostmask): assert isUserHostmask(hostmask) nick, rest = hostmask.split('!', 1) user, host = rest.split('@', 1) - return (sys.intern(nick), sys.intern(user), sys.intern(host)) + return (minisix.intern(nick), minisix.intern(user), minisix.intern(host)) def joinHostmask(nick, ident, host): """nick, user, host => hostmask Joins the nick, ident, host into a user hostmask.""" assert nick and ident and host - return sys.intern('%s!%s@%s' % (nick, ident, host)) + return minisix.intern('%s!%s@%s' % (nick, ident, host)) _rfc1459trans = utils.str.MultipleReplacer(dict(zip( string.ascii_uppercase + r'\[]~', @@ -107,7 +108,7 @@ def toLower(s, casemapping=None): elif casemapping == 'ascii': # freenode return s.lower() else: - raise ValueError, 'Invalid casemapping: %r' % casemapping + raise ValueError('Invalid casemapping: %r' % casemapping) def strEqual(nick1, nick2): """s1, s2 => bool diff --git a/src/log.py b/src/log.py index b850512d5..d811a717b 100644 --- a/src/log.py +++ b/src/log.py @@ -185,12 +185,11 @@ try: messagesLogFilename = os.path.join(_logDir, 'messages.log') _handler = BetterFileHandler(messagesLogFilename) except EnvironmentError, e: - raise SystemExit, \ - 'Error opening messages logfile (%s). ' \ + raise SystemExit('Error opening messages logfile (%s). ' \ 'Generally, this is because you are running Supybot in a directory ' \ 'you don\'t have permissions to add files in, or you\'re running ' \ 'Supybot as a different user than you normal do. The original ' \ - 'error was: %s' % (messagesLogFilename, utils.gen.exnToString(e)) + 'error was: %s' % (messagesLogFilename, utils.gen.exnToString(e))) # These are public. formatter = Formatter('NEVER SEEN; IF YOU SEE THIS, FILE A BUG!') diff --git a/src/plugin.py b/src/plugin.py index 5d63800c2..3517aa3ce 100644 --- a/src/plugin.py +++ b/src/plugin.py @@ -59,7 +59,7 @@ def loadPluginModule(name, ignoreDeprecation=False): if len(matched_names) == 1: name = matched_names[0] else: - raise ImportError, name + raise ImportError(name) moduleInfo = imp.find_module(name, pluginDirs) try: module = imp.load_module(name, *moduleInfo) @@ -74,8 +74,8 @@ def loadPluginModule(name, ignoreDeprecation=False): if ignoreDeprecation: log.warning('Deprecated plugin loaded: %s', name) else: - raise Deprecated, format('Attempted to load deprecated plugin %s', - name) + raise Deprecated(format('Attempted to load deprecated plugin %s', + name)) if module.__name__ in sys.modules: sys.modules[module.__name__] = module linecache.checkcache() @@ -88,8 +88,7 @@ def loadPluginClass(irc, module, register=None): except TypeError, e: s = str(e) if '2 given' in s and '__init__' in s: - raise callbacks.Error, \ - 'In our switch from CVS to Darcs (after 0.80.1), we ' \ + raise callbacks.Error('In our switch from CVS to Darcs (after 0.80.1), we ' \ 'changed the __init__ for callbacks.Privmsg* to also ' \ 'accept an irc argument. This plugin (%s) is overriding ' \ 'its __init__ method and needs to update its prototype ' \ @@ -98,17 +97,16 @@ def loadPluginClass(irc, module, register=None): 'parent\'s __init__. Another possible cause: the code in ' \ 'your __init__ raised a TypeError when calling a function ' \ 'or creating an object, which doesn\'t take 2 arguments.' %\ - module.__name__ + module.__name__) else: raise except AttributeError, e: if 'Class' in str(e): - raise callbacks.Error, \ - 'This plugin module doesn\'t have a "Class" ' \ + raise callbacks.Error('This plugin module doesn\'t have a "Class" ' \ 'attribute to specify which plugin should be ' \ 'instantiated. If you didn\'t write this ' \ 'plugin, but received it with Supybot, file ' \ - 'a bug with us about this error.' + 'a bug with us about this error.') else: raise cb.classModule = module diff --git a/src/registry.py b/src/registry.py index 5a445275b..194f421ba 100644 --- a/src/registry.py +++ b/src/registry.py @@ -103,7 +103,7 @@ def open_registry(filename, clear=False): value = decoder(value)[0] acc = '' except ValueError: - raise InvalidRegistryFile, 'Error unpacking line %r' % acc + raise InvalidRegistryFile('Error unpacking line %r' % acc) _cache[key] = value _lastModified = time.time() _fd.close() @@ -199,11 +199,11 @@ class Group(object): self.X = X def __call__(self): - raise ValueError, 'Groups have no value.' + raise ValueError('Groups have no value.') def __nonExistentEntry(self, attr): s = '%r is not a valid entry in %r' % (attr, self._name) - raise NonExistentRegistryEntry, s + raise NonExistentRegistryEntry(s) def __makeChild(self, attr, s): v = self.__class__(self._default, self._help) @@ -250,7 +250,7 @@ class Group(object): def register(self, name, node=None): if not isValidRegistryName(name): - raise InvalidRegistryName, name + raise InvalidRegistryName(name) if node is None: node = Group(private=self._private) else: @@ -626,9 +626,8 @@ class Regexp(Value): self.sr = sr self.__parent.setValue(v) else: - raise InvalidRegistryValue, \ - 'Can\'t setValue a regexp, there would be an inconsistency '\ - 'between the regexp and the recorded string value.' + raise InvalidRegistryValue('Can\'t setValue a regexp, there would be an inconsistency '\ + 'between the regexp and the recorded string value.') def __str__(self): self() # Gotta update if we've been reloaded. diff --git a/src/shlex.py b/src/shlex.py index 6dbd1dfc9..d2e364342 100644 --- a/src/shlex.py +++ b/src/shlex.py @@ -149,7 +149,7 @@ class shlex: if self.debug >= 2: print("shlex: I see EOF in quotes state") # XXX what error should be raised here? - raise ValueError, "No closing quotation" + raise ValueError("No closing quotation") elif self.state == 'a': if not nextchar: self.state = None # end of file diff --git a/src/test.py b/src/test.py index a1d9f269b..f3e85a815 100644 --- a/src/test.py +++ b/src/test.py @@ -187,7 +187,7 @@ class PluginTestCase(SupyTestCase): ircdb.ignores.reload() ircdb.channels.reload() if self.plugins is None: - raise ValueError, 'PluginTestCase must have a "plugins" attribute.' + raise ValueError('PluginTestCase must have a "plugins" attribute.') self.nick = nick self.prefix = ircutils.joinHostmask(nick, 'user', 'host.domain.tld') self.irc = getTestIrc() @@ -276,7 +276,7 @@ class PluginTestCase(SupyTestCase): def assertError(self, query, **kwargs): m = self._feedMsg(query, **kwargs) if m is None: - raise TimeoutError, query + raise TimeoutError(query) if lastGetHelp not in m.args[1]: self.failUnless(m.args[1].startswith('Error:'), '%r did not error: %s' % (query, m.args[1])) @@ -288,7 +288,7 @@ class PluginTestCase(SupyTestCase): def assertNotError(self, query, **kwargs): m = self._feedMsg(query, **kwargs) if m is None: - raise TimeoutError, query + raise TimeoutError(query) self.failIf(m.args[1].startswith('Error:'), '%r errored: %s' % (query, m.args[1])) self.failIf(lastGetHelp in m.args[1], @@ -301,7 +301,7 @@ class PluginTestCase(SupyTestCase): def assertHelp(self, query, **kwargs): m = self._feedMsg(query, **kwargs) if m is None: - raise TimeoutError, query + raise TimeoutError(query) msg = m.args[1] if 'more message' in msg: msg = msg[0:-27] # Strip (XXX more messages) @@ -321,7 +321,7 @@ class PluginTestCase(SupyTestCase): def assertResponse(self, query, expectedResponse, **kwargs): m = self._feedMsg(query, **kwargs) if m is None: - raise TimeoutError, query + raise TimeoutError(query) self.assertEqual(m.args[1], expectedResponse, '%r != %r' % (expectedResponse, m.args[1])) return m @@ -333,7 +333,7 @@ class PluginTestCase(SupyTestCase): def assertRegexp(self, query, regexp, flags=re.I, **kwargs): m = self._feedMsg(query, **kwargs) if m is None: - raise TimeoutError, query + raise TimeoutError(query) self.failUnless(re.search(regexp, m.args[1], flags), '%r does not match %r' % (m.args[1], regexp)) return m @@ -345,7 +345,7 @@ class PluginTestCase(SupyTestCase): def assertNotRegexp(self, query, regexp, flags=re.I, **kwargs): m = self._feedMsg(query, **kwargs) if m is None: - raise TimeoutError, query + raise TimeoutError(query) self.failUnless(re.search(regexp, m.args[1], flags) is None, '%r matched %r' % (m.args[1], regexp)) return m @@ -357,7 +357,7 @@ class PluginTestCase(SupyTestCase): def assertAction(self, query, expectedResponse=None, **kwargs): m = self._feedMsg(query, **kwargs) if m is None: - raise TimeoutError, query + raise TimeoutError(query) self.failUnless(ircmsgs.isAction(m), '%r is not an action.' % m) if expectedResponse is not None: s = ircmsgs.unAction(m) @@ -372,7 +372,7 @@ class PluginTestCase(SupyTestCase): def assertActionRegexp(self, query, regexp, flags=re.I, **kwargs): m = self._feedMsg(query, **kwargs) if m is None: - raise TimeoutError, query + raise TimeoutError(query) self.failUnless(ircmsgs.isAction(m)) s = ircmsgs.unAction(m) self.failUnless(re.search(regexp, s, flags), @@ -537,7 +537,7 @@ def open_http(url, data=None): host = realhost #print "proxy via http:", host, selector - if not host: raise IOError, ('http error', 'no host given') + if not host: raise IOError('http error', 'no host given') if proxy_passwd: import base64 diff --git a/src/utils/file.py b/src/utils/file.py index 16981db5a..6f68cc952 100644 --- a/src/utils/file.py +++ b/src/utils/file.py @@ -50,7 +50,7 @@ def open_mkdir(filename, mode='wb', *args, **kwargs): baz in it. """ if mode not in ('w', 'wb'): - raise ValueError, 'utils.file.open expects to write.' + raise ValueError('utils.file.open expects to write.') (dirname, basename) = os.path.split(filename) os.makedirs(dirname) return open(filename, mode, *args, **kwargs) @@ -137,7 +137,7 @@ class AtomicFile(object): if allowEmptyOverwrite is None: allowEmptyOverwrite = force(self.default.allowEmptyOverwrite) if mode not in ('w', 'wb'): - raise ValueError, format('Invalid mode: %q', mode) + raise ValueError(format('Invalid mode: %q', mode)) self.rolledback = False self.allowEmptyOverwrite = allowEmptyOverwrite self.makeBackupIfSmaller = makeBackupIfSmaller @@ -219,7 +219,7 @@ class AtomicFile(object): shutil.move(self.tempFilename, self.filename) else: - raise ValueError, 'AtomicFile.close called after rollback.' + raise ValueError('AtomicFile.close called after rollback.') def __del__(self): # We rollback because if we're deleted without being explicitly closed, diff --git a/src/utils/gen.py b/src/utils/gen.py index c2b3e6648..7327743cf 100644 --- a/src/utils/gen.py +++ b/src/utils/gen.py @@ -117,7 +117,7 @@ def timeElapsed(elapsed, short=False, leadingZeroes=False, years=True, leadingZeroes = True Format(_('second'), secs) if not ret: - raise ValueError, 'Time difference not great enough to be noted.' + raise ValueError('Time difference not great enough to be noted.') result = '' if short: result = ' '.join(ret) @@ -161,13 +161,13 @@ def safeEval(s, namespace={'True': True, 'False': False, 'None': None}): try: node = ast.parse(s) except SyntaxError, e: - raise ValueError, 'Invalid string: %s.' % e + raise ValueError('Invalid string: %s.' % e) nodes = ast.parse(s).body if not nodes: if node.__class__ is ast.Module: return node.doc else: - raise ValueError, format('Unsafe string: %q', s) + raise ValueError(format('Unsafe string: %q', s)) node = nodes[0] def checkNode(node): if node.__class__ is ast.Expr: @@ -192,7 +192,7 @@ def safeEval(s, namespace={'True': True, 'False': False, 'None': None}): if checkNode(node): return eval(s, namespace, namespace) else: - raise ValueError, format('Unsafe string: %q', s) + raise ValueError(format('Unsafe string: %q', s)) def exnToString(e): """Turns a simple exception instance into a string (better than str(e))""" diff --git a/src/utils/iter.py b/src/utils/iter.py index 1416859b5..8a9e1fde0 100644 --- a/src/utils/iter.py +++ b/src/utils/iter.py @@ -154,7 +154,7 @@ def limited(iterable, limit): yield next(iterable) i -= 1 except StopIteration: - raise ValueError, 'Expected %s elements in iterable (%r), got %s.' % \ - (limit, iterable, limit-i) + raise ValueError('Expected %s elements in iterable (%r), got %s.' % \ + (limit, iterable, limit-i)) # vim:set shiftwidth=4 softtabstop=4 expandtab textwidth=79: diff --git a/src/utils/net.py b/src/utils/net.py index f65ead27a..cb8b522a3 100644 --- a/src/utils/net.py +++ b/src/utils/net.py @@ -67,7 +67,7 @@ def getSocket(host, socks_proxy=None): elif isIPV6(host): return socket.socket(socket.AF_INET6, socket.SOCK_STREAM) else: - raise socket.error, 'Something wonky happened.' + raise socket.error('Something wonky happened.') def isIP(s): """Returns whether or not a given string is an IP address. diff --git a/src/utils/python.py b/src/utils/python.py index b9d6c1886..ca704e71a 100644 --- a/src/utils/python.py +++ b/src/utils/python.py @@ -53,7 +53,7 @@ def universalImport(*names): ret = getattr(ret, parts[0]) del parts[0] return ret - raise ImportError, ','.join(names) + raise ImportError(','.join(names)) def changeFunctionName(f, name, doc=None): if doc is None: diff --git a/src/utils/seq.py b/src/utils/seq.py index 67b0272be..0fa37e492 100644 --- a/src/utils/seq.py +++ b/src/utils/seq.py @@ -33,7 +33,7 @@ def window(L, size): Returns a sliding 'window' through the list L of size size.""" assert not isinstance(L, int), 'Argument order swapped: window(L, size)' if size < 1: - raise ValueError, 'size <= 0 disallowed.' + raise ValueError('size <= 0 disallowed.') for i in xrange(len(L) - (size-1)): yield L[i:i+size] diff --git a/src/utils/str.py b/src/utils/str.py index 8b8aacfef..a080653f5 100644 --- a/src/utils/str.py +++ b/src/utils/str.py @@ -124,7 +124,7 @@ def soundex(s, length=4): s = s.upper() # Make everything uppercase. s = ''.join([x for x in s if x in string.ascii_uppercase]) if not s: - raise ValueError, 'Invalid string for soundex: %s' + raise ValueError('Invalid string for soundex: %s') firstChar = s[0] # Save the first character. s = _soundextrans(s) # Convert to soundex numbers. s = s.lstrip(s[0]) # Remove all repeated first characters. @@ -155,7 +155,7 @@ _openers = '{[(<' _closers = '}])>' def _getSep(s, allowBraces=False): if len(s) < 2: - raise ValueError, 'string given to _getSep is too short: %r' % s + raise ValueError('string given to _getSep is too short: %r' % s) if allowBraces: braces = _closers else: @@ -165,9 +165,8 @@ def _getSep(s, allowBraces=False): else: separator = s[0] if separator.isalnum() or separator in braces: - raise ValueError, \ - 'Invalid separator: separator must not be alphanumeric or in ' \ - '"%s"' % braces + raise ValueError('Invalid separator: separator must not be alphanumeric or in ' \ + '"%s"' % braces) return separator def perlReToPythonRe(s): @@ -183,7 +182,7 @@ def perlReToPythonRe(s): try: (regexp, flags) = matcher.match(s).groups() except AttributeError: # Unpack list of wrong size. - raise ValueError, 'Must be of the form m/.../ or /.../' + raise ValueError('Must be of the form m/.../ or /.../') regexp = regexp.replace('\\'+opener, opener) if opener != closer: regexp = regexp.replace('\\'+closer, closer) @@ -192,11 +191,11 @@ def perlReToPythonRe(s): for c in flags.upper(): flag |= getattr(re, c) except AttributeError: - raise ValueError, 'Invalid flag: %s' % c + raise ValueError('Invalid flag: %s' % c) try: return re.compile(regexp, flag) except re.error, e: - raise ValueError, str(e) + raise ValueError(str(e)) def perlReToReplacer(s): """Converts a string representation of a Perl regular expression (i.e., @@ -210,7 +209,7 @@ def perlReToReplacer(s): try: (regexp, replace, flags) = matcher.match(s).groups() except AttributeError: # Unpack list of wrong size. - raise ValueError, 'Must be of the form s/.../.../' + raise ValueError('Must be of the form s/.../.../') regexp = regexp.replace('\x08', r'\b') replace = replace.replace('\\'+sep, sep) for i in xrange(10): @@ -414,7 +413,7 @@ def toBool(s): elif s in ('false', 'off', 'disable', 'disabled', '0'): return False else: - raise ValueError, 'Invalid string for toBool: %s' % quoted(s) + raise ValueError('Invalid string for toBool: %s' % quoted(s)) # When used with Supybot, this is overriden when supybot.conf is loaded def timestamp(t): @@ -476,14 +475,12 @@ def format(s, *args, **kwargs): return commaAndify(t) elif isinstance(t, tuple) and len(t) == 2: if not isinstance(t[0], list): - raise ValueError, \ - 'Invalid list for %%L in format: %s' % t + raise ValueError('Invalid list for %%L in format: %s' % t) if not isinstance(t[1], basestring): - raise ValueError, \ - 'Invalid string for %%L in format: %s' % t + raise ValueError('Invalid string for %%L in format: %s' % t) return commaAndify(t[0], And=t[1]) else: - raise ValueError, 'Invalid value for %%L in format: %s' % t + raise ValueError('Invalid value for %%L in format: %s' % t) elif char == 'p': return pluralize(args.pop()) elif char == 'q': @@ -493,17 +490,17 @@ def format(s, *args, **kwargs): elif char == 'n': t = args.pop() if not isinstance(t, (tuple, list)): - raise ValueError, 'Invalid value for %%n in format: %s' % t + raise ValueError('Invalid value for %%n in format: %s' % t) if len(t) == 2: return nItems(*t) elif len(t) == 3: return nItems(t[0], t[2], between=t[1]) else: - raise ValueError, 'Invalid value for %%n in format: %s' % t + raise ValueError('Invalid value for %%n in format: %s' % t) elif char == 'S': t = args.pop() if not isinstance(t, (int, long)): - raise ValueError, 'Invalid value for %%S in format: %s' % t + raise ValueError('Invalid value for %%S in format: %s' % t) for suffix in ['B','KB','MB','GB','TB']: if t < 1024: return "%i%s" % (t, suffix) @@ -527,10 +524,10 @@ def format(s, *args, **kwargs): elif char == '%': return '%' else: - raise ValueError, 'Invalid char in sub (in format).' + raise ValueError('Invalid char in sub (in format).') try: return _formatRe.sub(sub, s) except IndexError: - raise ValueError, 'Extra format chars in format spec: %r' % s + raise ValueError('Extra format chars in format spec: %r' % s) # vim:set shiftwidth=4 softtabstop=4 expandtab textwidth=79: diff --git a/src/utils/structures.py b/src/utils/structures.py index 0d9652d00..865ddd155 100644 --- a/src/utils/structures.py +++ b/src/utils/structures.py @@ -41,7 +41,7 @@ class RingBuffer(object): __slots__ = ('L', 'i', 'full', 'maxSize') def __init__(self, maxSize, seq=()): if maxSize <= 0: - raise ValueError, 'maxSize must be > 0.' + raise ValueError('maxSize must be > 0.') self.maxSize = maxSize self.reset() for elt in seq: @@ -109,7 +109,7 @@ class RingBuffer(object): else: (m, idx) = divmod(oidx, len(self.L)) if m and m != -1: - raise IndexError, oidx + raise IndexError(oidx) idx = (idx + self.i) % len(self.L) return self.L[idx] else: @@ -127,21 +127,21 @@ class RingBuffer(object): if isinstance(oidx, types.SliceType): range_ = xrange(*slice.indices(oidx, len(self))) if len(range_) != len(elt): - raise ValueError, 'seq must be the same length as slice.' + raise ValueError('seq must be the same length as slice.') else: for (i, x) in zip(range_, elt): self[i] = x else: (m, idx) = divmod(oidx, len(self.L)) if m and m != -1: - raise IndexError, oidx + raise IndexError(oidx) idx = (idx + self.i) % len(self.L) self.L[idx] = elt else: if isinstance(idx, types.SliceType): range_ = xrange(*slice.indices(idx, len(self))) if len(range_) != len(elt): - raise ValueError, 'seq must be the same length as slice.' + raise ValueError('seq must be the same length as slice.') else: for (i, x) in zip(range_, elt): self[i] = x @@ -226,7 +226,7 @@ class queue(object): def __getitem__(self, oidx): if len(self) == 0: - raise IndexError, 'queue index out of range' + raise IndexError('queue index out of range') if isinstance(oidx, types.SliceType): L = [] for i in xrange(*slice.indices(oidx, len(self))): @@ -235,7 +235,7 @@ class queue(object): else: (m, idx) = divmod(oidx, len(self)) if m and m != -1: - raise IndexError, oidx + raise IndexError(oidx) if len(self.front) > idx: return self.front[-(idx+1)] else: @@ -243,22 +243,22 @@ class queue(object): def __setitem__(self, oidx, value): if len(self) == 0: - raise IndexError, 'queue index out of range' + raise IndexError('queue index out of range') if isinstance(oidx, types.SliceType): range_ = xrange(*slice.indices(oidx, len(self))) if len(range_) != len(value): - raise ValueError, 'seq must be the same length as slice.' + raise ValueError('seq must be the same length as slice.') else: for i in range_: (m, idx) = divmod(oidx, len(self)) if m and m != -1: - raise IndexError, oidx + raise IndexError(oidx) for (i, x) in zip(range_, value): self[i] = x else: (m, idx) = divmod(oidx, len(self)) if m and m != -1: - raise IndexError, oidx + raise IndexError(oidx) if len(self.front) > idx: self.front[-(idx+1)] = value else: @@ -272,7 +272,7 @@ class queue(object): else: (m, idx) = divmod(oidx, len(self)) if m and m != -1: - raise IndexError, oidx + raise IndexError(oidx) if len(self.front) > idx: del self.front[-(idx+1)] else: diff --git a/src/utils/web.py b/src/utils/web.py index f439d1925..422e9eec3 100644 --- a/src/utils/web.py +++ b/src/utils/web.py @@ -126,18 +126,18 @@ def getUrlFd(url, headers=None, data=None, timeout=None): fd = urllib2.urlopen(request, timeout=timeout) return fd except socket.timeout, e: - raise Error, TIMED_OUT + raise Error(TIMED_OUT) except sockerrors, e: - raise Error, strError(e) + raise Error(strError(e)) except httplib.InvalidURL, e: - raise Error, 'Invalid URL: %s' % e + raise Error('Invalid URL: %s' % e) except urllib2.HTTPError, e: - raise Error, strError(e) + raise Error(strError(e)) except urllib2.URLError, e: - raise Error, strError(e.reason) + raise Error(strError(e.reason)) # Raised when urllib doesn't recognize the url type except ValueError, e: - raise Error, strError(e) + raise Error(strError(e)) def getUrl(url, size=None, headers=None, data=None): """getUrl(url, size=None, headers=None, data=None) @@ -152,7 +152,7 @@ def getUrl(url, size=None, headers=None, data=None): else: text = fd.read(size) except socket.timeout, e: - raise Error, TIMED_OUT + raise Error(TIMED_OUT) fd.close() return text From bb7db3ab213d7be919d19b839f834c97d345cb56 Mon Sep 17 00:00:00 2001 From: Valentin Lorentz Date: Mon, 20 Jan 2014 15:49:15 +0100 Subject: [PATCH 08/36] Continue accelerating the 2to3 step (remove fix_except). --- plugins/Alias/plugin.py | 6 +++--- plugins/ChannelLogger/plugin.py | 2 +- plugins/ChannelStats/plugin.py | 4 ++-- plugins/Conditional/plugin.py | 2 +- plugins/Config/plugin.py | 4 ++-- plugins/Dict/plugin.py | 8 ++++---- plugins/Format/plugin.py | 2 +- plugins/Internet/plugin.py | 4 ++-- plugins/Later/plugin.py | 2 +- plugins/Math/plugin.py | 10 +++++----- plugins/MessageParser/plugin.py | 4 ++-- plugins/Misc/plugin.py | 2 +- plugins/MoobotFactoids/plugin.py | 6 +++--- plugins/News/plugin.py | 4 ++-- plugins/Owner/plugin.py | 18 +++++++++--------- plugins/RSS/plugin.py | 2 +- plugins/Scheduler/plugin.py | 10 +++++----- plugins/ShrinkUrl/plugin.py | 16 ++++++++-------- plugins/String/plugin.py | 2 +- plugins/Topic/plugin.py | 8 ++++---- plugins/Unix/plugin.py | 12 ++++++------ plugins/User/plugin.py | 4 ++-- plugins/Utilities/plugin.py | 2 +- plugins/Web/plugin.py | 2 +- plugins/__init__.py | 10 +++++----- setup.py | 2 +- src/callbacks.py | 18 +++++++++--------- src/commands.py | 16 ++++++++-------- src/dbi.py | 6 +++--- src/drivers/Socket.py | 10 +++++----- src/ircdb.py | 24 ++++++++++++------------ src/irclib.py | 2 +- src/log.py | 8 ++++---- src/plugin.py | 6 +++--- src/registry.py | 8 ++++---- src/schedule.py | 2 +- src/test.py | 2 +- src/utils/gen.py | 2 +- src/utils/str.py | 2 +- src/utils/transaction.py | 2 +- src/utils/web.py | 14 +++++++------- src/world.py | 2 +- 42 files changed, 136 insertions(+), 136 deletions(-) diff --git a/plugins/Alias/plugin.py b/plugins/Alias/plugin.py index 6d818a0ae..136259f63 100644 --- a/plugins/Alias/plugin.py +++ b/plugins/Alias/plugin.py @@ -272,7 +272,7 @@ class Alias(callbacks.Plugin): for (alias, (command, locked, _)) in self.aliases.items(): try: self.addAlias(irc, alias, command, locked) - except Exception, e: + except Exception as e: self.log.exception('Exception when trying to add alias %s. ' 'Removing from the Alias database.', alias) del self.aliases[alias] @@ -397,7 +397,7 @@ class Alias(callbacks.Plugin): self.log.info('Adding alias %q for %q (from %s)', name, alias, msg.prefix) irc.replySuccess() - except AliasError, e: + except AliasError as e: irc.error(str(e)) add = wrap(add, ['commandName', 'text']) @@ -411,7 +411,7 @@ class Alias(callbacks.Plugin): self.removeAlias(name) self.log.info('Removing alias %q (from %s)', name, msg.prefix) irc.replySuccess() - except AliasError, e: + except AliasError as e: irc.error(str(e)) remove = wrap(remove, ['commandName']) diff --git a/plugins/ChannelLogger/plugin.py b/plugins/ChannelLogger/plugin.py index 43d9a1175..5087e6389 100644 --- a/plugins/ChannelLogger/plugin.py +++ b/plugins/ChannelLogger/plugin.py @@ -98,7 +98,7 @@ class ChannelLogger(callbacks.Plugin): for log in self._logs(): try: log.flush() - except ValueError, e: + except ValueError as e: if e.args[0] != 'I/O operation on a closed file': self.log.exception('Odd exception:') diff --git a/plugins/ChannelStats/plugin.py b/plugins/ChannelStats/plugin.py index 1ea05eacd..e2b3e6fec 100644 --- a/plugins/ChannelStats/plugin.py +++ b/plugins/ChannelStats/plugin.py @@ -336,9 +336,9 @@ class ChannelStats(callbacks.Plugin): v = eval(expr, e, e) except ZeroDivisionError: v = float('inf') - except NameError, e: + except NameError as e: irc.errorInvalid(_('stat variable'), str(e).split()[1]) - except Exception, e: + except Exception as e: irc.error(utils.exnToString(e), Raise=True) if id == 0: users.append((v, irc.nick)) diff --git a/plugins/Conditional/plugin.py b/plugins/Conditional/plugin.py index e724fea79..ecba0ff01 100644 --- a/plugins/Conditional/plugin.py +++ b/plugins/Conditional/plugin.py @@ -65,7 +65,7 @@ class Conditional(callbacks.Plugin): tokens = callbacks.tokenize(command) try: self.Proxy(irc.irc, msg, tokens) - except Exception, e: + except Exception as e: self.log.exception('Uncaught exception in requested function:') @internationalizeDocstring diff --git a/plugins/Config/plugin.py b/plugins/Config/plugin.py index ce88f381a..8c4d11ab9 100644 --- a/plugins/Config/plugin.py +++ b/plugins/Config/plugin.py @@ -99,7 +99,7 @@ def getConfigVar(irc, msg, args, state): group = getWrapper(name) state.args.append(group) del args[0] - except registry.InvalidRegistryName, e: + except registry.InvalidRegistryName as e: state.errorInvalid(_('configuration variable'), str(e)) addConverter('configVar', getConfigVar) @@ -114,7 +114,7 @@ class Config(callbacks.Plugin): def callCommand(self, command, irc, msg, *args, **kwargs): try: super(Config, self).callCommand(command, irc, msg, *args, **kwargs) - except registry.InvalidRegistryValue, e: + except registry.InvalidRegistryValue as e: irc.error(str(e)) def _list(self, group): diff --git a/plugins/Dict/plugin.py b/plugins/Dict/plugin.py index 008b32f5d..3eed6de64 100644 --- a/plugins/Dict/plugin.py +++ b/plugins/Dict/plugin.py @@ -56,7 +56,7 @@ class Dict(callbacks.Plugin): dbs = list(conn.getdbdescs().keys()) dbs.sort() irc.reply(format('%L', dbs)) - except socket.error, e: + except socket.error as e: irc.error(utils.web.strError(e)) dictionaries = wrap(dictionaries) @@ -71,7 +71,7 @@ class Dict(callbacks.Plugin): conn = dictclient.Connection(server) dbs = conn.getdbdescs().keys() irc.reply(utils.iter.choice(dbs)) - except socket.error, e: + except socket.error as e: irc.error(utils.web.strError(e)) random = wrap(random) @@ -85,7 +85,7 @@ class Dict(callbacks.Plugin): try: server = conf.supybot.plugins.Dict.server() conn = dictclient.Connection(server) - except socket.error, e: + except socket.error as e: irc.error(utils.web.strError(e), Raise=True) dbs = set(conn.getdbdescs()) if words[0] in dbs: @@ -139,7 +139,7 @@ class Dict(callbacks.Plugin): try: server = conf.supybot.plugins.Dict.server() conn = dictclient.Connection(server) - except socket.error, e: + except socket.error as e: irc.error(utils.web.strError(e), Raise=True) dictionary = 'moby-thes' diff --git a/plugins/Format/plugin.py b/plugins/Format/plugin.py index f18968b28..72b5ceecf 100644 --- a/plugins/Format/plugin.py +++ b/plugins/Format/plugin.py @@ -208,7 +208,7 @@ class Format(callbacks.Plugin): try: s %= tuple(args) irc.reply(s) - except TypeError, e: + except TypeError as e: self.log.debug(utils.exnToString(e)) irc.error(_('Not enough arguments for the format string.'), Raise=True) diff --git a/plugins/Internet/plugin.py b/plugins/Internet/plugin.py index 8128b4b61..2e09a1623 100644 --- a/plugins/Internet/plugin.py +++ b/plugins/Internet/plugin.py @@ -82,7 +82,7 @@ class Internet(callbacks.Plugin): try: sock = utils.net.getSocket('%s.whois-servers.net' % usertld) sock.connect(('%s.whois-servers.net' % usertld, 43)) - except socket.error, e: + except socket.error as e: irc.error(str(e)) return sock.settimeout(5) @@ -130,7 +130,7 @@ class Internet(callbacks.Plugin): status = 'unknown' try: t = telnetlib.Telnet('whois.pir.org', 43) - except socket.error, e: + except socket.error as e: irc.error(str(e)) return t.write(b'registrar ') diff --git a/plugins/Later/plugin.py b/plugins/Later/plugin.py index 8bd00687b..6bc2cb049 100644 --- a/plugins/Later/plugin.py +++ b/plugins/Later/plugin.py @@ -69,7 +69,7 @@ class Later(callbacks.Plugin): def _openNotes(self): try: fd = open(self.filename) - except EnvironmentError, e: + except EnvironmentError as e: self.log.warning('Couldn\'t open %s: %s', self.filename, e) return reader = csv.reader(fd) diff --git a/plugins/Math/plugin.py b/plugins/Math/plugin.py index 8877e2dfc..d23566b29 100644 --- a/plugins/Math/plugin.py +++ b/plugins/Math/plugin.py @@ -219,9 +219,9 @@ class Math(callbacks.Plugin): irc.error(_('The answer exceeded %s or so.') % maxFloat) except TypeError: irc.error(_('Something in there wasn\'t a valid number.')) - except NameError, e: + except NameError as e: irc.error(_('%s is not a defined function.') % str(e).split()[1]) - except Exception, e: + except Exception as e: irc.error(str(e)) calc = wrap(calc, ['text']) @@ -253,9 +253,9 @@ class Math(callbacks.Plugin): irc.error(_('The answer exceeded %s or so.') % maxFloat) except TypeError: irc.error(_('Something in there wasn\'t a valid number.')) - except NameError, e: + except NameError as e: irc.error(_('%s is not a defined function.') % str(e).split()[1]) - except Exception, e: + except Exception as e: irc.error(utils.exnToString(e)) icalc = wrap(icalc, [('checkCapability', 'trusted'), 'text']) @@ -337,7 +337,7 @@ class Math(callbacks.Plugin): newNum = round(newNum, digits + 1 + zeros) newNum = self._floatToString(newNum) irc.reply(str(newNum)) - except convertcore.UnitDataError, ude: + except convertcore.UnitDataError as ude: irc.error(str(ude)) convert = wrap(convert, [optional('float', 1.0),'something','to','text']) diff --git a/plugins/MessageParser/plugin.py b/plugins/MessageParser/plugin.py index 66382358a..0ad7160aa 100644 --- a/plugins/MessageParser/plugin.py +++ b/plugins/MessageParser/plugin.py @@ -128,7 +128,7 @@ class MessageParser(callbacks.Plugin, plugins.ChannelDBHandler): tokens = callbacks.tokenize(command) try: self.Proxy(irc.irc, msg, tokens) - except Exception, e: + except Exception as e: log.exception('Uncaught exception in function called by MessageParser:') def _checkManageCapabilities(self, irc, msg, channel): @@ -213,7 +213,7 @@ class MessageParser(callbacks.Plugin, plugins.ChannelDBHandler): if not locked: try: re.compile(regexp) - except Exception, e: + except Exception as e: irc.error(_('Invalid python regexp: %s') % (e,)) return if ircdb.users.hasUser(msg.prefix): diff --git a/plugins/Misc/plugin.py b/plugins/Misc/plugin.py index 781098d59..e2be33e8c 100644 --- a/plugins/Misc/plugin.py +++ b/plugins/Misc/plugin.py @@ -320,7 +320,7 @@ class Misc(callbacks.Plugin): newest = _('The newest versions available online are %s.') % \ ', '.join([_('%s (in %s)') % (y,x) for x,y in versions.items()]) - except utils.web.Error, e: + except utils.web.Error as e: self.log.info('Couldn\'t get website version: %s', e) newest = _('I couldn\'t fetch the newest version ' 'from the Limnoria repository.') diff --git a/plugins/MoobotFactoids/plugin.py b/plugins/MoobotFactoids/plugin.py index 32026c016..e1f8bb5cc 100755 --- a/plugins/MoobotFactoids/plugin.py +++ b/plugins/MoobotFactoids/plugin.py @@ -387,7 +387,7 @@ class MoobotFactoids(callbacks.Plugin): id = self._getUserId(irc, msg.prefix) try: (key, fact) = self._getKeyAndFactoid(tokens) - except ValueError, e: + except ValueError as e: irc.error(str(e), Raise=True) # Check and make sure it's not in the DB already if self.db.getFactoid(channel, key): @@ -406,7 +406,7 @@ class MoobotFactoids(callbacks.Plugin): # It's fair game if we get to here try: r = utils.str.perlReToReplacer(regexp) - except ValueError, e: + except ValueError as e: irc.errorInvalid('regexp', regexp, Raise=True) fact = fact[0] new_fact = r(fact) @@ -436,7 +436,7 @@ class MoobotFactoids(callbacks.Plugin): del tokens[0] # remove the "no," try: (key, fact) = self._getKeyAndFactoid(tokens) - except ValueError, e: + except ValueError as e: irc.error(str(e), Raise=True) _ = self._getFactoid(irc, channel, key) self._checkNotLocked(irc, channel, key) diff --git a/plugins/News/plugin.py b/plugins/News/plugin.py index 5a9d5d95d..599225fd7 100644 --- a/plugins/News/plugin.py +++ b/plugins/News/plugin.py @@ -153,7 +153,7 @@ class News(callbacks.Plugin): try: record = self.db.get(channel, id) irc.reply(str(record)) - except dbi.NoRecordError, id: + except dbi.NoRecordError as id: irc.errorInvalid(_('news item id'), id) news = wrap(news, ['channeldb', additional('positiveInt')]) @@ -199,7 +199,7 @@ class News(callbacks.Plugin): try: record = self.db.getOld(channel, id) irc.reply(str(record)) - except dbi.NoRecordError, id: + except dbi.NoRecordError as id: irc.errorInvalid(_('news item id'), id) else: try: diff --git a/plugins/Owner/plugin.py b/plugins/Owner/plugin.py index f4b285593..9983e3e95 100644 --- a/plugins/Owner/plugin.py +++ b/plugins/Owner/plugin.py @@ -142,9 +142,9 @@ class Owner(callbacks.Plugin): for network in conf.supybot.networks(): try: self._connect(network) - except socket.error, e: + except socket.error as e: self.log.error('Could not connect to %s: %s.', network, e) - except Exception, e: + except Exception as e: self.log.exception('Exception connecting to %s:', network) self.log.error('Could not connect to %s: %s.', network, e) @@ -209,21 +209,21 @@ class Owner(callbacks.Plugin): m = plugin.loadPluginModule(name, ignoreDeprecation=True) plugin.loadPluginClass(irc, m) - except callbacks.Error, e: + except callbacks.Error as e: # This is just an error message. log.warning(str(e)) - except (plugins.NoSuitableDatabase, ImportError), e: + except (plugins.NoSuitableDatabase, ImportError) as e: s = 'Failed to load %s: %s' % (name, e) if not s.endswith('.'): s += '.' log.warning(s) - except Exception, e: + except Exception as e: log.exception('Failed to load %s:', name) else: # Let's import the module so configuration is preserved. try: _ = plugin.loadPluginModule(name) - except Exception, e: + except Exception as e: log.debug('Attempted to load %s to preserve its ' 'configuration, but load failed: %s', name, e) @@ -267,7 +267,7 @@ class Owner(callbacks.Plugin): try: tokens = callbacks.tokenize(s, channel=msg.args[0]) self.Proxy(irc, msg, tokens) - except SyntaxError, e: + except SyntaxError as e: irc.queueMsg(callbacks.error(msg, str(e))) def logmark(self, irc, msg, args, text): @@ -340,7 +340,7 @@ class Owner(callbacks.Plugin): """ try: m = ircmsgs.IrcMsg(s) - except Exception, e: + except Exception as e: irc.error(utils.exnToString(e)) else: irc.queueMsg(m) @@ -435,7 +435,7 @@ class Owner(callbacks.Plugin): irc.error('%s is deprecated. Use --deprecated ' 'to force it to load.' % name.capitalize()) return - except ImportError, e: + except ImportError as e: if str(e).endswith(' ' + name): irc.error('No plugin named %s exists.' % utils.str.dqrepr(name)) else: diff --git a/plugins/RSS/plugin.py b/plugins/RSS/plugin.py index 5238ce865..7807f4b70 100644 --- a/plugins/RSS/plugin.py +++ b/plugins/RSS/plugin.py @@ -289,7 +289,7 @@ class RSS(callbacks.Plugin): raise callbacks.Error('Invalid (unparsable) RSS feed.') except socket.timeout: return error('Timeout downloading feed.') - except Exception, e: + except Exception as e: # These seem mostly harmless. We'll need reports of a # kind that isn't. self.log.debug('Allowing bozo_exception %r through.', e) diff --git a/plugins/Scheduler/plugin.py b/plugins/Scheduler/plugin.py index 226f12e45..28d34b631 100644 --- a/plugins/Scheduler/plugin.py +++ b/plugins/Scheduler/plugin.py @@ -58,12 +58,12 @@ class Scheduler(callbacks.Plugin): pkl = open(filename, 'rb') try: eventdict = pickle.load(pkl) - except Exception, e: + except Exception as e: self.log.debug('Unable to load pickled data: %s', e) return finally: pkl.close() - except IOError, e: + except IOError as e: self.log.debug('Unable to open pickle file: %s', e) return for name, event in eventdict.iteritems(): @@ -81,7 +81,7 @@ class Scheduler(callbacks.Plugin): elif event['type'] == 'repeat': # repeating event self._repeat(ircobj, event['msg'], name, event['time'], event['command'], False) - except AssertionError, e: + except AssertionError as e: if str(e) == 'An event with the same name has already been scheduled.': # we must be reloading the plugin, event is still scheduled self.log.info('Event %s already exists, adding to dict.' % (name,)) @@ -95,11 +95,11 @@ class Scheduler(callbacks.Plugin): pkl = os.fdopen(pklfd, 'wb') try: pickle.dump(self.events, pkl) - except Exception, e: + except Exception as e: self.log.warning('Unable to store pickled data: %s', e) pkl.close() shutil.move(tempfn, filename) - except (IOError, shutil.Error), e: + except (IOError, shutil.Error) as e: self.log.warning('File error: %s', e) def die(self): diff --git a/plugins/ShrinkUrl/plugin.py b/plugins/ShrinkUrl/plugin.py index 26772e5ec..f9981a2f9 100644 --- a/plugins/ShrinkUrl/plugin.py +++ b/plugins/ShrinkUrl/plugin.py @@ -98,7 +98,7 @@ class ShrinkUrl(callbacks.PluginRegexp): def callCommand(self, command, irc, msg, *args, **kwargs): try: self.__parent.callCommand(command, irc, msg, *args, **kwargs) - except utils.web.Error, e: + except utils.web.Error as e: irc.error(str(e)) def _outFilterThread(self, irc, msg): @@ -195,7 +195,7 @@ class ShrinkUrl(callbacks.PluginRegexp): m = irc.reply(lnurl) if m is not None: m.tag('shrunken') - except ShrinkError, e: + except ShrinkError as e: irc.error(str(e)) ln = thread(wrap(ln, ['url'])) @@ -222,7 +222,7 @@ class ShrinkUrl(callbacks.PluginRegexp): m = irc.reply(tinyurl) if m is not None: m.tag('shrunken') - except ShrinkError, e: + except ShrinkError as e: irc.errorPossibleBug(str(e)) tiny = thread(wrap(tiny, ['url'])) @@ -251,7 +251,7 @@ class ShrinkUrl(callbacks.PluginRegexp): m = irc.reply(xrlurl) if m is not None: m.tag('shrunken') - except ShrinkError, e: + except ShrinkError as e: irc.error(str(e)) xrl = thread(wrap(xrl, ['url'])) @@ -283,7 +283,7 @@ class ShrinkUrl(callbacks.PluginRegexp): m = irc.reply(goourl) if m is not None: m.tag('shrunken') - except ShrinkError, e: + except ShrinkError as e: irc.error(str(e)) goo = thread(wrap(goo, ['url'])) @@ -313,7 +313,7 @@ class ShrinkUrl(callbacks.PluginRegexp): m = irc.reply(ur1url) if m is not None: m.tag('shrunken') - except ShrinkError, e: + except ShrinkError as e: irc.error(str(e)) ur1 = thread(wrap(ur1, ['url'])) @@ -340,7 +340,7 @@ class ShrinkUrl(callbacks.PluginRegexp): m = irc.reply(x0url) if m is not None: m.tag('shrunken') - except ShrinkError, e: + except ShrinkError as e: irc.error(str(e)) x0 = thread(wrap(x0, ['url'])) @@ -367,7 +367,7 @@ class ShrinkUrl(callbacks.PluginRegexp): m = irc.reply(expandurl) if m is not None: m.tag('shrunken') - except ShrinkError, e: + except ShrinkError as e: irc.error(str(e)) expand = thread(wrap(expand, ['url'])) diff --git a/plugins/String/plugin.py b/plugins/String/plugin.py index 212c12cab..a22a1b5cb 100644 --- a/plugins/String/plugin.py +++ b/plugins/String/plugin.py @@ -203,7 +203,7 @@ class String(callbacks.Plugin): try: v = process(f, text, timeout=t, pn=self.name(), cn='re') irc.reply(v) - except commands.ProcessTimeoutError, e: + except commands.ProcessTimeoutError as e: irc.error("ProcessTimeoutError: %s" % (e,)) re = thread(wrap(re, [first('regexpMatcher', 'regexpReplacer'), 'text'])) diff --git a/plugins/Topic/plugin.py b/plugins/Topic/plugin.py index dc1065868..b21d07b51 100644 --- a/plugins/Topic/plugin.py +++ b/plugins/Topic/plugin.py @@ -125,10 +125,10 @@ class Topic(callbacks.Plugin): self.redos = pickle.load(pkl) self.lastTopics = pickle.load(pkl) self.watchingFor332 = pickle.load(pkl) - except Exception, e: + except Exception as e: self.log.debug('Unable to load pickled data: %s', e) pkl.close() - except IOError, e: + except IOError as e: self.log.debug('Unable to open pickle file: %s', e) world.flushers.append(self._flush) @@ -145,11 +145,11 @@ class Topic(callbacks.Plugin): pickle.dump(self.redos, pkl) pickle.dump(self.lastTopics, pkl) pickle.dump(self.watchingFor332, pkl) - except Exception, e: + except Exception as e: self.log.warning('Unable to store pickled data: %s', e) pkl.close() shutil.move(tempfn, filename) - except (IOError, shutil.Error), e: + except (IOError, shutil.Error) as e: self.log.warning('File error: %s', e) def _splitTopic(self, topic, channel): diff --git a/plugins/Unix/plugin.py b/plugins/Unix/plugin.py index 436e25162..2a8fa77f4 100644 --- a/plugins/Unix/plugin.py +++ b/plugins/Unix/plugin.py @@ -153,7 +153,7 @@ class Unix(callbacks.Plugin): stdout=subprocess.PIPE, stderr=subprocess.PIPE, stdin=subprocess.PIPE) - except OSError, e: + except OSError as e: irc.error(e, Raise=True) ret = inst.poll() if ret is not None: @@ -214,7 +214,7 @@ class Unix(callbacks.Plugin): stdout=subprocess.PIPE, stderr=subprocess.PIPE, stdin=open(os.devnull)) - except OSError, e: + except OSError as e: irc.error(_('It seems the configured fortune command was ' 'not available.'), Raise=True) (out, err) = inst.communicate() @@ -294,7 +294,7 @@ class Unix(callbacks.Plugin): inst = subprocess.Popen(args, stdout=subprocess.PIPE, stderr=subprocess.PIPE, stdin=open(os.devnull)) - except OSError, e: + except OSError as e: irc.error('It seems the configured ping command was ' 'not available (%s).' % e, Raise=True) result = inst.communicate() @@ -327,7 +327,7 @@ class Unix(callbacks.Plugin): stdout=subprocess.PIPE, stderr=subprocess.PIPE, stdin=open(os.devnull)) - except OSError, e: + except OSError as e: irc.error('It seems the configured uptime command was ' 'not available.', Raise=True) (out, err) = inst.communicate() @@ -355,7 +355,7 @@ class Unix(callbacks.Plugin): stdout=subprocess.PIPE, stderr=subprocess.PIPE, stdin=open(os.devnull)) - except OSError, e: + except OSError as e: irc.error('It seems the configured uptime command was ' 'not available.', Raise=True) (out, err) = inst.communicate() @@ -384,7 +384,7 @@ class Unix(callbacks.Plugin): inst = subprocess.Popen(args, stdout=subprocess.PIPE, stderr=subprocess.PIPE, stdin=open(os.devnull)) - except OSError, e: + except OSError as e: irc.error('It seems the requested command was ' 'not available (%s).' % e, Raise=True) result = inst.communicate() diff --git a/plugins/User/plugin.py b/plugins/User/plugin.py index 384ef930d..b35da1434 100644 --- a/plugins/User/plugin.py +++ b/plugins/User/plugin.py @@ -349,11 +349,11 @@ class User(callbacks.Plugin): Raise=True) try: user.addHostmask(hostmask) - except ValueError, e: + except ValueError as e: irc.error(str(e), Raise=True) try: ircdb.users.setUser(user) - except ValueError, e: + except ValueError as e: irc.error(str(e), Raise=True) except ircdb.DuplicateHostmask: irc.error(_('That hostmask is already registered.'), diff --git a/plugins/Utilities/plugin.py b/plugins/Utilities/plugin.py index 50f49cf4e..3050e4afd 100644 --- a/plugins/Utilities/plugin.py +++ b/plugins/Utilities/plugin.py @@ -113,7 +113,7 @@ class Utilities(callbacks.Plugin): try: samp = random.sample(things, num) irc.reply(' '.join(samp)) - except ValueError, e: + except ValueError as e: irc.error('%s' % (e,)) sample = wrap(sample, ['positiveInt', many('anything')]) diff --git a/plugins/Web/plugin.py b/plugins/Web/plugin.py index a90b5d1bf..d9ec16893 100644 --- a/plugins/Web/plugin.py +++ b/plugins/Web/plugin.py @@ -135,7 +135,7 @@ class Web(callbacks.PluginRegexp): fd = utils.web.getUrlFd(url) text = fd.read(size) fd.close() - except socket.timeout, e: + except socket.timeout as e: self.log.info('Couldn\'t snarf title of %u: %s.', url, e) if self.registryValue('snarferReportIOExceptions', channel): irc.reply(url+" : "+utils.web.TIMED_OUT, prefixNick=False) diff --git a/plugins/__init__.py b/plugins/__init__.py index 597a52b72..bde416a26 100644 --- a/plugins/__init__.py +++ b/plugins/__init__.py @@ -233,7 +233,7 @@ class ChannelUserDB(ChannelUserDictionary): self.filename = filename try: fd = open(self.filename) - except EnvironmentError, e: + except EnvironmentError as e: log.warning('Couldn\'t open %s: %s.', self.filename, e) return reader = csv.reader(fd) @@ -251,11 +251,11 @@ class ChannelUserDB(ChannelUserDictionary): pass v = self.deserialize(channel, id, t) self[channel, id] = v - except Exception, e: + except Exception as e: log.warning('Invalid line #%s in %s.', lineno, self.__class__.__name__) log.debug('Exception: %s', utils.exnToString(e)) - except Exception, e: # This catches exceptions from csv.reader. + except Exception as e: # This catches exceptions from csv.reader. log.warning('Invalid line #%s in %s.', lineno, self.__class__.__name__) log.debug('Exception: %s', utils.exnToString(e)) @@ -525,10 +525,10 @@ class PeriodicFileDownloader(object): try: try: infd = utils.web.getUrlFd(url) - except IOError, e: + except IOError as e: self.log.warning('Error downloading %s: %s', url, e) return - except utils.web.Error, e: + except utils.web.Error as e: self.log.warning('Error downloading %s: %s', url, e) return confDir = conf.supybot.directories.data() diff --git a/setup.py b/setup.py index 9ffbbe9d6..60c9c08fc 100644 --- a/setup.py +++ b/setup.py @@ -149,7 +149,7 @@ try: log.debug(msg, *args) fixer_names = ['fix_basestring', - 'fix_dict', 'fix_except', + 'fix_dict', 'fix_funcattrs', 'fix_imports', 'fix_itertools', 'fix_itertools_imports', 'fix_long', diff --git a/src/callbacks.py b/src/callbacks.py index a437aa29b..3ac8b6538 100644 --- a/src/callbacks.py +++ b/src/callbacks.py @@ -384,7 +384,7 @@ def tokenize(s, channel=None): try: ret = Tokenizer(brackets=brackets,pipe=pipe,quotes=quotes).tokenize(s) return ret - except ValueError, e: + except ValueError as e: raise SyntaxError(str(e)) def formatCommand(command): @@ -424,7 +424,7 @@ def checkCommandCapability(msg, cb, commandName): return not (default or \ any(lambda x: ircdb.checkCapability(msg.prefix, x), checkAtEnd)) - except RuntimeError, e: + except RuntimeError as e: s = ircdb.unAntiCapability(str(e)) return s @@ -717,9 +717,9 @@ class NestedCommandsIrcProxy(ReplyIrcProxy): log.debug('Calling %s.invalidCommand.', cb.name()) try: cb.invalidCommand(self, self.msg, self.args) - except Error, e: + except Error as e: self.error(str(e)) - except Exception, e: + except Exception as e: log.exception('Uncaught exception in %s.invalidCommand.', cb.name()) log.debug('Finished calling %s.invalidCommand.', cb.name()) @@ -1269,7 +1269,7 @@ class Commands(BasePlugin): self.callingCommand = None except SilentError: pass - except (getopt.GetoptError, ArgumentError), e: + except (getopt.GetoptError, ArgumentError) as e: self.log.debug('Got %s, giving argument error.', utils.exnToString(e)) help = self.getCommandHelp(command) @@ -1277,10 +1277,10 @@ class Commands(BasePlugin): irc.error(_('Invalid arguments for %s.') % method.__name__) else: irc.reply(help) - except (SyntaxError, Error), e: + except (SyntaxError, Error) as e: self.log.debug('Error return: %s', utils.exnToString(e)) irc.error(str(e)) - except Exception, e: + except Exception as e: self.log.exception('Uncaught exception in %s.', command) if conf.supybot.reply.error.detailed(): irc.error(utils.exnToString(e)) @@ -1444,9 +1444,9 @@ class PluginRegexp(Plugin): method = getattr(self, name) try: method(irc, msg, m) - except Error, e: + except Error as e: irc.error(str(e)) - except Exception, e: + except Exception as e: self.log.exception('Uncaught exception in _callRegexp:') def invalidCommand(self, irc, msg, tokens): diff --git a/src/commands.py b/src/commands.py index a6f3f2e2c..981664fe7 100644 --- a/src/commands.py +++ b/src/commands.py @@ -160,7 +160,7 @@ class UrlSnarfThread(world.SupyThread): def run(self): try: super(UrlSnarfThread, self).run() - except utils.web.Error, e: + except utils.web.Error as e: log.debug('Exception in urlSnarfer: %s', utils.exnToString(e)) class SnarfQueue(ircutils.FloodQueue): @@ -301,7 +301,7 @@ def getId(irc, msg, args, state, kind=None): try: args[0] = args[0].lstrip('#') getInt(irc, msg, args, state, type=type) - except Exception, e: + except Exception as e: args[0] = original raise @@ -798,7 +798,7 @@ class UnknownConverter(KeyError): def getConverter(name): try: return wrappers[name] - except KeyError, e: + except KeyError as e: raise UnknownConverter(str(e)) def callConverter(name, irc, msg, args, state, *L): @@ -852,7 +852,7 @@ class rest(context): args[:] = [' '.join(args)] try: super(rest, self).__call__(irc, msg, args, state) - except Exception, e: + except Exception as e: args[:] = original else: raise IndexError @@ -878,7 +878,7 @@ class optional(additional): def __call__(self, irc, msg, args, state): try: super(optional, self).__call__(irc, msg, args, state) - except (callbacks.ArgumentError, callbacks.Error), e: + except (callbacks.ArgumentError, callbacks.Error) as e: log.debug('Got %s, returning default.', utils.exnToString(e)) state.errored = False setDefault(state, self.default) @@ -896,7 +896,7 @@ class any(context): self.__parent.__call__(irc, msg, args, st) except IndexError: pass - except (callbacks.ArgumentError, callbacks.Error), e: + except (callbacks.ArgumentError, callbacks.Error) as e: if not self.continueOnError: raise else: @@ -925,7 +925,7 @@ class first(context): try: spec(irc, msg, args, state) return - except Exception, e: + except Exception as e: e2 = e # 'e' is local. errored = state.errored state.errored = False @@ -956,7 +956,7 @@ class commalist(context): if part: # trailing commas super(commalist, self).__call__(irc, msg, [part], st) state.args.append(st.args) - except Exception, e: + except Exception as e: args[:] = original raise diff --git a/src/dbi.py b/src/dbi.py index 5a0c809a5..ab3999e48 100644 --- a/src/dbi.py +++ b/src/dbi.py @@ -117,7 +117,7 @@ class DirMapping(MappingInterface): try: fd = open(self._makeFilename(id)) return fd.read() - except EnvironmentError, e: + except EnvironmentError as e: exn = NoRecordError(id) exn.realException = e raise exn @@ -141,7 +141,7 @@ class DirMapping(MappingInterface): def remove(self, id): try: os.remove(self._makeFilename(id)) - except EnvironmentError, e: + except EnvironmentError as e: raise NoRecordError(id) class FlatfileMapping(MappingInterface): @@ -155,7 +155,7 @@ class FlatfileMapping(MappingInterface): self.currentId = int(strId) except ValueError: raise Error('Invalid file for FlatfileMapping: %s' % filename) - except EnvironmentError, e: + except EnvironmentError as e: # File couldn't be opened. self.maxSize = int(math.log10(maxSize)) self.currentId = 0 diff --git a/src/drivers/Socket.py b/src/drivers/Socket.py index b49c52e74..98be09eca 100644 --- a/src/drivers/Socket.py +++ b/src/drivers/Socket.py @@ -140,7 +140,7 @@ class SocketDriver(drivers.IrcDriver, drivers.ServersMixin): sent = self.conn.send(self.outbuffer.encode()) self.outbuffer = self.outbuffer[sent:] self.eagains = 0 - except socket.error, e: + except socket.error as e: self._handleSocketError(e) if self.zombie and not self.outbuffer: self._reallyDie() @@ -233,13 +233,13 @@ class SocketDriver(drivers.IrcDriver, drivers.ServersMixin): self.irc.feedMsg(msg) except socket.timeout: pass - except SSLError, e: + except SSLError as e: if e.args[0] == 'The read operation timed out': pass else: self._handleSocketError(e) return - except socket.error, e: + except socket.error as e: self._handleSocketError(e) return if self.irc and not self.irc.zombie: @@ -295,7 +295,7 @@ class SocketDriver(drivers.IrcDriver, drivers.ServersMixin): self.conn = utils.net.getSocket(address, socks_proxy) vhost = conf.supybot.protocols.irc.vhost() self.conn.bind((vhost, 0)) - except socket.error, e: + except socket.error as e: drivers.log.connectError(self.currentServer, e) self.scheduleReconnect() return @@ -321,7 +321,7 @@ class SocketDriver(drivers.IrcDriver, drivers.ServersMixin): setTimeout() self.connected = True self.resetDelay() - except socket.error, e: + except socket.error as e: if e.args[0] == 115: now = time.time() when = now + 60 diff --git a/src/ircdb.py b/src/ircdb.py index b82cdffc0..a888b3fb4 100644 --- a/src/ircdb.py +++ b/src/ircdb.py @@ -628,10 +628,10 @@ class UsersDictionary(utils.IterableMap): reader.readFile(filename) self.noFlush = False self.flush() - except EnvironmentError, e: + except EnvironmentError as e: log.error('Invalid user dictionary file, resetting to empty.') log.error('Exact error: %s', utils.exnToString(e)) - except Exception, e: + except Exception as e: log.exception('Exact error:') finally: self.noFlush = False @@ -645,7 +645,7 @@ class UsersDictionary(utils.IterableMap): if self.filename is not None: try: self.open(self.filename) - except EnvironmentError, e: + except EnvironmentError as e: log.warning('UsersDictionary.reload failed: %s', e) else: log.error('UsersDictionary.reload called with no filename.') @@ -834,10 +834,10 @@ class ChannelsDictionary(utils.IterableMap): reader.readFile(filename) self.noFlush = False self.flush() - except EnvironmentError, e: + except EnvironmentError as e: log.error('Invalid channel database, resetting to empty.') log.error('Exact error: %s', utils.exnToString(e)) - except Exception, e: + except Exception as e: log.error('Invalid channel database, resetting to empty.') log.exception('Exact error:') finally: @@ -870,7 +870,7 @@ class ChannelsDictionary(utils.IterableMap): self.channels.clear() try: self.open(self.filename) - except EnvironmentError, e: + except EnvironmentError as e: log.warning('ChannelsDictionary.reload failed: %s', e) else: log.warning('ChannelsDictionary.reload without self.filename.') @@ -913,7 +913,7 @@ class IgnoresDB(object): else: expiration = 0 self.add(hostmask, expiration) - except Exception, e: + except Exception as e: log.error('Invalid line in ignores database: %q', line) fd.close() @@ -941,7 +941,7 @@ class IgnoresDB(object): self.hostmasks.clear() try: self.open(self.filename) - except EnvironmentError, e: + except EnvironmentError as e: log.warning('IgnoresDB.reload failed: %s', e) # Let's be somewhat transactional. self.hostmasks.update(oldhostmasks) @@ -971,7 +971,7 @@ try: userFile = os.path.join(confDir, conf.supybot.databases.users.filename()) users = UsersDictionary() users.open(userFile) -except EnvironmentError, e: +except EnvironmentError as e: log.warning('Couldn\'t open user database: %s', e) try: @@ -979,7 +979,7 @@ try: conf.supybot.databases.channels.filename()) channels = ChannelsDictionary() channels.open(channelFile) -except EnvironmentError, e: +except EnvironmentError as e: log.warning('Couldn\'t open channel database: %s', e) try: @@ -987,7 +987,7 @@ try: conf.supybot.databases.ignores.filename()) ignores = IgnoresDB() ignores.open(ignoreFile) -except EnvironmentError, e: +except EnvironmentError as e: log.warning('Couldn\'t open ignore database: %s', e) @@ -1083,7 +1083,7 @@ def checkCapability(hostmask, capability, users=users, channels=channels, # Raised when no hostmasks match. return _checkCapabilityForUnknownUser(capability, users=users, channels=channels) - except ValueError, e: + except ValueError as e: # Raised when multiple hostmasks match. log.warning('%s: %s', hostmask, e) return _checkCapabilityForUnknownUser(capability, users=users, diff --git a/src/irclib.py b/src/irclib.py index a7cac3acf..fd599b6cd 100644 --- a/src/irclib.py +++ b/src/irclib.py @@ -475,7 +475,7 @@ class IrcState(IrcCommandDispatcher): converter = self._005converters.get(name, lambda x: x) try: self.supported[name] = converter(value) - except Exception, e: + except Exception as e: log.exception('Uncaught exception in 005 converter:') log.error('Name: %s, Converter: %s', name, converter) else: diff --git a/src/log.py b/src/log.py index d811a717b..3922f6963 100644 --- a/src/log.py +++ b/src/log.py @@ -107,7 +107,7 @@ class StdoutStreamHandler(logging.StreamHandler): if conf.supybot.log.stdout() and not conf.daemonized: try: logging.StreamHandler.emit(self, record) - except ValueError, e: # Raised if sys.stdout is closed. + except ValueError as e: # Raised if sys.stdout is closed. self.disable() error('Error logging to stdout. Removing stdout handler.') exception('Uncaught exception in StdoutStreamHandler:') @@ -184,7 +184,7 @@ if not os.path.exists(pluginLogDir): try: messagesLogFilename = os.path.join(_logDir, 'messages.log') _handler = BetterFileHandler(messagesLogFilename) -except EnvironmentError, e: +except EnvironmentError as e: raise SystemExit('Error opening messages logfile (%s). ' \ 'Generally, this is because you are running Supybot in a directory ' \ 'you don\'t have permissions to add files in, or you\'re running ' \ @@ -348,14 +348,14 @@ def firewall(f, errorHandler=None): def m(self, *args, **kwargs): try: return f(self, *args, **kwargs) - except Exception, e: + except Exception as e: if testing: raise logException(self) if errorHandler is not None: try: return errorHandler(self, *args, **kwargs) - except Exception, e: + except Exception as e: logException(self, 'Uncaught exception in errorHandler') m = utils.python.changeFunctionName(m, f.func_name, f.__doc__) return m diff --git a/src/plugin.py b/src/plugin.py index 3517aa3ce..448a017e6 100644 --- a/src/plugin.py +++ b/src/plugin.py @@ -85,7 +85,7 @@ def loadPluginClass(irc, module, register=None): """Loads the plugin Class from the given module into the given Irc.""" try: cb = module.Class(irc) - except TypeError, e: + except TypeError as e: s = str(e) if '2 given' in s and '__init__' in s: raise callbacks.Error('In our switch from CVS to Darcs (after 0.80.1), we ' \ @@ -100,7 +100,7 @@ def loadPluginClass(irc, module, register=None): module.__name__) else: raise - except AttributeError, e: + except AttributeError as e: if 'Class' in str(e): raise callbacks.Error('This plugin module doesn\'t have a "Class" ' \ 'attribute to specify which plugin should be ' \ @@ -127,7 +127,7 @@ def loadPluginClass(irc, module, register=None): renameCommand(cb, command, newName) else: conf.supybot.commands.renames.unregister(plugin) - except registry.NonExistentRegistryEntry, e: + except registry.NonExistentRegistryEntry as e: pass # The plugin isn't there. irc.addCallback(cb) return cb diff --git a/src/registry.py b/src/registry.py index 194f421ba..b6779c636 100644 --- a/src/registry.py +++ b/src/registry.py @@ -127,12 +127,12 @@ def close(registry, filename, private=True): lines.append('#\n') try: x = value.__class__(value._default, value._help) - except Exception, e: + except Exception as e: exception('Exception instantiating default for %s:' % value._name) try: lines.append('# Default value: %s\n' % x) - except Exception, e: + except Exception as e: exception('Exception printing default value of %s:' % value._name) lines.append('###\n') @@ -144,7 +144,7 @@ def close(registry, filename, private=True): else: s = 'CENSORED' fd.write('%s: %s\n' % (name, s)) - except Exception, e: + except Exception as e: exception('Exception printing value:') fd.close() @@ -615,7 +615,7 @@ class Regexp(Value): self.setValue(utils.str.perlReToPythonRe(s), sr=s) else: self.setValue(None) - except ValueError, e: + except ValueError as e: self.error(e) def setValue(self, v, sr=None): diff --git a/src/schedule.py b/src/schedule.py index be0fd05fd..7019790ae 100644 --- a/src/schedule.py +++ b/src/schedule.py @@ -140,7 +140,7 @@ class Schedule(drivers.IrcDriver): del self.events[name] try: f(*args, **kwargs) - except Exception, e: + except Exception as e: log.exception('Uncaught exception in scheduled function:') diff --git a/src/test.py b/src/test.py index f3e85a815..f1ee7c7e4 100644 --- a/src/test.py +++ b/src/test.py @@ -81,7 +81,7 @@ class TestPlugin(callbacks.Plugin): irc.reply(repr(eval(' '.join(args)))) except callbacks.ArgumentError: raise - except Exception, e: + except Exception as e: irc.reply(utils.exnToString(e)) # Since we know we don't now need the Irc object, we just give None. This # might break if callbacks.Privmsg ever *requires* the Irc object. diff --git a/src/utils/gen.py b/src/utils/gen.py index 7327743cf..38f0100fd 100644 --- a/src/utils/gen.py +++ b/src/utils/gen.py @@ -160,7 +160,7 @@ def safeEval(s, namespace={'True': True, 'False': False, 'None': None}): without unsafely using eval().""" try: node = ast.parse(s) - except SyntaxError, e: + except SyntaxError as e: raise ValueError('Invalid string: %s.' % e) nodes = ast.parse(s).body if not nodes: diff --git a/src/utils/str.py b/src/utils/str.py index a080653f5..a5e49597a 100644 --- a/src/utils/str.py +++ b/src/utils/str.py @@ -194,7 +194,7 @@ def perlReToPythonRe(s): raise ValueError('Invalid flag: %s' % c) try: return re.compile(regexp, flag) - except re.error, e: + except re.error as e: raise ValueError(str(e)) def perlReToReplacer(s): diff --git a/src/utils/transaction.py b/src/utils/transaction.py index b91f14783..8a4e09d6b 100644 --- a/src/utils/transaction.py +++ b/src/utils/transaction.py @@ -107,7 +107,7 @@ class Transaction(TransactionMixin): raise FailedAcquisition(self.txnDir) try: os.rename(self.txnDir, self.dir) - except EnvironmentError, e: + except EnvironmentError as e: raise FailedAcquisition(self.txnDir, e) os.mkdir(self.dirize(self.ORIGINALS)) os.mkdir(self.dirize(self.REPLACEMENTS)) diff --git a/src/utils/web.py b/src/utils/web.py index 422e9eec3..dec904de0 100644 --- a/src/utils/web.py +++ b/src/utils/web.py @@ -125,18 +125,18 @@ def getUrlFd(url, headers=None, data=None, timeout=None): request.set_proxy(httpProxy, 'http') fd = urllib2.urlopen(request, timeout=timeout) return fd - except socket.timeout, e: + except socket.timeout as e: raise Error(TIMED_OUT) - except sockerrors, e: + except sockerrors as e: raise Error(strError(e)) - except httplib.InvalidURL, e: + except httplib.InvalidURL as e: raise Error('Invalid URL: %s' % e) - except urllib2.HTTPError, e: + except urllib2.HTTPError as e: raise Error(strError(e)) - except urllib2.URLError, e: + except urllib2.URLError as e: raise Error(strError(e.reason)) # Raised when urllib doesn't recognize the url type - except ValueError, e: + except ValueError as e: raise Error(strError(e)) def getUrl(url, size=None, headers=None, data=None): @@ -151,7 +151,7 @@ def getUrl(url, size=None, headers=None, data=None): text = fd.read() else: text = fd.read(size) - except socket.timeout, e: + except socket.timeout as e: raise Error(TIMED_OUT) fd.close() return text diff --git a/src/world.py b/src/world.py index 3a6d53bd8..a59a59973 100644 --- a/src/world.py +++ b/src/world.py @@ -118,7 +118,7 @@ def flush(): for (i, f) in enumerate(flushers): try: f() - except Exception, e: + except Exception as e: log.exception('Uncaught exception in flusher #%s (%s):', i, f) def debugFlush(s=''): From ca419f6485dcc7a11ac336f90328c69e55ea2e1c Mon Sep 17 00:00:00 2001 From: Valentin Lorentz Date: Mon, 20 Jan 2014 16:04:53 +0100 Subject: [PATCH 09/36] Continue accelerating the 2to3 step (remove fix_reduce, fix_renames, fix_repr, fix_set_literal, fix_standarderror, fix_sys_exc, fix_throw, and fix_tuple_params). --- plugins/Admin/plugin.py | 2 +- plugins/Channel/plugin.py | 2 +- plugins/Nickometer/plugin.py | 4 ++-- plugins/User/plugin.py | 2 +- plugins/__init__.py | 9 ++++++--- setup.py | 4 +--- src/ircdb.py | 2 +- src/irclib.py | 4 ++-- src/log.py | 8 +++++--- src/shlex.py | 8 ++++---- src/utils/structures.py | 9 ++++++--- 11 files changed, 30 insertions(+), 24 deletions(-) diff --git a/plugins/Admin/plugin.py b/plugins/Admin/plugin.py index d5057475d..c71afcdf5 100644 --- a/plugins/Admin/plugin.py +++ b/plugins/Admin/plugin.py @@ -151,7 +151,7 @@ class Admin(callbacks.Plugin): networkGroup.channels().add(channel) if key: networkGroup.channels.key.get(channel).setValue(key) - maxchannels = irc.state.supported.get('maxchannels', sys.maxint) + maxchannels = irc.state.supported.get('maxchannels', sys.maxsize) if len(irc.state.channels) + 1 > maxchannels: irc.error(_('I\'m already too close to maximum number of ' 'channels for this network.'), Raise=True) diff --git a/plugins/Channel/plugin.py b/plugins/Channel/plugin.py index bdbc5e191..9a32d8b4f 100644 --- a/plugins/Channel/plugin.py +++ b/plugins/Channel/plugin.py @@ -279,7 +279,7 @@ class Channel(callbacks.Plugin): irc.error(_('I cowardly refuse to kick myself.'), Raise=True) if not reason: reason = msg.nick - kicklen = irc.state.supported.get('kicklen', sys.maxint) + kicklen = irc.state.supported.get('kicklen', sys.maxsize) if len(reason) > kicklen: irc.error(_('The reason you gave is longer than the allowed ' 'length for a KICK reason on this server.'), diff --git a/plugins/Nickometer/plugin.py b/plugins/Nickometer/plugin.py index fd7d596a9..e282eb7ec 100644 --- a/plugins/Nickometer/plugin.py +++ b/plugins/Nickometer/plugin.py @@ -163,7 +163,7 @@ class Nickometer(callbacks.Plugin): # Punish k3wlt0k k3wlt0k_weights = (5, 5, 2, 5, 2, 3, 1, 2, 2, 2) for i in range(len(k3wlt0k_weights)): - hits=re.findall(`i`, nick) + hits=re.findall(repr(i), nick) if (hits and len(hits)>0): score += self.punish(k3wlt0k_weights[i] * len(hits) * 30, '%s occurrences of %s ' % (len(hits), i)) @@ -225,7 +225,7 @@ class Nickometer(callbacks.Plugin): (1 - 1 / (1 + score / 5.0)) // 2 # if it's above 99.9%, show as many digits as is interesting - score_string=re.sub('(99\\.9*\\d|\\.\\d).*','\\1',`percentage`) + score_string=re.sub('(99\\.9*\\d|\\.\\d).*','\\1',repr(percentage)) irc.reply(_('The "lame nick-o-meter" reading for "%s" is %s%%.') % (originalNick, score_string)) diff --git a/plugins/User/plugin.py b/plugins/User/plugin.py index b35da1434..fa4b17721 100644 --- a/plugins/User/plugin.py +++ b/plugins/User/plugin.py @@ -415,7 +415,7 @@ class User(callbacks.Plugin): def _expire_tokens(self): now = time.time() - self._tokens = dict(filter(lambda (x,y): y[1]>now, + self._tokens = dict(filter(lambda x_y: x_y[1][1]>now, self._tokens.items())) @internationalizeDocstring diff --git a/plugins/__init__.py b/plugins/__init__.py index bde416a26..57edd67a1 100644 --- a/plugins/__init__.py +++ b/plugins/__init__.py @@ -191,15 +191,18 @@ class ChannelUserDictionary(collections.MutableMapping): def __init__(self): self.channels = ircutils.IrcDict() - def __getitem__(self, (channel, id)): + def __getitem__(self, key): + (channel, id) = key return self.channels[channel][id] - def __setitem__(self, (channel, id), v): + def __setitem__(self, key, v): + (channel, id) = key if channel not in self.channels: self.channels[channel] = self.IdDict() self.channels[channel][id] = v - def __delitem__(self, (channel, id)): + def __delitem__(self, key): + (channel, id) = key del self.channels[channel][id] def __iter__(self): diff --git a/setup.py b/setup.py index 60c9c08fc..5e8c8adf3 100644 --- a/setup.py +++ b/setup.py @@ -155,9 +155,7 @@ try: 'fix_itertools', 'fix_itertools_imports', 'fix_long', 'fix_map', 'fix_metaclass', 'fix_methodattrs', 'fix_numliterals', - 'fix_reduce', 'fix_renames', 'fix_repr', - 'fix_set_literal', 'fix_standarderror', 'fix_sys_exc', - 'fix_throw', 'fix_tuple_params', 'fix_types', + 'fix_types', 'fix_unicode', 'fix_urllib', 'fix_ws_comma', 'fix_xrange', 'fix_xreadlines', 'fix_zip'] fixers = list(map(lambda x:'lib2to3.fixes.'+x, fixer_names)) diff --git a/src/ircdb.py b/src/ircdb.py index a888b3fb4..25ae3168a 100644 --- a/src/ircdb.py +++ b/src/ircdb.py @@ -693,7 +693,7 @@ class UsersDictionary(utils.IterableMap): try: self._hostmaskCache[id].add(s) except KeyError: - self._hostmaskCache[id] = set([s]) + self._hostmaskCache[id] = {s} return id elif len(ids) == 0: raise KeyError(s) diff --git a/src/irclib.py b/src/irclib.py index fd599b6cd..0772fbea9 100644 --- a/src/irclib.py +++ b/src/irclib.py @@ -628,9 +628,9 @@ class Irc(IrcCommandDispatcher): __firewalled__ = {'die': None, 'feedMsg': None, 'takeMsg': None,} - _nickSetters = set(['001', '002', '003', '004', '250', '251', '252', + _nickSetters = {'001', '002', '003', '004', '250', '251', '252', '254', '255', '265', '266', '372', '375', '376', - '333', '353', '332', '366', '005']) + '333', '353', '332', '366', '005'} # We specifically want these callbacks to be common between all Ircs, # that's why we don't do the normal None default with a check. def __init__(self, network, callbacks=_callbacks): diff --git a/src/log.py b/src/log.py index 3922f6963..eaf85e120 100644 --- a/src/log.py +++ b/src/log.py @@ -52,7 +52,8 @@ class Formatter(logging.Formatter): def formatTime(self, record, datefmt=None): return timestamp(record.created) - def formatException(self, (E, e, tb)): + def formatException(self, exc_info): + (E, e, tb) = exc_info for exn in deadlyExceptions: if issubclass(e.__class__, exn): raise @@ -113,7 +114,7 @@ class StdoutStreamHandler(logging.StreamHandler): exception('Uncaught exception in StdoutStreamHandler:') def disable(self): - self.setLevel(sys.maxint) # Just in case. + self.setLevel(sys.maxsize) # Just in case. _logger.removeHandler(self) logging._acquireLock() try: @@ -142,7 +143,8 @@ class ColorizedFormatter(Formatter): # This was necessary because these variables aren't defined until later. # The staticmethod is necessary because they get treated like methods. _fmtConf = staticmethod(lambda : conf.supybot.log.stdout.format()) - def formatException(self, (E, e, tb)): + def formatException(self, exc_info): + (E, e, tb) = exc_info if conf.supybot.log.stdout.colorized(): return ''.join([ansi.RED, Formatter.formatException(self, (E, e, tb)), diff --git a/src/shlex.py b/src/shlex.py index d2e364342..3d48235b9 100644 --- a/src/shlex.py +++ b/src/shlex.py @@ -37,7 +37,7 @@ class shlex: def push_token(self, tok): "Push a token onto the stack popped by the get_token method" if self.debug >= 1: - print("shlex: pushing token " + `tok`) + print("shlex: pushing token " + repr(tok)) self.pushback = [tok] + self.pushback def push_source(self, newstream, newfile=None): @@ -68,7 +68,7 @@ class shlex: tok = self.pushback[0] self.pushback = self.pushback[1:] if self.debug >= 1: - print("shlex: popping token " + `tok`) + print("shlex: popping token " + repr(tok)) return tok # No pushback. Get a token. raw = self.read_token() @@ -89,7 +89,7 @@ class shlex: # Neither inclusion nor EOF if self.debug >= 1: if raw: - print("shlex: token=" + `raw`) + print("shlex: token=" + repr(raw)) else: print("shlex: token=EOF") return raw @@ -180,7 +180,7 @@ class shlex: self.token = '' if self.debug > 1: if result: - print("shlex: raw token=" + `result`) + print("shlex: raw token=" + repr(result)) else: print("shlex: raw token=EOF") return result diff --git a/src/utils/structures.py b/src/utils/structures.py index 865ddd155..6e8e5e371 100644 --- a/src/utils/structures.py +++ b/src/utils/structures.py @@ -154,7 +154,8 @@ class RingBuffer(object): def __getstate__(self): return (self.maxSize, self.full, self.i, self.L) - def __setstate__(self, (maxSize, full, i, L)): + def __setstate__(self, state): + (maxSize, full, i, L) = state self.maxSize = maxSize self.full = full self.i = i @@ -281,7 +282,8 @@ class queue(object): def __getstate__(self): return (list(self),) - def __setstate__(self, (L,)): + def __setstate__(self, state): + (L,) = state L.reverse() self.front = L self.back = [] @@ -365,7 +367,8 @@ class MaxLengthQueue(queue): def __getstate__(self): return (self.length, queue.__getstate__(self)) - def __setstate__(self, (length, q)): + def __setstate__(self, state): + (length, q) = state self.length = length queue.__setstate__(self, q) From 35a62b4e77a3f273f6055f737fa0aecdb78372ff Mon Sep 17 00:00:00 2001 From: Valentin Lorentz Date: Tue, 21 Jan 2014 10:40:18 +0100 Subject: [PATCH 10/36] Continue accelerating the 2to3 step (remove fix_ws_comma, fix_xreadlines, and fix_zip). --- plugins/Factoids/plugin.py | 4 ++-- plugins/Filter/plugin.py | 6 +++--- plugins/Format/plugin.py | 2 +- plugins/Karma/plugin.py | 2 +- plugins/Nickometer/plugin.py | 4 ++-- plugins/Web/plugin.py | 2 +- setup.py | 3 +-- src/callbacks.py | 4 ++-- src/commands.py | 8 ++++---- src/irclib.py | 8 ++++---- src/ircutils.py | 4 ++-- src/log.py | 4 ++-- src/utils/python.py | 6 +++--- src/utils/str.py | 4 ++-- test/test_utils.py | 2 +- 15 files changed, 31 insertions(+), 32 deletions(-) diff --git a/plugins/Factoids/plugin.py b/plugins/Factoids/plugin.py index 34d3e2f58..9b5e604b0 100644 --- a/plugins/Factoids/plugin.py +++ b/plugins/Factoids/plugin.py @@ -244,7 +244,7 @@ class Factoids(callbacks.Plugin, plugins.ChannelDBHandler): def getCommandHelp(self, command, simpleSyntax=None): method = self.getCommandMethod(command) - if method.im_func.func_name == 'learn': + if method.im_func.__name__ == 'learn': chan = None if dynamic.msg is not None: chan = dynamic.msg.args[0] @@ -352,7 +352,7 @@ class Factoids(callbacks.Plugin, plugins.ChannelDBHandler): return [] flkeys = [line[0] for line in flkeys] dl_metrics = [dameraulevenshtein(key, sourcekey) for sourcekey in flkeys] - dict_metrics = dict(zip(flkeys, dl_metrics)) + dict_metrics = dict(list(zip(flkeys, dl_metrics))) if min(dl_metrics) <= 2: return [key for key,item in dict_metrics.iteritems() if item <= 2] if min(dl_metrics) <= 3: diff --git a/plugins/Filter/plugin.py b/plugins/Filter/plugin.py index 31921d28d..c34b012a7 100644 --- a/plugins/Filter/plugin.py +++ b/plugins/Filter/plugin.py @@ -241,8 +241,8 @@ class Filter(callbacks.Plugin): irc.reply(text) lithp = wrap(lithp, ['text']) - _leettrans = utils.str.MultipleReplacer(dict(zip('oOaAeElBTiIts', - '004433187!1+5'))) + _leettrans = utils.str.MultipleReplacer(dict(list(zip('oOaAeElBTiIts', + '004433187!1+5')))) _leetres = [(re.compile(r'\b(?:(?:[yY][o0O][oO0uU])|u)\b'), 'j00'), (re.compile(r'fear'), 'ph33r'), (re.compile(r'[aA][tT][eE]'), '8'), @@ -662,7 +662,7 @@ class Filter(callbacks.Plugin): irc.reply(text) shrink = wrap(shrink, ['text']) - _azn_trans = utils.str.MultipleReplacer(dict(zip('rlRL', 'lrLR'))) + _azn_trans = utils.str.MultipleReplacer(dict(list(zip('rlRL', 'lrLR')))) @internationalizeDocstring def azn(self, irc, msg, args, text): """ diff --git a/plugins/Format/plugin.py b/plugins/Format/plugin.py index 72b5ceecf..4417b2a17 100644 --- a/plugins/Format/plugin.py +++ b/plugins/Format/plugin.py @@ -102,7 +102,7 @@ class Format(callbacks.Plugin): if len(bad) != len(good): irc.error(_(' must be the same length as ' '.'), Raise=True) - irc.reply(utils.str.MultipleReplacer(dict(zip(bad, good)))(text)) + irc.reply(utils.str.MultipleReplacer(dict(list(zip(bad, good))))(text)) translate = wrap(translate, ['something', 'something', 'text']) @internationalizeDocstring diff --git a/plugins/Karma/plugin.py b/plugins/Karma/plugin.py index 713a3f128..3d1a46d94 100644 --- a/plugins/Karma/plugin.py +++ b/plugins/Karma/plugin.py @@ -93,7 +93,7 @@ class SqliteKarmaDB(object): def gets(self, channel, things): db = self._getDb(channel) cursor = db.cursor() - normalizedThings = dict(zip(map(lambda s: s.lower(), things), things)) + normalizedThings = dict(list(zip(map(lambda s: s.lower(), things), things))) criteria = ' OR '.join(['normalized=?'] * len(normalizedThings)) sql = """SELECT name, added-subtracted FROM karma WHERE %s ORDER BY added-subtracted DESC""" % criteria diff --git a/plugins/Nickometer/plugin.py b/plugins/Nickometer/plugin.py index e282eb7ec..cf9da917d 100644 --- a/plugins/Nickometer/plugin.py +++ b/plugins/Nickometer/plugin.py @@ -119,8 +119,8 @@ class Nickometer(callbacks.Plugin): ('\\[rkx]0', 1000), ('\\0[rkx]', 1000)] - letterNumberTranslator = utils.str.MultipleReplacer(dict(zip( - '023457+8', 'ozeasttb'))) + letterNumberTranslator = utils.str.MultipleReplacer(dict(list(zip( + '023457+8', 'ozeasttb')))) for special in specialCost: tempNick = nick if special[0][0] != '\\': diff --git a/plugins/Web/plugin.py b/plugins/Web/plugin.py index d9ec16893..20bb233b8 100644 --- a/plugins/Web/plugin.py +++ b/plugins/Web/plugin.py @@ -93,7 +93,7 @@ def fetch_sandbox(f): try: replies = commands.process(process, self, irc, *args, timeout=5, heap_size=1024*1024, - pn=self.name(), cn=f.func_name) + pn=self.name(), cn=f.__name__) except commands.ProcessTimeoutError: raise utils.web.Error(_('Page is too big.')) else: diff --git a/setup.py b/setup.py index 5e8c8adf3..cdf29a3e6 100644 --- a/setup.py +++ b/setup.py @@ -156,8 +156,7 @@ try: 'fix_map', 'fix_metaclass', 'fix_methodattrs', 'fix_numliterals', 'fix_types', - 'fix_unicode', 'fix_urllib', 'fix_ws_comma', 'fix_xrange', - 'fix_xreadlines', 'fix_zip'] + 'fix_unicode', 'fix_urllib', 'fix_xrange'] fixers = list(map(lambda x:'lib2to3.fixes.'+x, fixer_names)) fixers += get_fixers_from_package('2to3') r = DistutilsRefactoringTool(fixers, options=options) diff --git a/src/callbacks.py b/src/callbacks.py index 3ac8b6538..f3300f3d7 100644 --- a/src/callbacks.py +++ b/src/callbacks.py @@ -1170,7 +1170,7 @@ class Commands(BasePlugin): if hasattr(self, name): method = getattr(self, name) if inspect.ismethod(method): - code = method.im_func.func_code + code = method.im_func.__code__ return inspect.getargs(code)[0] == self.commandArgs else: return False @@ -1217,7 +1217,7 @@ class Commands(BasePlugin): else: method = getattr(self, command[0]) if inspect.ismethod(method): - code = method.im_func.func_code + code = method.im_func.__code__ if inspect.getargs(code)[0] == self.commandArgs: return method else: diff --git a/src/commands.py b/src/commands.py index 981664fe7..0c56226d7 100644 --- a/src/commands.py +++ b/src/commands.py @@ -67,7 +67,7 @@ def thread(f): t.start() else: f(self, irc, msg, args, *L, **kwargs) - return utils.python.changeFunctionName(newf, f.func_name, f.__doc__) + return utils.python.changeFunctionName(newf, f.__name__, f.__doc__) class ProcessTimeoutError(Exception): """Gets raised when a process is killed due to timeout.""" @@ -219,7 +219,7 @@ def urlSnarfer(f): L = list(L) t = UrlSnarfThread(target=doSnarf, url=url) t.start() - newf = utils.python.changeFunctionName(newf, f.func_name, f.__doc__) + newf = utils.python.changeFunctionName(newf, f.__name__, f.__doc__) return newf @@ -1068,7 +1068,7 @@ class Spec(object): return state def _wrap(f, specList=[], name=None, checkDoc=True, **kw): - name = name or f.func_name + name = name or f.__name__ assert (not checkDoc) or (hasattr(f, '__doc__') and f.__doc__), \ 'Command %r has no docstring.' % name f = internationalizeDocstring(f) @@ -1084,7 +1084,7 @@ def _wrap(f, specList=[], name=None, checkDoc=True, **kw): except TypeError: self.log.error('Spec: %s', specList) self.log.error('Received args: %s', args) - code = f.func_code + code = f.__code__ funcArgs = inspect.getargs(code)[0][len(self.commandArgs):] self.log.error('Extra args: %s', funcArgs) self.log.debug('Make sure you did not wrap a wrapped ' diff --git a/src/irclib.py b/src/irclib.py index 0772fbea9..51aea419d 100644 --- a/src/irclib.py +++ b/src/irclib.py @@ -435,9 +435,9 @@ class IrcState(IrcCommandDispatcher): assert left[0] == '(', 'Odd PREFIX in 005: %s' % s left = left[1:] assert len(left) == len(right), 'Odd PREFIX in 005: %s' % s - return dict(zip(left, right)) + return dict(list(zip(left, right))) else: - return dict(zip('ovh', s)) + return dict(list(zip('ovh', s))) _005converters['prefix'] = _prefixParser del _prefixParser def _maxlistParser(s): @@ -448,7 +448,7 @@ class IrcState(IrcCommandDispatcher): (mode, limit) = pair.split(':', 1) modes += mode limits += (int(limit),) * len(mode) - return dict(zip(modes, limits)) + return dict(list(zip(modes, limits))) _005converters['maxlist'] = _maxlistParser del _maxlistParser def _maxbansParser(s): @@ -461,7 +461,7 @@ class IrcState(IrcCommandDispatcher): (mode, limit) = pair.split(':', 1) modes += mode limits += (int(limit),) * len(mode) - d = dict(zip(modes, limits)) + d = dict(list(zip(modes, limits))) assert 'b' in d return d['b'] else: diff --git a/src/ircutils.py b/src/ircutils.py index c032799c3..33974fcc8 100644 --- a/src/ircutils.py +++ b/src/ircutils.py @@ -97,9 +97,9 @@ def joinHostmask(nick, ident, host): assert nick and ident and host return minisix.intern('%s!%s@%s' % (nick, ident, host)) -_rfc1459trans = utils.str.MultipleReplacer(dict(zip( +_rfc1459trans = utils.str.MultipleReplacer(dict(list(zip( string.ascii_uppercase + r'\[]~', - string.ascii_lowercase + r'|{}^'))) + string.ascii_lowercase + r'|{}^')))) def toLower(s, casemapping=None): """s => s Returns the string s lowered according to IRC case rules.""" diff --git a/src/log.py b/src/log.py index eaf85e120..b5425e4e9 100644 --- a/src/log.py +++ b/src/log.py @@ -346,7 +346,7 @@ def firewall(f, errorHandler=None): logging_function = self.log.exception else: logging_function = exception - logging_function('%s in %s.%s:', s, self.__class__.__name__, f.func_name) + logging_function('%s in %s.%s:', s, self.__class__.__name__, f.__name__) def m(self, *args, **kwargs): try: return f(self, *args, **kwargs) @@ -359,7 +359,7 @@ def firewall(f, errorHandler=None): return errorHandler(self, *args, **kwargs) except Exception as e: logException(self, 'Uncaught exception in errorHandler') - m = utils.python.changeFunctionName(m, f.func_name, f.__doc__) + m = utils.python.changeFunctionName(m, f.__name__, f.__doc__) return m class MetaFirewall(type): diff --git a/src/utils/python.py b/src/utils/python.py index ca704e71a..4b9008204 100644 --- a/src/utils/python.py +++ b/src/utils/python.py @@ -58,8 +58,8 @@ def universalImport(*names): def changeFunctionName(f, name, doc=None): if doc is None: doc = f.__doc__ - newf = types.FunctionType(f.func_code, f.func_globals, name, - f.func_defaults, f.func_closure) + newf = types.FunctionType(f.__code__, f.__globals__, name, + f.__defaults__, f.__closure__) newf.__doc__ = doc return newf @@ -86,7 +86,7 @@ class Synchronized(type): f(self, *args, **kwargs) finally: lock.release() - return changeFunctionName(g, f.func_name, f.__doc__) + return changeFunctionName(g, f.__name__, f.__doc__) for attr in sync: if attr in dict: dict[attr] = synchronized(dict[attr]) diff --git a/src/utils/str.py b/src/utils/str.py index a5e49597a..61387c970 100644 --- a/src/utils/str.py +++ b/src/utils/str.py @@ -114,8 +114,8 @@ class MultipleRemover: def __call__(self, s): return self._matcher.sub(lambda m: '', s) -_soundextrans = MultipleReplacer(dict(zip(string.ascii_uppercase, - '01230120022455012623010202'))) +_soundextrans = MultipleReplacer(dict(list(zip(string.ascii_uppercase, + '01230120022455012623010202')))) def soundex(s, length=4): """Returns the soundex hash of a given string. diff --git a/test/test_utils.py b/test/test_utils.py index 1919c1e09..bffb0d0b0 100644 --- a/test/test_utils.py +++ b/test/test_utils.py @@ -479,7 +479,7 @@ class IterTest(SupyTestCase): self.assertEqual(lflatten(range(10)), list(range(10))) twoRanges = list(range(10))*2 twoRanges.sort() - self.assertEqual(lflatten(zip(range(10), range(10))), twoRanges) + self.assertEqual(lflatten(list(zip(range(10), range(10)))), twoRanges) self.assertEqual(lflatten([1, [2, 3], 4]), [1, 2, 3, 4]) self.assertEqual(lflatten([[[[[[[[[[]]]]]]]]]]), []) self.assertEqual(lflatten([1, [2, [3, 4], 5], 6]), [1, 2, 3, 4, 5, 6]) From 1fbdedc7e04e85a292bd5183503da1014b7b66af Mon Sep 17 00:00:00 2001 From: Valentin Lorentz Date: Tue, 21 Jan 2014 10:50:55 +0100 Subject: [PATCH 11/36] Continue accelerating the 2to3 step (remove fix_funcattrs, fix_itertools, and fix_itertools_imports). --- plugins/Games/plugin.py | 4 ++-- plugins/Misc/plugin.py | 7 +++++-- setup.py | 3 +-- src/drivers/Socket.py | 2 +- src/ircdb.py | 2 +- src/ircutils.py | 4 ++-- src/utils/file.py | 2 +- src/utils/gen.py | 4 ++-- src/utils/iter.py | 9 +++++---- src/utils/structures.py | 6 +++--- 10 files changed, 23 insertions(+), 20 deletions(-) diff --git a/plugins/Games/plugin.py b/plugins/Games/plugin.py index 7ab02bb79..7f94cf7c7 100644 --- a/plugins/Games/plugin.py +++ b/plugins/Games/plugin.py @@ -30,7 +30,7 @@ import re import random -from itertools import imap + import supybot.utils as utils from supybot.commands import * @@ -62,7 +62,7 @@ class Games(callbacks.Plugin): For example, 2d6 will roll 2 six-sided dice; 10d10 will roll 10 ten-sided dice. """ - (dice, sides) = imap(int, m.groups()) + (dice, sides) = map(int, m.groups()) if dice > 1000: irc.error(_('You can\'t roll more than 1000 dice.')) elif sides > 100: diff --git a/plugins/Misc/plugin.py b/plugins/Misc/plugin.py index e2be33e8c..7fd39b494 100644 --- a/plugins/Misc/plugin.py +++ b/plugins/Misc/plugin.py @@ -34,7 +34,7 @@ import imp import sys import json import time -from itertools import ifilter + import supybot @@ -52,6 +52,9 @@ from supybot import commands from supybot.i18n import PluginInternationalization, internationalizeDocstring _ = PluginInternationalization('Misc') +if sys.version_info[0] < 3: + from itertools import ifilter as filter + def get_suffix(file): for suffix in imp.get_suffixes(): if file[-len(suffix[0]):] == suffix[0]: @@ -446,7 +449,7 @@ class Misc(callbacks.Plugin): predicates.setdefault('regexp', []).append(f) elif option == 'nolimit': nolimit = True - iterable = ifilter(self._validLastMsg, reversed(irc.state.history)) + iterable = filter(self._validLastMsg, reversed(irc.state.history)) if skipfirst: # Drop the first message only if our current channel is the same as # the channel we've been instructed to look at. diff --git a/setup.py b/setup.py index cdf29a3e6..ed18c0afa 100644 --- a/setup.py +++ b/setup.py @@ -150,9 +150,8 @@ try: fixer_names = ['fix_basestring', 'fix_dict', - 'fix_funcattrs', 'fix_imports', - 'fix_itertools', 'fix_itertools_imports', 'fix_long', + 'fix_long', 'fix_map', 'fix_metaclass', 'fix_methodattrs', 'fix_numliterals', 'fix_types', diff --git a/src/drivers/Socket.py b/src/drivers/Socket.py index 98be09eca..cab96264a 100644 --- a/src/drivers/Socket.py +++ b/src/drivers/Socket.py @@ -131,7 +131,7 @@ class SocketDriver(drivers.IrcDriver, drivers.ServersMixin): while msgs[-1] is not None: msgs.append(self.irc.takeMsg()) del msgs[-1] - self.outbuffer += ''.join(imap(str, msgs)) + self.outbuffer += ''.join(map(str, msgs)) if self.outbuffer: try: if sys.version_info[0] < 3: diff --git a/src/ircdb.py b/src/ircdb.py index 25ae3168a..e1b3cd913 100644 --- a/src/ircdb.py +++ b/src/ircdb.py @@ -150,7 +150,7 @@ class CapabilitySet(set): def __repr__(self): return '%s([%s])' % (self.__class__.__name__, - ', '.join(imap(repr, self))) + ', '.join(map(repr, self))) antiOwner = makeAntiCapability('owner') class UserCapabilitySet(CapabilitySet): diff --git a/src/ircutils.py b/src/ircutils.py index 33974fcc8..0e5aa942d 100644 --- a/src/ircutils.py +++ b/src/ircutils.py @@ -49,7 +49,7 @@ from cStringIO import StringIO as sio from . import utils from . import minisix -from itertools import imap + def debug(s, *args): """Prints a debug string. Most likely replaced by our logging debug.""" @@ -525,7 +525,7 @@ def unDccIP(i): L.append(i % 256) i //= 256 L.reverse() - return '.'.join(imap(str, L)) + return '.'.join(map(str, L)) class IrcString(str): """This class does case-insensitive comparison and hashing of nicks.""" diff --git a/src/utils/file.py b/src/utils/file.py index 6f68cc952..b2a698033 100644 --- a/src/utils/file.py +++ b/src/utils/file.py @@ -105,7 +105,7 @@ def nonCommentLines(fd): yield line def nonEmptyLines(fd): - return ifilter(str.strip, fd) + return filter(str.strip, fd) def nonCommentNonEmptyLines(fd): return nonEmptyLines(nonCommentLines(fd)) diff --git a/src/utils/gen.py b/src/utils/gen.py index 38f0100fd..794264766 100644 --- a/src/utils/gen.py +++ b/src/utils/gen.py @@ -38,7 +38,7 @@ import types import textwrap import traceback import collections -from itertools import imap + from . import crypt from .str import format @@ -302,7 +302,7 @@ class InsensitivePreservingDict(collections.MutableMapping): class NormalizingSet(set): def __init__(self, iterable=()): - iterable = imap(self.normalize, iterable) + iterable = map(self.normalize, iterable) super(NormalizingSet, self).__init__(iterable) def normalize(self, x): diff --git a/src/utils/iter.py b/src/utils/iter.py index 8a9e1fde0..8e84d8915 100644 --- a/src/utils/iter.py +++ b/src/utils/iter.py @@ -36,8 +36,9 @@ from itertools import * # For old plugins ifilter = filter -def ifilterfalse(p, L): - return ifilter(lambda x:not p(x), L) +def filterfalse(p, L): + return filter(lambda x:not p(x), L) +ifilterfalse = filterfalse imap = map def len(iterable): @@ -70,14 +71,14 @@ def partition(p, iterable): def any(p, iterable): """Returns true if any element in iterable satisfies predicate p.""" - for elt in ifilter(p, iterable): + for elt in filter(p, iterable): return True else: return False def all(p, iterable): """Returns true if all elements in iterable satisfy predicate p.""" - for elt in ifilterfalse(p, iterable): + for elt in filterfalse(p, iterable): return False else: return True diff --git a/src/utils/structures.py b/src/utils/structures.py index 6e8e5e371..31e8f561f 100644 --- a/src/utils/structures.py +++ b/src/utils/structures.py @@ -34,7 +34,7 @@ Data structures for Python. import time import types import collections -from itertools import imap + class RingBuffer(object): """Class to represent a fixed-size ring buffer.""" @@ -223,7 +223,7 @@ class queue(object): return False def __repr__(self): - return 'queue([%s])' % ', '.join(imap(repr, self)) + return 'queue([%s])' % ', '.join(map(repr, self)) def __getitem__(self, oidx): if len(self) == 0: @@ -300,7 +300,7 @@ class smallqueue(list): return self[0] def __repr__(self): - return 'smallqueue([%s])' % ', '.join(imap(repr, self)) + return 'smallqueue([%s])' % ', '.join(map(repr, self)) def reset(self): self[:] = [] From 06fdaa792fa14d8210cd036a77df3674dd0ecf2a Mon Sep 17 00:00:00 2001 From: Valentin Lorentz Date: Tue, 21 Jan 2014 10:57:38 +0100 Subject: [PATCH 12/36] Continue accelerating the 2to3 step (remove fix_map). --- plugins/Admin/plugin.py | 2 +- plugins/Aka/plugin.py | 14 +++++++------- plugins/Alias/plugin.py | 6 +++--- plugins/Channel/plugin.py | 2 +- plugins/ChannelStats/plugin.py | 2 +- plugins/Games/plugin.py | 2 +- plugins/Google/plugin.py | 2 +- plugins/Karma/plugin.py | 4 ++-- plugins/Lart/plugin.py | 2 +- plugins/Math/plugin.py | 2 +- plugins/MessageParser/plugin.py | 6 +++--- plugins/Misc/plugin.py | 2 +- plugins/MoobotFactoids/plugin.py | 10 +++++----- plugins/Plugin/plugin.py | 2 +- plugins/Praise/plugin.py | 2 +- plugins/Relay/plugin.py | 4 ++-- plugins/Seen/plugin.py | 2 +- plugins/Unix/plugin.py | 2 +- plugins/User/plugin.py | 4 ++-- plugins/Utilities/plugin.py | 2 +- setup.py | 2 +- src/callbacks.py | 10 +++++----- src/commands.py | 2 +- src/ircutils.py | 2 +- src/registry.py | 6 +++--- src/utils/gen.py | 2 +- test/test_ircmsgs.py | 2 +- 27 files changed, 50 insertions(+), 50 deletions(-) diff --git a/plugins/Admin/plugin.py b/plugins/Admin/plugin.py index c71afcdf5..4c8411695 100644 --- a/plugins/Admin/plugin.py +++ b/plugins/Admin/plugin.py @@ -351,7 +351,7 @@ class Admin(callbacks.Plugin): """ # XXX Add the expirations. if ircdb.ignores.hostmasks: - irc.reply(format('%L', (map(repr,ircdb.ignores.hostmasks)))) + irc.reply(format('%L', (list(map(repr,ircdb.ignores.hostmasks))))) else: irc.reply(_('I\'m not currently globally ignoring anyone.')) list = wrap(list) diff --git a/plugins/Aka/plugin.py b/plugins/Aka/plugin.py index 9b943f63a..e695b939e 100644 --- a/plugins/Aka/plugin.py +++ b/plugins/Aka/plugin.py @@ -212,7 +212,7 @@ class RecursiveAlias(AkaError): dollarRe = re.compile(r'\$(\d+)') def findBiggestDollar(alias): dollars = dollarRe.findall(alias) - dollars = map(int, dollars) + dollars = list(map(int, dollars)) dollars.sort() if dollars: return dollars[-1] @@ -222,7 +222,7 @@ def findBiggestDollar(alias): atRe = re.compile(r'@(\d+)') def findBiggestAt(alias): ats = atRe.findall(alias) - ats = map(int, ats) + ats = list(map(int, ats)) ats.sort() if ats: return ats[-1] @@ -259,15 +259,15 @@ class Aka(callbacks.Plugin): def listCommands(self): channel = dynamic.channel or 'global' - return list(set(map(callbacks.formatCommand, + return list(set(list(map(callbacks.formatCommand, self._db.get_aka_list(channel) + - self._db.get_aka_list('global')) + + self._db.get_aka_list('global'))) + ['add', 'remove', 'lock', 'unlock', 'importaliasdatabase'])) def getCommand(self, args, check_other_plugins=True): canonicalName = callbacks.canonicalName # All the code from here to the 'for' loop is copied from callbacks.py - assert args == map(canonicalName, args) + assert args == list(map(canonicalName, args)) first = args[0] for cb in self.cbs: if first == cb.canonicalName(): @@ -302,7 +302,7 @@ class Aka(callbacks.Plugin): args = getArgs(args, required=biggestDollar, optional=biggestAt, wildcard=wildcard) max_len = conf.supybot.reply.maximumLength() - args = list(map(lambda x:x[:max_len], args)) + args = list([x[:max_len] for x in args]) def regexpReplace(m): idx = int(m.group(1)) return args[idx-1] @@ -512,7 +512,7 @@ class Aka(callbacks.Plugin): if errors: irc.error(format(_('Error occured when importing the %n: %L'), (len(errors), 'following', 'command'), - map(lambda x:'%s (%s)' % x, errors.items()))) + ['%s (%s)' % x for x in errors.items()])) else: irc.replySuccess() importaliasdatabase = wrap(importaliasdatabase, ['owner']) diff --git a/plugins/Alias/plugin.py b/plugins/Alias/plugin.py index 136259f63..d5d3084f3 100644 --- a/plugins/Alias/plugin.py +++ b/plugins/Alias/plugin.py @@ -87,7 +87,7 @@ class RecursiveAlias(AliasError): dollarRe = re.compile(r'\$(\d+)') def findBiggestDollar(alias): dollars = dollarRe.findall(alias) - dollars = map(int, dollars) + dollars = list(map(int, dollars)) dollars.sort() if dollars: return dollars[-1] @@ -97,7 +97,7 @@ def findBiggestDollar(alias): atRe = re.compile(r'@(\d+)') def findBiggestAt(alias): ats = atRe.findall(alias) - ats = map(int, ats) + ats = list(map(int, ats)) ats.sort() if ats: return ats[-1] @@ -179,7 +179,7 @@ def makeNewAlias(name, alias): args = getArgs(args, required=biggestDollar, optional=biggestAt, wildcard=wildcard) max_len = conf.supybot.reply.maximumLength() - args = list(map(lambda x:x[:max_len], args)) + args = list([x[:max_len] for x in args]) def regexpReplace(m): idx = int(m.group(1)) return args[idx-1] diff --git a/plugins/Channel/plugin.py b/plugins/Channel/plugin.py index 9a32d8b4f..44020c1cb 100644 --- a/plugins/Channel/plugin.py +++ b/plugins/Channel/plugin.py @@ -667,7 +667,7 @@ class Channel(callbacks.Plugin): irc.reply(s) else: L = sorted(c.ignores) - irc.reply(utils.str.commaAndify(map(repr, L))) + irc.reply(utils.str.commaAndify(list(map(repr, L)))) list = wrap(list, ['op']) class capability(callbacks.Commands): diff --git a/plugins/ChannelStats/plugin.py b/plugins/ChannelStats/plugin.py index e2b3e6fec..ee7d5de0a 100644 --- a/plugins/ChannelStats/plugin.py +++ b/plugins/ChannelStats/plugin.py @@ -135,7 +135,7 @@ class StatsDB(plugins.ChannelUserDB): return v.values() def deserialize(self, channel, id, L): - L = map(int, L) + L = list(map(int, L)) if id == 'channelStats': return ChannelStat(*L) else: diff --git a/plugins/Games/plugin.py b/plugins/Games/plugin.py index 7f94cf7c7..1ab43e628 100644 --- a/plugins/Games/plugin.py +++ b/plugins/Games/plugin.py @@ -62,7 +62,7 @@ class Games(callbacks.Plugin): For example, 2d6 will roll 2 six-sided dice; 10d10 will roll 10 ten-sided dice. """ - (dice, sides) = map(int, m.groups()) + (dice, sides) = list(map(int, m.groups())) if dice > 1000: irc.error(_('You can\'t roll more than 1000 dice.')) elif sides > 100: diff --git a/plugins/Google/plugin.py b/plugins/Google/plugin.py index 17d033e1c..a42e72828 100644 --- a/plugins/Google/plugin.py +++ b/plugins/Google/plugin.py @@ -143,7 +143,7 @@ class Google(callbacks.PluginRegexp): results.append(url) if sys.version_info[0] < 3: repl = lambda x:x if isinstance(x, unicode) else unicode(x, 'utf8') - results = map(repl, results) + results = list(map(repl, results)) if not results: return [_('No matches found.')] elif onetoone: diff --git a/plugins/Karma/plugin.py b/plugins/Karma/plugin.py index 3d1a46d94..3e4370a4a 100644 --- a/plugins/Karma/plugin.py +++ b/plugins/Karma/plugin.py @@ -88,12 +88,12 @@ class SqliteKarmaDB(object): if len(results) == 0: return None else: - return map(int, results[0]) + return list(map(int, results[0])) def gets(self, channel, things): db = self._getDb(channel) cursor = db.cursor() - normalizedThings = dict(list(zip(map(lambda s: s.lower(), things), things))) + normalizedThings = dict(list(zip([s.lower() for s in things], things))) criteria = ' OR '.join(['normalized=?'] * len(normalizedThings)) sql = """SELECT name, added-subtracted FROM karma WHERE %s ORDER BY added-subtracted DESC""" % criteria diff --git a/plugins/Lart/plugin.py b/plugins/Lart/plugin.py index aed197614..4bc3f5ee3 100644 --- a/plugins/Lart/plugin.py +++ b/plugins/Lart/plugin.py @@ -56,7 +56,7 @@ class Lart(plugins.ChannelIdDatabasePlugin): only necessary if the message isn't sent in the channel itself. """ if ' for ' in text: - (target, reason) = map(str.strip, text.split(' for ', 1)) + (target, reason) = list(map(str.strip, text.split(' for ', 1))) else: (target, reason) = (text, '') if id is not None: diff --git a/plugins/Math/plugin.py b/plugins/Math/plugin.py index d23566b29..123f4b0ff 100644 --- a/plugins/Math/plugin.py +++ b/plugins/Math/plugin.py @@ -308,7 +308,7 @@ class Math(callbacks.Plugin): if len(stack) == 1: irc.reply(str(self._complexToString(complex(stack[0])))) else: - s = ', '.join(map(self._complexToString, map(complex, stack))) + s = ', '.join(map(self._complexToString, list(map(complex, stack)))) irc.reply(_('Stack: [%s]') % s) @internationalizeDocstring diff --git a/plugins/MessageParser/plugin.py b/plugins/MessageParser/plugin.py index 0ad7160aa..825502959 100644 --- a/plugins/MessageParser/plugin.py +++ b/plugins/MessageParser/plugin.py @@ -161,7 +161,7 @@ class MessageParser(callbacks.Plugin, plugins.ChannelDBHandler): cursor.execute("SELECT regexp, action FROM triggers") # Fetch results and prepend channel name or 'global'. This # prevents duplicating the following lines. - results.extend(map(lambda x: (channel,)+x, cursor.fetchall())) + results.extend([(channel,)+x for x in cursor.fetchall()]) if len(results) == 0: return max_triggers = self.registryValue('maxTriggers', channel) @@ -206,7 +206,7 @@ class MessageParser(callbacks.Plugin, plugins.ChannelDBHandler): cursor.execute("SELECT id, usage_count, locked FROM triggers WHERE regexp=?", (regexp,)) results = cursor.fetchall() if len(results) != 0: - (id, usage_count, locked) = map(int, results[0]) + (id, usage_count, locked) = list(map(int, results[0])) else: locked = 0 usage_count = 0 @@ -252,7 +252,7 @@ class MessageParser(callbacks.Plugin, plugins.ChannelDBHandler): cursor.execute(sql, (regexp,)) results = cursor.fetchall() if len(results) != 0: - (id, locked) = map(int, results[0]) + (id, locked) = list(map(int, results[0])) else: irc.error(_('There is no such regexp trigger.')) return diff --git a/plugins/Misc/plugin.py b/plugins/Misc/plugin.py index 7fd39b494..28219fbdd 100644 --- a/plugins/Misc/plugin.py +++ b/plugins/Misc/plugin.py @@ -285,7 +285,7 @@ class Misc(callbacks.Plugin): You may also want to use the 'list' command to list all available plugins and commands. """ - command = map(callbacks.canonicalName, command) + command = list(map(callbacks.canonicalName, command)) (maxL, cbs) = irc.findCallbacksForArgs(command) if maxL == command: if len(cbs) > 1: diff --git a/plugins/MoobotFactoids/plugin.py b/plugins/MoobotFactoids/plugin.py index e1f8bb5cc..cff4186ad 100755 --- a/plugins/MoobotFactoids/plugin.py +++ b/plugins/MoobotFactoids/plugin.py @@ -54,9 +54,9 @@ class OptionList(object): return '(%s' % ''.join(ret) #) elif token == ')': if '|' in ret: - L = map(''.join, + L = list(map(''.join, utils.iter.split('|'.__eq__, ret, - yieldEmpty=True)) + yieldEmpty=True))) return utils.iter.choice(L) else: return '(%s)' % ''.join(ret) @@ -377,7 +377,7 @@ class MoobotFactoids(callbacks.Plugin): tokens) s = _('Missing an \'is\' or \'_is_\'.') raise ValueError(s) - (key, newfact) = map(' '.join, utils.iter.split(p, tokens, maxsplit=1)) + (key, newfact) = list(map(' '.join, utils.iter.split(p, tokens, maxsplit=1))) key = self._sanitizeKey(key) return (key, newfact) @@ -397,8 +397,8 @@ class MoobotFactoids(callbacks.Plugin): def changeFactoid(self, irc, msg, tokens): id = self._getUserId(irc, msg.prefix) - (key, regexp) = map(' '.join, - utils.iter.split('=~'.__eq__, tokens, maxsplit=1)) + (key, regexp) = list(map(' '.join, + utils.iter.split('=~'.__eq__, tokens, maxsplit=1))) channel = plugins.getChannel(msg.args[0]) # Check and make sure it's in the DB fact = self._getFactoid(irc, channel, key) diff --git a/plugins/Plugin/plugin.py b/plugins/Plugin/plugin.py index 6bb7ac73d..79151f783 100644 --- a/plugins/Plugin/plugin.py +++ b/plugins/Plugin/plugin.py @@ -98,7 +98,7 @@ class Plugin(callbacks.Plugin): plugin = wrap(plugin, [many('something')]) def _findCallbacks(self, irc, command): - command = map(callbacks.canonicalName, command) + command = list(map(callbacks.canonicalName, command)) plugin_list = [] for cb in irc.callbacks: if not hasattr(cb, 'getCommand'): diff --git a/plugins/Praise/plugin.py b/plugins/Praise/plugin.py index f34ac8993..ad054bb94 100644 --- a/plugins/Praise/plugin.py +++ b/plugins/Praise/plugin.py @@ -61,7 +61,7 @@ class Praise(plugins.ChannelIdDatabasePlugin): sent in the channel itself. """ if ' for ' in text: - (target, reason) = map(str.strip, text.split(' for ', 1)) + (target, reason) = list(map(str.strip, text.split(' for ', 1))) else: (target, reason) = (text, '') if ircutils.strEqual(target, irc.nick): diff --git a/plugins/Relay/plugin.py b/plugins/Relay/plugin.py index dba7e4ea4..3224ac7e6 100644 --- a/plugins/Relay/plugin.py +++ b/plugins/Relay/plugin.py @@ -171,8 +171,8 @@ class Relay(callbacks.Plugin): utils.sortBy(ircutils.toLower, voices) utils.sortBy(ircutils.toLower, halfops) utils.sortBy(ircutils.toLower, usersS) - usersS = ', '.join(filter(None, map(', '.join, - (ops,halfops,voices,usersS)))) + usersS = ', '.join(filter(None, list(map(', '.join, + (ops,halfops,voices,usersS))))) users.append(format('%s (%i): %s', ircutils.bold(network), numUsers, usersS)) users.sort() diff --git a/plugins/Seen/plugin.py b/plugins/Seen/plugin.py index 65542ae0e..f3491afa7 100644 --- a/plugins/Seen/plugin.py +++ b/plugins/Seen/plugin.py @@ -369,7 +369,7 @@ class Seen(callbacks.Plugin): msgs = [m for m in irc.state.history[i:end] if m.command == 'PRIVMSG' and ircutils.strEqual(m.args[0], channel)] if msgs: - irc.reply(format('%L', map(ircmsgs.prettyPrint, msgs))) + irc.reply(format('%L', list(map(ircmsgs.prettyPrint, msgs)))) else: irc.reply(format(_('Either %s didn\'t leave, ' 'or no messages were sent while %s was gone.'), nick, nick)) diff --git a/plugins/Unix/plugin.py b/plugins/Unix/plugin.py index 2a8fa77f4..4816f2b21 100644 --- a/plugins/Unix/plugin.py +++ b/plugins/Unix/plugin.py @@ -220,7 +220,7 @@ class Unix(callbacks.Plugin): (out, err) = inst.communicate() inst.wait() lines = out.splitlines() - lines = map(str.rstrip, lines) + lines = list(map(str.rstrip, lines)) lines = filter(None, lines) irc.replies(lines, joiner=' ') else: diff --git a/plugins/User/plugin.py b/plugins/User/plugin.py index fa4b17721..4513d001b 100644 --- a/plugins/User/plugin.py +++ b/plugins/User/plugin.py @@ -280,7 +280,7 @@ class User(callbacks.Plugin): command. """ def getHostmasks(user): - hostmasks = map(repr, user.hostmasks) + hostmasks = list(map(repr, user.hostmasks)) if hostmasks: hostmasks.sort() return format('%L', hostmasks) @@ -507,7 +507,7 @@ class User(callbacks.Plugin): prefix, expiry = self._tokens.pop(token) found = False for (id, user) in ircdb.users.items(): - if keyid in map(lambda x:x[-len(keyid):], user.gpgkeys): + if keyid in [x[-len(keyid):] for x in user.gpgkeys]: user.addAuth(msg.prefix) ircdb.users.setUser(user, flush=False) irc.reply(_('You are now authenticated as %s.') % diff --git a/plugins/Utilities/plugin.py b/plugins/Utilities/plugin.py index 3050e4afd..ee3807821 100644 --- a/plugins/Utilities/plugin.py +++ b/plugins/Utilities/plugin.py @@ -135,7 +135,7 @@ class Utilities(callbacks.Plugin): args = [token and token or '""' for token in rest] text = ' '.join(args) commands = command.split() - commands = map(callbacks.canonicalName, commands) + commands = list(map(callbacks.canonicalName, commands)) tokens = callbacks.tokenize(text) allTokens = commands + tokens self.Proxy(irc, msg, allTokens) diff --git a/setup.py b/setup.py index ed18c0afa..1cf932e5b 100644 --- a/setup.py +++ b/setup.py @@ -152,7 +152,7 @@ try: 'fix_dict', 'fix_imports', 'fix_long', - 'fix_map', 'fix_metaclass', 'fix_methodattrs', + 'fix_metaclass', 'fix_methodattrs', 'fix_numliterals', 'fix_types', 'fix_unicode', 'fix_urllib', 'fix_xrange'] diff --git a/src/callbacks.py b/src/callbacks.py index f3300f3d7..5e675071e 100644 --- a/src/callbacks.py +++ b/src/callbacks.py @@ -91,7 +91,7 @@ def _addressed(nick, msg, prefixChars=None, nicks=None, return payload[1:].strip() if nicks is None: nicks = get(conf.supybot.reply.whenAddressedBy.nicks) - nicks = map(ircutils.toLower, nicks) + nicks = list(map(ircutils.toLower, nicks)) else: nicks = list(nicks) # Just in case. nicks.insert(0, ircutils.toLower(nick)) @@ -738,7 +738,7 @@ class NestedCommandsIrcProxy(ReplyIrcProxy): """Returns a two-tuple of (command, plugins) that has the command (a list of strings) and the plugins for which it was a command.""" assert isinstance(args, list) - args = map(canonicalName, args) + args = list(map(canonicalName, args)) cbs = [] maxL = [] for cb in self.irc.callbacks: @@ -783,7 +783,7 @@ class NestedCommandsIrcProxy(ReplyIrcProxy): # 3. Whether an importantPlugin is one of the responses. important = defaultPlugins.importantPlugins() - important = map(canonicalName, important) + important = list(map(canonicalName, important)) importants = [] for cb in cbs: if cb.canonicalName() in important: @@ -1188,7 +1188,7 @@ class Commands(BasePlugin): return self.getCommand(command) == command def getCommand(self, args, stripOwnName=True): - assert args == map(canonicalName, args) + assert args == list(map(canonicalName, args)) first = args[0] for cb in self.cbs: if first == cb.canonicalName(): @@ -1206,7 +1206,7 @@ class Commands(BasePlugin): """Gets the given command from this plugin.""" #print '*** %s.getCommandMethod(%r)' % (self.name(), command) assert not isinstance(command, basestring) - assert command == map(canonicalName, command) + assert command == list(map(canonicalName, command)) assert self.getCommand(command) == command for cb in self.cbs: if command[0] == cb.canonicalName(): diff --git a/src/commands.py b/src/commands.py index 0c56226d7..04fe0b120 100644 --- a/src/commands.py +++ b/src/commands.py @@ -917,7 +917,7 @@ class first(context): self.default = kw.pop('default') assert not kw, 'Bad kwargs for first.__init__' self.spec = specs # for __repr__ - self.specs = map(contextify, specs) + self.specs = list(map(contextify, specs)) def __call__(self, irc, msg, args, state): errored = False diff --git a/src/ircutils.py b/src/ircutils.py index 0e5aa942d..9c293e4dc 100644 --- a/src/ircutils.py +++ b/src/ircutils.py @@ -162,7 +162,7 @@ def areReceivers(s, strictRfc=True, nicklen=None, chantypes='#&+!', nick = functools.partial(isNick, strictRfc=strictRfc, nicklen=nicklen) chan = functools.partial(isChannel, chantypes=chantypes, channellen=channellen) - return all(map(lambda x:nick(x) or chan(x), s.split(','))) + return all([nick(x) or chan(x) for x in s.split(',')]) _patternCache = utils.structures.CacheDict(1000) def _hostmaskPatternEqual(pattern, hostmask): diff --git a/src/registry.py b/src/registry.py index b6779c636..ef67c4264 100644 --- a/src/registry.py +++ b/src/registry.py @@ -169,7 +169,7 @@ def unescape(name): _splitRe = re.compile(r'(? Date: Tue, 21 Jan 2014 13:43:33 +0100 Subject: [PATCH 13/36] Switch comments of callbacks.PluginRegexp's attributes to docstrings (for Sphinx). --- src/callbacks.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/callbacks.py b/src/callbacks.py index 420f94e2d..074211a73 100644 --- a/src/callbacks.py +++ b/src/callbacks.py @@ -1411,15 +1411,15 @@ class PluginRegexp(Plugin): the bot is addressed, or triggered only when the bot isn't addressed. """ flags = re.I - # 'regexps' methods are called whether the message is addressed or not. regexps = () - # 'addressedRegexps' methods are called only when the message is addressed, - # and then, only with the payload (i.e., what is returned from the - # 'addressed' function. + """'regexps' methods are called whether the message is addressed or not.""" addressedRegexps = () - # 'unaddressedRegexps' methods are called only when the message is *not* - # addressed. + """'addressedRegexps' methods are called only when the message is addressed, + and then, only with the payload (i.e., what is returned from the + 'addressed' function.""" unaddressedRegexps = () + """'unaddressedRegexps' methods are called only when the message is *not* + addressed.""" Proxy = SimpleProxy def __init__(self, irc): self.__parent = super(PluginRegexp, self) From 3af1e3f42d9a5e800952d42a4adf627f0427c42c Mon Sep 17 00:00:00 2001 From: Valentin Lorentz Date: Tue, 21 Jan 2014 16:33:35 +0100 Subject: [PATCH 14/36] Fix internationalization of docstrings of wrap()ed commands. --- src/commands.py | 4 ++-- test/test_i18n.py | 9 +++++++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/commands.py b/src/commands.py index 3ee2ff546..29c605239 100644 --- a/src/commands.py +++ b/src/commands.py @@ -1071,7 +1071,6 @@ def _wrap(f, specList=[], name=None, checkDoc=True, **kw): name = name or f.func_name assert (not checkDoc) or (hasattr(f, '__doc__') and f.__doc__), \ 'Command %r has no docstring.' % name - f = internationalizeDocstring(f) spec = Spec(specList, **kw) def newf(self, irc, msg, args, **kwargs): state = spec(irc, msg, args, stateAttrs={'cb': self, 'log': self.log}) @@ -1090,7 +1089,8 @@ def _wrap(f, specList=[], name=None, checkDoc=True, **kw): self.log.debug('Make sure you did not wrap a wrapped ' 'function ;)') raise - return utils.python.changeFunctionName(newf, name, f.__doc__) + newf2 = utils.python.changeFunctionName(newf, name, f.__doc__) + return internationalizeDocstring(newf2) def wrap(f, *args, **kwargs): if callable(f): diff --git a/test/test_i18n.py b/test/test_i18n.py index c4ec68ad8..a4f6582b6 100644 --- a/test/test_i18n.py +++ b/test/test_i18n.py @@ -29,6 +29,7 @@ ### from supybot.test import * +from supybot.commands import wrap from supybot.i18n import PluginInternationalization, internationalizeDocstring import supybot.conf as conf @@ -42,6 +43,11 @@ def foo(): """The operation succeeded.""" pass +@wrap +def bar(): + """The operation succeeded.""" + pass + class I18nTestCase(SupyTestCase): def testPluginInternationalization(self): self.assertEqual(_(msg_en), msg_en) @@ -54,6 +60,9 @@ class I18nTestCase(SupyTestCase): def testDocstring(self): self.assertEqual(foo.__doc__, msg_en) + self.assertEqual(bar.__doc__, msg_en) with conf.supybot.language.context('fr'): self.assertEqual(foo.__doc__, msg_fr) + self.assertEqual(bar.__doc__, msg_fr) self.assertEqual(foo.__doc__, msg_en) + self.assertEqual(bar.__doc__, msg_en) From 35c7b52e14070ff0180d40d3abbdf556afe16c66 Mon Sep 17 00:00:00 2001 From: Valentin Lorentz Date: Tue, 21 Jan 2014 16:36:45 +0100 Subject: [PATCH 15/36] Remove unnecessary call to i18n.reloadLocalesIfRequired. --- src/i18n.py | 1 - 1 file changed, 1 deletion(-) diff --git a/src/i18n.py b/src/i18n.py index f1aa9d5a4..13452db02 100644 --- a/src/i18n.py +++ b/src/i18n.py @@ -243,7 +243,6 @@ class _PluginInternationalization: return untranslated._original escapedUntranslated = self._unescape(untranslated, True) untranslated = self._unescape(untranslated, False) - reloadLocalesIfRequired() try: string = self._translate(escapedUntranslated) return self._addTracker(string, untranslated) From 8b06bd52f0b69a579c04925fef9fa015a5289223 Mon Sep 17 00:00:00 2001 From: Valentin Lorentz Date: Tue, 21 Jan 2014 16:48:13 +0100 Subject: [PATCH 16/36] All plugins: Update .pot files and rename Supybot-fr to Limnora in French translation files. --- locales/fr.po | 2 +- plugins/Admin/locales/fr.po | 2 +- plugins/Admin/messages.pot | 4 +- plugins/Aka/messages.pot | 65 ++++-- plugins/Alias/locales/fr.po | 4 +- plugins/Alias/messages.pot | 28 +-- plugins/Anonymous/locales/fr.po | 4 +- plugins/Anonymous/messages.pot | 16 +- plugins/AutoMode/locales/fr.po | 2 +- plugins/AutoMode/messages.pot | 27 ++- plugins/BadWords/locales/fr.po | 4 +- plugins/BadWords/messages.pot | 32 +-- plugins/Channel/locales/fr.po | 4 +- plugins/Channel/messages.pot | 170 +++++++-------- plugins/ChannelLogger/locales/fr.po | 4 +- plugins/ChannelLogger/messages.pot | 2 +- plugins/ChannelStats/messages.pot | 2 +- plugins/Conditional/locales/fr.po | 2 +- plugins/Conditional/messages.pot | 2 +- plugins/Config/locales/fr.po | 4 +- plugins/Config/messages.pot | 2 +- plugins/Ctcp/locales/fr.po | 4 +- plugins/Ctcp/messages.pot | 18 +- plugins/Dict/locales/fr.po | 4 +- plugins/Dict/messages.pot | 18 +- plugins/Dunno/locales/fr.po | 4 +- plugins/Dunno/messages.pot | 2 +- plugins/Factoids/locales/fr.po | 4 +- plugins/Factoids/messages.pot | 2 +- plugins/Filter/locales/fr.po | 4 +- plugins/Filter/messages.pot | 196 ++++++++--------- plugins/Format/locales/fr.po | 4 +- plugins/Format/messages.pot | 2 +- plugins/Games/messages.pot | 42 ++-- plugins/Google/locales/fr.po | 4 +- plugins/Google/messages.pot | 34 ++- plugins/Herald/locales/fr.po | 4 +- plugins/Herald/messages.pot | 2 +- plugins/Internet/locales/fr.po | 4 +- plugins/Internet/messages.pot | 28 +-- plugins/Karma/locales/fr.po | 4 +- plugins/Karma/messages.pot | 2 +- plugins/Lart/locales/fr.po | 4 +- plugins/Lart/messages.pot | 2 +- plugins/Later/locales/fr.po | 4 +- plugins/Later/messages.pot | 6 +- plugins/Limiter/locales/fr.po | 4 +- plugins/Limiter/messages.pot | 2 +- plugins/Math/locales/fr.po | 4 +- plugins/Math/messages.pot | 40 ++-- plugins/MessageParser/locales/fr.po | 2 +- plugins/MessageParser/messages.pot | 2 +- plugins/Misc/locales/fr.po | 300 +++++++++++++++++--------- plugins/Misc/messages.pot | 84 ++++---- plugins/MoobotFactoids/locales/fr.po | 4 +- plugins/MoobotFactoids/messages.pot | 92 ++++---- plugins/Network/locales/fr.po | 4 +- plugins/Network/messages.pot | 2 +- plugins/News/locales/fr.po | 4 +- plugins/News/messages.pot | 2 +- plugins/NickAuth/messages.pot | 2 +- plugins/NickCapture/locales/fr.po | 4 +- plugins/NickCapture/messages.pot | 2 +- plugins/Nickometer/locales/fr.po | 4 +- plugins/Nickometer/messages.pot | 6 +- plugins/Note/locales/fr.po | 4 +- plugins/Note/messages.pot | 6 +- plugins/Owner/locales/fr.po | 4 +- plugins/Owner/messages.pot | 34 +-- plugins/Plugin/locales/fr.po | 4 +- plugins/Plugin/messages.pot | 2 +- plugins/PluginDownloader/messages.pot | 2 +- plugins/Praise/locales/fr.po | 4 +- plugins/Praise/messages.pot | 2 +- plugins/Protector/locales/fr.po | 4 +- plugins/Protector/messages.pot | 2 +- plugins/Quote/locales/fr.po | 4 +- plugins/Quote/messages.pot | 2 +- plugins/QuoteGrabs/locales/fr.po | 4 +- plugins/QuoteGrabs/messages.pot | 40 ++-- plugins/RSS/locales/fr.po | 4 +- plugins/RSS/messages.pot | 30 +-- plugins/Relay/locales/fr.po | 4 +- plugins/Relay/messages.pot | 2 +- plugins/Reply/locales/fr.po | 4 +- plugins/Reply/messages.pot | 2 +- plugins/Scheduler/locales/fr.po | 4 +- plugins/Scheduler/messages.pot | 2 +- plugins/Seen/locales/fr.po | 4 +- plugins/Seen/messages.pot | 2 +- plugins/Services/locales/fr.po | 4 +- plugins/Services/messages.pot | 36 ++-- plugins/ShrinkUrl/locales/fr.po | 4 +- plugins/ShrinkUrl/messages.pot | 2 +- plugins/Status/locales/fr.po | 4 +- plugins/Status/messages.pot | 2 +- plugins/String/locales/fr.po | 4 +- plugins/String/messages.pot | 2 +- plugins/Success/locales/fr.po | 4 +- plugins/Success/messages.pot | 2 +- plugins/Time/locales/fr.po | 4 +- plugins/Time/messages.pot | 25 +-- plugins/Todo/locales/fr.po | 4 +- plugins/Todo/messages.pot | 10 +- plugins/Topic/locales/fr.po | 4 +- plugins/Topic/messages.pot | 2 +- plugins/URL/locales/fr.po | 4 +- plugins/URL/messages.pot | 2 +- plugins/Unix/locales/fr.po | 2 +- plugins/Unix/messages.pot | 52 ++--- plugins/User/locales/fr.po | 4 +- plugins/User/messages.pot | 2 +- plugins/Utilities/locales/fr.po | 4 +- plugins/Utilities/messages.pot | 2 +- plugins/Web/locales/fr.po | 4 +- plugins/Web/messages.pot | 40 ++-- 116 files changed, 946 insertions(+), 807 deletions(-) diff --git a/locales/fr.po b/locales/fr.po index 99adc6e17..f56c693a3 100644 --- a/locales/fr.po +++ b/locales/fr.po @@ -1,7 +1,7 @@ # Valentin Lorentz , 2012. msgid "" msgstr "" -"Project-Id-Version: Supybot-fr\n" +"Project-Id-Version: Limnoria\n" "POT-Creation-Date: 2013-04-21 16:00+CEST\n" "PO-Revision-Date: 2013-04-21 16:01+0100\n" "Last-Translator: Valentin Lorentz \n" diff --git a/plugins/Admin/locales/fr.po b/plugins/Admin/locales/fr.po index 6bf4ebe5e..e3030d805 100644 --- a/plugins/Admin/locales/fr.po +++ b/plugins/Admin/locales/fr.po @@ -1,6 +1,6 @@ msgid "" msgstr "" -"Project-Id-Version: Supybot-fr\n" +"Project-Id-Version: Limnoria\n" "POT-Creation-Date: 2011-10-30 19:20+CET\n" "PO-Revision-Date: \n" "Last-Translator: Valentin Lorentz \n" diff --git a/plugins/Admin/messages.pot b/plugins/Admin/messages.pot index f5aa6961e..b8760db8a 100644 --- a/plugins/Admin/messages.pot +++ b/plugins/Admin/messages.pot @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2013-07-25 11:34+CEST\n" +"POT-Creation-Date: 2014-01-21 16:39+CET\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -185,7 +185,7 @@ msgstr "" msgid "I'm not currently globally ignoring anyone." msgstr "" -#: plugin.py:362 +#: plugin.py:360 plugin.py:371 #, docstring msgid "" "takes no arguments\n" diff --git a/plugins/Aka/messages.pot b/plugins/Aka/messages.pot index 1d292bde4..724a94a46 100644 --- a/plugins/Aka/messages.pot +++ b/plugins/Aka/messages.pot @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2013-07-31 19:09+CEST\n" +"POT-Creation-Date: 2014-01-21 16:39+CET\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -15,57 +15,80 @@ msgstr "" "Generated-By: pygettext.py 1.5\n" -#: plugin.py:124 plugin.py:334 +#: config.py:55 +msgid "" +"The maximum number of words allowed in a\n" +" command name. Setting this to an high value may slow down your bot\n" +" on long commands." +msgstr "" + +#: plugin.py:129 plugin.py:368 msgid "This Aka already exists." msgstr "" -#: plugin.py:149 plugin.py:165 plugin.py:181 +#: plugin.py:156 plugin.py:173 plugin.py:190 msgid "This Aka does not exist" msgstr "" -#: plugin.py:151 +#: plugin.py:158 msgid "This Aka is already locked." msgstr "" -#: plugin.py:167 +#: plugin.py:175 msgid "This Aka is already unlocked." msgstr "" -#: plugin.py:226 +#: plugin.py:235 #, docstring msgid "" "Add the help for \"@plugin help Aka\" here\n" " This should describe *how* to use this plugin." msgstr "" -#: plugin.py:312 +#: plugin.py:342 +msgid "You've attempted more nesting than is currently allowed on this bot." +msgstr "" + +#: plugin.py:346 msgid " at least" msgstr "" -#: plugin.py:321 +#: plugin.py:355 msgid "Locked by %s at %s" msgstr "" -#: plugin.py:324 +#: plugin.py:358 msgid "" "\n" "\n" "Alias for %q.%s" msgstr "" -#: plugin.py:325 +#: plugin.py:359 msgid "argument" msgstr "" -#: plugin.py:331 +#: plugin.py:365 msgid "You can't overwrite commands in this plugin." msgstr "" -#: plugin.py:344 +#: plugin.py:370 +msgid "This Aka has too many spaces in its name." +msgstr "" + +#: plugin.py:375 +msgid "Can't mix $* and optional args (@1, etc.)" +msgstr "" + +#: plugin.py:377 +msgid "There can be only one $* in an alias." +msgstr "" + +#: plugin.py:384 msgid "This Aka is locked." msgstr "" -#: plugin.py:348 +#: plugin.py:388 #, docstring msgid "" "[--channel <#channel>] \n" @@ -80,11 +103,11 @@ msgid "" " " msgstr "" -#: plugin.py:362 plugin.py:388 plugin.py:420 plugin.py:443 +#: plugin.py:402 plugin.py:428 plugin.py:460 plugin.py:483 msgid "%r is not a valid channel." msgstr "" -#: plugin.py:380 +#: plugin.py:420 #, docstring msgid "" "[--channel <#channel>] \n" @@ -93,14 +116,14 @@ msgid "" " " msgstr "" -#: plugin.py:402 +#: plugin.py:442 #, docstring msgid "" "Check if the user has any of the required capabilities to manage\n" " the regexp database." msgstr "" -#: plugin.py:412 +#: plugin.py:452 #, docstring msgid "" "[--channel <#channel>] \n" @@ -109,7 +132,7 @@ msgid "" " " msgstr "" -#: plugin.py:435 +#: plugin.py:475 #, docstring msgid "" "[--channel <#channel>] \n" @@ -118,7 +141,7 @@ msgid "" " " msgstr "" -#: plugin.py:458 +#: plugin.py:498 #, docstring msgid "" "takes no arguments\n" @@ -126,11 +149,11 @@ msgid "" " Imports the Alias database into Aka's, and clean the former." msgstr "" -#: plugin.py:463 +#: plugin.py:503 msgid "Alias plugin is not loaded." msgstr "" -#: plugin.py:473 +#: plugin.py:513 msgid "Error occured when importing the %n: %L" msgstr "" diff --git a/plugins/Alias/locales/fr.po b/plugins/Alias/locales/fr.po index 9fbf6f06b..0141a379d 100644 --- a/plugins/Alias/locales/fr.po +++ b/plugins/Alias/locales/fr.po @@ -1,10 +1,10 @@ msgid "" msgstr "" -"Project-Id-Version: Supybot-fr\n" +"Project-Id-Version: Limnoria\n" "POT-Creation-Date: 2013-03-02 19:04+CET\n" "PO-Revision-Date: \n" "Last-Translator: Valentin Lorentz \n" -"Language-Team: Supybot-fr \n" +"Language-Team: Limnoria \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" diff --git a/plugins/Alias/messages.pot b/plugins/Alias/messages.pot index d5fb476f0..fc99b8ff0 100644 --- a/plugins/Alias/messages.pot +++ b/plugins/Alias/messages.pot @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2012-10-07 18:48+EEST\n" +"POT-Creation-Date: 2014-01-21 16:39+CET\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -15,7 +15,7 @@ msgstr "" "Generated-By: pygettext.py 1.5\n" -#: plugin.py:45 +#: plugin.py:46 #, docstring msgid "" "Returns the channel the msg came over or the channel given in args.\n" @@ -25,29 +25,33 @@ msgid "" " " msgstr "" -#: plugin.py:107 +#: plugin.py:108 #, docstring msgid "" "Encodes [a-z0-9.]+ into [a-z][a-z0-9].\n" " Format: aa(d)+." msgstr "" -#: plugin.py:217 +#: plugin.py:219 +msgid "You've attempted more nesting than is currently allowed on this bot." +msgstr "" + +#: plugin.py:224 msgid " at least" msgstr "" -#: plugin.py:218 +#: plugin.py:226 plugin.py:231 msgid "" "\n" "\n" "Alias for %q." msgstr "" -#: plugin.py:219 +#: plugin.py:227 plugin.py:232 msgid "argument" msgstr "" -#: plugin.py:287 +#: plugin.py:300 #, docstring msgid "" "\n" @@ -56,11 +60,11 @@ msgid "" " " msgstr "" -#: plugin.py:296 plugin.py:310 +#: plugin.py:309 plugin.py:323 msgid "There is no such alias." msgstr "" -#: plugin.py:301 +#: plugin.py:314 #, docstring msgid "" "\n" @@ -69,11 +73,11 @@ msgid "" " " msgstr "" -#: plugin.py:319 +#: plugin.py:335 msgid "That name isn't valid. Try %q instead." msgstr "" -#: plugin.py:363 +#: plugin.py:383 #, docstring msgid "" " \n" @@ -87,7 +91,7 @@ msgid "" " " msgstr "" -#: plugin.py:386 +#: plugin.py:406 #, docstring msgid "" "\n" diff --git a/plugins/Anonymous/locales/fr.po b/plugins/Anonymous/locales/fr.po index 83022e658..cfc1826e4 100644 --- a/plugins/Anonymous/locales/fr.po +++ b/plugins/Anonymous/locales/fr.po @@ -1,10 +1,10 @@ msgid "" msgstr "" -"Project-Id-Version: Supybot-fr\n" +"Project-Id-Version: Limnoria\n" "POT-Creation-Date: 2011-06-09 18:26+CEST\n" "PO-Revision-Date: \n" "Last-Translator: Valentin Lorentz \n" -"Language-Team: Supybot-fr \n" +"Language-Team: Limnoria \n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/plugins/Anonymous/messages.pot b/plugins/Anonymous/messages.pot index 0d3da92d3..053d8efd3 100644 --- a/plugins/Anonymous/messages.pot +++ b/plugins/Anonymous/messages.pot @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2011-06-09 18:26+CEST\n" +"POT-Creation-Date: 2014-01-21 16:39+CET\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -42,7 +42,7 @@ msgid "" " messages to other users." msgstr "" -#: plugin.py:40 +#: plugin.py:41 #, docstring msgid "" "This plugin allows users to act through the bot anonymously. The 'do'\n" @@ -58,23 +58,23 @@ msgid "" " " msgstr "" -#: plugin.py:64 +#: plugin.py:65 msgid "You must be in %s to %q in there." msgstr "" -#: plugin.py:68 +#: plugin.py:69 msgid "I'm lobotomized in %s." msgstr "" -#: plugin.py:71 +#: plugin.py:72 msgid "That channel has set its capabilities so as to disallow the use of this plugin." msgstr "" -#: plugin.py:74 +#: plugin.py:75 msgid "%q cannot be used to send private messages." msgstr "" -#: plugin.py:80 +#: plugin.py:81 #, docstring msgid "" " \n" @@ -84,7 +84,7 @@ msgid "" " " msgstr "" -#: plugin.py:94 +#: plugin.py:95 #, docstring msgid "" " \n" diff --git a/plugins/AutoMode/locales/fr.po b/plugins/AutoMode/locales/fr.po index b9a07776d..ffa9c1442 100644 --- a/plugins/AutoMode/locales/fr.po +++ b/plugins/AutoMode/locales/fr.po @@ -1,7 +1,7 @@ # Valentin Lorentz , 2012. msgid "" msgstr "" -"Project-Id-Version: Supybot-fr\n" +"Project-Id-Version: Limnoria\n" "POT-Creation-Date: 2013-03-03 19:39+CET\n" "PO-Revision-Date: 2013-03-03 19:45+0100\n" "Last-Translator: Valentin Lorentz \n" diff --git a/plugins/AutoMode/messages.pot b/plugins/AutoMode/messages.pot index 52bff0bdf..f7a6d2483 100644 --- a/plugins/AutoMode/messages.pot +++ b/plugins/AutoMode/messages.pot @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2012-10-07 18:54+EEST\n" +"POT-Creation-Date: 2014-01-21 16:39+CET\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -29,60 +29,67 @@ msgstr "" #: config.py:52 msgid "" +"Determines whether the bot will\n" +" check for 'alternative capabilities' (ie. autoop, autohalfop,\n" +" autovoice) in addition to/instead of classic ones." +msgstr "" + +#: config.py:56 +msgid "" "Determines whether the bot will \"fall\n" " through\" to halfop/voicing when auto-opping is turned off but\n" " auto-halfopping/voicing are turned on." msgstr "" -#: config.py:56 +#: config.py:60 msgid "" "Determines whether the bot will automatically\n" " op people with the ,op capability when they join the channel.\n" " " msgstr "" -#: config.py:60 +#: config.py:64 msgid "" "Determines whether the bot will automatically\n" " halfop people with the ,halfop capability when they join the\n" " channel." msgstr "" -#: config.py:64 +#: config.py:68 msgid "" "Determines whether the bot will automatically\n" " voice people with the ,voice capability when they join the\n" " channel." msgstr "" -#: config.py:68 +#: config.py:72 msgid "" "Determines whether the bot will automatically\n" " ban people who join the channel and are on the banlist." msgstr "" -#: config.py:71 +#: config.py:75 msgid "" "Determines how many seconds the bot\n" " will automatically ban a person when banning." msgstr "" -#: config.py:75 +#: config.py:79 msgid "" "Determines how many seconds the bot will wait\n" " before applying a mode. Has no effect on bans." msgstr "" -#: config.py:79 +#: config.py:83 msgid "" "Extra modes that will be\n" " applied to a user. Example syntax: user1+o-v user2+v user3-v" msgstr "" -#: plugin.py:64 +#: plugin.py:78 #, docstring msgid "" "Determines whether or not a mode has already\n" -" been applied." +" been applied." msgstr "" diff --git a/plugins/BadWords/locales/fr.po b/plugins/BadWords/locales/fr.po index f602542ce..17c39096b 100644 --- a/plugins/BadWords/locales/fr.po +++ b/plugins/BadWords/locales/fr.po @@ -1,10 +1,10 @@ msgid "" msgstr "" -"Project-Id-Version: Supybot-fr\n" +"Project-Id-Version: Limnoria\n" "POT-Creation-Date: 2011-02-26 09:49+CET\n" "PO-Revision-Date: \n" "Last-Translator: Valentin Lorentz \n" -"Language-Team: Supybot-fr \n" +"Language-Team: Limnoria \n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/plugins/BadWords/messages.pot b/plugins/BadWords/messages.pot index bb63481d2..6b7f6ad16 100644 --- a/plugins/BadWords/messages.pot +++ b/plugins/BadWords/messages.pot @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2012-03-11 20:58+UTC\n" +"POT-Creation-Date: 2014-01-21 16:39+CET\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -15,21 +15,21 @@ msgstr "" "Generated-By: pygettext.py 1.5\n" -#: config.py:40 +#: config.py:42 msgid "Would you like to add some bad words?" msgstr "" -#: config.py:41 +#: config.py:43 msgid "What words? (separate individual words by spaces)" msgstr "" -#: config.py:53 +#: config.py:55 msgid "" "Determines what words are\n" " considered to be 'bad' so the bot won't say them." msgstr "" -#: config.py:56 +#: config.py:58 msgid "" "Determines whether the bot will require bad\n" " words to be independent words, or whether it will censor them within other\n" @@ -40,14 +40,14 @@ msgid "" " plugin." msgstr "" -#: config.py:73 +#: config.py:75 msgid "" "Determines what characters will replace bad words; a\n" " chunk of these characters matching the size of the replaced bad word will\n" " be used to replace the bad words you've configured." msgstr "" -#: config.py:81 +#: config.py:83 msgid "" "Determines the manner in which\n" " bad words will be replaced. 'nastyCharacters' (the default) will replace a\n" @@ -58,13 +58,13 @@ msgid "" " supybot.plugins.BadWords.simpleReplacement." msgstr "" -#: config.py:89 +#: config.py:91 msgid "" "Determines what word will replace bad\n" " words if the replacement method is 'simple'." msgstr "" -#: config.py:92 +#: config.py:94 msgid "" "Determines whether the bot will strip\n" " formatting characters from messages before it checks them for bad words.\n" @@ -73,20 +73,20 @@ msgid "" " plugins that do coloring or bolding of text." msgstr "" -#: config.py:99 +#: config.py:101 msgid "" "Determines whether the bot will kick people with\n" " a warning when they use bad words." msgstr "" -#: config.py:102 +#: config.py:104 msgid "" "You have been kicked for using a word\n" " prohibited in the presence of this bot. Please use more appropriate\n" " language in the future." msgstr "" -#: config.py:104 +#: config.py:106 msgid "" "Determines the kick message used by the\n" " bot when kicking users for saying bad words." @@ -100,7 +100,7 @@ msgid "" " has op." msgstr "" -#: plugin.py:114 +#: plugin.py:115 #, docstring msgid "" "takes no arguments\n" @@ -109,11 +109,11 @@ msgid "" " " msgstr "" -#: plugin.py:124 +#: plugin.py:125 msgid "I'm not currently censoring any bad words." msgstr "" -#: plugin.py:129 +#: plugin.py:130 #, docstring msgid "" " [ ...]\n" @@ -122,7 +122,7 @@ msgid "" " " msgstr "" -#: plugin.py:141 +#: plugin.py:142 #, docstring msgid "" " [ ...]\n" diff --git a/plugins/Channel/locales/fr.po b/plugins/Channel/locales/fr.po index 0aaabc4db..d7899108d 100644 --- a/plugins/Channel/locales/fr.po +++ b/plugins/Channel/locales/fr.po @@ -1,10 +1,10 @@ msgid "" msgstr "" -"Project-Id-Version: Supybot-fr\n" +"Project-Id-Version: Limnoria\n" "POT-Creation-Date: 2013-03-03 19:39+CET\n" "PO-Revision-Date: \n" "Last-Translator: Valentin Lorentz \n" -"Language-Team: Supybot-fr \n" +"Language-Team: Limnoria \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" diff --git a/plugins/Channel/messages.pot b/plugins/Channel/messages.pot index 80aa8c422..3a8ceac5f 100644 --- a/plugins/Channel/messages.pot +++ b/plugins/Channel/messages.pot @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2013-03-03 19:39+CET\n" +"POT-Creation-Date: 2014-01-21 16:39+CET\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -21,7 +21,7 @@ msgid "" " rejoin a channel whenever it's kicked from the channel." msgstr "" -#: plugin.py:69 +#: plugin.py:74 #, docstring msgid "" "[] [ ...]\n" @@ -32,11 +32,11 @@ msgid "" " " msgstr "" -#: plugin.py:76 +#: plugin.py:81 msgid "change the mode" msgstr "" -#: plugin.py:80 +#: plugin.py:85 #, docstring msgid "" "[] []\n" @@ -47,11 +47,11 @@ msgid "" " " msgstr "" -#: plugin.py:90 +#: plugin.py:95 msgid "change the limit" msgstr "" -#: plugin.py:95 +#: plugin.py:100 #, docstring msgid "" "[]\n" @@ -62,11 +62,11 @@ msgid "" " " msgstr "" -#: plugin.py:102 +#: plugin.py:107 msgid "moderate the channel" msgstr "" -#: plugin.py:106 +#: plugin.py:111 #, docstring msgid "" "[]\n" @@ -77,11 +77,11 @@ msgid "" " " msgstr "" -#: plugin.py:114 +#: plugin.py:119 msgid "unmoderate the channel" msgstr "" -#: plugin.py:118 +#: plugin.py:123 #, docstring msgid "" "[] []\n" @@ -92,11 +92,11 @@ msgid "" " " msgstr "" -#: plugin.py:130 +#: plugin.py:135 msgid "change the keyword" msgstr "" -#: plugin.py:135 +#: plugin.py:140 #, docstring msgid "" "[] [ ...]\n" @@ -108,11 +108,11 @@ msgid "" " " msgstr "" -#: plugin.py:147 +#: plugin.py:152 msgid "op someone" msgstr "" -#: plugin.py:151 +#: plugin.py:156 #, docstring msgid "" "[] [ ...]\n" @@ -124,11 +124,11 @@ msgid "" " " msgstr "" -#: plugin.py:163 +#: plugin.py:168 msgid "halfop someone" msgstr "" -#: plugin.py:184 +#: plugin.py:189 #, docstring msgid "" "[] [ ...]\n" @@ -140,11 +140,11 @@ msgid "" " " msgstr "" -#: plugin.py:192 +#: plugin.py:197 msgid "voice someone" msgstr "" -#: plugin.py:197 +#: plugin.py:202 #, docstring msgid "" "[] [ ...]\n" @@ -155,15 +155,15 @@ msgid "" " " msgstr "" -#: plugin.py:204 +#: plugin.py:209 msgid "I cowardly refuse to deop myself. If you really want me deopped, tell me to op you and then deop me yourself." msgstr "" -#: plugin.py:212 +#: plugin.py:217 msgid "deop someone" msgstr "" -#: plugin.py:217 +#: plugin.py:222 #, docstring msgid "" "[] [ ...]\n" @@ -174,15 +174,15 @@ msgid "" " " msgstr "" -#: plugin.py:224 +#: plugin.py:229 msgid "I cowardly refuse to dehalfop myself. If you really want me dehalfopped, tell me to op you and then dehalfop me yourself." msgstr "" -#: plugin.py:232 +#: plugin.py:237 msgid "dehalfop someone" msgstr "" -#: plugin.py:237 +#: plugin.py:242 #, docstring msgid "" "[] [ ...]\n" @@ -193,11 +193,11 @@ msgid "" " " msgstr "" -#: plugin.py:244 +#: plugin.py:249 msgid "I cowardly refuse to devoice myself. If you really want me devoiced, tell me to op you and then devoice me yourself." msgstr "" -#: plugin.py:253 +#: plugin.py:258 #, docstring msgid "" "[]\n" @@ -208,7 +208,7 @@ msgid "" " " msgstr "" -#: plugin.py:266 +#: plugin.py:271 #, docstring msgid "" "[] [, , ...] []\n" @@ -220,19 +220,19 @@ msgid "" " " msgstr "" -#: plugin.py:274 +#: plugin.py:279 msgid "I cowardly refuse to kick myself." msgstr "" -#: plugin.py:279 +#: plugin.py:284 msgid "The reason you gave is longer than the allowed length for a KICK reason on this server." msgstr "" -#: plugin.py:284 +#: plugin.py:289 msgid "kick someone" msgstr "" -#: plugin.py:290 +#: plugin.py:295 #, docstring msgid "" "[] [--{exact,nick,user,host}] [] []\n" @@ -249,11 +249,11 @@ msgid "" " " msgstr "" -#: plugin.py:307 +#: plugin.py:312 msgid "kick or ban someone" msgstr "" -#: plugin.py:315 +#: plugin.py:320 #, docstring msgid "" "[] [--{exact,nick,user,host}] []\n" @@ -269,27 +269,27 @@ msgid "" " " msgstr "" -#: plugin.py:331 +#: plugin.py:336 msgid "ban someone" msgstr "" -#: plugin.py:351 +#: plugin.py:356 msgid "I haven't seen %s." msgstr "" -#: plugin.py:361 +#: plugin.py:366 msgid "I cowardly refuse to kickban myself." msgstr "" -#: plugin.py:370 +#: plugin.py:375 msgid "I cowardly refuse to ban myself." msgstr "" -#: plugin.py:398 +#: plugin.py:403 msgid "%s has %s too, you can't ban him/her/it." msgstr "" -#: plugin.py:410 +#: plugin.py:415 #, docstring msgid "" "[] []\n" @@ -302,19 +302,19 @@ msgid "" " " msgstr "" -#: plugin.py:430 +#: plugin.py:435 msgid "All bans on %s matching %s have been removed." msgstr "" -#: plugin.py:434 +#: plugin.py:439 msgid "No bans matching %s were found on %s." msgstr "" -#: plugin.py:437 +#: plugin.py:442 msgid "unban someone" msgstr "" -#: plugin.py:444 +#: plugin.py:449 #, docstring msgid "" "[]\n" @@ -323,11 +323,11 @@ msgid "" " If is not given, it defaults to the current channel." msgstr "" -#: plugin.py:448 +#: plugin.py:453 msgid "No bans." msgstr "" -#: plugin.py:453 +#: plugin.py:458 #, docstring msgid "" "[] \n" @@ -338,19 +338,19 @@ msgid "" " " msgstr "" -#: plugin.py:462 +#: plugin.py:467 msgid "invite someone" msgstr "" -#: plugin.py:481 +#: plugin.py:486 msgid "%s is already in %s." msgstr "" -#: plugin.py:488 +#: plugin.py:493 msgid "There is no %s on this network." msgstr "" -#: plugin.py:500 +#: plugin.py:505 #, docstring msgid "" "[]\n" @@ -362,7 +362,7 @@ msgid "" " " msgstr "" -#: plugin.py:515 +#: plugin.py:520 #, docstring msgid "" "[]\n" @@ -374,7 +374,7 @@ msgid "" " " msgstr "" -#: plugin.py:530 +#: plugin.py:535 #, docstring msgid "" "takes no arguments\n" @@ -383,15 +383,15 @@ msgid "" " " msgstr "" -#: plugin.py:545 +#: plugin.py:550 msgid "I'm currently lobotomized in %L." msgstr "" -#: plugin.py:548 +#: plugin.py:553 msgid "I'm not currently lobotomized in any channels that you're in." msgstr "" -#: plugin.py:555 +#: plugin.py:560 #, docstring msgid "" "[] []\n" @@ -408,7 +408,7 @@ msgid "" " " msgstr "" -#: plugin.py:575 +#: plugin.py:580 #, docstring msgid "" "[] \n" @@ -419,11 +419,11 @@ msgid "" " " msgstr "" -#: plugin.py:587 +#: plugin.py:592 msgid "There are no persistent bans for that hostmask." msgstr "" -#: plugin.py:592 +#: plugin.py:597 #, docstring msgid "" "[]\n" @@ -433,19 +433,19 @@ msgid "" " " msgstr "" -#: plugin.py:602 +#: plugin.py:607 msgid "%q (expires %t)" msgstr "" -#: plugin.py:605 +#: plugin.py:610 msgid "%q (never expires)" msgstr "" -#: plugin.py:609 +#: plugin.py:614 msgid "There are no persistent bans on %s." msgstr "" -#: plugin.py:616 +#: plugin.py:621 #, docstring msgid "" "[] []\n" @@ -460,7 +460,7 @@ msgid "" " " msgstr "" -#: plugin.py:634 +#: plugin.py:639 #, docstring msgid "" "[] \n" @@ -471,11 +471,11 @@ msgid "" " " msgstr "" -#: plugin.py:646 +#: plugin.py:651 msgid "There are no ignores for that hostmask." msgstr "" -#: plugin.py:651 +#: plugin.py:656 #, docstring msgid "" "[]\n" @@ -486,11 +486,11 @@ msgid "" " " msgstr "" -#: plugin.py:660 +#: plugin.py:665 msgid "I'm not currently ignoring any hostmasks in %q" msgstr "" -#: plugin.py:671 +#: plugin.py:676 #, docstring msgid "" "[] [ ...]\n" @@ -502,7 +502,7 @@ msgid "" " " msgstr "" -#: plugin.py:687 +#: plugin.py:692 #, docstring msgid "" "[] [ ...]\n" @@ -514,11 +514,11 @@ msgid "" " " msgstr "" -#: plugin.py:706 +#: plugin.py:711 msgid "That user didn't have the %L %s." msgstr "" -#: plugin.py:715 +#: plugin.py:720 #, docstring msgid "" "[] {True|False}\n" @@ -530,7 +530,7 @@ msgid "" " " msgstr "" -#: plugin.py:733 +#: plugin.py:738 #, docstring msgid "" "[] [ ...]\n" @@ -541,7 +541,7 @@ msgid "" " " msgstr "" -#: plugin.py:748 +#: plugin.py:753 #, docstring msgid "" "[] [ ...]\n" @@ -553,15 +553,15 @@ msgid "" " " msgstr "" -#: plugin.py:764 +#: plugin.py:769 msgid "capability" msgstr "" -#: plugin.py:767 +#: plugin.py:772 msgid "I do not know about the %L %s." msgstr "" -#: plugin.py:774 +#: plugin.py:779 #, docstring msgid "" "[]\n" @@ -571,7 +571,7 @@ msgid "" " " msgstr "" -#: plugin.py:786 +#: plugin.py:791 #, docstring msgid "" "[] [] []\n" @@ -584,15 +584,15 @@ msgid "" " " msgstr "" -#: plugin.py:802 plugin.py:841 +#: plugin.py:807 plugin.py:846 msgid "The %s plugin does not have a command called %s." msgstr "" -#: plugin.py:809 plugin.py:848 +#: plugin.py:814 plugin.py:853 msgid "No plugin or command named %s could be found." msgstr "" -#: plugin.py:825 +#: plugin.py:830 #, docstring msgid "" "[] [] []\n" @@ -605,11 +605,11 @@ msgid "" " " msgstr "" -#: plugin.py:862 +#: plugin.py:867 msgid "%s was not disabled." msgstr "" -#: plugin.py:871 +#: plugin.py:876 #, docstring msgid "" "[] [--count]\n" @@ -620,26 +620,26 @@ msgid "" " " msgstr "" -#: plugin.py:883 +#: plugin.py:888 msgid "You don't have access to that information." msgstr "" -#: plugin.py:897 +#: plugin.py:902 #, docstring msgid "" "Internal message for notifying all the #channel,ops in a channel of\n" " a given situation." msgstr "" -#: plugin.py:900 +#: plugin.py:905 msgid "Alert to all %s ops: %s" msgstr "" -#: plugin.py:902 +#: plugin.py:907 msgid " (from %s)" msgstr "" -#: plugin.py:910 +#: plugin.py:915 #, docstring msgid "" "[] \n" diff --git a/plugins/ChannelLogger/locales/fr.po b/plugins/ChannelLogger/locales/fr.po index dbf122b31..9ce917684 100644 --- a/plugins/ChannelLogger/locales/fr.po +++ b/plugins/ChannelLogger/locales/fr.po @@ -1,10 +1,10 @@ msgid "" msgstr "" -"Project-Id-Version: Supybot-fr\n" +"Project-Id-Version: Limnoria\n" "POT-Creation-Date: 2013-03-02 19:04+CET\n" "PO-Revision-Date: \n" "Last-Translator: Valentin Lorentz \n" -"Language-Team: Supybot-fr \n" +"Language-Team: Limnoria \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" diff --git a/plugins/ChannelLogger/messages.pot b/plugins/ChannelLogger/messages.pot index c1d277016..fcff454b0 100644 --- a/plugins/ChannelLogger/messages.pot +++ b/plugins/ChannelLogger/messages.pot @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2012-10-07 18:37+EEST\n" +"POT-Creation-Date: 2014-01-21 16:39+CET\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/plugins/ChannelStats/messages.pot b/plugins/ChannelStats/messages.pot index ab2bd1b25..245c3f688 100644 --- a/plugins/ChannelStats/messages.pot +++ b/plugins/ChannelStats/messages.pot @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2013-11-26 23:54+CET\n" +"POT-Creation-Date: 2014-01-21 16:39+CET\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/plugins/Conditional/locales/fr.po b/plugins/Conditional/locales/fr.po index ebf6820c6..34b75f44d 100644 --- a/plugins/Conditional/locales/fr.po +++ b/plugins/Conditional/locales/fr.po @@ -4,7 +4,7 @@ msgstr "" "POT-Creation-Date: 2011-06-28 19:37+CEST\n" "PO-Revision-Date: \n" "Last-Translator: Valentin Lorentz \n" -"Language-Team: Supybot-fr \n" +"Language-Team: Limnoria \n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/plugins/Conditional/messages.pot b/plugins/Conditional/messages.pot index 19ff5dcb0..958fc2aaf 100644 --- a/plugins/Conditional/messages.pot +++ b/plugins/Conditional/messages.pot @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2013-11-26 23:54+CET\n" +"POT-Creation-Date: 2014-01-21 16:39+CET\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/plugins/Config/locales/fr.po b/plugins/Config/locales/fr.po index 91ef682f9..9fd1b3fe3 100644 --- a/plugins/Config/locales/fr.po +++ b/plugins/Config/locales/fr.po @@ -1,10 +1,10 @@ msgid "" msgstr "" -"Project-Id-Version: Supybot-fr\n" +"Project-Id-Version: Limnoria\n" "POT-Creation-Date: 2013-03-03 19:39+CET\n" "PO-Revision-Date: \n" "Last-Translator: Valentin Lorentz \n" -"Language-Team: Supybot-fr \n" +"Language-Team: Limnoria \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" diff --git a/plugins/Config/messages.pot b/plugins/Config/messages.pot index 0cd1ab75f..d8f2ff93d 100644 --- a/plugins/Config/messages.pot +++ b/plugins/Config/messages.pot @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2013-03-03 19:39+CET\n" +"POT-Creation-Date: 2014-01-21 16:39+CET\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/plugins/Ctcp/locales/fr.po b/plugins/Ctcp/locales/fr.po index d8e9e0cb7..6e21bc301 100644 --- a/plugins/Ctcp/locales/fr.po +++ b/plugins/Ctcp/locales/fr.po @@ -1,10 +1,10 @@ msgid "" msgstr "" -"Project-Id-Version: Supybot-fr\n" +"Project-Id-Version: Limnoria\n" "POT-Creation-Date: 2011-02-26 09:49+CET\n" "PO-Revision-Date: \n" "Last-Translator: Mika Suomalainen \n" -"Language-Team: Supybot-fr \n" +"Language-Team: Limnoria \n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/plugins/Ctcp/messages.pot b/plugins/Ctcp/messages.pot index 2d026233a..15295471e 100644 --- a/plugins/Ctcp/messages.pot +++ b/plugins/Ctcp/messages.pot @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2011-02-26 09:49+CET\n" +"POT-Creation-Date: 2014-01-21 16:39+CET\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -15,41 +15,41 @@ msgstr "" "Generated-By: pygettext.py 1.5\n" -#: plugin.py:77 +#: plugin.py:81 #, docstring msgid "\001PING ?(.*)\001" msgstr "" -#: plugin.py:86 +#: plugin.py:90 #, docstring msgid "\001VERSION\001" msgstr "" -#: plugin.py:91 +#: plugin.py:95 #, docstring msgid "\001USERINFO\001" msgstr "" -#: plugin.py:96 +#: plugin.py:100 #, docstring msgid "\001TIME\001" msgstr "" -#: plugin.py:101 +#: plugin.py:105 #, docstring msgid "\001FINGER\001" msgstr "" -#: plugin.py:104 +#: plugin.py:108 msgid "Supybot, the best Python IRC bot in existence!" msgstr "" -#: plugin.py:107 +#: plugin.py:111 #, docstring msgid "\001SOURCE\001" msgstr "" -#: plugin.py:123 +#: plugin.py:127 #, docstring msgid "" "[] [--nicks]\n" diff --git a/plugins/Dict/locales/fr.po b/plugins/Dict/locales/fr.po index 2a6360cd2..e9fea31d7 100644 --- a/plugins/Dict/locales/fr.po +++ b/plugins/Dict/locales/fr.po @@ -1,10 +1,10 @@ msgid "" msgstr "" -"Project-Id-Version: Supybot-fr\n" +"Project-Id-Version: Limnoria\n" "POT-Creation-Date: 2011-06-28 19:40+CEST\n" "PO-Revision-Date: \n" "Last-Translator: Valentin Lorentz \n" -"Language-Team: Supybot-fr \n" +"Language-Team: Limnoria \n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/plugins/Dict/messages.pot b/plugins/Dict/messages.pot index 41a8993a6..d9157aea4 100644 --- a/plugins/Dict/messages.pot +++ b/plugins/Dict/messages.pot @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2011-06-28 19:40+CEST\n" +"POT-Creation-Date: 2014-01-21 16:39+CET\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -36,7 +36,7 @@ msgid "" " will use all dictionaries to define words." msgstr "" -#: plugin.py:54 +#: plugin.py:49 #, docstring msgid "" "takes no arguments\n" @@ -45,7 +45,7 @@ msgid "" " " msgstr "" -#: plugin.py:70 +#: plugin.py:65 #, docstring msgid "" "takes no arguments\n" @@ -54,7 +54,7 @@ msgid "" " " msgstr "" -#: plugin.py:85 +#: plugin.py:80 #, docstring msgid "" "[] \n" @@ -64,23 +64,23 @@ msgid "" " " msgstr "" -#: plugin.py:108 +#: plugin.py:103 msgid "You must give a word to define." msgstr "" -#: plugin.py:114 +#: plugin.py:109 msgid "No definition for %q could be found." msgstr "" -#: plugin.py:117 +#: plugin.py:112 msgid "No definition for %q could be found in %s" msgstr "" -#: plugin.py:129 +#: plugin.py:124 msgid "%L responded: %s" msgstr "" -#: plugin.py:136 +#: plugin.py:131 #, docstring msgid "" " [ ...]\n" diff --git a/plugins/Dunno/locales/fr.po b/plugins/Dunno/locales/fr.po index 957076ab0..b76830f80 100644 --- a/plugins/Dunno/locales/fr.po +++ b/plugins/Dunno/locales/fr.po @@ -1,10 +1,10 @@ msgid "" msgstr "" -"Project-Id-Version: Supybot-fr\n" +"Project-Id-Version: Limnoria\n" "POT-Creation-Date: 2010-10-17 10:48+CEST\n" "PO-Revision-Date: \n" "Last-Translator: Valentin Lorentz \n" -"Language-Team: Supybot-fr \n" +"Language-Team: Limnoria \n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/plugins/Dunno/messages.pot b/plugins/Dunno/messages.pot index d25a8258f..93747c0f5 100644 --- a/plugins/Dunno/messages.pot +++ b/plugins/Dunno/messages.pot @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2011-02-26 09:49+CET\n" +"POT-Creation-Date: 2014-01-21 16:39+CET\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/plugins/Factoids/locales/fr.po b/plugins/Factoids/locales/fr.po index 751e029e8..87fcf9196 100644 --- a/plugins/Factoids/locales/fr.po +++ b/plugins/Factoids/locales/fr.po @@ -1,10 +1,10 @@ msgid "" msgstr "" -"Project-Id-Version: Supybot-fr\n" +"Project-Id-Version: Limnoria\n" "POT-Creation-Date: 2011-06-28 19:40+CEST\n" "PO-Revision-Date: \n" "Last-Translator: Valentin Lorentz \n" -"Language-Team: Supybot-fr \n" +"Language-Team: Limnoria \n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/plugins/Factoids/messages.pot b/plugins/Factoids/messages.pot index 13fe54725..c2ff8583e 100644 --- a/plugins/Factoids/messages.pot +++ b/plugins/Factoids/messages.pot @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2013-07-25 11:34+CEST\n" +"POT-Creation-Date: 2014-01-21 16:39+CET\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/plugins/Filter/locales/fr.po b/plugins/Filter/locales/fr.po index 2d192fe45..56e31fb8e 100644 --- a/plugins/Filter/locales/fr.po +++ b/plugins/Filter/locales/fr.po @@ -1,10 +1,10 @@ msgid "" msgstr "" -"Project-Id-Version: Supybot-fr\n" +"Project-Id-Version: Limnoria\n" "POT-Creation-Date: 2011-02-26 09:49+CET\n" "PO-Revision-Date: \n" "Last-Translator: Valentin Lorentz \n" -"Language-Team: Supybot-fr \n" +"Language-Team: Limnoria \n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/plugins/Filter/messages.pot b/plugins/Filter/messages.pot index 1793959ea..0bd717287 100644 --- a/plugins/Filter/messages.pot +++ b/plugins/Filter/messages.pot @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2011-02-26 09:49+CET\n" +"POT-Creation-Date: 2014-01-21 16:39+CET\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -39,7 +39,7 @@ msgid "" " in a word before it will be shrunken by the shrink command/filter." msgstr "" -#: plugin.py:50 +#: plugin.py:52 #, docstring msgid "" "This plugin offers several commands which transform text in some way.\n" @@ -49,7 +49,7 @@ msgid "" " Not very useful, but definitely quite fun :)" msgstr "" -#: plugin.py:84 +#: plugin.py:86 #, docstring msgid "" "[] []\n" @@ -60,11 +60,11 @@ msgid "" " " msgstr "" -#: plugin.py:97 +#: plugin.py:99 msgid "That's not a valid filter command." msgstr "" -#: plugin.py:107 +#: plugin.py:110 #, docstring msgid "" "\n" @@ -75,7 +75,7 @@ msgid "" " " msgstr "" -#: plugin.py:119 +#: plugin.py:121 #, docstring msgid "" "\n" @@ -84,7 +84,7 @@ msgid "" " " msgstr "" -#: plugin.py:129 +#: plugin.py:131 #, docstring msgid "" "\n" @@ -93,7 +93,7 @@ msgid "" " " msgstr "" -#: plugin.py:142 +#: plugin.py:144 #, docstring msgid "" "\n" @@ -102,7 +102,7 @@ msgid "" " " msgstr "" -#: plugin.py:168 +#: plugin.py:169 #, docstring msgid "" "\n" @@ -112,7 +112,7 @@ msgid "" " " msgstr "" -#: plugin.py:179 +#: plugin.py:183 #, docstring msgid "" "\n" @@ -122,7 +122,7 @@ msgid "" " " msgstr "" -#: plugin.py:189 +#: plugin.py:194 #, docstring msgid "" "\n" @@ -132,11 +132,11 @@ msgid "" " " msgstr "" -#: plugin.py:197 +#: plugin.py:203 msgid "Invalid input." msgstr "" -#: plugin.py:202 +#: plugin.py:209 #, docstring msgid "" "\n" @@ -147,7 +147,7 @@ msgid "" " " msgstr "" -#: plugin.py:213 +#: plugin.py:222 #, docstring msgid "" "\n" @@ -156,7 +156,7 @@ msgid "" " " msgstr "" -#: plugin.py:244 +#: plugin.py:254 #, docstring msgid "" "\n" @@ -165,7 +165,7 @@ msgid "" " " msgstr "" -#: plugin.py:264 +#: plugin.py:274 #, docstring msgid "" "\n" @@ -174,7 +174,7 @@ msgid "" " " msgstr "" -#: plugin.py:280 +#: plugin.py:290 #, docstring msgid "" "\n" @@ -184,7 +184,7 @@ msgid "" " " msgstr "" -#: plugin.py:345 +#: plugin.py:355 #, docstring msgid "" "\n" @@ -193,7 +193,7 @@ msgid "" " " msgstr "" -#: plugin.py:362 +#: plugin.py:372 #, docstring msgid "" "\n" @@ -202,7 +202,7 @@ msgid "" " " msgstr "" -#: plugin.py:374 +#: plugin.py:384 #, docstring msgid "" "\n" @@ -211,7 +211,7 @@ msgid "" " " msgstr "" -#: plugin.py:391 +#: plugin.py:402 #, docstring msgid "" "\n" @@ -220,7 +220,7 @@ msgid "" " " msgstr "" -#: plugin.py:401 +#: plugin.py:412 #, docstring msgid "" "\n" @@ -229,7 +229,7 @@ msgid "" " " msgstr "" -#: plugin.py:412 +#: plugin.py:427 #, docstring msgid "" "\n" @@ -238,7 +238,7 @@ msgid "" " " msgstr "" -#: plugin.py:421 +#: plugin.py:436 #, docstring msgid "" "\n" @@ -247,7 +247,7 @@ msgid "" " " msgstr "" -#: plugin.py:448 +#: plugin.py:463 #, docstring msgid "" "\n" @@ -256,279 +256,279 @@ msgid "" " " msgstr "" -#: plugin.py:544 +#: plugin.py:559 msgid "ay" msgstr "" -#: plugin.py:544 +#: plugin.py:559 msgid "bee" msgstr "" -#: plugin.py:544 +#: plugin.py:559 msgid "dee" msgstr "" -#: plugin.py:544 +#: plugin.py:559 msgid "see" msgstr "" -#: plugin.py:545 +#: plugin.py:560 msgid "aych" msgstr "" -#: plugin.py:545 +#: plugin.py:560 msgid "ee" msgstr "" -#: plugin.py:545 +#: plugin.py:560 msgid "eff" msgstr "" -#: plugin.py:545 +#: plugin.py:560 msgid "gee" msgstr "" -#: plugin.py:546 +#: plugin.py:561 msgid "ell" msgstr "" -#: plugin.py:546 +#: plugin.py:561 msgid "eye" msgstr "" -#: plugin.py:546 +#: plugin.py:561 msgid "jay" msgstr "" -#: plugin.py:546 +#: plugin.py:561 msgid "kay" msgstr "" -#: plugin.py:547 +#: plugin.py:562 msgid "cue" msgstr "" -#: plugin.py:547 +#: plugin.py:562 msgid "em" msgstr "" -#: plugin.py:547 +#: plugin.py:562 msgid "en" msgstr "" -#: plugin.py:547 +#: plugin.py:562 msgid "oh" msgstr "" -#: plugin.py:547 +#: plugin.py:562 msgid "pee" msgstr "" -#: plugin.py:548 +#: plugin.py:563 msgid "arr" msgstr "" -#: plugin.py:548 +#: plugin.py:563 msgid "ess" msgstr "" -#: plugin.py:548 +#: plugin.py:563 msgid "tee" msgstr "" -#: plugin.py:548 +#: plugin.py:563 msgid "you" msgstr "" -#: plugin.py:549 +#: plugin.py:564 msgid "double-you" msgstr "" -#: plugin.py:549 +#: plugin.py:564 msgid "ecks" msgstr "" -#: plugin.py:549 +#: plugin.py:564 msgid "vee" msgstr "" -#: plugin.py:549 +#: plugin.py:564 msgid "why" msgstr "" -#: plugin.py:550 +#: plugin.py:565 msgid "zee" msgstr "" -#: plugin.py:555 +#: plugin.py:570 msgid "exclamation point" msgstr "" -#: plugin.py:556 +#: plugin.py:571 msgid "quote" msgstr "" -#: plugin.py:557 +#: plugin.py:572 msgid "pound" msgstr "" -#: plugin.py:558 +#: plugin.py:573 msgid "dollar sign" msgstr "" -#: plugin.py:559 +#: plugin.py:574 msgid "percent" msgstr "" -#: plugin.py:560 +#: plugin.py:575 msgid "ampersand" msgstr "" -#: plugin.py:561 +#: plugin.py:576 msgid "single quote" msgstr "" -#: plugin.py:562 +#: plugin.py:577 msgid "left paren" msgstr "" -#: plugin.py:563 +#: plugin.py:578 msgid "right paren" msgstr "" -#: plugin.py:564 +#: plugin.py:579 msgid "asterisk" msgstr "" -#: plugin.py:565 +#: plugin.py:580 msgid "plus" msgstr "" -#: plugin.py:566 +#: plugin.py:581 msgid "comma" msgstr "" -#: plugin.py:567 +#: plugin.py:582 msgid "minus" msgstr "" -#: plugin.py:568 +#: plugin.py:583 msgid "period" msgstr "" -#: plugin.py:569 +#: plugin.py:584 msgid "slash" msgstr "" -#: plugin.py:570 +#: plugin.py:585 msgid "colon" msgstr "" -#: plugin.py:571 +#: plugin.py:586 msgid "semicolon" msgstr "" -#: plugin.py:572 +#: plugin.py:587 msgid "less than" msgstr "" -#: plugin.py:573 +#: plugin.py:588 msgid "equals" msgstr "" -#: plugin.py:574 +#: plugin.py:589 msgid "greater than" msgstr "" -#: plugin.py:575 +#: plugin.py:590 msgid "question mark" msgstr "" -#: plugin.py:576 +#: plugin.py:591 msgid "at" msgstr "" -#: plugin.py:577 +#: plugin.py:592 msgid "left bracket" msgstr "" -#: plugin.py:578 +#: plugin.py:593 msgid "backslash" msgstr "" -#: plugin.py:579 +#: plugin.py:594 msgid "right bracket" msgstr "" -#: plugin.py:580 +#: plugin.py:595 msgid "caret" msgstr "" -#: plugin.py:581 +#: plugin.py:596 msgid "underscore" msgstr "" -#: plugin.py:582 +#: plugin.py:597 msgid "backtick" msgstr "" -#: plugin.py:583 +#: plugin.py:598 msgid "left brace" msgstr "" -#: plugin.py:584 +#: plugin.py:599 msgid "pipe" msgstr "" -#: plugin.py:585 +#: plugin.py:600 msgid "right brace" msgstr "" -#: plugin.py:586 +#: plugin.py:601 msgid "tilde" msgstr "" -#: plugin.py:589 +#: plugin.py:604 msgid "one" msgstr "" -#: plugin.py:589 +#: plugin.py:604 msgid "three" msgstr "" -#: plugin.py:589 +#: plugin.py:604 msgid "two" msgstr "" -#: plugin.py:589 +#: plugin.py:604 msgid "zero" msgstr "" -#: plugin.py:590 +#: plugin.py:605 msgid "five" msgstr "" -#: plugin.py:590 +#: plugin.py:605 msgid "four" msgstr "" -#: plugin.py:590 +#: plugin.py:605 msgid "seven" msgstr "" -#: plugin.py:590 +#: plugin.py:605 msgid "six" msgstr "" -#: plugin.py:591 +#: plugin.py:606 msgid "eight" msgstr "" -#: plugin.py:591 +#: plugin.py:606 msgid "nine" msgstr "" -#: plugin.py:595 +#: plugin.py:610 #, docstring msgid "" "\n" @@ -537,7 +537,7 @@ msgid "" " " msgstr "" -#: plugin.py:625 +#: plugin.py:640 #, docstring msgid "" "\n" @@ -546,7 +546,7 @@ msgid "" " " msgstr "" -#: plugin.py:634 +#: plugin.py:649 #, docstring msgid "" "\n" @@ -557,7 +557,7 @@ msgid "" " " msgstr "" -#: plugin.py:653 +#: plugin.py:668 #, docstring msgid "" "\n" @@ -566,7 +566,7 @@ msgid "" " " msgstr "" -#: plugin.py:702 +#: plugin.py:717 #, docstring msgid "" "\n" diff --git a/plugins/Format/locales/fr.po b/plugins/Format/locales/fr.po index 06bed1be7..c1983ba67 100644 --- a/plugins/Format/locales/fr.po +++ b/plugins/Format/locales/fr.po @@ -1,10 +1,10 @@ msgid "" msgstr "" -"Project-Id-Version: Supybot-fr\n" +"Project-Id-Version: Limnoria\n" "POT-Creation-Date: 2011-08-10 11:27+CEST\n" "PO-Revision-Date: \n" "Last-Translator: Valentin Lorentz \n" -"Language-Team: Supybot-fr \n" +"Language-Team: Limnoria \n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/plugins/Format/messages.pot b/plugins/Format/messages.pot index 4a9a503c4..405f2db26 100644 --- a/plugins/Format/messages.pot +++ b/plugins/Format/messages.pot @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2013-11-26 23:54+CET\n" +"POT-Creation-Date: 2014-01-21 16:39+CET\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/plugins/Games/messages.pot b/plugins/Games/messages.pot index 3f15674d2..b6a086e67 100644 --- a/plugins/Games/messages.pot +++ b/plugins/Games/messages.pot @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2011-02-26 09:49+CET\n" +"POT-Creation-Date: 2014-01-21 16:39+CET\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -15,7 +15,7 @@ msgstr "" "Generated-By: pygettext.py 1.5\n" -#: plugin.py:46 +#: plugin.py:47 #, docstring msgid "" "takes no arguments\n" @@ -24,15 +24,15 @@ msgid "" " " msgstr "" -#: plugin.py:51 +#: plugin.py:52 msgid "heads" msgstr "" -#: plugin.py:53 +#: plugin.py:54 msgid "tails" msgstr "" -#: plugin.py:58 +#: plugin.py:59 #, docstring msgid "" "d\n" @@ -43,35 +43,35 @@ msgid "" " " msgstr "" -#: plugin.py:66 +#: plugin.py:67 msgid "You can't roll more than 1000 dice." msgstr "" -#: plugin.py:68 +#: plugin.py:69 msgid "Dice can't have more than 100 sides." msgstr "" -#: plugin.py:70 +#: plugin.py:71 msgid "Dice can't have fewer than 3 sides." msgstr "" -#: plugin.py:78 +#: plugin.py:79 msgid "Dice must be of the form d" msgstr "" -#: plugin.py:82 +#: plugin.py:83 msgid "It is possible.|Yes!|Of course.|Naturally.|Obviously.|It shall be.|The outlook is good.|It is so.|One would be wise to think so.|The answer is certainly yes." msgstr "" -#: plugin.py:86 +#: plugin.py:87 msgid "In your dreams.|I doubt it very much.|No chance.|The outlook is poor.|Unlikely.|About as likely as pigs flying.|You're kidding, right?|NO!|NO.|No.|The answer is a resounding no." msgstr "" -#: plugin.py:90 +#: plugin.py:91 msgid "Maybe...|No clue.|_I_ don't know.|The outlook is hazy, please ask again later.|What are you asking me for?|Come again?|You know the answer better than I.|The answer is def-- oooh! shiny thing!" msgstr "" -#: plugin.py:107 +#: plugin.py:108 #, docstring msgid "" "[]\n" @@ -80,7 +80,7 @@ msgid "" " " msgstr "" -#: plugin.py:121 +#: plugin.py:122 #, docstring msgid "" "[spin]\n" @@ -90,23 +90,23 @@ msgid "" " " msgstr "" -#: plugin.py:128 +#: plugin.py:129 msgid "*SPIN* Are you feeling lucky?" msgstr "" -#: plugin.py:137 +#: plugin.py:139 msgid "*BANG* Hey, who put a blank in here?!" msgstr "" -#: plugin.py:139 +#: plugin.py:141 msgid "reloads and spins the chambers." msgstr "" -#: plugin.py:141 +#: plugin.py:143 msgid "*click*" msgstr "" -#: plugin.py:148 +#: plugin.py:150 #, docstring msgid "" "[]\n" @@ -118,11 +118,11 @@ msgid "" " " msgstr "" -#: plugin.py:167 +#: plugin.py:169 msgid "Your current monologue is at least %n long." msgstr "" -#: plugin.py:168 +#: plugin.py:170 msgid "line" msgstr "" diff --git a/plugins/Google/locales/fr.po b/plugins/Google/locales/fr.po index 3d6097ca6..8dbfb9989 100644 --- a/plugins/Google/locales/fr.po +++ b/plugins/Google/locales/fr.po @@ -1,10 +1,10 @@ msgid "" msgstr "" -"Project-Id-Version: Supybot-fr\n" +"Project-Id-Version: Limnoria\n" "POT-Creation-Date: 2013-03-03 19:38+CET\n" "PO-Revision-Date: \n" "Last-Translator: Valentin Lorentz \n" -"Language-Team: Supybot-fr \n" +"Language-Team: Limnoria \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" diff --git a/plugins/Google/messages.pot b/plugins/Google/messages.pot index 05c5d6bf3..97aef7d68 100644 --- a/plugins/Google/messages.pot +++ b/plugins/Google/messages.pot @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2013-07-25 11:34+CEST\n" +"POT-Creation-Date: 2014-01-21 16:39+CET\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -93,7 +93,7 @@ msgid "" " 'off' - no filtering" msgstr "" -#: plugin.py:83 +#: plugin.py:84 #, docstring msgid "" "Perform a search using Google's AJAX API.\n" @@ -107,15 +107,15 @@ msgid "" " " msgstr "" -#: plugin.py:122 plugin.py:188 +#: plugin.py:123 plugin.py:189 msgid "We broke The Google!" msgstr "" -#: plugin.py:147 +#: plugin.py:148 msgid "No matches found." msgstr "" -#: plugin.py:155 +#: plugin.py:156 #, docstring msgid "" "[--snippet] \n" @@ -125,11 +125,11 @@ msgid "" " " msgstr "" -#: plugin.py:172 +#: plugin.py:173 msgid "Google found nothing." msgstr "" -#: plugin.py:177 +#: plugin.py:178 #, docstring msgid "" " [--{filter,language} ]\n" @@ -140,7 +140,7 @@ msgid "" " " msgstr "" -#: plugin.py:205 +#: plugin.py:206 #, docstring msgid "" "\n" @@ -149,11 +149,11 @@ msgid "" " " msgstr "" -#: plugin.py:216 +#: plugin.py:217 msgid "Google seems to have no cache for that site." msgstr "" -#: plugin.py:221 +#: plugin.py:222 #, docstring msgid "" " [ ...]\n" @@ -163,7 +163,7 @@ msgid "" " " msgstr "" -#: plugin.py:244 +#: plugin.py:245 #, docstring msgid "" " [to] \n" @@ -173,12 +173,12 @@ msgid "" " " msgstr "" -#: plugin.py:280 +#: plugin.py:283 #, docstring msgid "^google\\s+(.*)$" msgstr "" -#: plugin.py:311 +#: plugin.py:310 #, docstring msgid "" "\n" @@ -187,11 +187,7 @@ msgid "" " " msgstr "" -#: plugin.py:347 -msgid "Google says: Error: %s." -msgstr "" - -#: plugin.py:354 +#: plugin.py:345 #, docstring msgid "" "\n" @@ -200,7 +196,7 @@ msgid "" " " msgstr "" -#: plugin.py:371 +#: plugin.py:362 msgid "Google's phonebook didn't come up with anything." msgstr "" diff --git a/plugins/Herald/locales/fr.po b/plugins/Herald/locales/fr.po index 05b446ada..05624111a 100644 --- a/plugins/Herald/locales/fr.po +++ b/plugins/Herald/locales/fr.po @@ -1,10 +1,10 @@ msgid "" msgstr "" -"Project-Id-Version: Supybot-fr\n" +"Project-Id-Version: Limnoria\n" "POT-Creation-Date: 2010-10-17 15:21+CEST\n" "PO-Revision-Date: \n" "Last-Translator: Valentin Lorentz \n" -"Language-Team: Supybot-fr \n" +"Language-Team: Limnoria \n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/plugins/Herald/messages.pot b/plugins/Herald/messages.pot index 50ebc64fc..d7f7ee203 100644 --- a/plugins/Herald/messages.pot +++ b/plugins/Herald/messages.pot @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2011-02-26 09:49+CET\n" +"POT-Creation-Date: 2014-01-21 16:39+CET\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/plugins/Internet/locales/fr.po b/plugins/Internet/locales/fr.po index fc22ff9da..68580af01 100644 --- a/plugins/Internet/locales/fr.po +++ b/plugins/Internet/locales/fr.po @@ -1,10 +1,10 @@ msgid "" msgstr "" -"Project-Id-Version: Supybot-fr\n" +"Project-Id-Version: Limnoria\n" "POT-Creation-Date: 2010-10-17 15:20+CEST\n" "PO-Revision-Date: \n" "Last-Translator: Valentin Lorentz \n" -"Language-Team: Supybot-fr \n" +"Language-Team: Limnoria \n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/plugins/Internet/messages.pot b/plugins/Internet/messages.pot index 22b7025df..e4a336f86 100644 --- a/plugins/Internet/messages.pot +++ b/plugins/Internet/messages.pot @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2011-02-26 09:49+CET\n" +"POT-Creation-Date: 2014-01-21 16:39+CET\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -15,12 +15,12 @@ msgstr "" "Generated-By: pygettext.py 1.5\n" -#: plugin.py:42 +#: plugin.py:43 #, docstring msgid "Add the help for \"@help Internet\" here." msgstr "" -#: plugin.py:46 +#: plugin.py:47 #, docstring msgid "" "\n" @@ -29,11 +29,11 @@ msgid "" " " msgstr "" -#: plugin.py:53 plugin.py:60 plugin.py:64 +#: plugin.py:54 plugin.py:62 msgid "Host not found." msgstr "" -#: plugin.py:76 +#: plugin.py:74 #, docstring msgid "" "\n" @@ -42,39 +42,39 @@ msgid "" " " msgstr "" -#: plugin.py:82 +#: plugin.py:80 msgid "domain" msgstr "" -#: plugin.py:111 +#: plugin.py:120 msgid "updated %s" msgstr "" -#: plugin.py:114 +#: plugin.py:123 msgid "registered %s" msgstr "" -#: plugin.py:117 +#: plugin.py:126 msgid "expires %s" msgstr "" -#: plugin.py:137 +#: plugin.py:146 msgid " " msgstr "" -#: plugin.py:139 +#: plugin.py:148 msgid " " msgstr "" -#: plugin.py:144 +#: plugin.py:153 msgid "%s%s is %L." msgstr "" -#: plugin.py:147 +#: plugin.py:156 msgid "I couldn't find such a domain." msgstr "" -#: plugin.py:152 +#: plugin.py:161 #, docstring msgid "" "\n" diff --git a/plugins/Karma/locales/fr.po b/plugins/Karma/locales/fr.po index 040cdf3e6..e8df9b0ab 100644 --- a/plugins/Karma/locales/fr.po +++ b/plugins/Karma/locales/fr.po @@ -1,10 +1,10 @@ msgid "" msgstr "" -"Project-Id-Version: Supybot-fr\n" +"Project-Id-Version: Limnoria\n" "POT-Creation-Date: 2011-08-10 11:27+CEST\n" "PO-Revision-Date: \n" "Last-Translator: Valentin Lorentz \n" -"Language-Team: Supybot-fr \n" +"Language-Team: Limnoria \n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/plugins/Karma/messages.pot b/plugins/Karma/messages.pot index a15b8e2b2..6f0015b5d 100644 --- a/plugins/Karma/messages.pot +++ b/plugins/Karma/messages.pot @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2013-11-26 23:54+CET\n" +"POT-Creation-Date: 2014-01-21 16:39+CET\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/plugins/Lart/locales/fr.po b/plugins/Lart/locales/fr.po index 68f09fad6..61eace4f9 100644 --- a/plugins/Lart/locales/fr.po +++ b/plugins/Lart/locales/fr.po @@ -1,10 +1,10 @@ msgid "" msgstr "" -"Project-Id-Version: Supybot-fr\n" +"Project-Id-Version: Limnoria\n" "POT-Creation-Date: 2010-10-17 15:21+CEST\n" "PO-Revision-Date: \n" "Last-Translator: Valentin Lorentz \n" -"Language-Team: Supybot-fr \n" +"Language-Team: Limnoria \n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/plugins/Lart/messages.pot b/plugins/Lart/messages.pot index 52f05d432..dc3655acd 100644 --- a/plugins/Lart/messages.pot +++ b/plugins/Lart/messages.pot @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2011-02-26 09:49+CET\n" +"POT-Creation-Date: 2014-01-21 16:39+CET\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/plugins/Later/locales/fr.po b/plugins/Later/locales/fr.po index c06e1a0be..4dd88701b 100644 --- a/plugins/Later/locales/fr.po +++ b/plugins/Later/locales/fr.po @@ -1,10 +1,10 @@ msgid "" msgstr "" -"Project-Id-Version: Supybot-fr\n" +"Project-Id-Version: Limnoria\n" "POT-Creation-Date: 2011-08-10 11:28+CEST\n" "PO-Revision-Date: \n" "Last-Translator: Valentin Lorentz \n" -"Language-Team: Supybot-fr \n" +"Language-Team: Limnoria \n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/plugins/Later/messages.pot b/plugins/Later/messages.pot index d7b1f3d4a..24f1976c4 100644 --- a/plugins/Later/messages.pot +++ b/plugins/Later/messages.pot @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2013-07-25 11:34+CEST\n" +"POT-Creation-Date: 2014-01-21 16:39+CET\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -50,10 +50,6 @@ msgid "" " Note plugin." msgstr "" -#: plugin.py:84 -msgid "%s ago" -msgstr "" - #: plugin.py:86 msgid "just now" msgstr "" diff --git a/plugins/Limiter/locales/fr.po b/plugins/Limiter/locales/fr.po index 747d3e119..227c7b8ce 100644 --- a/plugins/Limiter/locales/fr.po +++ b/plugins/Limiter/locales/fr.po @@ -1,10 +1,10 @@ msgid "" msgstr "" -"Project-Id-Version: Supybot-fr\n" +"Project-Id-Version: Limnoria\n" "POT-Creation-Date: 2010-10-17 15:35+CEST\n" "PO-Revision-Date: \n" "Last-Translator: Valentin Lorentz \n" -"Language-Team: Supybot-fr \n" +"Language-Team: Limnoria \n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/plugins/Limiter/messages.pot b/plugins/Limiter/messages.pot index 855038a70..1bab025dc 100644 --- a/plugins/Limiter/messages.pot +++ b/plugins/Limiter/messages.pot @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2013-11-26 23:54+CET\n" +"POT-Creation-Date: 2014-01-21 16:39+CET\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/plugins/Math/locales/fr.po b/plugins/Math/locales/fr.po index 9f8d9b856..93b54aa4a 100644 --- a/plugins/Math/locales/fr.po +++ b/plugins/Math/locales/fr.po @@ -1,10 +1,10 @@ msgid "" msgstr "" -"Project-Id-Version: Supybot-fr\n" +"Project-Id-Version: Limnoria\n" "POT-Creation-Date: 2010-10-17 15:35+CEST\n" "PO-Revision-Date: \n" "Last-Translator: Valentin Lorentz \n" -"Language-Team: Supybot-fr \n" +"Language-Team: Limnoria \n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/plugins/Math/messages.pot b/plugins/Math/messages.pot index a781772bb..3ffe952d2 100644 --- a/plugins/Math/messages.pot +++ b/plugins/Math/messages.pot @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2011-02-26 09:49+CET\n" +"POT-Creation-Date: 2014-01-21 16:39+CET\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -15,7 +15,7 @@ msgstr "" "Generated-By: pygettext.py 1.5\n" -#: plugin.py:52 +#: plugin.py:55 #, docstring msgid "" " [] \n" @@ -25,23 +25,23 @@ msgid "" " " msgstr "" -#: plugin.py:63 +#: plugin.py:66 msgid "Invalid for base %s: %s" msgstr "" -#: plugin.py:69 +#: plugin.py:72 #, docstring msgid "Convert a decimal number to another base; returns a string." msgstr "" -#: plugin.py:90 +#: plugin.py:93 #, docstring msgid "" "Convert a number from any base, 2 through 36, to any other\n" " base, 2 through 36. Returns a string." msgstr "" -#: plugin.py:157 +#: plugin.py:167 #, docstring msgid "" "\n" @@ -54,27 +54,31 @@ msgid "" " " msgstr "" -#: plugin.py:166 plugin.py:220 +#: plugin.py:178 +msgid "There's no reason you should have fancy non-ASCII characters in your mathematical expression. Please remove them." +msgstr "" + +#: plugin.py:183 plugin.py:237 msgid "There's really no reason why you should have underscores or brackets in your mathematical expression. Please remove them." msgstr "" -#: plugin.py:172 plugin.py:228 +#: plugin.py:189 plugin.py:245 msgid "You can't use lambda in this command." msgstr "" -#: plugin.py:202 plugin.py:236 +#: plugin.py:219 plugin.py:253 msgid "The answer exceeded %s or so." msgstr "" -#: plugin.py:204 plugin.py:238 +#: plugin.py:221 plugin.py:255 msgid "Something in there wasn't a valid number." msgstr "" -#: plugin.py:206 plugin.py:240 +#: plugin.py:223 plugin.py:257 msgid "%s is not a defined function." msgstr "" -#: plugin.py:213 +#: plugin.py:230 #, docstring msgid "" "\n" @@ -85,7 +89,7 @@ msgid "" " " msgstr "" -#: plugin.py:250 +#: plugin.py:267 #, docstring msgid "" "\n" @@ -94,19 +98,19 @@ msgid "" " " msgstr "" -#: plugin.py:275 +#: plugin.py:292 msgid "Not enough arguments for %s" msgstr "" -#: plugin.py:288 +#: plugin.py:305 msgid "%q is not a defined function." msgstr "" -#: plugin.py:295 +#: plugin.py:312 msgid "Stack: [%s]" msgstr "" -#: plugin.py:299 +#: plugin.py:316 #, docstring msgid "" "[] to \n" @@ -116,7 +120,7 @@ msgid "" " " msgstr "" -#: plugin.py:314 +#: plugin.py:346 #, docstring msgid "" " []\n" diff --git a/plugins/MessageParser/locales/fr.po b/plugins/MessageParser/locales/fr.po index 88f843f87..7984ac844 100644 --- a/plugins/MessageParser/locales/fr.po +++ b/plugins/MessageParser/locales/fr.po @@ -4,7 +4,7 @@ msgstr "" "POT-Creation-Date: 2013-03-02 19:04+CET\n" "PO-Revision-Date: \n" "Last-Translator: Valentin Lorentz \n" -"Language-Team: Supybot-fr \n" +"Language-Team: Limnoria \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" diff --git a/plugins/MessageParser/messages.pot b/plugins/MessageParser/messages.pot index 1a9a92456..0356e993d 100644 --- a/plugins/MessageParser/messages.pot +++ b/plugins/MessageParser/messages.pot @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2013-11-26 23:54+CET\n" +"POT-Creation-Date: 2014-01-21 16:39+CET\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/plugins/Misc/locales/fr.po b/plugins/Misc/locales/fr.po index dac5ed86c..e1a0fdeaf 100644 --- a/plugins/Misc/locales/fr.po +++ b/plugins/Misc/locales/fr.po @@ -1,70 +1,102 @@ msgid "" msgstr "" -"Project-Id-Version: Supybot-fr\n" -"POT-Creation-Date: 2012-07-30 11:30+CEST\n" +"Project-Id-Version: Limnoria\n" +"POT-Creation-Date: 2014-01-21 16:39+CET\n" "PO-Revision-Date: \n" -"Last-Translator: Valentin Lorentz \n" -"Language-Team: Supybot-fr \n" -"Language: \n" +"Last-Translator: \n" +"Language-Team: Limnoria \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Poedit-Language: Français\n" -"X-Poedit-Country: France\n" "X-Poedit-SourceCharset: ASCII\n" +"X-Generator: Poedit 1.5.4\n" #: config.py:45 msgid "" +"Determines how many messages the bot\n" +" will issue when using the 'more' command." +msgstr "" +"Détermine combien de message le bot enverra lorsque l’on utilise la commande " +"« more »." + +#: config.py:48 +msgid "" "Determines whether the bot will list private\n" -" plugins with the list command if given the --private switch. If this is\n" +" plugins with the list command if given the --private switch. If this " +"is\n" " disabled, non-owner users should be unable to see what private plugins\n" " are loaded." -msgstr "Détermine si le bot listera les plugins privés dans la commande 'list', si l'option --private est donné. Si cette variable est désactivée, les utilisateurs non-owner ne pourront pas voir quels plugins privés sont chargés." +msgstr "" +"Détermine si le bot listera les plugins privés dans la commande 'list', si " +"l'option --private est donné. Si cette variable est désactivée, les " +"utilisateurs non-owner ne pourront pas voir quels plugins privés sont " +"chargés." -#: config.py:50 +#: config.py:53 msgid "" "Determines whether the bot will list unloaded\n" -" plugins with the list command if given the --unloaded switch. If this is\n" +" plugins with the list command if given the --unloaded switch. If this " +"is\n" " disabled, non-owner users should be unable to see what unloaded plugins\n" " are available." -msgstr "Détermine si le bot listera les plugins déchargés dans la commande 'list', si l'option --unloaded est donné. Si cette variable est désactivée, les utilisateurs non-owner ne pourront pas voir quels plugins déchargés sont présents." +msgstr "" +"Détermine si le bot listera les plugins déchargés dans la commande 'list', " +"si l'option --unloaded est donné. Si cette variable est désactivée, les " +"utilisateurs non-owner ne pourront pas voir quels plugins déchargés sont " +"présents." -#: config.py:55 +#: config.py:58 msgid "" "Determines the format string for\n" " timestamps in the Misc.last command. Refer to the Python documentation\n" " for the time module to see what formats are accepted. If you set this\n" " variable to the empty string, the timestamp will not be shown." -msgstr "Détermine la chaîne de formattage pour les timestamps de la commande Misc.last. Référez-vous à la documentation de Python sur le module 'time' pour voir quels formats sont acceptés. Si vous définissez cette variable pour être une chaîne vide, le timestamp ne sera pas affiché." +msgstr "" +"Détermine la chaîne de formattage pour les timestamps de la commande Misc." +"last. Référez-vous à la documentation de Python sur le module 'time' pour " +"voir quels formats sont acceptés. Si vous définissez cette variable pour " +"être une chaîne vide, le timestamp ne sera pas affiché." -#: config.py:62 +#: config.py:65 msgid "" "Determines whether or not\n" -" the timestamp will be included in the output of last when it is part of a\n" +" the timestamp will be included in the output of last when it is part of " +"a\n" " nested command" -msgstr "Détermine si le timestamp sera inclu dans la sortie de 'last' lorsqu'il est dans une commande imbriquée." +msgstr "" +"Détermine si le timestamp sera inclu dans la sortie de 'last' lorsqu'il est " +"dans une commande imbriquée." -#: config.py:66 +#: config.py:69 msgid "" "Determines whether or not the\n" " nick will be included in the output of last when it is part of a nested\n" " command" -msgstr "Détermine si le nick est inclu dans la sortie de 'last' lorsqu'il est dans une commande imbriquée." +msgstr "" +"Détermine si le nick est inclu dans la sortie de 'last' lorsqu'il est dans " +"une commande imbriquée." -#: plugin.py:105 -msgid "You've given me %s invalid commands within the last minute; I'm now ignoring you for %s." -msgstr "Vous m'avez donné %s commandes invalides dans la dernière minute, je vous ignore maitenant pendant %s." +#: plugin.py:112 +msgid "" +"You've given me %s invalid commands within the last %i seconds; I'm now " +"ignoring you for %s." +msgstr "" +"Vous m'avez donné %s commandes invalides durant les %i dernières secondes, " +"je vous ignore maintenant pendant %s." -#: plugin.py:144 -msgid "The %q plugin is loaded, but there is no command named %q in it. Try \"list %s\" to see the commands in the %q plugin." -msgstr "Le plugin %q est chargé, mais il n'a pas de commande appelée %q. Essayez \"list %s\" pour voir les commandes dans le plugin %q." +#: plugin.py:154 +msgid "" +"The %q plugin is loaded, but there is no command named %q in it. Try \"list " +"%s\" to see the commands in the %q plugin." +msgstr "" +"Le plugin %q est chargé, mais il n'a pas de commande appelée %q. Essayez " +"\"list %s\" pour voir les commandes dans le plugin %q." -#: plugin.py:150 -#: plugin.py:153 +#: plugin.py:160 plugin.py:163 msgid "command" msgstr "commande" -#: plugin.py:170 +#: plugin.py:180 msgid "" "[--private] [--unloaded] []\n" "\n" @@ -76,25 +108,36 @@ msgid "" msgstr "" "[--private] [--unloaded] []\n" "\n" -"Liste les commandes disponibles dans le plugin donné. Si aucun plugin n'est donné, liste les plugins publics. Si --private est donné, il liste les plugins privés. Si --unloaded est donné, il liste les plugins disponibles qui ne sont pas chargés." +"Liste les commandes disponibles dans le plugin donné. Si aucun plugin n'est " +"donné, liste les plugins publics. Si --private est donné, il liste les " +"plugins privés. Si --unloaded est donné, il liste les plugins disponibles " +"qui ne sont pas chargés." -#: plugin.py:191 +#: plugin.py:201 msgid "--private and --unloaded are uncompatible options." msgstr "--private et --unloaded ne sont pas des options compatibles." -#: plugin.py:222 +#: plugin.py:232 msgid "There are no private plugins." msgstr "Il n'y a pas de plugin privé." -#: plugin.py:224 +#: plugin.py:234 msgid "There are no public plugins." msgstr "Il n'y a pas de plugin privé." -#: plugin.py:231 -msgid "That plugin exists, but has no commands. This probably means that it has some configuration variables that can be changed in order to modify its behavior. Try \"config list supybot.plugins.%s\" to see what configuration variables it has." -msgstr "Ce plugin existe, mais n'a pas de commande. Cela signifie probablement qu'il a des variables de configuration qui peuvent être changés pour modifier son comportement. Essayez \"config list supybot.plugins.%s\" pour voir quelles variables de configuration il a." +#: plugin.py:241 +msgid "" +"That plugin exists, but has no commands. This probably means that it has " +"some configuration variables that can be changed in order to modify its " +"behavior. Try \"config list supybot.plugins.%s\" to see what configuration " +"variables it has." +msgstr "" +"Ce plugin existe, mais n'a pas de commande. Cela signifie probablement qu'il " +"a des variables de configuration qui peuvent être changés pour modifier son " +"comportement. Essayez \"config list supybot.plugins.%s\" pour voir quelles " +"variables de configuration il a." -#: plugin.py:243 +#: plugin.py:253 msgid "" "\n" "\n" @@ -104,33 +147,45 @@ msgid "" msgstr "" "\n" "\n" -"Recherche la dans les commandes actuellement fournies par le bot et retourne une list des commandes contenant cette chaîne." +"Recherche la dans les commandes actuellement fournies par le bot et " +"retourne une list des commandes contenant cette chaîne." -#: plugin.py:262 +#: plugin.py:272 msgid "No appropriate commands were found." msgstr "Aucune commande appropriée n'a été trouvée." -#: plugin.py:267 +#: plugin.py:277 msgid "" "[] []\n" "\n" " This command gives a useful description of what does.\n" -" is only necessary if the command is in more than one plugin.\n" +" is only necessary if the command is in more than one " +"plugin.\n" +"\n" +" You may also want to use the 'list' command to list all available\n" +" plugins and commands.\n" " " msgstr "" "[] []\n" "\n" -"Cette commande donne une description utile de ce que fait la . n'est nécessaire que si la commande est présente dans plus d'un plugin." +"Cette commande donne une description utile de ce que fait la . " +" n'est nécessaire que si la commande est présente dans plus d'un " +"plugin.Il se peut que vous vouliez utiliser la commande « list » pour lister " +"tous les plugins et commandes disponibles." -#: plugin.py:277 -msgid "That command exists in the %L plugins. Please specify exactly which plugin command you want help with." -msgstr "Cette commande existe dans les plugins %L. Veuillez spécifier dans quel plugin se trouve la commande pour laquelle vous cherchez de l'aide." +#: plugin.py:290 +msgid "" +"That command exists in the %L plugins. Please specify exactly which plugin " +"command you want help with." +msgstr "" +"Cette commande existe dans les plugins %L. Veuillez spécifier dans quel " +"plugin se trouve la commande pour laquelle vous cherchez de l'aide." -#: plugin.py:284 +#: plugin.py:297 msgid "There is no command %q." msgstr "Il n'y a pas de commande %q." -#: plugin.py:290 +#: plugin.py:303 msgid "" "takes no arguments\n" "\n" @@ -141,23 +196,26 @@ msgstr "" "\n" "Retourne la version actuelle du bot" -#: plugin.py:306 +#: plugin.py:320 msgid "The newest versions available online are %s." msgstr "Les dernières versions disponibles en ligne sont %s." -#: plugin.py:307 +#: plugin.py:321 msgid "%s (in %s)" msgstr "%s (dans %s)" -#: plugin.py:311 +#: plugin.py:325 msgid "I couldn't fetch the newest version from the Limnoria repository." msgstr "Je ne peux récupérer la dernière version sur le dépôt de Limnoria." -#: plugin.py:313 -msgid "The current (running) version of this Supybot is %s. %s" -msgstr "La version de ce Supybot est %s. %s" +#: plugin.py:327 +msgid "" +"The current (running) version of this Supybot is %s, running on Python %s. " +"%s" +msgstr "" +"La version actuelle de ce Supybot est %s, fonctionnant sur Python %s. %s" -#: plugin.py:320 +#: plugin.py:335 msgid "" "takes no arguments\n" "\n" @@ -168,74 +226,116 @@ msgstr "" "\n" "Retourne une URL disant où trouver Limnoria." -#: plugin.py:324 +#: plugin.py:339 msgid "My source is at https://github.com/ProgVal/Limnoria" msgstr "Ma source est disponible sur https://github.com/ProgVal/Limnoria" -#: plugin.py:329 +#: plugin.py:344 msgid "" "[]\n" "\n" " If the last command was truncated due to IRC message length\n" -" limitations, returns the next chunk of the result of the last command.\n" -" If is given, it takes the continuation of the last command from\n" +" limitations, returns the next chunk of the result of the last " +"command.\n" +" If is given, it takes the continuation of the last command " +"from\n" " instead of the person sending this message.\n" " " msgstr "" "[]\n" "\n" -"Si la dernière commande était tronquée par les limitations de taille des messages sur IRC, retourne le morceau suivant résultant de la dernière commande. Si le est donné, continue la dernière commande du plutôt que de la personne envoyant ce message." +"Si la dernière commande était tronquée par les limitations de taille des " +"messages sur IRC, retourne le morceau suivant résultant de la dernière " +"commande. Si le est donné, continue la dernière commande du " +"plutôt que de la personne envoyant ce message." -#: plugin.py:343 +#: plugin.py:358 msgid "%s has no public mores." msgstr "%s n'a pas de 'more' public." -#: plugin.py:346 +#: plugin.py:361 msgid "Sorry, I can't find any mores for %s" msgstr "Désolé, je ne peux trouver de 'more' pour %s" -#: plugin.py:353 +#: plugin.py:369 msgid "1 more message" msgstr "1 autre message" -#: plugin.py:355 +#: plugin.py:371 msgid "%i more messages" msgstr "%i autres messages" -#: plugin.py:359 -msgid "You haven't asked me a command; perhaps you want to see someone else's more. To do so, call this command with that person's nick." -msgstr "Vous ne m'avez donné aucune commande. Peut-être que vous voulez voir celle de quelqu'un d'autre. Pour cela, appelez cette commande en ajoutant le nick de cette personne." +#: plugin.py:375 +msgid "" +"You haven't asked me a command; perhaps you want to see someone else's " +"more. To do so, call this command with that person's nick." +msgstr "" +"Vous ne m'avez donné aucune commande. Peut-être que vous voulez voir celle " +"de quelqu'un d'autre. Pour cela, appelez cette commande en ajoutant le nick " +"de cette personne." -#: plugin.py:363 +#: plugin.py:379 msgid "That's all, there is no more." msgstr "C'est tout, il n'y a plus de 'more'" -#: plugin.py:373 +#: plugin.py:389 msgid "" "[--{from,in,on,with,without,regexp} ] [--nolimit]\n" "\n" -" Returns the last message matching the given criteria. --from requires\n" -" a nick from whom the message came; --in requires a channel the message\n" -" was sent to; --on requires a network the message was sent on; --with\n" -" requires some string that had to be in the message; --regexp requires\n" +" Returns the last message matching the given criteria. --from " +"requires\n" +" a nick from whom the message came; --in requires a channel the " +"message\n" +" was sent to; --on requires a network the message was sent on; --" +"with\n" +" requires some string that had to be in the message; --regexp " +"requires\n" " a regular expression the message must match; --nolimit returns all\n" -" the messages that can be found. By default, the channel this command is\n" +" the messages that can be found. By default, the channel this " +"command is\n" " given in is searched.\n" " " msgstr "" "[--{from,in,on,with,without,regexp} ] [--nolimit]\n" "\n" -"Retourne le dernier message correspondant aux critères donnés. --from requiert le nick de la personne qui a envoyé le message ; --in requiert le canal sur lequel a été envoyé le message ; --with requiert une chaîne qui doit être dans le message --regexp requiert une expression régulière à laquelle le message doit correspondre ; --nolimit retourne tous les messages qui peuvent être trouvés. Par défaut, recherche dans les logs du canal sur lequel est envoyée cette commande." +"Retourne le dernier message correspondant aux critères donnés. --from " +"requiert le nick de la personne qui a envoyé le message ; --in requiert le " +"canal sur lequel a été envoyé le message ; --with requiert une chaîne qui " +"doit être dans le message --regexp requiert une expression régulière à " +"laquelle le message doit correspondre ; --nolimit retourne tous les messages " +"qui peuvent être trouvés. Par défaut, recherche dans les logs du canal sur " +"lequel est envoyée cette commande." -#: plugin.py:475 +#: plugin.py:484 msgid "The regular expression timed out." msgstr "L'expression régulière a pris trop de temps à être évaluée." -#: plugin.py:488 -msgid "I couldn't find a message matching that criteria in my history of %s messages." -msgstr "Je ne peux trouver de message correspondant à ce critère dans mon historique de %s messages." +#: plugin.py:497 +msgid "" +"I couldn't find a message matching that criteria in my history of %s " +"messages." +msgstr "" +"Je ne peux trouver de message correspondant à ce critère dans mon historique " +"de %s messages." -#: plugin.py:503 +#: plugin.py:516 +msgid "Hey, just give the command. No need for the tell." +msgstr "" +"Oh, contentes-toi de me donner la commande. Pas besoin d'utiliser 'tell'." + +#: plugin.py:521 +msgid "You just told me, why should I tell myself?" +msgstr "Vous venez de me le dire, pourquoi devrais-je me le dire moi-même ?" + +#: plugin.py:526 +msgid "I haven't seen %s, I'll let you do the telling." +msgstr "Je n'ai pas vu %s, je vous laisse lui dire." + +#: plugin.py:531 +msgid "%s wants me to tell you: %s" +msgstr "%s veut que je vous dise : %s" + +#: plugin.py:537 msgid "" " \n" "\n" @@ -247,23 +347,20 @@ msgstr "" "\n" "Dit le au . Utile si vous utilisez des commandes imbriquées." -#: plugin.py:513 -msgid "Hey, just give the command. No need for the tell." -msgstr "Oh, contentes-toi de me donner la commande. Pas besoin d'utiliser 'tell'." +#: plugin.py:547 +msgid "" +" \n" +"\n" +" Tells the whatever is, in a notice. Use nested\n" +" commands to your benefit here.\n" +" " +msgstr "" +" \n" +"\n" +"Dit le à , dans une notice. Utile si vous utilisez des " +"commandes imbriquées." -#: plugin.py:518 -msgid "You just told me, why should I tell myself?" -msgstr "Vous venez de me le dire, pourquoi devrais-je me le dire moi-même ?" - -#: plugin.py:523 -msgid "I haven't seen %s, I'll let you do the telling." -msgstr "Je n'ai pas vu %s, je vous laisse lui dire." - -#: plugin.py:528 -msgid "%s wants me to tell you: %s" -msgstr "%s veut que je vous dise : %s" - -#: plugin.py:535 +#: plugin.py:557 msgid "" "takes no arguments\n" "\n" @@ -274,26 +371,27 @@ msgstr "" "\n" "Vérifie si le bot est encore en vie." -#: plugin.py:539 +#: plugin.py:561 msgid "pong" msgstr "pong" -#: plugin.py:543 +#: plugin.py:565 msgid "" "[] [--match-case]\n" "\n" -" Returns the nick of someone on the channel whose nick begins with the\n" +" Returns the nick of someone on the channel whose nick begins with " +"the\n" " given .\n" " defaults to the current channel." msgstr "" "[] [--match-case]\n" -"Retourne le nick de quelqu'un dans le salon dont le nick commence par les indiquées. correspond par défaut au salon actuel." +"Retourne le nick de quelqu'un dans le salon dont le nick commence par les " +" indiquées. correspond par défaut au salon actuel." -#: plugin.py:549 +#: plugin.py:571 msgid "I'm not even in %s." msgstr "Je ne suis pas dans %s." -#: plugin.py:561 +#: plugin.py:583 msgid "No such nick." msgstr "Ce nick n'existe pas." - diff --git a/plugins/Misc/messages.pot b/plugins/Misc/messages.pot index 0f59df065..2680cc463 100644 --- a/plugins/Misc/messages.pot +++ b/plugins/Misc/messages.pot @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2013-11-26 23:54+CET\n" +"POT-Creation-Date: 2014-01-21 16:39+CET\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -143,23 +143,23 @@ msgid "" " " msgstr "" -#: plugin.py:318 +#: plugin.py:320 msgid "The newest versions available online are %s." msgstr "" -#: plugin.py:319 +#: plugin.py:321 msgid "%s (in %s)" msgstr "" -#: plugin.py:323 +#: plugin.py:325 msgid "I couldn't fetch the newest version from the Limnoria repository." msgstr "" -#: plugin.py:325 +#: plugin.py:327 msgid "The current (running) version of this Supybot is %s, running on Python %s. %s" msgstr "" -#: plugin.py:333 +#: plugin.py:335 #, docstring msgid "" "takes no arguments\n" @@ -168,11 +168,11 @@ msgid "" " " msgstr "" -#: plugin.py:337 +#: plugin.py:339 msgid "My source is at https://github.com/ProgVal/Limnoria" msgstr "" -#: plugin.py:342 +#: plugin.py:344 #, docstring msgid "" "[]\n" @@ -184,31 +184,31 @@ msgid "" " " msgstr "" -#: plugin.py:356 +#: plugin.py:358 msgid "%s has no public mores." msgstr "" -#: plugin.py:359 +#: plugin.py:361 msgid "Sorry, I can't find any mores for %s" msgstr "" -#: plugin.py:367 +#: plugin.py:369 msgid "1 more message" msgstr "" -#: plugin.py:369 +#: plugin.py:371 msgid "%i more messages" msgstr "" -#: plugin.py:373 +#: plugin.py:375 msgid "You haven't asked me a command; perhaps you want to see someone else's more. To do so, call this command with that person's nick." msgstr "" -#: plugin.py:377 +#: plugin.py:379 msgid "That's all, there is no more." msgstr "" -#: plugin.py:387 +#: plugin.py:389 #, docstring msgid "" "[--{from,in,on,with,without,regexp} ] [--nolimit]\n" @@ -223,15 +223,31 @@ msgid "" " " msgstr "" -#: plugin.py:482 +#: plugin.py:484 msgid "The regular expression timed out." msgstr "" -#: plugin.py:495 +#: plugin.py:497 msgid "I couldn't find a message matching that criteria in my history of %s messages." msgstr "" -#: plugin.py:510 +#: plugin.py:516 +msgid "Hey, just give the command. No need for the tell." +msgstr "" + +#: plugin.py:521 +msgid "You just told me, why should I tell myself?" +msgstr "" + +#: plugin.py:526 +msgid "I haven't seen %s, I'll let you do the telling." +msgstr "" + +#: plugin.py:531 +msgid "%s wants me to tell you: %s" +msgstr "" + +#: plugin.py:537 #, docstring msgid "" " \n" @@ -241,23 +257,17 @@ msgid "" " " msgstr "" -#: plugin.py:520 -msgid "Hey, just give the command. No need for the tell." +#: plugin.py:547 +#, docstring +msgid "" +" \n" +"\n" +" Tells the whatever is, in a notice. Use nested\n" +" commands to your benefit here.\n" +" " msgstr "" -#: plugin.py:525 -msgid "You just told me, why should I tell myself?" -msgstr "" - -#: plugin.py:530 -msgid "I haven't seen %s, I'll let you do the telling." -msgstr "" - -#: plugin.py:535 -msgid "%s wants me to tell you: %s" -msgstr "" - -#: plugin.py:542 +#: plugin.py:557 #, docstring msgid "" "takes no arguments\n" @@ -266,11 +276,11 @@ msgid "" " " msgstr "" -#: plugin.py:546 +#: plugin.py:561 msgid "pong" msgstr "" -#: plugin.py:550 +#: plugin.py:565 #, docstring msgid "" "[] [--match-case]\n" @@ -280,11 +290,11 @@ msgid "" " defaults to the current channel." msgstr "" -#: plugin.py:556 +#: plugin.py:571 msgid "I'm not even in %s." msgstr "" -#: plugin.py:568 +#: plugin.py:583 msgid "No such nick." msgstr "" diff --git a/plugins/MoobotFactoids/locales/fr.po b/plugins/MoobotFactoids/locales/fr.po index 7c248174d..a38eca34e 100644 --- a/plugins/MoobotFactoids/locales/fr.po +++ b/plugins/MoobotFactoids/locales/fr.po @@ -1,10 +1,10 @@ msgid "" msgstr "" -"Project-Id-Version: Supybot-fr\n" +"Project-Id-Version: Limnoria\n" "POT-Creation-Date: 2013-03-02 19:04+CET\n" "PO-Revision-Date: \n" "Last-Translator: Valentin Lorentz \n" -"Language-Team: Supybot-fr \n" +"Language-Team: Limnoria \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" diff --git a/plugins/MoobotFactoids/messages.pot b/plugins/MoobotFactoids/messages.pot index 88344976b..0a865266e 100644 --- a/plugins/MoobotFactoids/messages.pot +++ b/plugins/MoobotFactoids/messages.pot @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2012-03-11 20:58+UTC\n" +"POT-Creation-Date: 2014-01-21 16:39+CET\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -28,38 +28,38 @@ msgid "" " when the 'most' command is called." msgstr "" -#: plugin.py:289 +#: plugin.py:285 #, docstring msgid "" "Add the help for \"@help MoobotFactoids\" here (assuming you don't implement a MoobotFactoids\n" " command). This should describe *how* to use this plugin." msgstr "" -#: plugin.py:346 +#: plugin.py:342 msgid "%s is %s" msgstr "" -#: plugin.py:365 +#: plugin.py:361 msgid "Factoid %q is locked." msgstr "" -#: plugin.py:372 +#: plugin.py:368 msgid "Factoid %q not found." msgstr "" -#: plugin.py:382 +#: plugin.py:378 msgid "Missing an 'is' or '_is_'." msgstr "" -#: plugin.py:398 +#: plugin.py:394 msgid "Factoid %q already exists." msgstr "" -#: plugin.py:432 +#: plugin.py:428 msgid "%s, or %s" msgstr "" -#: plugin.py:453 +#: plugin.py:449 #, docstring msgid "" "[] \n" @@ -70,7 +70,7 @@ msgid "" " " msgstr "" -#: plugin.py:466 +#: plugin.py:462 #, docstring msgid "" "[] \n" @@ -81,39 +81,39 @@ msgid "" " " msgstr "" -#: plugin.py:477 plugin.py:517 +#: plugin.py:473 plugin.py:513 msgid "No such factoid: %q" msgstr "" -#: plugin.py:486 +#: plugin.py:482 msgid "Created by %s on %s." msgstr "" -#: plugin.py:492 +#: plugin.py:488 msgid " Last modified by %s on %s." msgstr "" -#: plugin.py:500 +#: plugin.py:496 msgid " Last requested by %s on %s, requested %n." msgstr "" -#: plugin.py:507 +#: plugin.py:503 msgid " Locked by %s on %s." msgstr "" -#: plugin.py:522 +#: plugin.py:518 msgid "Factoid %q is already locked." msgstr "" -#: plugin.py:525 +#: plugin.py:521 msgid "Factoid %q is not locked." msgstr "" -#: plugin.py:535 +#: plugin.py:531 msgid "Cannot %s someone else's factoid unless you are an admin." msgstr "" -#: plugin.py:547 +#: plugin.py:543 #, docstring msgid "" "[] \n" @@ -124,7 +124,7 @@ msgid "" " " msgstr "" -#: plugin.py:558 +#: plugin.py:554 #, docstring msgid "" "[] \n" @@ -135,7 +135,7 @@ msgid "" " " msgstr "" -#: plugin.py:569 +#: plugin.py:565 #, docstring msgid "" "[] {popular|authored|recent}\n" @@ -148,51 +148,51 @@ msgid "" " " msgstr "" -#: plugin.py:591 +#: plugin.py:587 msgid "author" msgstr "" -#: plugin.py:593 +#: plugin.py:589 msgid "authors" msgstr "" -#: plugin.py:594 +#: plugin.py:590 msgid "Most prolific %s: %L" msgstr "" -#: plugin.py:596 plugin.py:608 +#: plugin.py:592 plugin.py:604 msgid "There are no factoids in my database." msgstr "" -#: plugin.py:603 +#: plugin.py:599 msgid "latest factoid" msgstr "" -#: plugin.py:605 +#: plugin.py:601 msgid "latest factoids" msgstr "" -#: plugin.py:606 -msgid "%s: %L" +#: plugin.py:602 +msgid "%i %s: %L" msgstr "" -#: plugin.py:615 +#: plugin.py:611 msgid "requested factoid" msgstr "" -#: plugin.py:617 +#: plugin.py:613 msgid "requested factoids" msgstr "" -#: plugin.py:618 -msgid "Top %s: %L" +#: plugin.py:614 +msgid "Top %i %s: %L" msgstr "" -#: plugin.py:620 +#: plugin.py:616 msgid "No factoids have been requested from my database." msgstr "" -#: plugin.py:624 +#: plugin.py:620 #, docstring msgid "" "[] \n" @@ -204,15 +204,15 @@ msgid "" " " msgstr "" -#: plugin.py:637 +#: plugin.py:633 msgid "No factoids by %q found." msgstr "" -#: plugin.py:640 +#: plugin.py:636 msgid "Author search for %q (%i found): %L" msgstr "" -#: plugin.py:647 +#: plugin.py:643 #, docstring msgid "" "[] \n" @@ -223,15 +223,15 @@ msgid "" " " msgstr "" -#: plugin.py:655 +#: plugin.py:651 msgid "No keys matching %q found." msgstr "" -#: plugin.py:662 +#: plugin.py:658 msgid "Key search for %q (%i found): %L" msgstr "" -#: plugin.py:669 +#: plugin.py:665 #, docstring msgid "" "[] \n" @@ -242,15 +242,15 @@ msgid "" " " msgstr "" -#: plugin.py:677 +#: plugin.py:673 msgid "No values matching %q found." msgstr "" -#: plugin.py:680 +#: plugin.py:676 msgid "Value search for %q (%i found): %L" msgstr "" -#: plugin.py:687 +#: plugin.py:683 #, docstring msgid "" "[] \n" @@ -260,7 +260,7 @@ msgid "" " " msgstr "" -#: plugin.py:700 +#: plugin.py:696 #, docstring msgid "" "[]\n" @@ -271,7 +271,7 @@ msgid "" " " msgstr "" -#: plugin.py:708 +#: plugin.py:704 msgid "No factoids in the database." msgstr "" diff --git a/plugins/Network/locales/fr.po b/plugins/Network/locales/fr.po index c78076501..f050bcc0e 100644 --- a/plugins/Network/locales/fr.po +++ b/plugins/Network/locales/fr.po @@ -1,10 +1,10 @@ msgid "" msgstr "" -"Project-Id-Version: Supybot-fr\n" +"Project-Id-Version: Limnoria\n" "POT-Creation-Date: 2012-07-04 19:47+CEST\n" "PO-Revision-Date: \n" "Last-Translator: Valentin Lorentz \n" -"Language-Team: Supybot-fr \n" +"Language-Team: Limnoria \n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/plugins/Network/messages.pot b/plugins/Network/messages.pot index afed6eb25..6c2fa18e8 100644 --- a/plugins/Network/messages.pot +++ b/plugins/Network/messages.pot @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2013-11-26 23:54+CET\n" +"POT-Creation-Date: 2014-01-21 16:39+CET\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/plugins/News/locales/fr.po b/plugins/News/locales/fr.po index eaa196c33..7032dc9d2 100644 --- a/plugins/News/locales/fr.po +++ b/plugins/News/locales/fr.po @@ -1,10 +1,10 @@ msgid "" msgstr "" -"Project-Id-Version: Supybot-fr\n" +"Project-Id-Version: Limnoria\n" "POT-Creation-Date: 2010-10-17 16:53+CEST\n" "PO-Revision-Date: \n" "Last-Translator: Valentin Lorentz \n" -"Language-Team: Supybot-fr \n" +"Language-Team: Limnoria \n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/plugins/News/messages.pot b/plugins/News/messages.pot index daf0616b5..a7f0feabc 100644 --- a/plugins/News/messages.pot +++ b/plugins/News/messages.pot @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2011-02-26 09:49+CET\n" +"POT-Creation-Date: 2014-01-21 16:39+CET\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/plugins/NickAuth/messages.pot b/plugins/NickAuth/messages.pot index 24ecd48ec..6114b7091 100644 --- a/plugins/NickAuth/messages.pot +++ b/plugins/NickAuth/messages.pot @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2013-07-25 11:34+CEST\n" +"POT-Creation-Date: 2014-01-21 16:39+CET\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/plugins/NickCapture/locales/fr.po b/plugins/NickCapture/locales/fr.po index a2280bc0e..cc3efe0b4 100644 --- a/plugins/NickCapture/locales/fr.po +++ b/plugins/NickCapture/locales/fr.po @@ -1,10 +1,10 @@ msgid "" msgstr "" -"Project-Id-Version: Supybot-fr\n" +"Project-Id-Version: Limnoria\n" "POT-Creation-Date: 2010-10-17 16:58+CEST\n" "PO-Revision-Date: \n" "Last-Translator: Valentin Lorentz \n" -"Language-Team: Supybot-fr \n" +"Language-Team: Limnoria \n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/plugins/NickCapture/messages.pot b/plugins/NickCapture/messages.pot index a95138fab..90e2adfde 100644 --- a/plugins/NickCapture/messages.pot +++ b/plugins/NickCapture/messages.pot @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2012-03-11 20:58+UTC\n" +"POT-Creation-Date: 2014-01-21 16:39+CET\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/plugins/Nickometer/locales/fr.po b/plugins/Nickometer/locales/fr.po index adba1f196..85358f8a1 100644 --- a/plugins/Nickometer/locales/fr.po +++ b/plugins/Nickometer/locales/fr.po @@ -1,10 +1,10 @@ msgid "" msgstr "" -"Project-Id-Version: Supybot-fr\n" +"Project-Id-Version: Limnoria\n" "POT-Creation-Date: 2010-10-17 18:28+CEST\n" "PO-Revision-Date: \n" "Last-Translator: Valentin Lorentz \n" -"Language-Team: Supybot-fr \n" +"Language-Team: Limnoria \n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/plugins/Nickometer/messages.pot b/plugins/Nickometer/messages.pot index 42e1d7d36..14f927e38 100644 --- a/plugins/Nickometer/messages.pot +++ b/plugins/Nickometer/messages.pot @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2011-02-26 09:49+CET\n" +"POT-Creation-Date: 2014-01-21 16:39+CET\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -15,7 +15,7 @@ msgstr "" "Generated-By: pygettext.py 1.5\n" -#: plugin.py:84 +#: plugin.py:87 #, docstring msgid "" "[]\n" @@ -25,7 +25,7 @@ msgid "" " " msgstr "" -#: plugin.py:226 +#: plugin.py:230 msgid "The \"lame nick-o-meter\" reading for \"%s\" is %s%%." msgstr "" diff --git a/plugins/Note/locales/fr.po b/plugins/Note/locales/fr.po index e70fffa69..5d4c7bd49 100644 --- a/plugins/Note/locales/fr.po +++ b/plugins/Note/locales/fr.po @@ -1,10 +1,10 @@ msgid "" msgstr "" -"Project-Id-Version: Supybot-fr\n" +"Project-Id-Version: Limnoria\n" "POT-Creation-Date: 2010-10-29 13:54+CEST\n" "PO-Revision-Date: \n" "Last-Translator: Valentin Lorentz \n" -"Language-Team: Supybot-fr \n" +"Language-Team: Limnoria \n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/plugins/Note/messages.pot b/plugins/Note/messages.pot index 1dceaa30b..7eeb7ce98 100644 --- a/plugins/Note/messages.pot +++ b/plugins/Note/messages.pot @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2012-03-11 20:58+UTC\n" +"POT-Creation-Date: 2014-01-21 16:39+CET\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -65,7 +65,7 @@ msgid "" " " msgstr "" -#: plugin.py:324 +#: plugin.py:326 #, docstring msgid "" "[--{old,sent}] [--{from,to} ]\n" @@ -77,7 +77,7 @@ msgid "" " " msgstr "" -#: plugin.py:365 +#: plugin.py:367 #, docstring msgid "" "takes no arguments\n" diff --git a/plugins/Owner/locales/fr.po b/plugins/Owner/locales/fr.po index bd429a2f7..a805e60db 100644 --- a/plugins/Owner/locales/fr.po +++ b/plugins/Owner/locales/fr.po @@ -1,10 +1,10 @@ msgid "" msgstr "" -"Project-Id-Version: Supybot-fr\n" +"Project-Id-Version: Limnoria\n" "POT-Creation-Date: 2012-03-11 20:58+UTC\n" "PO-Revision-Date: \n" "Last-Translator: Valentin Lorentz \n" -"Language-Team: Supybot-fr \n" +"Language-Team: Limnoria \n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/plugins/Owner/messages.pot b/plugins/Owner/messages.pot index fefcfd010..9f5ea0e09 100644 --- a/plugins/Owner/messages.pot +++ b/plugins/Owner/messages.pot @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2012-03-11 20:58+UTC\n" +"POT-Creation-Date: 2014-01-21 16:39+CET\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -15,7 +15,7 @@ msgstr "" "Generated-By: pygettext.py 1.5\n" -#: plugin.py:273 +#: plugin.py:274 #, docstring msgid "" "\n" @@ -25,7 +25,7 @@ msgid "" " " msgstr "" -#: plugin.py:283 +#: plugin.py:284 #, docstring msgid "" "\n" @@ -35,7 +35,7 @@ msgid "" " " msgstr "" -#: plugin.py:298 +#: plugin.py:299 #, docstring msgid "" "[--remove] []\n" @@ -47,7 +47,7 @@ msgid "" " " msgstr "" -#: plugin.py:336 +#: plugin.py:337 #, docstring msgid "" "\n" @@ -56,7 +56,7 @@ msgid "" " " msgstr "" -#: plugin.py:350 +#: plugin.py:351 #, docstring msgid "" "[]\n" @@ -67,7 +67,7 @@ msgid "" " " msgstr "" -#: plugin.py:366 +#: plugin.py:367 #, docstring msgid "" "takes no arguments\n" @@ -77,7 +77,7 @@ msgid "" " " msgstr "" -#: plugin.py:376 +#: plugin.py:377 #, docstring msgid "" "[]\n" @@ -89,7 +89,7 @@ msgid "" " " msgstr "" -#: plugin.py:415 +#: plugin.py:416 #, docstring msgid "" "[--deprecated] \n" @@ -101,7 +101,7 @@ msgid "" " " msgstr "" -#: plugin.py:450 +#: plugin.py:451 #, docstring msgid "" "\n" @@ -111,7 +111,7 @@ msgid "" " " msgstr "" -#: plugin.py:479 +#: plugin.py:482 #, docstring msgid "" "\n" @@ -122,7 +122,7 @@ msgid "" " " msgstr "" -#: plugin.py:503 +#: plugin.py:506 #, docstring msgid "" "{add|remove} \n" @@ -133,7 +133,7 @@ msgid "" " " msgstr "" -#: plugin.py:528 +#: plugin.py:531 #, docstring msgid "" "[] \n" @@ -146,7 +146,7 @@ msgid "" " " msgstr "" -#: plugin.py:555 +#: plugin.py:558 #, docstring msgid "" "[] \n" @@ -157,7 +157,7 @@ msgid "" " " msgstr "" -#: plugin.py:574 +#: plugin.py:577 #, docstring msgid "" " \n" @@ -166,7 +166,7 @@ msgid "" " " msgstr "" -#: plugin.py:591 +#: plugin.py:594 #, docstring msgid "" "\n" @@ -176,7 +176,7 @@ msgid "" " " msgstr "" -#: plugin.py:604 +#: plugin.py:607 #, docstring msgid "" "takes no argument\n" diff --git a/plugins/Plugin/locales/fr.po b/plugins/Plugin/locales/fr.po index e6b81e714..40f8c5719 100644 --- a/plugins/Plugin/locales/fr.po +++ b/plugins/Plugin/locales/fr.po @@ -1,10 +1,10 @@ msgid "" msgstr "" -"Project-Id-Version: Supybot-fr\n" +"Project-Id-Version: Limnoria\n" "POT-Creation-Date: 2011-02-26 09:49+CET\n" "PO-Revision-Date: \n" "Last-Translator: Valentin Lorentz \n" -"Language-Team: Supybot-fr \n" +"Language-Team: Limnoria \n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/plugins/Plugin/messages.pot b/plugins/Plugin/messages.pot index 29850541f..d6fe977d9 100644 --- a/plugins/Plugin/messages.pot +++ b/plugins/Plugin/messages.pot @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2012-03-11 20:58+UTC\n" +"POT-Creation-Date: 2014-01-21 16:39+CET\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/plugins/PluginDownloader/messages.pot b/plugins/PluginDownloader/messages.pot index 4abf361c2..6501091e9 100644 --- a/plugins/PluginDownloader/messages.pot +++ b/plugins/PluginDownloader/messages.pot @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2013-11-26 23:54+CET\n" +"POT-Creation-Date: 2014-01-21 16:39+CET\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/plugins/Praise/locales/fr.po b/plugins/Praise/locales/fr.po index 935fbef77..7fb007397 100644 --- a/plugins/Praise/locales/fr.po +++ b/plugins/Praise/locales/fr.po @@ -1,10 +1,10 @@ msgid "" msgstr "" -"Project-Id-Version: Supybot-fr\n" +"Project-Id-Version: Limnoria\n" "POT-Creation-Date: 2010-10-17 18:33+CEST\n" "PO-Revision-Date: \n" "Last-Translator: Valentin Lorentz \n" -"Language-Team: Supybot-fr \n" +"Language-Team: Limnoria \n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/plugins/Praise/messages.pot b/plugins/Praise/messages.pot index 7bf6aee74..d9a484e0b 100644 --- a/plugins/Praise/messages.pot +++ b/plugins/Praise/messages.pot @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2012-03-11 20:58+UTC\n" +"POT-Creation-Date: 2014-01-21 16:39+CET\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/plugins/Protector/locales/fr.po b/plugins/Protector/locales/fr.po index 0b4058dac..50153a540 100644 --- a/plugins/Protector/locales/fr.po +++ b/plugins/Protector/locales/fr.po @@ -1,10 +1,10 @@ msgid "" msgstr "" -"Project-Id-Version: Supybot-fr\n" +"Project-Id-Version: Limnoria\n" "POT-Creation-Date: 2010-10-17 18:34+CEST\n" "PO-Revision-Date: \n" "Last-Translator: Valentin Lorentz \n" -"Language-Team: Supybot-fr \n" +"Language-Team: Limnoria \n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/plugins/Protector/messages.pot b/plugins/Protector/messages.pot index fa97aea1f..353e6b38a 100644 --- a/plugins/Protector/messages.pot +++ b/plugins/Protector/messages.pot @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2011-02-26 09:49+CET\n" +"POT-Creation-Date: 2014-01-21 16:39+CET\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/plugins/Quote/locales/fr.po b/plugins/Quote/locales/fr.po index 81a453816..62de54a7e 100644 --- a/plugins/Quote/locales/fr.po +++ b/plugins/Quote/locales/fr.po @@ -1,10 +1,10 @@ msgid "" msgstr "" -"Project-Id-Version: Supybot-fr\n" +"Project-Id-Version: Limnoria\n" "POT-Creation-Date: 2010-10-17 18:34+CEST\n" "PO-Revision-Date: \n" "Last-Translator: Valentin Lorentz \n" -"Language-Team: Supybot-fr \n" +"Language-Team: Limnoria \n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/plugins/Quote/messages.pot b/plugins/Quote/messages.pot index fe018e400..3e957b362 100644 --- a/plugins/Quote/messages.pot +++ b/plugins/Quote/messages.pot @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2011-02-26 09:49+CET\n" +"POT-Creation-Date: 2014-01-21 16:39+CET\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/plugins/QuoteGrabs/locales/fr.po b/plugins/QuoteGrabs/locales/fr.po index 40fe2091f..74c9d1533 100644 --- a/plugins/QuoteGrabs/locales/fr.po +++ b/plugins/QuoteGrabs/locales/fr.po @@ -1,10 +1,10 @@ msgid "" msgstr "" -"Project-Id-Version: Supybot-fr\n" +"Project-Id-Version: Limnoria\n" "POT-Creation-Date: 2010-10-17 18:36+CEST\n" "PO-Revision-Date: \n" "Last-Translator: Valentin Lorentz \n" -"Language-Team: Supybot-fr \n" +"Language-Team: Limnoria \n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/plugins/QuoteGrabs/messages.pot b/plugins/QuoteGrabs/messages.pot index 3f67237ac..08b5a4921 100644 --- a/plugins/QuoteGrabs/messages.pot +++ b/plugins/QuoteGrabs/messages.pot @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2011-02-26 09:49+CET\n" +"POT-Creation-Date: 2014-01-21 16:39+CET\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -44,16 +44,16 @@ msgid "" " random grabbing." msgstr "" -#: plugin.py:66 +#: plugin.py:63 msgid "%s (Said by: %s; grabbed by %s at %t)" msgstr "" -#: plugin.py:226 +#: plugin.py:223 #, docstring msgid "Add the help for \"@help QuoteGrabs\" here." msgstr "" -#: plugin.py:265 +#: plugin.py:262 #, docstring msgid "" "[] \n" @@ -64,15 +64,15 @@ msgid "" " " msgstr "" -#: plugin.py:278 +#: plugin.py:275 msgid "You can't quote grab yourself." msgstr "" -#: plugin.py:285 +#: plugin.py:282 msgid "I couldn't find a proper message to grab." msgstr "" -#: plugin.py:290 +#: plugin.py:287 #, docstring msgid "" "[] \n" @@ -83,15 +83,15 @@ msgid "" " " msgstr "" -#: plugin.py:301 +#: plugin.py:298 msgid "Nothing to ungrab." msgstr "" -#: plugin.py:303 +#: plugin.py:300 msgid "Invalid grab number." msgstr "" -#: plugin.py:308 +#: plugin.py:305 #, docstring msgid "" "[] \n" @@ -101,11 +101,11 @@ msgid "" " " msgstr "" -#: plugin.py:316 +#: plugin.py:313 msgid "I couldn't find a matching quotegrab for %s." msgstr "" -#: plugin.py:322 +#: plugin.py:319 #, docstring msgid "" "[] \n" @@ -117,11 +117,11 @@ msgid "" " " msgstr "" -#: plugin.py:339 +#: plugin.py:336 msgid "I couldn't find any quotegrabs for %s." msgstr "" -#: plugin.py:345 +#: plugin.py:342 #, docstring msgid "" "[] []\n" @@ -132,15 +132,15 @@ msgid "" " " msgstr "" -#: plugin.py:355 +#: plugin.py:352 msgid "Couldn't get a random quote for that nick." msgstr "" -#: plugin.py:357 +#: plugin.py:354 msgid "Couldn't get a random quote. Are there any grabbed quotes in the database?" msgstr "" -#: plugin.py:363 +#: plugin.py:360 #, docstring msgid "" "[] \n" @@ -150,11 +150,11 @@ msgid "" " " msgstr "" -#: plugin.py:371 +#: plugin.py:368 msgid "No quotegrab for id %s" msgstr "" -#: plugin.py:377 +#: plugin.py:374 #, docstring msgid "" "[] \n" @@ -164,7 +164,7 @@ msgid "" " " msgstr "" -#: plugin.py:392 +#: plugin.py:389 msgid "No quotegrabs matching %s" msgstr "" diff --git a/plugins/RSS/locales/fr.po b/plugins/RSS/locales/fr.po index 813a9c75c..7a14914c6 100644 --- a/plugins/RSS/locales/fr.po +++ b/plugins/RSS/locales/fr.po @@ -1,10 +1,10 @@ msgid "" msgstr "" -"Project-Id-Version: Supybot-fr\n" +"Project-Id-Version: Limnoria\n" "POT-Creation-Date: 2012-07-31 19:07+UTC\n" "PO-Revision-Date: \n" "Last-Translator: Valentin Lorentz \n" -"Language-Team: Supybot-fr \n" +"Language-Team: Limnoria \n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/plugins/RSS/messages.pot b/plugins/RSS/messages.pot index fc0bb20a2..8f6301b18 100644 --- a/plugins/RSS/messages.pot +++ b/plugins/RSS/messages.pot @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2013-07-25 11:34+CEST\n" +"POT-Creation-Date: 2014-01-21 16:39+CET\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -121,7 +121,7 @@ msgid "" " announced." msgstr "" -#: plugin.py:63 +#: plugin.py:57 #, docstring msgid "" "This plugin is useful both for announcing updates to RSS feeds in a\n" @@ -130,12 +130,12 @@ msgid "" " command to determine what feeds should be announced in a given channel." msgstr "" -#: plugin.py:320 +#: plugin.py:325 #, docstring msgid "Return feed items, sorted according to sortFeedItems." msgstr "" -#: plugin.py:373 +#: plugin.py:378 #, docstring msgid "" " \n" @@ -145,7 +145,7 @@ msgid "" " " msgstr "" -#: plugin.py:384 +#: plugin.py:389 #, docstring msgid "" "\n" @@ -155,11 +155,11 @@ msgid "" " " msgstr "" -#: plugin.py:390 +#: plugin.py:395 msgid "That's not a valid RSS feed command name." msgstr "" -#: plugin.py:401 +#: plugin.py:406 #, docstring msgid "" "[]\n" @@ -169,11 +169,11 @@ msgid "" " " msgstr "" -#: plugin.py:408 +#: plugin.py:413 msgid "I am currently not announcing any feeds." msgstr "" -#: plugin.py:413 +#: plugin.py:418 #, docstring msgid "" "[] [ ...]\n" @@ -185,7 +185,7 @@ msgid "" " " msgstr "" -#: plugin.py:431 +#: plugin.py:436 #, docstring msgid "" "[] [ ...]\n" @@ -197,7 +197,7 @@ msgid "" " " msgstr "" -#: plugin.py:449 +#: plugin.py:454 #, docstring msgid "" " []\n" @@ -207,11 +207,11 @@ msgid "" " " msgstr "" -#: plugin.py:462 +#: plugin.py:467 msgid "Couldn't get RSS feed." msgstr "" -#: plugin.py:477 +#: plugin.py:482 #, docstring msgid "" "\n" @@ -221,11 +221,11 @@ msgid "" " " msgstr "" -#: plugin.py:490 +#: plugin.py:495 msgid "I couldn't retrieve that RSS feed." msgstr "" -#: plugin.py:503 +#: plugin.py:508 msgid "Title: %s; URL: %u; Description: %s; Last updated: %s." msgstr "" diff --git a/plugins/Relay/locales/fr.po b/plugins/Relay/locales/fr.po index 227dc7079..24ed15b7b 100644 --- a/plugins/Relay/locales/fr.po +++ b/plugins/Relay/locales/fr.po @@ -1,10 +1,10 @@ msgid "" msgstr "" -"Project-Id-Version: Supybot-fr\n" +"Project-Id-Version: Limnoria\n" "POT-Creation-Date: 2010-10-19 19:27+CEST\n" "PO-Revision-Date: \n" "Last-Translator: Valentin Lorentz \n" -"Language-Team: Supybot-fr \n" +"Language-Team: Limnoria \n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/plugins/Relay/messages.pot b/plugins/Relay/messages.pot index 0540d468c..50181317d 100644 --- a/plugins/Relay/messages.pot +++ b/plugins/Relay/messages.pot @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2012-03-11 20:58+UTC\n" +"POT-Creation-Date: 2014-01-21 16:39+CET\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/plugins/Reply/locales/fr.po b/plugins/Reply/locales/fr.po index 8ef1aaad1..9ec7a4e7a 100644 --- a/plugins/Reply/locales/fr.po +++ b/plugins/Reply/locales/fr.po @@ -1,10 +1,10 @@ msgid "" msgstr "" -"Project-Id-Version: Supybot-fr\n" +"Project-Id-Version: Limnoria\n" "POT-Creation-Date: 2011-08-10 11:27+CEST\n" "PO-Revision-Date: \n" "Last-Translator: Valentin Lorentz \n" -"Language-Team: Supybot-fr \n" +"Language-Team: Limnoria \n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/plugins/Reply/messages.pot b/plugins/Reply/messages.pot index 9bd93fe51..25801a00f 100644 --- a/plugins/Reply/messages.pot +++ b/plugins/Reply/messages.pot @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2011-08-10 11:27+CEST\n" +"POT-Creation-Date: 2014-01-21 16:39+CET\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/plugins/Scheduler/locales/fr.po b/plugins/Scheduler/locales/fr.po index 96d81d113..f874e4dd6 100644 --- a/plugins/Scheduler/locales/fr.po +++ b/plugins/Scheduler/locales/fr.po @@ -1,10 +1,10 @@ msgid "" msgstr "" -"Project-Id-Version: Supybot-fr\n" +"Project-Id-Version: Limnoria\n" "POT-Creation-Date: 2010-10-19 19:28+CEST\n" "PO-Revision-Date: \n" "Last-Translator: Valentin Lorentz \n" -"Language-Team: Supybot-fr \n" +"Language-Team: Limnoria \n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/plugins/Scheduler/messages.pot b/plugins/Scheduler/messages.pot index 0dcc3aaee..9efdf6349 100644 --- a/plugins/Scheduler/messages.pot +++ b/plugins/Scheduler/messages.pot @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2012-03-11 20:58+UTC\n" +"POT-Creation-Date: 2014-01-21 16:39+CET\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/plugins/Seen/locales/fr.po b/plugins/Seen/locales/fr.po index 5151f6629..2a777dec3 100644 --- a/plugins/Seen/locales/fr.po +++ b/plugins/Seen/locales/fr.po @@ -1,10 +1,10 @@ msgid "" msgstr "" -"Project-Id-Version: Supybot-fr\n" +"Project-Id-Version: Limnoria\n" "POT-Creation-Date: 2013-03-03 19:39+CET\n" "PO-Revision-Date: \n" "Last-Translator: Valentin Lorentz \n" -"Language-Team: Supybot-fr \n" +"Language-Team: Limnoria \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" diff --git a/plugins/Seen/messages.pot b/plugins/Seen/messages.pot index 4139d9ca8..182f28117 100644 --- a/plugins/Seen/messages.pot +++ b/plugins/Seen/messages.pot @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2013-11-26 23:54+CET\n" +"POT-Creation-Date: 2014-01-21 16:39+CET\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/plugins/Services/locales/fr.po b/plugins/Services/locales/fr.po index 148fa38f7..d10a9e567 100644 --- a/plugins/Services/locales/fr.po +++ b/plugins/Services/locales/fr.po @@ -1,10 +1,10 @@ msgid "" msgstr "" -"Project-Id-Version: Supybot-fr\n" +"Project-Id-Version: Limnoria\n" "POT-Creation-Date: 2010-10-20 08:55+CEST\n" "PO-Revision-Date: \n" "Last-Translator: Valentin Lorentz \n" -"Language-Team: Supybot-fr \n" +"Language-Team: Limnoria \n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/plugins/Services/messages.pot b/plugins/Services/messages.pot index 42e2e7d0b..e54e8317b 100644 --- a/plugins/Services/messages.pot +++ b/plugins/Services/messages.pot @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2012-03-11 20:58+UTC\n" +"POT-Creation-Date: 2014-01-21 16:39+CET\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -114,11 +114,11 @@ msgid "" " necessary if the bot is properly configured." msgstr "" -#: plugin.py:402 +#: plugin.py:406 msgid "You must set supybot.plugins.Services.ChanServ before I'm able to send the %s command." msgstr "" -#: plugin.py:408 +#: plugin.py:412 #, docstring msgid "" "[]\n" @@ -128,11 +128,11 @@ msgid "" " " msgstr "" -#: plugin.py:414 +#: plugin.py:418 msgid "I'm already opped in %s." msgstr "" -#: plugin.py:421 +#: plugin.py:425 #, docstring msgid "" "[]\n" @@ -142,11 +142,11 @@ msgid "" " " msgstr "" -#: plugin.py:427 +#: plugin.py:431 msgid "I'm already voiced in %s." msgstr "" -#: plugin.py:444 +#: plugin.py:448 #, docstring msgid "" "[]\n" @@ -158,7 +158,7 @@ msgid "" " " msgstr "" -#: plugin.py:465 +#: plugin.py:469 #, docstring msgid "" "[]\n" @@ -170,7 +170,7 @@ msgid "" " " msgstr "" -#: plugin.py:486 +#: plugin.py:490 #, docstring msgid "" "takes no arguments\n" @@ -179,15 +179,15 @@ msgid "" " " msgstr "" -#: plugin.py:495 +#: plugin.py:499 msgid "I don't have a configured password for my current nick." msgstr "" -#: plugin.py:498 +#: plugin.py:502 msgid "You must set supybot.plugins.Services.NickServ before I'm able to do identify." msgstr "" -#: plugin.py:504 +#: plugin.py:508 #, docstring msgid "" "[]\n" @@ -197,15 +197,15 @@ msgid "" " " msgstr "" -#: plugin.py:513 +#: plugin.py:517 msgid "I cowardly refuse to ghost myself." msgstr "" -#: plugin.py:518 +#: plugin.py:522 msgid "You must set supybot.plugins.Services.NickServ before I'm able to ghost a nick." msgstr "" -#: plugin.py:524 +#: plugin.py:528 #, docstring msgid "" " []\n" @@ -215,11 +215,11 @@ msgid "" " " msgstr "" -#: plugin.py:534 +#: plugin.py:538 msgid "That nick was not configured with a password." msgstr "" -#: plugin.py:545 +#: plugin.py:549 #, docstring msgid "" "takes no arguments\n" @@ -229,7 +229,7 @@ msgid "" " " msgstr "" -#: plugin.py:555 +#: plugin.py:559 msgid "I'm not currently configured for any nicks." msgstr "" diff --git a/plugins/ShrinkUrl/locales/fr.po b/plugins/ShrinkUrl/locales/fr.po index 204c43869..320f5ef36 100644 --- a/plugins/ShrinkUrl/locales/fr.po +++ b/plugins/ShrinkUrl/locales/fr.po @@ -1,10 +1,10 @@ msgid "" msgstr "" -"Project-Id-Version: Supybot-fr\n" +"Project-Id-Version: Limnoria\n" "POT-Creation-Date: 2013-03-03 19:39+CET\n" "PO-Revision-Date: \n" "Last-Translator: Valentin Lorentz \n" -"Language-Team: Supybot-fr \n" +"Language-Team: Limnoria \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" diff --git a/plugins/ShrinkUrl/messages.pot b/plugins/ShrinkUrl/messages.pot index 25bb37aa8..7e43afa43 100644 --- a/plugins/ShrinkUrl/messages.pot +++ b/plugins/ShrinkUrl/messages.pot @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2013-11-26 23:54+CET\n" +"POT-Creation-Date: 2014-01-21 16:39+CET\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/plugins/Status/locales/fr.po b/plugins/Status/locales/fr.po index 46d60a38d..087386df3 100644 --- a/plugins/Status/locales/fr.po +++ b/plugins/Status/locales/fr.po @@ -1,10 +1,10 @@ msgid "" msgstr "" -"Project-Id-Version: Supybot-fr\n" +"Project-Id-Version: Limnoria\n" "POT-Creation-Date: 2012-03-11 20:58+UTC\n" "PO-Revision-Date: \n" "Last-Translator: Valentin Lorentz \n" -"Language-Team: Supybot-fr \n" +"Language-Team: Limnoria \n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/plugins/Status/messages.pot b/plugins/Status/messages.pot index 18d718fc6..2f553b349 100644 --- a/plugins/Status/messages.pot +++ b/plugins/Status/messages.pot @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2013-11-26 23:54+CET\n" +"POT-Creation-Date: 2014-01-21 16:39+CET\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/plugins/String/locales/fr.po b/plugins/String/locales/fr.po index 1a8074ccc..7574e1101 100644 --- a/plugins/String/locales/fr.po +++ b/plugins/String/locales/fr.po @@ -1,10 +1,10 @@ msgid "" msgstr "" -"Project-Id-Version: Supybot-fr\n" +"Project-Id-Version: Limnoria\n" "POT-Creation-Date: 2013-03-03 19:37+CET\n" "PO-Revision-Date: \n" "Last-Translator: Valentin Lorentz \n" -"Language-Team: Supybot-fr \n" +"Language-Team: Limnoria \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" diff --git a/plugins/String/messages.pot b/plugins/String/messages.pot index 44603803b..4805366ab 100644 --- a/plugins/String/messages.pot +++ b/plugins/String/messages.pot @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2013-11-26 23:54+CET\n" +"POT-Creation-Date: 2014-01-21 16:39+CET\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/plugins/Success/locales/fr.po b/plugins/Success/locales/fr.po index 94218851c..4acfbd3a6 100644 --- a/plugins/Success/locales/fr.po +++ b/plugins/Success/locales/fr.po @@ -1,10 +1,10 @@ msgid "" msgstr "" -"Project-Id-Version: Supybot-fr\n" +"Project-Id-Version: Limnoria\n" "POT-Creation-Date: 2010-10-20 09:09+CEST\n" "PO-Revision-Date: \n" "Last-Translator: Valentin Lorentz \n" -"Language-Team: Supybot-fr \n" +"Language-Team: Limnoria \n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/plugins/Success/messages.pot b/plugins/Success/messages.pot index 0ebb40756..ffeeef750 100644 --- a/plugins/Success/messages.pot +++ b/plugins/Success/messages.pot @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2011-02-26 09:49+CET\n" +"POT-Creation-Date: 2014-01-21 16:39+CET\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/plugins/Time/locales/fr.po b/plugins/Time/locales/fr.po index 4e6e3fd46..5598d62dc 100644 --- a/plugins/Time/locales/fr.po +++ b/plugins/Time/locales/fr.po @@ -1,10 +1,10 @@ msgid "" msgstr "" -"Project-Id-Version: Supybot-fr\n" +"Project-Id-Version: Limnoria\n" "POT-Creation-Date: 2012-03-11 20:58+UTC\n" "PO-Revision-Date: \n" "Last-Translator: Valentin Lorentz \n" -"Language-Team: Supybot-fr \n" +"Language-Team: Limnoria \n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/plugins/Time/messages.pot b/plugins/Time/messages.pot index 74b12320d..4075954f8 100644 --- a/plugins/Time/messages.pot +++ b/plugins/Time/messages.pot @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2013-11-26 23:54+CET\n" +"POT-Creation-Date: 2014-01-21 16:39+CET\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -39,23 +39,24 @@ msgstr "" #: plugin.py:99 #, docstring msgid "" -"