]> granicus.if.org Git - python/log
python
21 years agoRemove 'e.g.' from error message
Raymond Hettinger [Sat, 30 Aug 2003 23:57:36 +0000 (23:57 +0000)]
Remove 'e.g.' from error message

21 years agoSF patch #797180: Bug 792656: slicing explained
Raymond Hettinger [Sat, 30 Aug 2003 23:31:31 +0000 (23:31 +0000)]
SF patch #797180: Bug 792656: slicing explained

21 years agoSF patch #797868: Tutorial, sec. 5.1.4 could contain an extra example
Raymond Hettinger [Sat, 30 Aug 2003 23:21:32 +0000 (23:21 +0000)]
SF patch #797868:  Tutorial, sec. 5.1.4 could contain an extra example
(Revised from the original patch contributed by Michal Pasternak.)

Also, make a couple minor fixups elsewhere.

21 years agoSF patch #736962: Port tests to unittest
Raymond Hettinger [Sat, 30 Aug 2003 22:54:55 +0000 (22:54 +0000)]
SF patch #736962:  Port tests to unittest
(Contributed by Walter Dörwald).

* Convert three test modules to unittest format.
* Expanded coverage in test_structseq.py.
* Raymond added a new test in test_sets.py

21 years agoSF bug 797650: Infinite loop in textwrap.py
Raymond Hettinger [Sat, 30 Aug 2003 14:43:55 +0000 (14:43 +0000)]
SF bug 797650: Infinite loop in textwrap.py

When the indents were set to longer than the width and long word breaking
was enabled, an infinite loop would result because the inner loop did not
assure that at least one character was stripped off on every pass.

21 years agoEliminate unnecessary eval() in tests
Raymond Hettinger [Sat, 30 Aug 2003 01:24:19 +0000 (01:24 +0000)]
Eliminate unnecessary eval() in tests

21 years agoFor safety, replace a tuple entry before decreffing it.
Raymond Hettinger [Sat, 30 Aug 2003 00:10:06 +0000 (00:10 +0000)]
For safety, replace a tuple entry before decreffing it.

21 years agoSF bug #793826: using itertools.izip to mutate tuples
Raymond Hettinger [Fri, 29 Aug 2003 23:09:58 +0000 (23:09 +0000)]
SF bug #793826:  using itertools.izip to mutate tuples

Avoid Armin Rigo's dastardly exercise in re-entrancy.

21 years agoRework previous fix slightly; the &0x20 test seems useless, and the isprint() check...
Andrew M. Kuchling [Fri, 29 Aug 2003 18:50:59 +0000 (18:50 +0000)]
Rework previous fix slightly; the &0x20 test seems useless, and the isprint() check mustn't prevent the meta-bit check at the end

21 years agoAdd tests for meta- bit set
Andrew M. Kuchling [Fri, 29 Aug 2003 18:49:05 +0000 (18:49 +0000)]
Add tests for meta- bit set

