Commit Graph

8672 Commits

Author SHA1 Message Date
Armin Rigo 9c8f7eafca Fixed dis.disassemble_string().
Added dis.findlinestarts().
SF bug 811294
2003-10-28 12:17:25 +00:00
Armin Rigo 2b3eb4062c Deleting cyclic object comparison.
SF patch 825639
http://mail.python.org/pipermail/python-dev/2003-October/039445.html
2003-10-28 12:05:48 +00:00
Andrew M. Kuchling 0f10343410 Docstring fix: XHTML 1.0 entities are supported 2003-10-27 15:47:48 +00:00
Martin v. Löwis 11892ecd6d Patch #817854: Add missing operations for SSLFile. Fixes #792101.
Backported to 2.3.
2003-10-27 14:07:53 +00:00
Steve Purcell cca3491dbe Another instance of the same typo. 2003-10-26 16:38:16 +00:00
Raymond Hettinger d591f666de Replace the window() example with pairwise() which demonstrates tee(). 2003-10-26 15:34:50 +00:00
Raymond Hettinger f0c5aec85f Minor improvements to itertools.tee():
* tee object is no longer subclassable
* independent iterators renamed to "itertools.tee_iterator"
* fixed doc string typo and added entry in the module doc string
2003-10-26 14:25:56 +00:00
Steve Purcell 397b45d4ba Incorporated patch 819077, from George Yoshida:
* Fixed typo in docstring for 'failUnlessAlmostEqual()'

* Removed unnecessary use of 'float()' for time values.

* Removed apparently unnecessary import of unittest. At some point in
  the distant past I believe it was necessary otherwise the 'TestCase'
  that a module saw was not the same as the 'TestCase' seen within
  'unittest', and the user's TestCase subclasses were not recognised as
  subclasses of the TestCase seen within unittest. Seems not to be
  necessary now.
