Commit Graph

21001 Commits

Author SHA1 Message Date
Tim Peters bf72fe2650 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.
2001-12-11 21:43:14 +00:00
Fred Drake e31e9cebc0 Document generators and the yield statement, avoiding implementation details. 2001-12-11 21:10:08 +00:00
Fred Drake be6dd3083c 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.
2001-12-11 20:49:23 +00:00
Marc-André Lemburg 90294d01be 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.
2001-12-11 20:44:42 +00:00
Tim Peters 77d8a4fc91 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.
2001-12-11 20:31:34 +00:00
Tim Peters 63a3571e17 float_int_div(): For clarity, move this closer to the other float
division functions, and rename to float_floor_div.
2001-12-11 19:57:24 +00:00
Fred Drake 54e6294197 A number of small adjustments. 2001-12-11 19:40:16 +00:00
Tim Peters 017052152b Fiddle test_class so it passes with -Qnew. 2001-12-11 19:28:47 +00:00
Fred Drake 145b479508 Added discussion of protecting against screwing up the exception state in
an object's deallocator, including an example of how to do this.
2001-12-11 19:28:22 +00:00
Tim Peters e93e477215 Fiddle test_augassign so it passes under -Qnew. 2001-12-11 19:20:15 +00:00
Tim Peters f582b82fe9 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.
2001-12-11 18:51:08 +00:00
Fred Drake c82bd7281f Save a new version of the productionlist environment for safe-keeping; this
will be replaced shortly.  See the comments for more details.
2001-12-11 18:47:36 +00:00
Martin v. Löwis df8adcd7ba Ignore SIGXFSZ. Fixes #490453. 2001-12-11 17:57:26 +00:00
Fred Drake 1d3e6c15ce 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
2001-12-11 17:46:38 +00:00
Jack Jansen 9493455c2a Updated for hfsplus module, new gusi libs. 2001-12-11 15:08:52 +00:00
Just van Rossum 14666cc04f Added __members__ to FInfo object. 2001-12-11 14:04:12 +00:00
Fred Drake d15db5c711 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.
2001-12-11 05:04:24 +00:00
Guido van Rossum 29d260670e Additional coverage tests by Neil Norwitz.
(SF patch #491418, #491420, #491421.)
2001-12-11 04:37:34 +00:00
Fred Drake 2a64f4693d Regression test for SF bug #478534 -- exceptions could "leak" into a weakref
callback.
2001-12-10 23:46:02 +00:00
Fred Drake ef8ebd1e74 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.
2001-12-10 23:44:54 +00:00
Tim Peters 65760b2173 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").
2001-12-10 22:53:30 +00:00
Finn Bock 2b29cb2593 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".
2001-12-10 20:57:34 +00:00
Fred Drake cf72abab8c Update link to the SAX homepage. 2001-12-10 18:10:37 +00:00
Guido van Rossum 7171f1c8d8 Well what do you know. The Python implementation contained the same
bug as the C code. :-(
2001-12-10 18:06:21 +00:00
Guido van Rossum ba2485f947 Fix the Python property class in a comment right. 2001-12-10 18:03:34 +00:00
Guido van Rossum b75ba918d6 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!
2001-12-10 18:00:15 +00:00
Fred Drake 6048ce95a9 Added documentation for str.decode().
This closes SF bug #490823.
2001-12-10 16:43:08 +00:00
Guido van Rossum 61d3637ff8 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.
2001-12-10 16:42:43 +00:00
Michael W. Hudson fb173cd471 Fix for
[ #409430 ] pydoc install broken
2001-12-10 16:15:44 +00:00
Jack Jansen 52306a780b 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. 2001-12-10 16:08:14 +00:00
Guido van Rossum 1d961f5e5f New fodder. 2001-12-10 15:46:20 +00:00
Guido van Rossum 169192e818 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.
2001-12-10 15:45:54 +00:00
Michael W. Hudson 49bdaede1b Fix for
[ #477371 ] build_scripts can use wrong #! line

scripts now get "built" into a directory

build/scripts-$(PYTHON_VERSION)/
2001-12-10 15:28:30 +00:00
Jeremy Hylton 2990640d8a Add a comment explaining the st_symbols cache. 2001-12-10 00:53:18 +00:00
Jack Jansen 5801a2d8e3 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. 2001-12-09 23:25:00 +00:00
Jack Jansen b2fb202bc2 Updated, and converted line-endings to unix-style (oops:-) 2001-12-09 23:17:38 +00:00
Jack Jansen cb85244228 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.
2001-12-09 23:15:56 +00:00
Jack Jansen edeea04bfd Mods to make WASTE module compile and link for MachoPython. Not tested
any further, yet.
2001-12-09 23:08:54 +00:00
Finn Bock 793ead5696 A workaround for the missing buffer() builtin in jython.
This closes patch "[ #490850 ] Jython and test_StringIO".
2001-12-09 20:06:32 +00:00
Fredrik Lundh 82b230732f 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)
2001-12-09 16:13:15 +00:00
Finn Bock ed69aeedb9 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".
2001-12-09 16:06:29 +00:00
Finn Bock d08011a0e1 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.
2001-12-09 10:19:25 +00:00
Finn Bock 4ab7adbd94 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".
2001-12-09 09:12:34 +00:00
Finn Bock ada1983950 Refcounting isn't available in Jython. Putting the jython test around it.
This closes patch "[ #490414 ] Jython and test_socket".
2001-12-09 08:57:46 +00:00
Tim Peters 0f2d4b84a6 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.
2001-12-08 23:40:38 +00:00
Guido van Rossum 146483964e 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.
2001-12-08 18:02:58 +00:00
Guido van Rossum 7745218c05 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.
2001-12-08 17:13:45 +00:00
Guido van Rossum b931bf3c55 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".
2001-12-08 17:09:07 +00:00
Just van Rossum 1f1e7270cf OSX tweak. 2001-12-08 10:37:40 +00:00
Finn Bock aa3dc45658 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"
2001-12-08 10:15:48 +00:00