]> granicus.if.org Git - python/log
python
23 years agoClean up a sad sentence in the yield description.
Fred Drake [Tue, 11 Dec 2001 21:58:35 +0000 (21:58 +0000)]
Clean up a sad sentence in the yield description.

23 years agoFixed to the extend that it now builds in CW6, and actually works
Just van Rossum [Tue, 11 Dec 2001 21:52:02 +0000 (21:52 +0000)]
Fixed to the extend that it now builds in CW6, and actually works
a little.

23 years agoAdded -Qnew news about the test_coercion.py failure. That's the only test
Tim Peters [Tue, 11 Dec 2001 21:43:14 +0000 (21:43 +0000)]
Added -Qnew news about the test_coercion.py failure.  That's the only test
that still fails under -Qnew, and is so tied to details of current
behavior that fixing it before new division becomes the default is
impractical.

23 years agoDocument generators and the yield statement, avoiding implementation details.
Fred Drake [Tue, 11 Dec 2001 21:10:08 +0000 (21:10 +0000)]
Document generators and the yield statement, avoiding implementation details.

23 years agoRemove crufty whitespace in a block of index entries.
Fred Drake [Tue, 11 Dec 2001 20:49:23 +0000 (20:49 +0000)]
Remove crufty whitespace in a block of index entries.
Minor, but generates slightly smaller HTML & makes it easier to see what's
happening when debugging the HTML.

23 years agoJoe VanAndel wrote:
Marc-André Lemburg [Tue, 11 Dec 2001 20:44:42 +0000 (20:44 +0000)]
Joe VanAndel wrote:
>
> When using 'distutils' (shipped with Python 2.1) I've found that my
> Python scripts installed with a first line of:
>
> #!/usr/bin/python2.1None
>
> This is caused by distutils trying to patch the first line of the python
> script to use the current interpreter.

23 years agofloat_floor_div: An expression like 3.//1j crashed the interpreter, or
Tim Peters [Tue, 11 Dec 2001 20:31:34 +0000 (20:31 +0000)]
float_floor_div:  An expression like 3.//1j crashed the interpreter, or
delivered bizarre results.  Check float_divmod for a Py_NotImplemented
return and pass it along (instead of treating Py_NotImplemented as a
2-tuple).
CONVERT_TO_DOUBLE:  Added comments; this macro is obscure.

23 years agofloat_int_div(): For clarity, move this closer to the other float
Tim Peters [Tue, 11 Dec 2001 19:57:24 +0000 (19:57 +0000)]
float_int_div():  For clarity, move this closer to the other float
division functions, and rename to float_floor_div.

23 years agoA number of small adjustments.
Fred Drake [Tue, 11 Dec 2001 19:40:16 +0000 (19:40 +0000)]
A number of small adjustments.

23 years agoFiddle test_class so it passes with -Qnew.
Tim Peters [Tue, 11 Dec 2001 19:28:47 +0000 (19:28 +0000)]
Fiddle test_class so it passes with -Qnew.

23 years agoAdded discussion of protecting against screwing up the exception state in
Fred Drake [Tue, 11 Dec 2001 19:28:22 +0000 (19:28 +0000)]
Added discussion of protecting against screwing up the exception state in
an object's deallocator, including an example of how to do this.

23 years agoFiddle test_augassign so it passes under -Qnew.
Tim Peters [Tue, 11 Dec 2001 19:20:15 +0000 (19:20 +0000)]
Fiddle test_augassign so it passes under -Qnew.

23 years agoSF bug #491415 PyDict_UpdateFromSeq2() unused
Tim Peters [Tue, 11 Dec 2001 18:51:08 +0000 (18:51 +0000)]
SF bug #491415 PyDict_UpdateFromSeq2() unused
PyDict_UpdateFromSeq2():  removed it.
PyDict_MergeFromSeq2():  made it public and documented it.
PyDict_Merge() docs:  updated to reveal <wink> that the second
argument can be any mapping object.

23 years agoSave a new version of the productionlist environment for safe-keeping; this
Fred Drake [Tue, 11 Dec 2001 18:47:36 +0000 (18:47 +0000)]
Save a new version of the productionlist environment for safe-keeping; this
will be replaced shortly.  See the comments for more details.