21 years ago[Bug #790356] unctrl() doesn't work for full printable charset. Fix by Dave Cinege.
Andrew M. Kuchling [Fri, 29 Aug 2003 18:40:03 +0000 (18:40 +0000)]
[Bug #790356] unctrl() doesn't work for full printable charset.  Fix by Dave Cinege.

21 years agoAdd simple unit test for ascii.unctrl() function
Andrew M. Kuchling [Fri, 29 Aug 2003 18:37:37 +0000 (18:37 +0000)]
Add simple unit test for ascii.unctrl() function

21 years ago[Bug #776542] open_https() generates a bad Authorization header because it calls...
Andrew M. Kuchling [Fri, 29 Aug 2003 18:12:23 +0000 (18:12 +0000)]
[Bug #776542] open_https() generates a bad Authorization header because it calls .putheader() wrongly.  Reported by Steffen Ries.

21 years ago[Bug #780231] One of the changes described in the 2.3 "What's New" document
Andrew M. Kuchling [Fri, 29 Aug 2003 17:49:26 +0000 (17:49 +0000)]
[Bug #780231]  One of the changes described in the 2.3 "What's New" document
   actually occurred in 2.2.  Move the description to whatsnew22.tex.

[Bugfix candidate -- I'll backport to 2.3 (another 2.2 bugfix seems unlikely)

21 years agofix minor syntactic faux pas
Fred Drake [Fri, 29 Aug 2003 04:09:26 +0000 (04:09 +0000)]
fix minor syntactic faux pas

21 years agoMake sure parentheses are escaped when used in the format string.
Brett Cannon [Fri, 29 Aug 2003 02:28:54 +0000 (02:28 +0000)]
Make sure parentheses are escaped when used in the format string.
Closes bug #796149 .  Will be backported.

21 years agoSupport DBEnv.set_shm_key() to allow multi-threaded multi-process
Gregory P. Smith [Thu, 28 Aug 2003 21:50:30 +0000 (21:50 +0000)]
Support DBEnv.set_shm_key() to allow multi-threaded multi-process
database environments to use shared memory on systems supporting it.

21 years agoFix for SF bug [ 784075 ] Fatal Python error: unknown scope
Jeremy Hylton [Thu, 28 Aug 2003 14:42:14 +0000 (14:42 +0000)]
Fix for SF bug [ 784075 ] Fatal Python error: unknown scope

Make sure the inner function is not compiled when there is a syntax
error in the default arguments.

21 years agoFix SF bug [ 788011 ] compiler.compileFile fails on csv.py
Jeremy Hylton [Thu, 28 Aug 2003 02:09:26 +0000 (02:09 +0000)]
Fix SF bug [ 788011 ] compiler.compileFile fails on csv.py

Bug fix candidate.

21 years agoFix typo in docstring: The switch is '-x', not '-s'.
Thomas Heller [Wed, 27 Aug 2003 20:19:35 +0000 (20:19 +0000)]
Fix typo in docstring: The switch is '-x', not '-s'.

Will backport to 2.3 myself.

21 years agoremove extra word occurance; reported to webmaster
Fred Drake [Wed, 27 Aug 2003 15:11:40 +0000 (15:11 +0000)]
remove extra word occurance; reported to webmaster

21 years agoRemove a typo. (Or is this some markup I don't understand? ;-)
Thomas Heller [Wed, 27 Aug 2003 10:48:12 +0000 (10:48 +0000)]
Remove a typo. (Or is this some markup I don't understand? ;-)

21 years agoSF bug #795506: Wrong handling of string format code for float values.
Raymond Hettinger [Wed, 27 Aug 2003 04:55:52 +0000 (04:55 +0000)]
SF bug #795506:  Wrong handling of string format code for float values.

Adding missing support for '%F'.

Will backport to 2.3.1.

21 years agotest_largefile can leave its temp file open if one of many tests fail. On
Jason Tishler [Tue, 26 Aug 2003 11:59:27 +0000 (11:59 +0000)]
test_largefile can leave its temp file open if one of many tests fail. On
platforms (e.g., Cygwin) that are "particular" about open files, this will
cause other regression tests that use the same temp file to fail:

    $ ./python.exe -E -tt Lib/test/regrtest.py -l
    test_largefile test_mmap test_mutants
    test_largefile
    test test_largefile failed -- got -1794967295L, but expected 2500000001L
    test_mmap
    test test_mmap crashed -- exceptions.IOError: [Errno 13] Permission denied: '@test'
    test_mutants
    test test_mutants crashed -- exceptions.IOError: [Errno 13] Permission denied: '@test'

This patch solves the problem by adding missing "try/finally" blocks. Note
that the "large" size of this patch is due to many white space changes --
otherwise, the patch is small.

I tested this patch under Red Hat Linux 8.0 too.

21 years agoMake the derived tools amendable to cut and paste.
Raymond Hettinger [Mon, 25 Aug 2003 05:06:09 +0000 (05:06 +0000)]
Make the derived tools amendable to cut and paste.

21 years agoFix doubled word typos.
Raymond Hettinger [Mon, 25 Aug 2003 04:43:53 +0000 (04:43 +0000)]
Fix doubled word typos.

21 years agoAdded doubled word warnings.
Raymond Hettinger [Mon, 25 Aug 2003 04:39:55 +0000 (04:39 +0000)]
Added doubled word warnings.

21 years agoFix double word typos.
Raymond Hettinger [Mon, 25 Aug 2003 04:28:05 +0000 (04:28 +0000)]
Fix double word typos.

21 years agoSF bug #793702: Section 13.1 HTMLParser documentation error
Raymond Hettinger [Mon, 25 Aug 2003 03:31:28 +0000 (03:31 +0000)]
SF bug #793702:  Section 13.1 HTMLParser documentation error

The -- is special to TeX and was printing as just -.

21 years agoFix typo.
Raymond Hettinger [Sat, 23 Aug 2003 03:49:08 +0000 (03:49 +0000)]
Fix typo.

Thou shalt not count to two unless proceeding to the number three.

21 years agoFix typo.
Raymond Hettinger [Sat, 23 Aug 2003 03:38:11 +0000 (03:38 +0000)]
Fix typo.

21 years agoFix a loooong-standing brainfart: I got the site-packages path for
Greg Ward [Sat, 23 Aug 2003 02:09:18 +0000 (02:09 +0000)]
Fix a loooong-standing brainfart: I got the site-packages path for
Python 1.5.2 wrong in the section on config files.

21 years agoBuild the bzip2.lib as a custom pre-link step in MSVC.
Thomas Heller [Wed, 20 Aug 2003 18:27:36 +0000 (18:27 +0000)]
Build the bzip2.lib as a custom pre-link step in MSVC.

21 years agoOpening the WISE script changes a few items:
Thomas Heller [Wed, 20 Aug 2003 17:27:42 +0000 (17:27 +0000)]
Opening the WISE script changes a few items:
I have a different WISE version, and it's installed in a different directory.
My sytem directory is somewhere else.

21 years agoUpdate get_param() description to reflect changes to the docstring.
Barry Warsaw [Tue, 19 Aug 2003 04:26:59 +0000 (04:26 +0000)]
Update get_param() description to reflect changes to the docstring.

21 years agoBump the version number for the standalone mimelib package.
Barry Warsaw [Tue, 19 Aug 2003 04:05:25 +0000 (04:05 +0000)]
Bump the version number for the standalone mimelib package.

21 years agoDescribe the fix to the email package.
Barry Warsaw [Tue, 19 Aug 2003 03:59:09 +0000 (03:59 +0000)]
Describe the fix to the email package.

21 years agotest_rfc2231_no_language_or_charset_in_filename(),
Barry Warsaw [Tue, 19 Aug 2003 03:54:24 +0000 (03:54 +0000)]
test_rfc2231_no_language_or_charset_in_filename(),
test_rfc2231_no_language_or_charset_in_boundary(),
test_rfc2231_no_language_or_charset_in_charset(): New tests for proper
decoding of some RFC 2231 headers.

Backport candidate (as was the Utils.py 1.25 change) to both Python
2.3.1 and 2.2.4 -- will do momentarily.

21 years agoget_param(): Update the docstring to explain how CHARSET and LANGUAGE
Barry Warsaw [Tue, 19 Aug 2003 03:53:02 +0000 (03:53 +0000)]
get_param(): Update the docstring to explain how CHARSET and LANGUAGE
can be None, and what to do in that situation.

get_filename(), get_boundary(), get_content_charset(): Make sure these
handle RFC 2231 headers without a CHARSET field.

Backport candidate (as was the Utils.py 1.25 change) to both Python
2.3.1 and 2.2.4 -- will do momentarily.

21 years agodecode_rfc2231(): We need to urllib.unquote() the value even if the
Barry Warsaw [Tue, 19 Aug 2003 03:49:34 +0000 (03:49 +0000)]
decode_rfc2231(): We need to urllib.unquote() the value even if the
charset and language fields are not present, e.g. as in:

    title*0="This%20is%20encoded"

21 years agoThis started opening files in text mode by default in the 2.3 release,
Tim Peters [Mon, 18 Aug 2003 23:52:09 +0000 (23:52 +0000)]
This started opening files in text mode by default in the 2.3 release,
which is a disaster on Windows.  Restored the binary default of all
previous releases.  Also minor code cleanups.

Bugfix candidate!

21 years agoFix a crash: when sq_item failed the code continued blindly and used the
Walter Dörwald [Mon, 18 Aug 2003 18:28:45 +0000 (18:28 +0000)]
Fix a crash: when sq_item failed the code continued blindly and used the
NULL pointer. (Detected by Michael Hudson, patch provided by Neal Norwitz).

Fix refcounting leak in filtertuple().

21 years agoRemove a stray single quote.
Thomas Heller [Mon, 18 Aug 2003 17:53:33 +0000 (17:53 +0000)]
Remove a stray single quote.
Will backport to release23-maint.

21 years agoSF #784031: Byte-order bug in socket-module getaddrinfo.c
Raymond Hettinger [Sun, 17 Aug 2003 21:28:39 +0000 (21:28 +0000)]
SF #784031:  Byte-order bug in socket-module getaddrinfo.c

21 years agoImprovements to set.py:
Raymond Hettinger [Sun, 17 Aug 2003 08:34:09 +0000 (08:34 +0000)]
Improvements to set.py:

* Relaxed the argument restrictions for non-operator methods.  They now
  allow any iterable instead of requiring a set.  This makes the module
  a little easier to use and paves the way for an efficient C
  implementation which can take better advantage of iterable arguments
  while screening out immutables.

* Deprecated Set.update() because it now duplicates Set.union_update()

* Adapted the tests and docs to include the above changes.

* Added more test coverage including testing identities and checking
  to make sure non-restartable generators work as arguments.

Will backport to Py2.3.1 so that the interface remains consistent
across versions.  The deprecation of update() will be changed to
a FutureWarning.

21 years agoAdjust some horizontal indentation to be consistent with the style used
Fred Drake [Sat, 16 Aug 2003 06:30:47 +0000 (06:30 +0000)]
Adjust some horizontal indentation to be consistent with the style used
throughout the documentation.

21 years agoKeep doctests in sync with the docs.
Raymond Hettinger [Sat, 16 Aug 2003 00:59:59 +0000 (00:59 +0000)]
Keep doctests in sync with the docs.

21 years agoIncorporate documentation suggestions from feedback on comp.lang.python.
Raymond Hettinger [Sat, 16 Aug 2003 00:56:40 +0000 (00:56 +0000)]
Incorporate documentation suggestions from feedback on comp.lang.python.

* Positive wording for the description of why < and > and = can all
  be False.

* Move to a three column table format that puts long method names
  side-by-side with their operator equivalents

* Mention that KeyError can be raised by Set.pop() and Set.remove().

* Minor tweaks to the examples.

Will backport as soon as Fred rebuilds the docs so I can confirm
the tables formatted properly

21 years agoMake sets.py compatible with Py2.2
Raymond Hettinger [Fri, 15 Aug 2003 21:17:04 +0000 (21:17 +0000)]
Make sets.py compatible with Py2.2

21 years agoFix SF #789402, Memory leak on open()
Neal Norwitz [Fri, 15 Aug 2003 20:05:45 +0000 (20:05 +0000)]
Fix SF #789402, Memory leak on open()

If opening a directory, the exception would leak.

21 years agoMake a copy of L before appending, so the global L remains
Walter Dörwald [Fri, 15 Aug 2003 17:52:39 +0000 (17:52 +0000)]
Make a copy of L before appending, so the global L remains
unchanged (and sys.gettotalrefcount() remains constant).

Fix a few typos.

21 years agoFix refcounting leak in charmaptranslate_lookup()
Walter Dörwald [Fri, 15 Aug 2003 16:52:19 +0000 (16:52 +0000)]
Fix refcounting leak in charmaptranslate_lookup()

21 years agoFix another refcounting leak in PyUnicode_EncodeCharmap().
Walter Dörwald [Fri, 15 Aug 2003 16:26:34 +0000 (16:26 +0000)]
Fix another refcounting leak in PyUnicode_EncodeCharmap().

21 years agoFix another refcounting leak (in PyUnicode_DecodeUnicodeEscape()).
Walter Dörwald [Fri, 15 Aug 2003 15:00:26 +0000 (15:00 +0000)]
Fix another refcounting leak (in PyUnicode_DecodeUnicodeEscape()).

21 years agoFix for
Michael W. Hudson [Fri, 15 Aug 2003 13:07:47 +0000 (13:07 +0000)]
Fix for

[ 784825 ] fix obscure crash in descriptor handling

Should be applied to release23-maint and in all likelyhood
release22-maint, too.

Certainly doesn't apply to release21-maint.

21 years agoFix silly leak in test used in test_exceptions.
Michael W. Hudson [Fri, 15 Aug 2003 13:03:30 +0000 (13:03 +0000)]
Fix silly leak in test used in test_exceptions.

21 years agoMy last fix left n used unitialized in tha a==b case.
Michael W. Hudson [Fri, 15 Aug 2003 12:06:41 +0000 (12:06 +0000)]
My last fix left n used unitialized in tha a==b case.
Fix, by not using n at all in that case.

Needs to be applied to release23-maint, too.

21 years agocomplex_new(): This could leak when the argument was neither string nor
Tim Peters [Fri, 15 Aug 2003 01:16:37 +0000 (01:16 +0000)]
complex_new():  This could leak when the argument was neither string nor
number.  This accounts for the 2 refcount leaks per test_complex run
Michael Hudson discovered (I figured only I would have the stomach to
look for leaks in floating-point code <wink>).

21 years agoDon't introduce map(None, ...) in the tutorial. In practice, zip() is
Neil Schemenauer [Thu, 14 Aug 2003 22:57:46 +0000 (22:57 +0000)]
Don't introduce map(None, ...) in the tutorial.  In practice, zip() is
usually preferred.

21 years agoFix refcount leak in the UnicodeError constructor:
Walter Dörwald [Thu, 14 Aug 2003 20:59:07 +0000 (20:59 +0000)]
Fix refcount leak in the UnicodeError constructor:
When parsing the constructor arguments failed, a
reference to the argument tuple was leaked.

21 years agoMake filter(bool, ...) as fast as filter(None, ...).
Neil Schemenauer [Thu, 14 Aug 2003 20:37:34 +0000 (20:37 +0000)]
Make filter(bool, ...) as fast as filter(None, ...).

21 years agoFix refcount leak in PyUnicode_EncodeCharmap(). The bug surfaces
Walter Dörwald [Thu, 14 Aug 2003 20:25:29 +0000 (20:25 +0000)]
Fix refcount leak in PyUnicode_EncodeCharmap(). The bug surfaces
when an encoding error occurs and the callback name is unknown,
i.e. when the callback has to be called. The problem was that
the fact that the callback has already been looked up was only
recorded in a local variable in charmap_encoding_error(), because
charmap_encoding_error() got it's own copy of the errorHandler
pointer instead of a pointer to the pointer in
PyUnicode_EncodeCharmap().

21 years agoSF patch #787929: reflect the introduce of boolean type(libcfgparser.tex)
Raymond Hettinger [Thu, 14 Aug 2003 19:58:35 +0000 (19:58 +0000)]
SF patch #787929:  reflect the introduce of boolean type(libcfgparser.tex)
(Contributed by George Yoshida.)

21 years agoFix reference leak noted in test_types:
Michael W. Hudson [Thu, 14 Aug 2003 17:04:28 +0000 (17:04 +0000)]
Fix reference leak noted in test_types:
Check for a[:] = a _before_ calling PySequence_Fast on a.
release23-maint candidate
Reference leak doesn't happen with head of release22-maint.

21 years agoWhen piping output into a pager like "less", quiting the pager before
Fred Drake [Thu, 14 Aug 2003 15:52:33 +0000 (15:52 +0000)]
When piping output into a pager like "less", quiting the pager before
the output was consumed would cause and exception to be raise in
logmerge; suppress this specific error, because it's not helpful.

21 years agoIDLE didn't start correctly when Python was installed in "Program Files"
Kurt B. Kaiser [Thu, 14 Aug 2003 14:54:28 +0000 (14:54 +0000)]
IDLE didn't start correctly when Python was installed in "Program Files"
on W2K and XP.  Python Bugs 780451, 784183

Backported to 2.2-maint

21 years agofix markup
Fred Drake [Thu, 14 Aug 2003 04:51:24 +0000 (04:51 +0000)]
fix markup

21 years ago[Patch #739124] Add use_default_colors() to curses module
Andrew M. Kuchling [Wed, 13 Aug 2003 23:11:04 +0000 (23:11 +0000)]
[Patch #739124] Add use_default_colors() to curses module

21 years agoAdd a unicode prefix to the characters in the UnicodeEncodeError and
Walter Dörwald [Tue, 12 Aug 2003 17:34:49 +0000 (17:34 +0000)]
Add a unicode prefix to the characters in the UnicodeEncodeError and
UnicodeTranslateError message.

21 years agoEnhance message for UnicodeEncodeError and UnicodeTranslateError.
Walter Dörwald [Tue, 12 Aug 2003 17:32:43 +0000 (17:32 +0000)]
Enhance message for UnicodeEncodeError and UnicodeTranslateError.
If there is only one bad character it will now be printed in a
form that is a valid Python string.

21 years agoSF patch#786531 'the the' typo. Contributed by George Yoshida
Raymond Hettinger [Tue, 12 Aug 2003 00:01:17 +0000 (00:01 +0000)]
SF patch#786531 'the the' typo.  Contributed by George Yoshida

21 years agoSF patch#786531 'the the' typo. Contributed by George Yoshida
Raymond Hettinger [Tue, 12 Aug 2003 00:01:16 +0000 (00:01 +0000)]
SF patch#786531 'the the' typo.  Contributed by George Yoshida

21 years agoFix bug in test_bad_timezone where test was assuming locale knew of PDT.
Brett Cannon [Mon, 11 Aug 2003 19:06:13 +0000 (19:06 +0000)]
Fix bug in test_bad_timezone where test was assuming locale knew of PDT.

21 years agoAdd a couple of decrefs to error paths.
Michael W. Hudson [Mon, 11 Aug 2003 17:32:02 +0000 (17:32 +0000)]
Add a couple of decrefs to error paths.

Now test_descr only appears to leak two references & I think this
are in fact illusory (it's to do with things getting resurrected in
__del__ methods & it's easy to be believe confusion occurs when that
happens <wink>).  Woohoo!

21 years agoComment typo fixes
Andrew M. Kuchling [Mon, 11 Aug 2003 16:20:39 +0000 (16:20 +0000)]
Comment typo fixes

21 years agomention pymemcompat.h in Misc/README
Michael W. Hudson [Mon, 11 Aug 2003 16:18:43 +0000 (16:18 +0000)]
mention pymemcompat.h in Misc/README

21 years agoFix silly typo in comment.
Michael W. Hudson [Mon, 11 Aug 2003 16:14:06 +0000 (16:14 +0000)]
Fix silly typo in comment.

21 years agoadd a statement identifying StringI and StringO objects.
Skip Montanaro [Mon, 11 Aug 2003 15:06:07 +0000 (15:06 +0000)]
add a statement identifying StringI and StringO objects.

21 years agoreverting to 2.41 version (distinct tp_names) - will add verbiage to the
Skip Montanaro [Mon, 11 Aug 2003 14:51:15 +0000 (14:51 +0000)]
reverting to 2.41 version (distinct tp_names) - will add verbiage to the
docs

21 years agoshit - just change the visible name, not the comments - strictly speaking,
Skip Montanaro [Mon, 11 Aug 2003 13:15:11 +0000 (13:15 +0000)]
shit - just change the visible name, not the comments - strictly speaking,
the tp_name is not correct, but what's exposed to users is known visibly as
"StringIO", not "StringI" or "StringO".

21 years agotypos
Skip Montanaro [Mon, 11 Aug 2003 13:09:12 +0000 (13:09 +0000)]
typos

21 years agoFix refcounting and cut & paste error (?) in last checkin.
Michael W. Hudson [Mon, 11 Aug 2003 12:20:24 +0000 (12:20 +0000)]
Fix refcounting and cut & paste error (?) in last checkin.

This should go onto release23-maint, too.

21 years agoUnconditionally opening the temp file in text mode causes this test to fail
Jason Tishler [Mon, 11 Aug 2003 12:13:14 +0000 (12:13 +0000)]
Unconditionally opening the temp file in text mode causes this test to fail
under Cygwin. The attached patch corrects this problem.

I tested this patch under Red Hat Linux 8.0 too.

21 years agoBug fix for #780461: 'sysu' gestalt selector is meaningless on MacOSX,
Jack Jansen [Mon, 11 Aug 2003 11:08:49 +0000 (11:08 +0000)]
Bug fix for #780461: 'sysu' gestalt selector is meaningless on MacOSX,
but attempting to get it resulted in a crash. Fixed. Backport candidate.

21 years agoFix handling of bad locale setup where time.tzname[0] == time.tzname[1] and
Brett Cannon [Mon, 11 Aug 2003 07:24:05 +0000 (07:24 +0000)]
Fix handling of bad locale setup where time.tzname[0] == time.tzname[1] and
time.daylight is true.  Add an explicit test for this situation.

Fixed some wording in docstrings.

21 years agoSF bug #778964: bad seed in python 2.3 random
Raymond Hettinger [Sat, 9 Aug 2003 18:30:57 +0000 (18:30 +0000)]
SF bug #778964:  bad seed in python 2.3 random

The default seed is time.time().
Multiplied by 256 before truncating so that fractional seconds are used.
This way, two successive calls to random.seed() are much more likely
to produce different sequences.

21 years agoAdd HIDDEN. Fixes #777664.
Martin v. Löwis [Sat, 9 Aug 2003 09:53:51 +0000 (09:53 +0000)]
Add HIDDEN. Fixes #777664.

21 years agoMove initialization of sys.std{in,out}.encoding to Py_Initialize.
Martin v. Löwis [Sat, 9 Aug 2003 09:47:11 +0000 (09:47 +0000)]
Move initialization of sys.std{in,out}.encoding to Py_Initialize.
Verify that the encoding actually exists. Fixes #775985.
Will backport to 2.3.

21 years agoPatch #771998: Put braces around variables. Will backport to 2.3.
Martin v. Löwis [Sat, 9 Aug 2003 09:06:52 +0000 (09:06 +0000)]
Patch #771998: Put braces around variables. Will backport to 2.3.

21 years agoSF patch #747364: BaseHTTPServer doesn't need StringIO intermediary
Raymond Hettinger [Sat, 9 Aug 2003 05:01:41 +0000 (05:01 +0000)]
SF patch #747364:  BaseHTTPServer doesn't need StringIO intermediary
(Contributed by Andrew Dalke.)

21 years agoSF patch #783807: Clarify PySequence_Setitem ref counting
Raymond Hettinger [Sat, 9 Aug 2003 04:37:14 +0000 (04:37 +0000)]
SF patch #783807:  Clarify PySequence_Setitem ref counting
(Contributed by Jay T Miller.)

21 years agoIDLEfork Bug 782759
Kurt B. Kaiser [Sat, 9 Aug 2003 01:51:28 +0000 (01:51 +0000)]
IDLEfork Bug 782759
backported to 23-maint

21 years agoExplain argument unpacking
Raymond Hettinger [Fri, 8 Aug 2003 23:32:46 +0000 (23:32 +0000)]
Explain argument unpacking

21 years ago/* XXX From here until type is allocated, "return NULL" leaks bases! */
Michael W. Hudson [Fri, 8 Aug 2003 13:57:22 +0000 (13:57 +0000)]
/* XXX From here until type is allocated, "return NULL" leaks bases! */

Sure looks like it to me! <wink>

When I run the leak2.py script I posted to python-dev, I only see
three reference leaks in all of test_descr.  When I run
test_descr.test_main, I still see 46 leaks.  This clearly demands
posting a yelp to python-dev :-)

This certainly should be applied to release23-maint, and in all
likelyhood release22-maint as well.

21 years agoSF bug #770485: cStringIO does not set closed attr
Raymond Hettinger [Fri, 8 Aug 2003 12:20:03 +0000 (12:20 +0000)]
SF bug #770485: cStringIO does not set closed attr

21 years agoSF bug #775836: change 0,1 to False,True in dict.has_key doc
Raymond Hettinger [Fri, 8 Aug 2003 11:07:59 +0000 (11:07 +0000)]
SF bug #775836: change 0,1 to False,True in dict.has_key doc

21 years agoModified itertools.izip() to match the behavior of __builtin__.zip()
Raymond Hettinger [Fri, 8 Aug 2003 05:10:41 +0000 (05:10 +0000)]
Modified itertools.izip() to match the behavior of __builtin__.zip()
which can now take zero arguments.

21 years agoRe-sync doc tests with the doc updates.
Raymond Hettinger [Fri, 8 Aug 2003 04:33:19 +0000 (04:33 +0000)]
Re-sync doc tests with the doc updates.

21 years agoImprove docs:
Raymond Hettinger [Fri, 8 Aug 2003 02:40:28 +0000 (02:40 +0000)]
Improve docs:
* Simplify the pure python examples
* Add a quantify() example

21 years agoFix docstring in LocaleTime.
Brett Cannon [Fri, 8 Aug 2003 01:53:05 +0000 (01:53 +0000)]
Fix docstring in LocaleTime.