Commit Graph

100 Commits

Author SHA1 Message Date
Jeremy Fincher
fc87901a89 Added some more XXXes for dangerfan. 2005-07-18 04:46:41 +00:00
Jeremy Fincher
27ac845628 Moved some XXXes around, added some methods (so naming them isn't hard) and a new XXX about methods that return file objects. 2005-07-18 04:37:32 +00:00
Jeremy Fincher
91874dba2c Added some XXXes to transaction.py. 2005-07-16 05:09:49 +00:00
Jeremy Fincher
5b8400e158 Removed utils.iter.one, which was dumb, because iterators have a .next() method that does the same thing. 2005-07-08 09:14:45 +00:00
Jeremy Fincher
a88f52bc7f Forgot to change the exception name in one of the spots it was raised in. 2005-07-06 03:59:46 +00:00
Jeremy Fincher
e9c52f6a5f Prefixed some non-public method names with an underscore. 2005-07-06 03:59:16 +00:00
Jeremy Fincher
612a8e1183 Added utils.{transaction,error} 2005-07-05 17:48:00 +00:00
Jeremy Fincher
b369039507 Added utils.iter.one, to grab one value from an iterable. 2005-06-12 04:54:15 +00:00
Jeremy Fincher
b5f1e2a3e7 Added utils.iter.limited, an iterable that limits the number of elements that can be taken from another iterable. 2005-05-30 19:19:11 +00:00
Jeremy Fincher
a1e707caa2 Changed Synchronized to make attributes (and changing the attributes' names) more maintainable. 2005-05-16 18:42:38 +00:00
Jeremy Fincher
79fc5b5994 Fixed a bug in the way Synchronized was implemented. 2005-05-16 00:23:44 +00:00
Jeremy Fincher
cbf154b4ff Fixed Synchronized to allow synchronization of methods not defined in the current class. 2005-05-15 18:26:50 +00:00
Jeremy Fincher
4b0600a91a Added a Synchronized metaclass. 2005-05-15 17:41:07 +00:00
Jeremy Fincher
2394005cdd Moved utils.changeFunctionName to utils.python. 2005-05-15 17:17:26 +00:00
Jeremy Fincher
1d357dd470 Some more slight tweaks to the MetaFirewall implementation and stuff. 2005-05-15 17:08:02 +00:00
Jeremy Fincher
00fc0584ed Put more useful information into the docstring for utils.seq.window. 2005-05-15 16:12:43 +00:00
James Vega
7bfc9cbdd3 utils/str: Rename nth to ordinal and have it return the full string instead of just the ordinal ending. 2005-05-09 17:20:43 +00:00
Glen Mailer
7deadddbe8 utils.str.nth 2005-05-08 01:46:35 +00:00
Jeremy Fincher
c66e7b3e6e Added a utils.python module for python-esque things. 2005-04-09 17:04:27 +00:00
Jeremy Fincher
29fc5681d3 Added a touch function to the file utils module. 2005-04-04 06:01:17 +00:00
Jeremy Fincher
c8d114b9bc Added a few useful file functions. 2005-04-04 05:46:22 +00:00
James Vega
9971e991fe Fix the modelines. 2005-03-23 20:07:45 +00:00
George-Cristian Bîrzan
7aae5ae41e fix alternate separator with slash in first part of regexp 2005-03-17 19:51:24 +00:00
Jeremy Fincher
c598e4cca9 Added a few more UNKNOWN_HOST types. 2005-03-14 02:32:48 +00:00
James Vega
aefcd594df Move structures to utils/ 2005-03-12 18:01:47 +00:00
Jeremy Fincher
6aca01bafb Made utils.file.mktemp a little more stochastic. 2005-02-18 07:04:48 +00:00
Jeremy Fincher
4808a68f7d Added utils.iter.startswith. 2005-02-17 23:30:54 +00:00
Jeremy Fincher
7389f1757c Forgot an import which broke choice. 2005-02-16 02:15:51 +00:00
James Vega
90c000793d utils.gen.* functions shouldn't explicitly be called since they're all in the utils namespace. 2005-02-15 13:57:57 +00:00
Jeremy Fincher
6580fc535f 2.4 defines groupby, so there's no need to define our own. 2005-02-04 05:55:04 +00:00
Jeremy Fincher
5ca79f0f49 Hah, changed WebError to Error everywhere but the source :) 2005-02-02 14:07:20 +00:00
Jeremy Fincher
dbd9e9f16c Added a %r handler (repr, just like normal string formatting). 2005-02-02 13:09:14 +00:00
Jeremy Fincher
f6e132dde4 Added test_format.py, added floating point formatting to format, and fixed a bug in the %t format. 2005-02-01 11:57:50 +00:00
Jeremy Fincher
f44be3b864 Allow timestamps in format to be None, indicating the current time. 2005-02-01 09:53:08 +00:00
Jeremy Fincher
74717061f2 Forgot to add u to the _formatRe. 2005-02-01 09:35:35 +00:00
Jeremy Fincher
4ac7bb4717 Added a %u specifier to format, for URLs. 2005-02-01 09:26:44 +00:00
Jeremy Fincher
8897e6458b Removed test/test_fix.py, moving its tests to test/test_utils.py, and fixed the resulting bugs that were discovered. 2005-02-01 07:08:30 +00:00
Jeremy Fincher
2b6994428e Fixed a bug that was introduced in nItems. 2005-02-01 07:06:36 +00:00
Jeremy Fincher
65893c8e3c Added emailRe to utils.net. 2005-02-01 06:34:58 +00:00
James Vega
afc3c3f94a Fix some calls to pluralize to not use the extra argument. Also updated the pluralize tests. 2005-01-31 15:59:44 +00:00
James Vega
4d32d36982 Update a few more places that use utils.str functions. 2005-01-31 15:21:22 +00:00
James Vega
de89bf0265 Update usage of utils.str functions. 2005-01-31 14:52:27 +00:00
James Vega
47aa4c0f7c Remove the extra argument to utils.str.pluralize.
We previously had a second argument to utils.str.pluralize which determined
whether we truly plurazlied a word or not.  This has been removed so that
the function does what it says it does.
2005-01-31 13:37:47 +00:00
James Vega
9099a1a934 Update utils.str.format to support specifying an 'and' string. 2005-01-31 13:29:28 +00:00
James Vega
28cb5abc65 Update usage of functions in utils.gen. 2005-01-31 13:06:43 +00:00
Jeremy Fincher
5c72ded4a8 Stupid spelling error in a docstring. 2005-01-28 15:30:15 +00:00
Jeremy Fincher
a19a979499 Robustified and improved utils.str.format a bit; added a simple test. 2005-01-28 15:23:18 +00:00
Jeremy Fincher
90e901702b Moved toBool to go before format in utils/str.py. 2005-01-28 15:21:03 +00:00
Jeremy Fincher
34f1fe6562 Swapped the argument order for nItems *again*. 2005-01-28 15:17:26 +00:00
Jeremy Fincher
5fd6bbb52d Completely restructured our utils modules.
Tons of changes.  Here's the summary of things that matter most:

* There is no more supybot.fix.
* There is no more supybot.webutils; now there is supybot.utils.web.
  * It's no longer webutils.WebError, but just utils.web.Error.
* You shouldn't import itertools, ideally, but instead import utils.iter.
* No more using imap/ifilter in commands unless absolutely necessary.  It's
  premature optimization and annoying.
* utils.str.format isn't quite ready yet, but will be soon.  That'll be the
  next big thing to fix in our code.
2005-01-27 06:59:08 +00:00