]> granicus.if.org Git - python/log
python
21 years agoMinor improvements to itertools.tee():
Raymond Hettinger [Sun, 26 Oct 2003 14:25:56 +0000 (14:25 +0000)]
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

21 years agoIncorporated patch 819077, from George Yoshida:
Steve Purcell [Sun, 26 Oct 2003 10:41:03 +0000 (10:41 +0000)]
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.

21 years agoregressing the performance bugfix -- Guido wants the performance bug left
Alex Martelli [Sat, 25 Oct 2003 23:24:14 +0000 (23:24 +0000)]
regressing the performance bugfix -- Guido wants the performance bug left
alone, because there can be no guarantee re the semantics of += vs + .

21 years agooh dear. Wrong manipulation. Committed a version of ceval.c from my
Armin Rigo [Sat, 25 Oct 2003 14:33:09 +0000 (14:33 +0000)]
oh dear. Wrong manipulation. Committed a version of ceval.c from my
no-cyclic-comparison patch at the same time as errors.c.

Reverting ceval.c to the previous revision.

21 years agoMade function declaration a proper C prototype
Armin Rigo [Sat, 25 Oct 2003 14:29:27 +0000 (14:29 +0000)]
Made function declaration a proper C prototype

21 years agoSF #829941, update tutorial, built-in types can be base classes since 2.2
Neal Norwitz [Sat, 25 Oct 2003 14:15:54 +0000 (14:15 +0000)]
SF #829941, update tutorial, built-in types can be base classes since 2.2

21 years agodocument the performance fix to builtin_sum().
Alex Martelli [Sat, 25 Oct 2003 13:02:57 +0000 (13:02 +0000)]
document the performance fix to builtin_sum().

