Steve Purcell [Mon, 9 Apr 2001 15:37:31 +0000 (15:37 +0000)]
* Remove exc_info() kludge -- it actually messed up the Jython output
* Fixed TestLoader.loadTestsFromName() for nested packages
* Corrected the command-line usage summary
fixing 408085 - redirect from https becomes http
Even though relative redirects are illegal, they are common
urllib treated every relative redirect as though it was to http,
even if the original was https://
As long as we're compensating for server bugs, might as well do
it properly.
Jeremy Hylton [Mon, 9 Apr 2001 13:57:32 +0000 (13:57 +0000)]
Add two arguments to Scope constructor, module scope and class name
Add mangling support
Add get_children() and add_child() methods to Scope
Skip nodes when If test is a false constant
Add test code that checks results against symtable module
Jeremy Hylton [Mon, 9 Apr 2001 04:27:12 +0000 (04:27 +0000)]
Fix "import as" (has always skipping the as name)
Fix com_NEWLINE() so that is accepts arguments, which occurs for lines like:
stmt; # note trailing semicolon
Add XXX about checking for assignment to list comps
Tim Peters [Sun, 8 Apr 2001 23:39:38 +0000 (23:39 +0000)]
Repair portability of sign extension when reading signed ints on boxes
where sizeof(long)==8. This *was* broken on boxes where signed right
shifts didn't sign-extend, but not elsewhere. Unfortunately, apart
from the Cray T3E I don't know of such a box, and Guido has so far
refused to buy me any Cray machines for home Python testing <wink>.
More immediately interesting would be if someone could please test
this on *any* sizeof(long)==8 box, to make sure I didn't break it.
Tim Peters [Sun, 8 Apr 2001 07:23:44 +0000 (07:23 +0000)]
Fix from the Madusa mailing list:
http://groups.yahoo.com/group/medusa/message/333
It's clear that Medusa should not be checking for an empty buffer
via "buf is ''". The patch merely changes "is" to "==". However,
there's a mystery here all the same: Python attempts to store null
strings uniquely, so it's unclear why "buf is ''" ever returned
false when buf actually was empty. *Some* string operations produce
non-unique null strings, e.g.
>>> "abc"*0 is "abc"*0
0
>>>
but they're rare, and I don't see any such operations in asynchat.
Tim Peters [Sat, 7 Apr 2001 20:34:48 +0000 (20:34 +0000)]
SF patch #413552 - Premature decref on object
Jeffery Collins pointed out that filterstring decrefs a character object
before it's done using it. This works by accident today because another
module always happens to have an active reference too at the time. The
accident doesn't work after his Pippy modifications, and since it *is*
an accident even in the mainline Python, it should work by design there too.
The patch accomplishes that.
Fred Drake [Sat, 7 Apr 2001 05:41:39 +0000 (05:41 +0000)]
Start of documentation for the unittest module. Some of this comes from
Steve Purcell's documentation, and a lot of it is written based on
using PyUnit and reading the implementation.
There is more to come, but I want to get this check in before I have a
disk crash or anything else bad happens.
Fred Drake [Thu, 5 Apr 2001 18:26:31 +0000 (18:26 +0000)]
Effectively revert the previous change: leave the new #include in, but
comment it out with an explanation. This makes it easier for someone
who wants the additional symbols to try re-enabling it for their platform.
Fred Drake [Thu, 5 Apr 2001 18:14:50 +0000 (18:14 +0000)]
Added more link attributes based on additonal information from Chris
McCafferty <christopher.mccafferty@csg.ch>, and a bit of experimentation
with Navigator 4.7.
Bug #412086, reported by Peter Wilson: The _curses module doesn't
define COLORS or COLOR_PAIRS until after start_color() is called,
but they were never added to the curses module. Fixed by adding
a wrapper around start_color(), similar to the wrapper around initscr().
Tim Peters [Wed, 4 Apr 2001 18:56:49 +0000 (18:56 +0000)]
Sf bug [ #412214 ] ZipFile constructor leaves files open.
This applies the patch Fred Drake created to fix it.
I'm checking it in since I had to apply the patch anyway in order
to test its behavior on Windows.
Jack Jansen [Tue, 3 Apr 2001 21:56:12 +0000 (21:56 +0000)]
Disable fused-add-mul instructions. They give a nonstandard result for some things that test_coercion complains about. The added performance is probably minimal for Python anyway.
Fred Drake [Tue, 3 Apr 2001 17:41:56 +0000 (17:41 +0000)]
Make reference to the Library Reference in the "What Now?" chapter a
hyperlink.
Fix two English usage errors caught by Jan Wells: Changed "subsequence"
to "sub-sequence" in two places, and avoid improper use of "hopefully" in
the first paragraph of the "What Now?" chapter.
Jack Jansen [Tue, 3 Apr 2001 14:36:35 +0000 (14:36 +0000)]
If the frontmost window is not a Tk window exit the event handling code early. This fixes that using Tk once used to disable cmd-. processing. It may also influence Tk/IDE interaction, I'm not sure.
Tim Peters [Mon, 2 Apr 2001 20:15:57 +0000 (20:15 +0000)]
SF bug [#410708] Condition.wait() and KeyboardInterrupt.
http://sourceforge.net/tracker/?func=detail&aid=410708&group_id=5470&atid=105470
Added try/finally around Condition.wait() guts, so that the lock state gets
restored at the end no matter what happens.
Applying SF patch #412553 by Christopher Lee: fix linuxaudiodev
handling of EAGAIN.
This may or may not fix the problem for me (Mandrake 7.2 on a Dell
Optiplex GX110 desktop): I can't hear the output, but it does pass the
test now. It doesn't fix the problem for Fred (Mandrake 7.2 on a Dell
Inspiron 7500 which has the Maestro sound drivers). Fred suspects
that it's the kernel version in combination with the driver.
Fred Drake [Thu, 29 Mar 2001 18:24:08 +0000 (18:24 +0000)]
Remove the spurious space of uncertain origin from the output for function,
method and constructor signatures. Suggested by Peter Funk on the Doc-SIG
mailing list.
Jack Jansen [Thu, 29 Mar 2001 13:53:19 +0000 (13:53 +0000)]
On OSX always copy PythonCore. It turns out an orphaned alias in /Library/CFMSupport (happens when you remove python and aliased pythoncore) wreaks havoc with the system.
Tim Peters [Thu, 29 Mar 2001 03:34:43 +0000 (03:34 +0000)]
Initialize new save_warnings_filters data member in ModifiedInterpreter.__init__.
Was getting mystery
ModifiedInterpreter instance has no attribute 'save_warnings_filters'
errors at odd times (for sure in a fresh IDLE, fresh file, then Run Script).
Ka-Ping Yee [Tue, 27 Mar 2001 08:13:42 +0000 (08:13 +0000)]
Fix some reloading problems (still more work needed).
Add hyperlinks to PEPs at http://www.python.org/peps/pep-%04d.html
Remove script directory (dirname of sys.argv[0]) from sys.path.
Jack Jansen [Mon, 26 Mar 2001 20:03:30 +0000 (20:03 +0000)]
Disable fused-add-mul instructions. They give a nonstandard result for some things that test_coercion complains about. The added performance is probably minimal for Python anyway.
Jeremy Hylton [Mon, 26 Mar 2001 19:53:38 +0000 (19:53 +0000)]
Bug fix: compile() called from a nested-scopes-enable Python was not
using nested scopes to compile its argument. Pass compiler flags
through to underlying compile call.
Fred Drake [Mon, 26 Mar 2001 15:06:15 +0000 (15:06 +0000)]
Update auto-detection for Konqueror to include KDE 2 -- the kfm command is
gone; "konqueror" is the new name, and the command-line args are different.
kfmclient has not changed, though.
Fred Drake [Sat, 24 Mar 2001 19:58:26 +0000 (19:58 +0000)]
get_version_string(): New function -- returns a Python string object that
gives the CVS revision of this file even if it does not include the
extra RCS "$Revision: " cruft.
initpyexpat(): Use get_version_string() instead of hard-coding magic
indexes into the RCS string (which may be affected by export options).
Guido van Rossum [Sat, 24 Mar 2001 19:17:35 +0000 (19:17 +0000)]
Document use_rawinput. (Although now that I think more about it, a
better solution would have been to factor out the raw_input() call and
make it into an overridable method. Oh well, maybe later...)
Barry Warsaw [Fri, 23 Mar 2001 20:24:07 +0000 (20:24 +0000)]
main(): Application of SF patch #405851, which allows this test to be
used by Jython. The tests in this module expect C locale, so be
explicit about setting that (for CPython). However, in Jython, there
is no C locale, so instead be explicit about setting the US locale.
Closes the patch.
Guido van Rossum [Fri, 23 Mar 2001 17:54:43 +0000 (17:54 +0000)]
Finishing touch to Ping's changes. This is a patch that Ping sent me
but apparently he had to go to school, so I am checking it in for him.
This makes PyRun_HandleSystemExit() a static instead, called
handle_system_exit(), and let it use the current exception rather than
passing in an exception. This slightly simplifies the code.
Barry Warsaw [Fri, 23 Mar 2001 17:53:49 +0000 (17:53 +0000)]
Two minor changes for better Jython compatibility. Finn Bock says:
Change 1: Not all 'modules' in sys.modules have a
sensible __file__ attribute. Some of our java package
can have the __file__ attribute set to None.
Change 2: In jython we have the jython license file in
<root> and the CPython license file in <root>/Lib. By
reversing the search sequence jython will find and
show the jython license file before the CPython file.