23 years agoIgnore SIGXFSZ. Fixes #490453.
Martin v. Löwis [Tue, 11 Dec 2001 17:57:26 +0000 (17:57 +0000)]
Ignore SIGXFSZ. Fixes #490453.

23 years agoFix whitespace in example of bad indentation: a comment indicated that one
Fred Drake [Tue, 11 Dec 2001 17:46:38 +0000 (17:46 +0000)]
Fix whitespace in example of bad indentation: a comment indicated that one
line was not indented at all, so the example is no longer indented at all.
All of the errors being shown remain.

Typo: characteru --> character

23 years agoUpdated for hfsplus module, new gusi libs.
Jack Jansen [Tue, 11 Dec 2001 15:08:52 +0000 (15:08 +0000)]
Updated for hfsplus module, new gusi libs.

23 years agoAdded __members__ to FInfo object.
Just van Rossum [Tue, 11 Dec 2001 14:04:12 +0000 (14:04 +0000)]
Added __members__ to FInfo object.

23 years agoWhen using GCC, use the right option to add a directory to the list of dirs
Fred Drake [Tue, 11 Dec 2001 05:04:24 +0000 (05:04 +0000)]
When using GCC, use the right option to add a directory to the list of dirs
searched for a dependency for runtime linking.
This closes SF bug #445902.