21 years agoChanged builtin_sum to use PyNumber_InPlaceAdd (same semantics, but fixes
Alex Martelli [Sat, 25 Oct 2003 12:49:56 +0000 (12:49 +0000)]
Changed builtin_sum to use PyNumber_InPlaceAdd (same semantics, but fixes
a performance bug in sum(manylists)), same as in 2.3 maintenance branch.

21 years agoUse PyArg_UnpackTuple() where possible.
Raymond Hettinger [Sat, 25 Oct 2003 06:41:37 +0000 (06:41 +0000)]
Use PyArg_UnpackTuple() where possible.

21 years agoImprovements to coding for itertools.tee():
Raymond Hettinger [Sat, 25 Oct 2003 06:37:47 +0000 (06:37 +0000)]
Improvements to coding for itertools.tee():

* Add error checking code to PyList_Append() call.

* Replace PyObject_CallMethod(to->outbasket, "pop", NULL) with equivalent
  in-line code.  Inlining is important here because the search for the
  pop method will occur for every element returned by the iterator.

* Make tee's dealloc() a little smarter.  If the trailing iterator is
  being deallocated, then the queue data is no longer needed and can
  be freed.

21 years agoPatch #812378: Normalize white space.
Martin v. Löwis [Fri, 24 Oct 2003 20:09:23 +0000 (20:09 +0000)]
Patch #812378: Normalize white space.

21 years agoPatch #828384: Don't discard nested exception in AddObject.
Martin v. Löwis [Fri, 24 Oct 2003 20:05:32 +0000 (20:05 +0000)]
Patch #828384: Don't discard nested exception in AddObject.

21 years ago[Patch #772077 from Tim Rice] Fix for compiling the readline module on UnixWare;...
Andrew M. Kuchling [Fri, 24 Oct 2003 18:26:26 +0000 (18:26 +0000)]
[Patch #772077 from Tim Rice] Fix for compiling the readline module on UnixWare; fix goofy comment indent.  2.3 bugfix candidate

21 years ago[Bug #822668] tarfile raises an exception if the tarfile is gzipped and is too large...
Andrew M. Kuchling [Fri, 24 Oct 2003 17:38:34 +0000 (17:38 +0000)]
[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)

21 years agoFixed bug introduced in revision 1.27
Armin Rigo [Fri, 24 Oct 2003 17:15:29 +0000 (17:15 +0000)]
Fixed bug introduced in revision 1.27

21 years agoFix a bug in the memory reallocation code of PyUnicode_TranslateCharmap().
Walter Dörwald [Fri, 24 Oct 2003 14:25:28 +0000 (14:25 +0000)]
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.

21 years agoAdded itertools.tee()
Raymond Hettinger [Fri, 24 Oct 2003 08:45:23 +0000 (08:45 +0000)]
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.

21 years ago- The pwd module incorrectly advertised its struct type as
Guido van Rossum [Thu, 23 Oct 2003 23:54:57 +0000 (23:54 +0000)]
- The pwd module incorrectly advertised its struct type as
  struct_pwent; this has been renamed to struct_passwd.  (The old name
  is still supported for backwards compatibility.)

21 years agoRecord an item I missed and bump the version number. [2.3 bugfix candidate.]
Andrew M. Kuchling [Thu, 23 Oct 2003 18:08:03 +0000 (18:08 +0000)]
Record an item I missed and bump the version number.  [2.3 bugfix candidate.]

21 years agoPatch #813200: Quote executable path on Windows. Fixes #811082.
Martin v. Löwis [Thu, 23 Oct 2003 15:55:28 +0000 (15:55 +0000)]
Patch #813200: Quote executable path on Windows. Fixes #811082.
Backported to 2.3.

21 years ago- add "Why is Python installed on my computer?" as a documentation FAQ
Fred Drake [Thu, 23 Oct 2003 14:33:46 +0000 (14:33 +0000)]
- add "Why is Python installed on my computer?" as a documentation FAQ
  since this gets asked at the docs at python.org address a lot
- fix some minor style violations and inconsistencies

21 years agoRemove unneeded import.
Guido van Rossum [Wed, 22 Oct 2003 17:22:18 +0000 (17:22 +0000)]
Remove unneeded import.

21 years agoReplace a reduce() with sum().
Raymond Hettinger [Wed, 22 Oct 2003 16:49:01 +0000 (16:49 +0000)]
Replace a reduce() with sum().

21 years agoAdd docstring
Andrew M. Kuchling [Wed, 22 Oct 2003 14:38:54 +0000 (14:38 +0000)]
Add docstring

21 years ago[Part of patch #648322] Delete the poll2() function, which uses a 'poll' extension...
Andrew M. Kuchling [Wed, 22 Oct 2003 14:38:27 +0000 (14:38 +0000)]
[Part of patch #648322] Delete the poll2() function, which uses a 'poll' extension module that was once part of Medusa.  Contributed by Kjetil Jacobsen

21 years ago[Bug #809174] loads() and dumps() not documented
Andrew M. Kuchling [Wed, 22 Oct 2003 14:12:03 +0000 (14:12 +0000)]
[Bug #809174] loads() and dumps() not documented

21 years ago[Bug #758241] When you use asyncore with a non-default map, methods
Andrew M. Kuchling [Wed, 22 Oct 2003 13:48:27 +0000 (13:48 +0000)]
[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.

21 years agoAvoid confusing name for the 3rd argument to str.replace().
Fred Drake [Wed, 22 Oct 2003 02:56:40 +0000 (02:56 +0000)]
Avoid confusing name for the 3rd argument to str.replace().
This closes SF bug #827260.

21 years agoDon't make promises about about the visibility of the induction variable.
Raymond Hettinger [Tue, 21 Oct 2003 18:42:21 +0000 (18:42 +0000)]
Don't make promises about about the visibility of the induction variable.

21 years agoRemoving bogus Py_DECREF() reported by Armin Rigo (SF bug 812353).
Jeremy Hylton [Tue, 21 Oct 2003 18:14:20 +0000 (18:14 +0000)]
Removing bogus Py_DECREF() reported by Armin Rigo (SF bug 812353).

Even if a new dict is generated for locals, it is stored in
f->f_locals.

21 years agoFix indentation.
Jeremy Hylton [Tue, 21 Oct 2003 18:10:28 +0000 (18:10 +0000)]
Fix indentation.

21 years agoApply patch 823328 -- support for rfc 2617 digestion authentication.
Jeremy Hylton [Tue, 21 Oct 2003 18:07:07 +0000 (18:07 +0000)]
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.

21 years ago- make this section format
Fred Drake [Tue, 21 Oct 2003 17:58:55 +0000 (17:58 +0000)]
- make this section format
- start cleaning up the markup for consistency
- comment out the reference to a MS KnowledgeBase article that doesn't
  seem to be present at msdn.microsoft.com; hopefully someone can
  point out an alternate source for the relevant information

21 years agoadd missing dependency
Fred Drake [Tue, 21 Oct 2003 17:25:05 +0000 (17:25 +0000)]
add missing dependency

21 years agomarkup fixes; this would not format
Fred Drake [Tue, 21 Oct 2003 17:04:21 +0000 (17:04 +0000)]
markup fixes; this would not format

21 years agoConfigParser.items() and SafeConfigParser.items() no longer return a
Fred Drake [Tue, 21 Oct 2003 16:50:55 +0000 (16:50 +0000)]
ConfigParser.items() and SafeConfigParser.items() no longer return a
generator.  See SF bug #818861.

21 years agoMake both items() methods return lists; one had changed to return an
Fred Drake [Tue, 21 Oct 2003 16:45:00 +0000 (16:45 +0000)]
Make both items() methods return lists; one had changed to return an
iterator where it probably shouldn't have.
Closes SF bug #818861.

21 years agoNote the update to Expat 1.95.7.
Fred Drake [Tue, 21 Oct 2003 15:41:59 +0000 (15:41 +0000)]
Note the update to Expat 1.95.7.

21 years agoProvide a bit more information to the compiler when building Expat.
Fred Drake [Tue, 21 Oct 2003 15:41:15 +0000 (15:41 +0000)]
Provide a bit more information to the compiler when building Expat.
This avoids having to modify the Expat sources in any way starting
with Expat 1.95.7.

21 years agoUpdate to Expat 1.95.7; there are no changes to the Expat sources.
Fred Drake [Tue, 21 Oct 2003 15:38:55 +0000 (15:38 +0000)]
Update to Expat 1.95.7; there are no changes to the Expat sources.

21 years agoAdd some more items
Andrew M. Kuchling [Tue, 21 Oct 2003 12:48:23 +0000 (12:48 +0000)]
Add some more items

21 years agoDocument list.sort() changes
Andrew M. Kuchling [Tue, 21 Oct 2003 12:31:16 +0000 (12:31 +0000)]
Document list.sort() changes

21 years agoShow microseconds, milliseconds or seconds, whichever is most natural,
Guido van Rossum [Mon, 20 Oct 2003 23:38:28 +0000 (23:38 +0000)]
Show microseconds, milliseconds or seconds, whichever is most natural,
rather than showing weird numbers like 8.4e+03 usec.

21 years agoUse 'predicate = bool' as the default predicate for ifilter[false].
Guido van Rossum [Mon, 20 Oct 2003 17:01:07 +0000 (17:01 +0000)]
Use 'predicate = bool' as the default predicate for ifilter[false].

21 years agoFix a bunch of typos in documentation, docstrings and comments.
Walter Dörwald [Mon, 20 Oct 2003 14:01:56 +0000 (14:01 +0000)]
Fix a bunch of typos in documentation, docstrings and comments.
(From SF patch #810751)

21 years agoModify the Py_RETURN_* macros to be of the form ``do {...} while (0)`` in order
Brett Cannon [Sun, 19 Oct 2003 22:58:11 +0000 (22:58 +0000)]
Modify the Py_RETURN_* macros to be of the form ``do {...} while (0)`` in order
to handle situations like ``if (foo) Py_RETURN_NONE else ...``.

21 years agoModified the Py_RETURN_* macros by having the statements surrounded by {} in
Brett Cannon [Sun, 19 Oct 2003 21:31:43 +0000 (21:31 +0000)]
Modified the Py_RETURN_* macros by having the statements surrounded by {} in
order to prevent any unexpected surprises from someone using them in a
conditional without using curly braces (e.g., ``if (foo) Py_RETURN_TRUE``.

21 years agoDefined macros Py_RETURN_(TRUE|FALSE|NONE) as helper functions for returning
Brett Cannon [Sun, 19 Oct 2003 21:19:40 +0000 (21:19 +0000)]
Defined macros Py_RETURN_(TRUE|FALSE|NONE) as helper functions for returning
the specified value.  All three Py_INCREF the singleton and then return it.

21 years agoPatch #823259: Update spec file:
Martin v. Löwis [Sun, 19 Oct 2003 18:34:52 +0000 (18:34 +0000)]
Patch #823259: Update spec file:
- skip building HTML documentation if it is not available.
- Removal of patches, which can't be referenced from a build
directly from the tar-file.
- Using the RPM tmp directory macro for the buildroot location.
- Ensuring that the clean directive doesn't accidentally
delete the users root directory or another directory.
- --enable-unicode=ucs4 in configure line.
Backported to 2.3.

21 years agoMake CObjects mutable. Fixes #477441.
Martin v. Löwis [Sun, 19 Oct 2003 18:30:01 +0000 (18:30 +0000)]
Make CObjects mutable. Fixes #477441.

21 years agoPatch #821093: Fix various typos.
Martin v. Löwis [Sun, 19 Oct 2003 07:32:24 +0000 (07:32 +0000)]
Patch #821093: Fix various typos.

21 years agoPatch #792869: Clarify error message for parameters declared global,
Martin v. Löwis [Sat, 18 Oct 2003 22:05:25 +0000 (22:05 +0000)]
Patch #792869: Clarify error message for parameters declared global,
rename LOCAL_GLOBAL to PARAM_GLOBAL.

21 years agoRemoving dead code.
Gustavo Niemeyer [Sat, 18 Oct 2003 20:54:44 +0000 (20:54 +0000)]
Removing dead code.

21 years agoFixed \versionadded for the (?(id/name)yes|no) expression support.
Gustavo Niemeyer [Sat, 18 Oct 2003 15:28:22 +0000 (15:28 +0000)]
Fixed \versionadded for the (?(id/name)yes|no) expression support.

21 years agoPatch #822994: Consolidate tests for self.closed.
Martin v. Löwis [Sat, 18 Oct 2003 10:20:42 +0000 (10:20 +0000)]
Patch #822994: Consolidate tests for self.closed.

21 years agoPatch #825679: Clarify semantics of .isfoo on empty strings.
Martin v. Löwis [Sat, 18 Oct 2003 09:55:08 +0000 (09:55 +0000)]
Patch #825679: Clarify semantics of .isfoo on empty strings.
Backported to 2.3.

21 years agoPatch #809535: Mention behaviour of seek on text files. Backported to 2.3.
Martin v. Löwis [Sat, 18 Oct 2003 09:38:01 +0000 (09:38 +0000)]
Patch #809535: Mention behaviour of seek on text files. Backported to 2.3.

21 years agoImplemented non-recursive SRE matching.
Gustavo Niemeyer [Fri, 17 Oct 2003 22:13:16 +0000 (22:13 +0000)]
Implemented non-recursive SRE matching.

21 years agoTypo found by Lokasz Pankowski:
Thomas Heller [Thu, 16 Oct 2003 19:40:48 +0000 (19:40 +0000)]
Typo found by Lokasz Pankowski:

dir_created -> directory_created

21 years agoFix typo found by Neal Norwitz.
Raymond Hettinger [Thu, 16 Oct 2003 17:16:30 +0000 (17:16 +0000)]
Fix typo found by Neal Norwitz.

21 years agoLet library modules use the new keyword arguments for list.sort().
Raymond Hettinger [Thu, 16 Oct 2003 05:53:16 +0000 (05:53 +0000)]
Let library modules use the new keyword arguments for list.sort().

21 years ago* list.sort() now supports three keyword arguments: cmp, key, and reverse.
Raymond Hettinger [Thu, 16 Oct 2003 03:41:09 +0000 (03:41 +0000)]
* 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.

21 years agoAdded Bjorn Pettersen for initial conversion of Lib/platform.py's docstring to LaTeX.
Brett Cannon [Tue, 14 Oct 2003 21:47:28 +0000 (21:47 +0000)]
Added Bjorn Pettersen for initial conversion of Lib/platform.py's docstring to LaTeX.

21 years agoInitial checkin of docs for Lib/platform.py .
Brett Cannon [Tue, 14 Oct 2003 21:45:59 +0000 (21:45 +0000)]
Initial checkin of docs for Lib/platform.py .
Closes patch #785752 and bug #726911.

Should be backported after correctness and such has been verified by Fred.

21 years agoOpen results files, which contain binary pickles, in binary mode.
Jeremy Hylton [Tue, 14 Oct 2003 20:12:06 +0000 (20:12 +0000)]
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.

21 years agoSF bug #821701: reduce docs neglect a very important piece of information.
Raymond Hettinger [Mon, 13 Oct 2003 17:52:35 +0000 (17:52 +0000)]
SF bug #821701:  reduce docs neglect a very important piece of information.

Add a note showing which argument is the accumulator.

21 years agoSF #822262, Typo in Doc/api/intro.tex
Neal Norwitz [Mon, 13 Oct 2003 17:47:30 +0000 (17:47 +0000)]
SF #822262, Typo in Doc/api/intro.tex

21 years agoAdd test__locale to expected skip list for Darwin.
Brett Cannon [Mon, 13 Oct 2003 04:27:47 +0000 (04:27 +0000)]
Add test__locale to expected skip list for Darwin.

21 years agofix for bug [819860]: make sure the buffer gets emptied, even if WEInsert() fails
Just van Rossum [Sun, 12 Oct 2003 19:27:24 +0000 (19:27 +0000)]
fix for bug [819860]: make sure the buffer gets emptied, even if WEInsert() fails

21 years agoSimplify and speedup uses of Py_BuildValue():
Raymond Hettinger [Sun, 12 Oct 2003 19:09:37 +0000 (19:09 +0000)]
Simplify and speedup uses of Py_BuildValue():

* Py_BuildValue("(OOO)",a,b,c)  -->  PyTuple_Pack(3,a,b,c)
* Py_BuildValue("()",a)         -->  PyTuple_New(0)
* Py_BuildValue("O", a)         -->  Py_INCREF(a)

21 years agoExtended tuple's C API to include a new function, PyTuple_Pack() that is
Raymond Hettinger [Sun, 12 Oct 2003 18:24:34 +0000 (18:24 +0000)]
Extended tuple's C API to include a new function, PyTuple_Pack() that is
useful for rapidly building argument tuples without having to invoke the
more sophisticated machinery of Py_BuildValue().

21 years agoPatch #810914: Return absolute path for mkstemp. Fixes #810408.
Martin v. Löwis [Sun, 12 Oct 2003 17:37:01 +0000 (17:37 +0000)]
Patch #810914: Return absolute path for mkstemp. Fixes #810408.
This should not be backported to 2.3, as it might break backwards
compatibility.

21 years agoMinor fixup. "Random" was listed twice in __all__.
Raymond Hettinger [Sun, 12 Oct 2003 17:14:11 +0000 (17:14 +0000)]
Minor fixup.  "Random" was listed twice in __all__.

21 years agoAdd mention of urlparse becoming RFC 2396 compliant.
Brett Cannon [Sun, 12 Oct 2003 04:38:48 +0000 (04:38 +0000)]
Add mention of urlparse becoming RFC 2396 compliant.

21 years ago(revision purely to add comment)
Brett Cannon [Sun, 12 Oct 2003 04:38:06 +0000 (04:38 +0000)]
(revision purely to add comment)

Make urlparse RFC 2396 compliant.
Closes bug #450225 (thanks Michael Stone).

21 years ago(just for comment to fix previous commit comment)
Brett Cannon [Sun, 12 Oct 2003 04:36:18 +0000 (04:36 +0000)]
(just for comment to fix previous commit comment)

Add Michael Stone for helping with bug #450225 (making urlparse RFC 2396
compliant).

21 years agoSee rev. 1.250 for log message
Brett Cannon [Sun, 12 Oct 2003 04:29:10 +0000 (04:29 +0000)]
See rev. 1.250 for log message

21 years agoSee rev. 1.42 for log message
Brett Cannon [Sun, 12 Oct 2003 04:29:10 +0000 (04:29 +0000)]
See rev. 1.42 for log message

21 years agosee rev. 1.13 for log message
Brett Cannon [Sun, 12 Oct 2003 04:29:10 +0000 (04:29 +0000)]
see rev. 1.13 for log message

21 years agoSF patch #819955: Erroneous \seemodule in tarfile docs
Raymond Hettinger [Sun, 12 Oct 2003 02:02:16 +0000 (02:02 +0000)]
SF patch #819955:  Erroneous \seemodule in tarfile docs
(Contributed by Johannes Gijsbers.)

21 years agoUse the simpler and faster PyArg_UnpackTuple() instead of
Raymond Hettinger [Sat, 11 Oct 2003 19:32:18 +0000 (19:32 +0000)]
Use the simpler and faster PyArg_UnpackTuple() instead of
PyArg_ParseTuple() where possible.

21 years agoSF bug #820397: __nonzero__() returns 1/0
Raymond Hettinger [Sat, 11 Oct 2003 17:29:04 +0000 (17:29 +0000)]
SF bug #820397:  __nonzero__() returns 1/0

Altered to return a PyBool instead of a PyInt.

Backport candidate.

21 years agoadd some information about using graphics with the Python document
Fred Drake [Sat, 11 Oct 2003 05:25:24 +0000 (05:25 +0000)]
add some information about using graphics with the Python document
classes

21 years agoOuch. Remove debug code containing obscenities. :-)
Guido van Rossum [Fri, 10 Oct 2003 23:05:41 +0000 (23:05 +0000)]
Ouch.  Remove debug code containing obscenities. :-)

21 years agoThe fullmodname() function chopped off the first character if the
Guido van Rossum [Fri, 10 Oct 2003 23:02:01 +0000 (23:02 +0000)]
The fullmodname() function chopped off the first character if the
module existed in the current directory.  Fix this.  Backport
candidate (I presume).

21 years agoTo build on windows, the manual editing of the python_nt.rc file to
Thomas Heller [Fri, 10 Oct 2003 16:57:45 +0000 (16:57 +0000)]
To build on windows, the manual editing of the python_nt.rc file to
change the version number is no longer required.

Instead, a make_versioninfo.exe is compiled, which spits out an
include file for python_nt.rc.

Will backport to 2.3

21 years agoTCPServer: Fixed typo in class docstring.
Barry Warsaw [Thu, 9 Oct 2003 23:48:52 +0000 (23:48 +0000)]
TCPServer: Fixed typo in class docstring.

21 years agoTCPServer: Fixed typo in class docstring.
Barry Warsaw [Thu, 9 Oct 2003 22:44:05 +0000 (22:44 +0000)]
TCPServer: Fixed typo in class docstring.

Backport candidate.

21 years agoReturn a bool rather than an int from proxy_has_key().
Guido van Rossum [Thu, 9 Oct 2003 03:47:08 +0000 (03:47 +0000)]
Return a bool rather than an int from proxy_has_key().

21 years agoFix leak introduced by previous typeobject.c checkin.
Guido van Rossum [Thu, 9 Oct 2003 03:46:35 +0000 (03:46 +0000)]
Fix leak introduced by previous typeobject.c checkin.

21 years agoSF patch #820195 by Wojtek Walczak (gminick at users.sourceforge.net):
Guido van Rossum [Wed, 8 Oct 2003 21:08:29 +0000 (21:08 +0000)]
SF patch #820195 by Wojtek Walczak (gminick at users.sourceforge.net):
make obj.__contains__() returns True/False instead of 1/0.

21 years agoFix a typo, discovered by Joonas Paalasmaa.
Thomas Heller [Wed, 8 Oct 2003 12:01:33 +0000 (12:01 +0000)]
Fix a typo, discovered by Joonas Paalasmaa.

Backported to 2.3

21 years agoPatch #817329: Use SC_OPEN_MAX to determine MAXFD. Backported to 2.3.
Martin v. Löwis [Mon, 6 Oct 2003 21:34:33 +0000 (21:34 +0000)]
Patch #817329: Use SC_OPEN_MAX to determine MAXFD. Backported to 2.3.

21 years agoSF patch [ 816787 ] urllib2.URLError don't calll IOError.__init__
Jeremy Hylton [Mon, 6 Oct 2003 05:15:13 +0000 (05:15 +0000)]
SF patch [ 816787 ] urllib2.URLError don't calll IOError.__init__

Not sure if this fix is great, but it's probably a small improvement.

21 years agoFix for SF bug [ 817156 ] invalid \U escape gives 0=length unistr.
Jeremy Hylton [Mon, 6 Oct 2003 05:08:26 +0000 (05:08 +0000)]
Fix for SF bug [ 817156 ] invalid \U escape gives 0=length unistr.

21 years agoAdopt Christian Stork's suggested argument order for the logic quantifiers.
Raymond Hettinger [Sun, 5 Oct 2003 16:47:36 +0000 (16:47 +0000)]
Adopt Christian Stork's suggested argument order for the logic quantifiers.
Adopt Jeremy Fincher's suggested function name, "any", instead of "some".

21 years agoSF bug #812202: randint is always even
Raymond Hettinger [Sun, 5 Oct 2003 09:09:15 +0000 (09:09 +0000)]
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.

21 years agotwo bugfixes
Anthony Baxter [Sat, 4 Oct 2003 08:04:04 +0000 (08:04 +0000)]
two bugfixes

21 years agomade the SGI INET_ADDRSTRLEN define apply for any compiler on Irix. Both the
Anthony Baxter [Sat, 4 Oct 2003 08:00:49 +0000 (08:00 +0000)]
made the SGI INET_ADDRSTRLEN define apply for any compiler on Irix. Both the
SGI compiler and GCC seem to need this.

21 years agoFreeBSD 4.8 and MacOS X 10.2 have a broken ncurses.h - if you don't
Anthony Baxter [Sat, 4 Oct 2003 07:46:23 +0000 (07:46 +0000)]
FreeBSD 4.8 and MacOS X 10.2 have a broken ncurses.h - if you don't
define _XOPEN_EXTENDED_SOURCE, the bug isn't triggered. Testing on
FreeBSD shows that nothing is broken by this change.