2003-10-26 10:41:03 +00:00
Martin v. Löwis 23b44a39ce Patch #812378: Normalize white space. 2003-10-24 20:09:23 +00:00
Andrew M. Kuchling 10a444965d [Bug #822668] tarfile raises an exception if the tarfile is gzipped and is too large; the gzip filesize should be written out mod 2**32. (Reported by Johan Fredrik Ohman) 2003-10-24 17:38:34 +00:00
Armin Rigo 1b3c04b510 Fixed bug introduced in revision 1.27 2003-10-24 17:15:29 +00:00
Walter Dörwald 4894c30626 Fix a bug in the memory reallocation code of PyUnicode_TranslateCharmap().
charmaptranslate_makespace() allocated more memory than required for the
next replacement but didn't remember that fact, so memory size was growing
exponentially every time a replacement string is longer that one character.
This fixes SF bug #828737.
2003-10-24 14:25:28 +00:00
Raymond Hettinger 6a5b027742 Added itertools.tee()
It works like the pure python verion except:
* it stops storing data after of the iterators gets deallocated
* the data queue is implemented with two stacks instead of one dictionary.
2003-10-24 08:45:23 +00:00
Martin v. Löwis d4210bc718 Patch #813200: Quote executable path on Windows. Fixes #811082.
Backported to 2.3.
2003-10-23 15:55:28 +00:00
Guido van Rossum 38443c1513 Remove unneeded import. 2003-10-22 17:22:18 +00:00
Raymond Hettinger 97aa32b467 Replace a reduce() with sum(). 2003-10-22 16:49:01 +00:00
Andrew M. Kuchling 7cebbf39a9 Add docstring 2003-10-22 14:38:54 +00:00
Andrew M. Kuchling 6c2871e707 [Part of patch #648322] Delete the poll2() function, which uses a 'poll' extension module that was once part of Medusa. Contributed by Kjetil Jacobsen 2003-10-22 14:38:27 +00:00
Andrew M. Kuchling f9ca409292 [Bug #758241] When you use asyncore with a non-default map, methods
of the dispatcher object break.  e.g. if you close() the object, it
  tries to remove itself from the default map, not from the map the
  dispatcher was created with.

  The patch, from Stephane Ninin, records the map as an attribute of
  the dispatcher instance.

2.3 bugfix candidate.
2003-10-22 13:48:27 +00:00
Jeremy Hylton fcefd0d2a5 Apply patch 823328 -- support for rfc 2617 digestion authentication.
The patch was tweaked slightly.  It's get a different mechanism for
generating the cnonce which uses /dev/urandom when possible to
generate less-easily-guessed random input.

Also rearrange the imports so that they are alphabetical and
duplicates are eliminated.

Add a few XXX comments about things left undone and things that could
be improved.
2003-10-21 18:07:07 +00:00
Fred Drake 8c4da53afe Make both items() methods return lists; one had changed to return an
iterator where it probably shouldn't have.
Closes SF bug #818861.
2003-10-21 16:45:00 +00:00
Guido van Rossum 571720811b Show microseconds, milliseconds or seconds, whichever is most natural,
rather than showing weird numbers like 8.4e+03 usec.
2003-10-20 23:38:28 +00:00
Walter Dörwald f0dfc7ac5c Fix a bunch of typos in documentation, docstrings and comments.
(From SF patch #810751)
2003-10-20 14:01:56 +00:00
Martin v. Löwis 9e62ff287b Patch #822994: Consolidate tests for self.closed. 2003-10-18 10:20:42 +00:00
Gustavo Niemeyer ad3fc44ccb Implemented non-recursive SRE matching. 2003-10-17 22:13:16 +00:00
Raymond Hettinger 6b59f5f3fd Let library modules use the new keyword arguments for list.sort(). 2003-10-16 05:53:16 +00:00
Raymond Hettinger 42b1ba31af * list.sort() now supports three keyword arguments: cmp, key, and reverse.
key provides C support for the decorate-sort-undecorate pattern.
  reverse provide a stable sort of the list with the comparisions reversed.

* Amended the docs to guarantee sort stability.
2003-10-16 03:41:09 +00:00
Jeremy Hylton d0e2705f3f Open results files, which contain binary pickles, in binary mode.
Remove fallback code that tries to read marshal data from a results
file, since this module never writes marshal data.
2003-10-14 20:12:06 +00:00
Brett Cannon 2bfb94c871 Add test__locale to expected skip list for Darwin. 2003-10-13 04:27:47 +00:00
Martin v. Löwis d662548c72 Patch #810914: Return absolute path for mkstemp. Fixes #810408.
This should not be backported to 2.3, as it might break backwards
compatibility.
2003-10-12 17:37:01 +00:00
Raymond Hettinger 411c602349 Minor fixup. "Random" was listed twice in __all__. 2003-10-12 17:14:11 +00:00
Brett Cannon 8da2a52dd6 See rev. 1.42 for log message 2003-10-12 04:29:10 +00:00
Brett Cannon 82860df417 see rev. 1.13 for log message 2003-10-12 04:29:10 +00:00
Guido van Rossum 80bd5ca722 Ouch. Remove debug code containing obscenities. :-) 2003-10-10 23:05:41 +00:00
Guido van Rossum b427c00376 The fullmodname() function chopped off the first character if the
module existed in the current directory.  Fix this.  Backport
candidate (I presume).
2003-10-10 23:02:01 +00:00
Barry Warsaw b97f0b7654 TCPServer: Fixed typo in class docstring. 2003-10-09 23:48:52 +00:00
Barry Warsaw 3aaad5079b TCPServer: Fixed typo in class docstring.
Backport candidate.
2003-10-09 22:44:05 +00:00
Martin v. Löwis f563c8bbac Patch #817329: Use SC_OPEN_MAX to determine MAXFD. Backported to 2.3. 2003-10-06 21:34:33 +00:00
Jeremy Hylton 0a4a50dd85 SF patch [ 816787 ] urllib2.URLError don't calll IOError.__init__
Not sure if this fix is great, but it's probably a small improvement.
2003-10-06 05:15:13 +00:00
Jeremy Hylton 504de6bd2c Fix for SF bug [ 817156 ] invalid \U escape gives 0=length unistr. 2003-10-06 05:08:26 +00:00
Raymond Hettinger dbe3d280e7 Adopt Christian Stork's suggested argument order for the logic quantifiers.
Adopt Jeremy Fincher's suggested function name, "any", instead of "some".
2003-10-05 16:47:36 +00:00
Raymond Hettinger 2f726e9093 SF bug #812202: randint is always even
* Added C coded getrandbits(k) method that runs in linear time.
* Call the new method from randrange() for ranges >= 2**53.
* Adds a warning for generators not defining getrandbits() whenever they
  have a call to randrange() with too large of a population.
2003-10-05 09:09:15 +00:00
Barry Warsaw b8c787606c GNUTranslations._parse(): Initialize local variable k so that if the
first line of a header section isn't an RFC-ish header, it's just
ignored instead of throwing an UnboundLocalError.

Backport candidate.
2003-10-04 02:28:31 +00:00
Skip Montanaro 0b87444b1b tweak the docstring to not be so focused on 1.6. 2003-10-03 14:05:26 +00:00
Skip Montanaro dffeed3ffa Make the fieldnames argument optional in the DictReader. If self.fieldnames
is None, the next row read is used as the fieldnames.  In the common case,
this means the programmer doesn't need to know the fieldnames ahead of time.
The first row of the file will be used.  In the uncommon case, this means
the programmer can set the reader's fieldnames attribute to None at any time
and have the next row read as the next set of fieldnames, so a csv file can
contain several "sections", each with different fieldnames.
2003-10-03 14:03:01 +00:00
Gregory P. Smith be0db8b125 bsddb3 4.2.2, adds DBCursor.get_current_size() method to return the length
of the current value without reading the value itself.
2003-10-01 06:48:51 +00:00
Steve Purcell 3a01b7d66e Removed redundant 'return' statement. (Issue 813159) 2003-09-30 09:25:32 +00:00
Gregory P. Smith 1eb41e22ab Use a threadsafe private DBEnv for each bsddb compatibility interface
db that is opened.  DB_THREAD and DB_INIT_LOCK allow for multithreaded
access.  DB_PRIVATE prevents the DBEnv from using the filesystem
(making it only usable by this process; and in this implementation
using one DBEnv per bsddb database)
2003-09-27 23:00:19 +00:00
Raymond Hettinger 9edae346dd Fix typo in the comments. 2003-09-24 03:57:36 +00:00
Raymond Hettinger 3778f40389 Add more identity tests. 2003-09-24 03:56:07 +00:00