23 years agoAdditional coverage tests by Neil Norwitz.
Guido van Rossum [Tue, 11 Dec 2001 04:37:34 +0000 (04:37 +0000)]
Additional coverage tests by Neil Norwitz.
(SF patch #491418, #491420, #491421.)

23 years agoRegression test for SF bug #478534 -- exceptions could "leak" into a weakref
Fred Drake [Mon, 10 Dec 2001 23:46:02 +0000 (23:46 +0000)]
Regression test for SF bug #478534 -- exceptions could "leak" into a weakref
callback.

23 years agoMake sure that when we invoke callback functions associated with weak
Fred Drake [Mon, 10 Dec 2001 23:44:54 +0000 (23:44 +0000)]
Make sure that when we invoke callback functions associated with weak
references, we do not allow any outstanding exceptions "leak" into the
callback's execution state.
This closes SF bug #478534.

23 years agoGive xxsubtype a module docstring, so its oddball purpose is discoverable
Tim Peters [Mon, 10 Dec 2001 22:53:30 +0000 (22:53 +0000)]
Give xxsubtype a module docstring, so its oddball purpose is discoverable
from a prompt without searching the source code (there was an SF bug
report about this, already closed ...  "479568 xxsubtype builtin").

23 years agoSkipping some tests by adding the usual jython conditional test around:
Finn Bock [Mon, 10 Dec 2001 20:57:34 +0000 (20:57 +0000)]
Skipping some tests by adding the usual jython conditional test around:

- the repr of unicode. Jython only add the u'' if the string contains char
  values > 255.
- A unicode arg to unicode() is perfectly valid in jython.
- A test buffer() test. No buffer() on Jython

This closes patch "[ #490920 ] Jython and test_unicode".

23 years agoUpdate link to the SAX homepage.
Fred Drake [Mon, 10 Dec 2001 18:10:37 +0000 (18:10 +0000)]
Update link to the SAX homepage.

23 years agoWell what do you know. The Python implementation contained the same
Guido van Rossum [Mon, 10 Dec 2001 18:06:21 +0000 (18:06 +0000)]
Well what do you know.  The Python implementation contained the same
bug as the C code. :-(

23 years agoFix the Python property class in a comment right.
Guido van Rossum [Mon, 10 Dec 2001 18:03:34 +0000 (18:03 +0000)]
Fix the Python property class in a comment right.

23 years agoproperty_descr_get(): Fix a curious bug in the property() type: when
Guido van Rossum [Mon, 10 Dec 2001 18:00:15 +0000 (18:00 +0000)]
property_descr_get(): Fix a curious bug in the property() type: when
no get function was defined, the property's doc string was
inaccessible.  This was because the test for prop_get was made
*before* the test for a NULL/None object argument.

Also changed the property class defined in Python in a comment to test
for NULL to decide between get and delete; this makes it less Python
but then, assigning None to a property doesn't delete it!

23 years agoAdded documentation for str.decode().
Fred Drake [Mon, 10 Dec 2001 16:43:08 +0000 (16:43 +0000)]
Added documentation for str.decode().
This closes SF bug #490823.

23 years agoSF patch #491183 (Jeff Epler): ScrolledText.grid() doesn't work
Guido van Rossum [Mon, 10 Dec 2001 16:42:43 +0000 (16:42 +0000)]
SF patch #491183 (Jeff Epler): ScrolledText.grid() doesn't work

Using grid methods on ScrolledText widgets does not
work as expected. It either fails to pack a widget, or
can even cause Tk to lock up.

The problem is that the .grid method is being called on
the text widget, not the frame widget. This can lead
to the well-known lockup in Tk when a frame's children
are managed by both the pack and grid managers. Even
if it doesn't lock up, the frame is never placed within
the intended widget.

Program fragment:
>>> import ScrolledText
>>> s = ScrolledText.ScrolledText()
>>> s.grid(row=0, column=0, rowspan=2)

The following patch uses the same hack to copy the
'grid' and 'place' geometry manager methods to the
ScrolledText instance as is already used for the 'pack'
manager.

23 years agoFix for
Michael W. Hudson [Mon, 10 Dec 2001 16:15:44 +0000 (16:15 +0000)]
Fix for

[ #409430 ] pydoc install broken

23 years agoThe new menu initialization code would also add the SIOUX menus if a (frozen) Python...
Jack Jansen [Mon, 10 Dec 2001 16:08:14 +0000 (16:08 +0000)]
The new menu initialization code would also add the SIOUX menus if a (frozen) Python program had installed its own menubar previously. We now guard against this, with a bit of a hack: FrameWork uses the same Menu ID as Sioux, and the init code checks that the text in the menu is "About SIOUX" before replacing it.

23 years agoNew fodder.
Guido van Rossum [Mon, 10 Dec 2001 15:46:20 +0000 (15:46 +0000)]
New fodder.

23 years agoSF patch #491049 (David Jacobs): Small PyString_FromString optimization
Guido van Rossum [Mon, 10 Dec 2001 15:45:54 +0000 (15:45 +0000)]
SF patch #491049 (David Jacobs): Small PyString_FromString optimization

PyString_FromString():
  Since the length of the string is already being stored in size,
  changed the strcpy() to a memcpy() for a small speed improvement.

23 years agoFix for
Michael W. Hudson [Mon, 10 Dec 2001 15:28:30 +0000 (15:28 +0000)]
Fix for

[ #477371 ] build_scripts can use wrong #! line

scripts now get "built" into a directory

build/scripts-$(PYTHON_VERSION)/

23 years agoAdd a comment explaining the st_symbols cache.
Jeremy Hylton [Mon, 10 Dec 2001 00:53:18 +0000 (00:53 +0000)]
Add a comment explaining the st_symbols cache.

23 years agoThe module generator now tells its object generators about the module name (through...
Jack Jansen [Sun, 9 Dec 2001 23:25:00 +0000 (23:25 +0000)]
The module generator now tells its object generators about the module name (through the new setmodulename() method). If the module name has been set the object generators output it as part of the tp_name field for the object type.

23 years agoUpdated, and converted line-endings to unix-style (oops:-)
Jack Jansen [Sun, 9 Dec 2001 23:17:38 +0000 (23:17 +0000)]
Updated, and converted line-endings to unix-style (oops:-)

23 years agoMods by Tony Lownds (patch 490100, slightly massaged by me) to make Tkinter
Jack Jansen [Sun, 9 Dec 2001 23:15:56 +0000 (23:15 +0000)]
Mods by Tony Lownds (patch 490100, slightly massaged by me) to make Tkinter
work with Mac OS X Aqua-Tk, all nicely within ifdefs.

The process is not for the faint of heart, though: you need to download
and install the (alfa) Aqua-Tk, obtain a few needed X11 headers from
somewhere else and then everything builds. To run scripts using Tkinter
you must build with --enable-framework, build Python.app in Mac/OSX
and run your Tkinter scripts with that. Then, about half the tests in
Demo/tkinter work (or at least do something).

Checking this in anyway because it shouldn't break anything, and newer
versions of Aqua-Tk will streamline the process.

23 years agoMods to make WASTE module compile and link for MachoPython. Not tested
Jack Jansen [Sun, 9 Dec 2001 23:08:54 +0000 (23:08 +0000)]
Mods to make WASTE module compile and link for MachoPython. Not tested
any further, yet.

23 years agoA workaround for the missing buffer() builtin in jython.
Finn Bock [Sun, 9 Dec 2001 20:06:32 +0000 (20:06 +0000)]
A workaround for the missing buffer() builtin in jython.

This closes patch "[ #490850 ] Jython and test_StringIO".

23 years agobug #133283, #477728, #483789, #490573
Fredrik Lundh [Sun, 9 Dec 2001 16:13:15 +0000 (16:13 +0000)]
bug #133283, #477728, #483789, #490573

backed out of broken minimal repeat patch from July

also fixed a couple of minor potential resource leaks in pattern_subx
(Guido had already fixed the big one)

23 years agotest(): Avoid a UnboundLocalError when a method is missing from both the string
Finn Bock [Sun, 9 Dec 2001 16:06:29 +0000 (16:06 +0000)]
test(): Avoid a UnboundLocalError when a method is missing from both the string
module and from string methods.

This closes patch "[ #490811 ] Jython and test_string".

23 years agoMoved a print statement outside the jython platform test. Otherwise
Finn Bock [Sun, 9 Dec 2001 10:19:25 +0000 (10:19 +0000)]
Moved a print statement outside the jython platform test. Otherwise
the output fails to compare correctly for jython. This change was part
of the original patch #403666.

23 years agoThe initial patch #468662 was not applied quite verbatim. This should one
Finn Bock [Sun, 9 Dec 2001 09:12:34 +0000 (09:12 +0000)]
The initial patch #468662 was not applied quite verbatim. This should one
will fix the remaining Jython issues.

This closes patch "[ #490411 ] Jython and test_grammar.py".

23 years agoRefcounting isn't available in Jython. Putting the jython test around it.
Finn Bock [Sun, 9 Dec 2001 08:57:46 +0000 (08:57 +0000)]
Refcounting isn't available in Jython. Putting the jython test around it.

This closes patch "[ #490414 ] Jython and test_socket".

23 years agoPySymtableEntry_New(): I'm not sure what this routine is doing, but it
Tim Peters [Sat, 8 Dec 2001 23:40:38 +0000 (23:40 +0000)]
PySymtableEntry_New():  I'm not sure what this routine is doing, but it
was obviously leaking an int object when whatever the heck it's looking for
was found.  Repaired that.  This accounts for why entering function and
class definitions at an interactive prompt leaked a reference to the
integer 1 each time.
Bugfix candidate.

23 years agoPatch supplied by Burton Radons for his own SF bug #487390: Modifying
Guido van Rossum [Sat, 8 Dec 2001 18:02:58 +0000 (18:02 +0000)]
Patch supplied by Burton Radons for his own SF bug #487390: Modifying
type.__module__ behavior.

This adds the module name and a dot in front of the type name in every
type object initializer, except for built-in types (and those that
already had this).  Note that it touches lots of Mac modules -- I have
no way to test these but the changes look right.  Apologies if they're
not.  This also touches the weakref docs, which contains a sample type
object initializer.  It also touches the mmap test output, because the
mmap type's repr is included in that output.  It touches object.h to
put the correct description in a comment.

23 years agoSF patch #489989 (Charles G Waldman) linuxaudiodev.c - fix initialization
Guido van Rossum [Sat, 8 Dec 2001 17:13:45 +0000 (17:13 +0000)]
SF patch #489989 (Charles G Waldman) linuxaudiodev.c - fix initialization

The OSS Programmer's Reference (www.4front-tech.com)
states:

*Setting Sampling Parameters

There are three parameters which affect the sound
quality (and therefore memory and bandwidth
requirements) of sampled audio data. These are:

** sample format (sometimes called number of bits)
** number of channels (mono or stereo), and
** sampling rate (speed)

NOTE:

It is important to always set these parameters in the
above order. Setting sampling rate before the number
of channels doesn't work with all devices.

23 years agoSF patch #490515 (Joe A) urllib.open_https() protocol issue
Guido van Rossum [Sat, 8 Dec 2001 17:09:07 +0000 (17:09 +0000)]
SF patch #490515 (Joe A) urllib.open_https() protocol issue

open_http():
    In urllib.py library module, URLopener.open_https()
    returns a class instance of addinfourl() with its
    self.url property missing the protocol.

    Instead of "https://www.someurl.com", it becomes
    "://www.someurl.com".

23 years agoOSX tweak.
Just van Rossum [Sat, 8 Dec 2001 10:37:40 +0000 (10:37 +0000)]
OSX tweak.

23 years agoEnable support for jython:
Finn Bock [Sat, 8 Dec 2001 10:15:48 +0000 (10:15 +0000)]
Enable support for jython:

1. Acknowledge the welknown difference that jython
allows continue in the finally clause.

2. Avoid using _testcapi when running with jython.

This closes patch "[ #490417 ] Jython and test_exceptions"

23 years agoDon't do App.DrawThemeListBoxFrame() upon activate: it starts
Just van Rossum [Sat, 8 Dec 2001 09:51:41 +0000 (09:51 +0000)]
Don't do App.DrawThemeListBoxFrame() upon activate: it starts
looking worse and worse if you deactivate/activate the window
a few times. I don't know how to fix this properly, but I'm beginning
to think that it's almost impossible to support the Appearance
manager properly due to the way W works. Time for W2?...

23 years agoRemove erroneous and confusing comment -- sre patterns *can* be
Guido van Rossum [Sat, 8 Dec 2001 05:11:15 +0000 (05:11 +0000)]
Remove erroneous and confusing comment -- sre patterns *can* be
pickled and we do *not* expect exceptions from either pickle or
cPickle.

23 years agoScript to generate the table of distribution packages, plugging in the size
Fred Drake [Sat, 8 Dec 2001 00:26:07 +0000 (00:26 +0000)]
Script to generate the table of distribution packages, plugging in the size
information automatically.

23 years agoAdd change notes where im_class is discussed, since the exact meaning changes
Fred Drake [Fri, 7 Dec 2001 23:13:53 +0000 (23:13 +0000)]
Add change notes where im_class is discussed, since the exact meaning changes
with Python 2.2.

23 years agoCorrect the description of im_class. (Fred, this is changed in 2.2.
Guido van Rossum [Fri, 7 Dec 2001 22:03:18 +0000 (22:03 +0000)]
Correct the description of im_class.  (Fred, this is changed in 2.2.
Should this be labeled as changed?  How?)

23 years agoRevise description of dumbdbm.open() to reflect that the flag argument is
Fred Drake [Fri, 7 Dec 2001 21:56:13 +0000 (21:56 +0000)]
Revise description of dumbdbm.open() to reflect that the flag argument is
ignored and that mode was ignored before Python 2.2.
This closes SF bug #490098.

23 years agoHonor the mode argument to dumbdbm.open(); there is not good reason not to,
Fred Drake [Fri, 7 Dec 2001 21:54:46 +0000 (21:54 +0000)]
Honor the mode argument to dumbdbm.open(); there is not good reason not to,
especially since the documentation described it in detail.
This partially closes SF bug #490098.

23 years agoPyMethodObject(): Update the comment about im_class based upon a
Guido van Rossum [Fri, 7 Dec 2001 21:54:33 +0000 (21:54 +0000)]
PyMethodObject(): Update the comment about im_class based upon a
conversation with Robin Dunn in SF patch #490402.

23 years agoDescribe the behavior of the read() method when the list of filenames
Fred Drake [Fri, 7 Dec 2001 21:35:57 +0000 (21:35 +0000)]
Describe the behavior of the read() method when the list of filenames
includes files that do not exist, explain the intended use of the interface,
and show how to ensure an expected file really exists.
This closes SF bug #490399.

23 years agoSF patch 490393: test___all__ and Jython; from Finn Bock.
Tim Peters [Fri, 7 Dec 2001 21:35:42 +0000 (21:35 +0000)]
SF patch 490393: test___all__ and Jython; from Finn Bock.
Don't even try to import _socket when running under Jython.

23 years agoI found that when run as a script, this test suite ran its tests
Guido van Rossum [Fri, 7 Dec 2001 21:07:08 +0000 (21:07 +0000)]
I found that when run as a script, this test suite ran its tests
twice!  Fixed this by avoiding the import of test_email, which loads
the module a second time in that situation, and fiddled the __main__
section to resemble other test suites using unittest.

23 years agoSF patch #489173: Make os.spawnv not block the interpreter, from
Tim Peters [Fri, 7 Dec 2001 20:35:43 +0000 (20:35 +0000)]
SF patch #489173:  Make os.spawnv not block the interpreter, from
Anthony Roach.
Release the global interpreter lock around platform spawn calls.
Bugfix candidate?  Hard to say; I favor "yes, bugfix".
These clearly *should* have been releasing the GIL all along, if for no
other reason than compatibility with the similar os.system().  But it's
possible some program out there is (a) multithreaded, (b) calling a spawn
function with P_WAIT, and (c) relying on the spawn call to block all their
threads until the spawned program completes.  I think it's very unlikely
anyone is doing that on purpose, but someone may be doing so by accident.

23 years agoO_cwrite(): rewrote for clarity, replacing all the (Oobject *)self
Guido van Rossum [Fri, 7 Dec 2001 20:20:28 +0000 (20:20 +0000)]
O_cwrite(): rewrote for clarity, replacing all the (Oobject *)self
casts with a variable oself that has the proper type.  A smart
compiler may put this thing into a register.

(I'm not sure what good this does except satisfy my desire to
understand this function; I got a report about an uninitialized read
from Insure++ about this function and it hurt my eyes to even look at
it.  I gotta run away or I'll get tempted to reformat the entire
file...)

23 years ago_PyTuple_Resize(): this dumped core on tuple(globals()) for me. Turns
Guido van Rossum [Fri, 7 Dec 2001 20:00:04 +0000 (20:00 +0000)]
_PyTuple_Resize(): this dumped core on tuple(globals()) for me.  Turns
out the for loop at the end intended to zero out new items wasn't
doing anything, because sv->ob_size was already equal to newsize.  The
fix slightly refactors the function, introducing a variable oldsize
and doing away with sizediff (which was used only once), and using
oldsize and newsize consistently.  I also added comments explaining
what the two for loops do.  (Looking at the CVS annotation of this
function, it's no miracle a bug crept in -- this has been patched by
many different folks! :-)

23 years agoAnother name.
Fred Drake [Fri, 7 Dec 2001 18:27:38 +0000 (18:27 +0000)]
Another name.

23 years agoAlign the number of %s with the number of format arguments.
Finn Bock [Fri, 7 Dec 2001 18:21:56 +0000 (18:21 +0000)]
Align the number of %s with the number of format arguments.

This closes patch "[ #490330 ] String format bug in test_b2."

23 years agoMore info about the cycle detector.
Guido van Rossum [Fri, 7 Dec 2001 17:57:56 +0000 (17:57 +0000)]
More info about the cycle detector.

23 years agoTrivial spelling repair on new cyclic garbage text.
Tim Peters [Fri, 7 Dec 2001 17:51:41 +0000 (17:51 +0000)]
Trivial spelling repair on new cyclic garbage text.

23 years agoAdded more information about reference counting limitations and the cycle
Fred Drake [Fri, 7 Dec 2001 17:30:40 +0000 (17:30 +0000)]
Added more information about reference counting limitations and the cycle
detector.
This closes SF bug #484950.

23 years agoMove import dbhash out of test_sundry and into test_bsddb,
Guido van Rossum [Fri, 7 Dec 2001 16:43:19 +0000 (16:43 +0000)]
Move import dbhash out of test_sundry and into test_bsddb,
so that test_sundry won't fail if the bsddb module is absent.

23 years agoNot being able to copy PythonCore to the system-folder is not a fatal error, on OSX...
Jack Jansen [Fri, 7 Dec 2001 16:07:04 +0000 (16:07 +0000)]
Not being able to copy PythonCore to the system-folder is not a fatal error, on OSX the user may not have permission to do so. Also  give a more informative message in this case.

Fixes bug 475253.

23 years agoFix for:
Michael W. Hudson [Fri, 7 Dec 2001 15:38:26 +0000 (15:38 +0000)]
Fix for:

    [ #417634 ] configuring without C++ compiler name

by checking that we're not about to try to compile C++ files with "yes".

Now we wait for the system where the C++ compiler *is* called yes...

23 years agoMissing DECREFs when exception is raised in sys.excepthook.
Jeremy Hylton [Fri, 7 Dec 2001 15:35:35 +0000 (15:35 +0000)]
Missing DECREFs when exception is raised in sys.excepthook.

Bug fix candidate for 2.1 branch.

(I imagine the other recent leak patches are bug fix candidates, too,
but I forgot to mark mine as such.)

23 years agoUse an immutable tuple for __slots instead of a mutable list
Andrew M. Kuchling [Fri, 7 Dec 2001 14:22:13 +0000 (14:22 +0000)]
Use an immutable tuple for __slots instead of a mutable list
Bump version number

23 years agoFix for #489672 (Neil Norwitz): memory leak in test_sre.
Guido van Rossum [Fri, 7 Dec 2001 04:25:10 +0000 (04:25 +0000)]
Fix for #489672 (Neil Norwitz): memory leak in test_sre.

(At least for the repeatable test case that Tim produced.)

pattern_subx(): Add missing DECREF(filter) in both exit branches
(normal and error return).  Also fix a DECREF(args) that should
certainly be a DECREF(match) -- because it's inside if (!args) and
right after allocation of match.

23 years agoIn unconditional except clauses, don't catch KeyboardInterrupt -- it's
Guido van Rossum [Fri, 7 Dec 2001 03:39:34 +0000 (03:39 +0000)]
In unconditional except clauses, don't catch KeyboardInterrupt -- it's
annoying that often you have to hit ^C numerous times before it
works.  The solution: before the "except:" clause, insert "except
KeyboardInterrupt: raise".  This propagates KeyboardInterrupt out,
stopping the test in its tracks.

23 years agoaudioop_ratecv() again: settle for a sloppier upper bound that's less
Tim Peters [Fri, 7 Dec 2001 00:37:39 +0000 (00:37 +0000)]
audioop_ratecv() again:  settle for a sloppier upper bound that's less
obnoxious to compute and easier to explain.  No compromise on safety.

23 years agos/it/if/ in descriptions of spawn mode argument.
Tim Peters [Thu, 6 Dec 2001 23:37:17 +0000 (23:37 +0000)]
s/it/if/ in descriptions of spawn mode argument.

23 years agoFor ratecv, document that None should be the initial state argument (when
Tim Peters [Thu, 6 Dec 2001 23:16:09 +0000 (23:16 +0000)]
For ratecv, document that None should be the initial state argument (when
I was squashing spurious overflows in the implementation, I got hung up
on this point).

23 years agoVisious hackery to solve a build-control problem related to our use of
Fred Drake [Thu, 6 Dec 2001 22:59:54 +0000 (22:59 +0000)]
Visious hackery to solve a build-control problem related to our use of
distutils for the library modules built as shared objects.  A better solution
appears possible, but with the threat that the distutils becomes more
magical ("complex").
This closes SF bug #458343.

23 years agoDon't fail on importing things with undefined references. Unfortunately we
Jack Jansen [Thu, 6 Dec 2001 22:58:56 +0000 (22:58 +0000)]
Don't fail on importing things with undefined references. Unfortunately we
still fail on importing modules that link with libraries that fail
their initialization code (such as windowing libraries when we don't have
access to the window server) and that is what I really wanted to fix.

23 years agoSilly mistake in build directory extension fix.
Jack Jansen [Thu, 6 Dec 2001 22:36:17 +0000 (22:36 +0000)]
Silly mistake in build directory extension fix.

23 years agoWrap some long lines.
Fred Drake [Thu, 6 Dec 2001 22:24:47 +0000 (22:24 +0000)]
Wrap some long lines.

23 years agoCleaned up Mac OS X section to the current state of affairs.
Jack Jansen [Thu, 6 Dec 2001 21:49:02 +0000 (21:49 +0000)]
Cleaned up Mac OS X section to the current state of affairs.

23 years agoTest wether we are building on a case-insensitive filesystem (such
Jack Jansen [Thu, 6 Dec 2001 21:47:20 +0000 (21:47 +0000)]
Test wether we are building on a case-insensitive filesystem (such
as OSX HFS+) and if so add an extension to the python executable, but
only in the build directory, not on the installed python.

23 years ago[Bug #475009] Tighten the pattern for the first line, so we don't
Andrew M. Kuchling [Thu, 6 Dec 2001 21:29:28 +0000 (21:29 +0000)]
[Bug #475009] Tighten the pattern for the first line, so we don't
   adjust it when a versioned interpreter is supplied (#!.../python2 ...)

23 years agoFix for SF bug #489671 (Neil Norwitz): memory leak in test_richcmp.
Guido van Rossum [Thu, 6 Dec 2001 21:28:18 +0000 (21:28 +0000)]
Fix for SF bug #489671 (Neil Norwitz): memory leak in test_richcmp.

Had nothing to do with rich comparisons -- some stack cleanup code was
lost as a result of merging in Neil Schemenauer's generators patch.
Reinserted the stack cleanup code, skipping it when yielding.

23 years agosys.platform is now "darwin" without digits appended.
Jack Jansen [Thu, 6 Dec 2001 21:14:00 +0000 (21:14 +0000)]
sys.platform is now "darwin" without digits appended.

23 years agoWhitespace normalization.
Fred Drake [Thu, 6 Dec 2001 21:01:19 +0000 (21:01 +0000)]
Whitespace normalization.

23 years agoWhitespace normalization.
Fred Drake [Thu, 6 Dec 2001 20:51:35 +0000 (20:51 +0000)]
Whitespace normalization.

23 years agoUse a version number of 0.0.0 instead of ???. The latter leads to
Thomas Heller [Thu, 6 Dec 2001 20:44:19 +0000 (20:44 +0000)]
Use a version number of 0.0.0 instead of ???.  The latter leads to
invalid filenames on Windows when building without specifying a
version number in the setup script.

See also
http://mail.python.org/pipermail/distutils-sig/2001-November/002656.html

Bugfix candidate.

23 years agoDocument that PyString_FromString() cannot take NULL as a parameter.
Fred Drake [Thu, 6 Dec 2001 20:38:15 +0000 (20:38 +0000)]
Document that PyString_FromString() cannot take NULL as a parameter.
This closes SF bug #489872.

23 years agoPyString_FromString: this requires its argument be non-NULL, but doesn't
Tim Peters [Thu, 6 Dec 2001 20:29:32 +0000 (20:29 +0000)]
PyString_FromString:  this requires its argument be non-NULL, but doesn't
check it.  Added an assert() to that effect.

23 years agoFix for #489669 (Neil Norwitz): memory leak in test_descr (unicode).
Guido van Rossum [Thu, 6 Dec 2001 20:03:56 +0000 (20:03 +0000)]
Fix for #489669 (Neil Norwitz): memory leak in test_descr (unicode).

This is best reproduced by

  while 1:
      class U(unicode):
          pass
      U(u"xxxxxx")

The unicode_dealloc() code wasn't properly freeing the str and defenc
fields of the Unicode object when freeing a subtype instance.  Fixed
this by a subtle refactoring that actually reduces the amount of code
slightly.

23 years agoUndefine addrinfo.h constants if the system header defined them.
Martin v. Löwis [Thu, 6 Dec 2001 19:04:35 +0000 (19:04 +0000)]
Undefine addrinfo.h constants if the system header defined them.
Fixes #486099.

23 years agoAttribute nodes did not always get their ownerDocument and ownerElement
Fred Drake [Thu, 6 Dec 2001 18:27:48 +0000 (18:27 +0000)]
Attribute nodes did not always get their ownerDocument and ownerElement
properly set.  This fixes that.

23 years agoBe more careful about accessing attributes of the parent: if Tk has not been
Fred Drake [Thu, 6 Dec 2001 16:51:41 +0000 (16:51 +0000)]
Be more careful about accessing attributes of the parent: if Tk has not been
initialized, this will be None, but the functions will still work (there will
simply be a bogus parent on the screen).  Allowing the parent to be None
is useful when testing the functions from an interactive interpreter.

Add an optional keyword paramter "show" to the _QueryString class; when given
it is used to set the -show option to the entry widget.  This allows passing
show="*" or the like to askstring(), making it useful for requesting
passwords/passphrases from the user.
This closes SF bug #438517.

Changed a docstring to be less font-lock-hostile.

23 years ago[Bug #459270] Fix incorrect filename for system-wide config file
Andrew M. Kuchling [Thu, 6 Dec 2001 16:34:53 +0000 (16:34 +0000)]
[Bug #459270] Fix incorrect filename for system-wide config file