Guido van Rossum [Tue, 22 Aug 2000 02:04:46 +0000 (02:04 +0000)]
Patch by Toby Dickenson: don't die when an error occurs during string
conversion in an exception, but instead display <unprintable %s
object> where %s is the type name.
Fred Drake [Mon, 21 Aug 2000 21:42:42 +0000 (21:42 +0000)]
Patch from Paul Schreiber <paul@commerceflow.com>:
Patch description
-----------------
This addresses four issues:
(1) usernames and passwords in urls with special characters are now
decoded properly. i.e. http://foo%2C:bar@www.whatever.com/
(2) Basic Auth support has been added to HTTPS, like it was in HTTP.
(3) Version 1.92 sent the POSTed data, but did not deal with errors
(HTTP responses other than 200) properly. HTTPS now behaves the
same way HTTP does.
(4) made URL-checking beahve the same way with HTTPS as it does with
HTTP (changed == to !=).
Barry Warsaw [Mon, 21 Aug 2000 17:07:20 +0000 (17:07 +0000)]
com_print_stmt(): Guido rightly points out that the stream expression
in extended prints should only be evaluated once. This patch plays
stack games (documented!) to fix this.
Tim Peters [Mon, 21 Aug 2000 02:27:22 +0000 (02:27 +0000)]
Remove the winreg module from the project. I don't believe any
docs changes are needed (only reference to winreg I could find
was in libwinreg.tex, which is documenting _winreg, and merely
mentions that a higher-level winreg module *may* appear someday;
that's still true).
Jack Jansen [Sun, 20 Aug 2000 21:57:38 +0000 (21:57 +0000)]
Updated the applescript documentation for te new framework, and replaced the Eudora example with one that uses Disk Copy (which everyone running MacOS 8 or
higher should have).
Jack Jansen [Sun, 20 Aug 2000 19:56:13 +0000 (19:56 +0000)]
Updated for the new applescript interface (which actually makes it so ridiculously simple that its main reason for existence is backward compatability).
Jack Jansen [Sun, 20 Aug 2000 19:42:52 +0000 (19:42 +0000)]
Enums we cannot find are set to None, and enumsubst understands this (no substitution done). This is need for what I think are bugs in the Finder aete resources (some events use unknown enums).
Jack Jansen [Sun, 20 Aug 2000 19:30:56 +0000 (19:30 +0000)]
Fixed event inheritance code (which didn't work at all).
Do two passes over the suites so we can figure out dependencies for enums and such. The manual method was getting too cumbersome for Finder suites.
Thomas Wouters [Sun, 20 Aug 2000 14:01:53 +0000 (14:01 +0000)]
Fix the bug Sjoerd Mullender discovered, where find_from_args() wasn't
trying hard enough to find out what the arguments to an import were. There
is no test-case for this bug, yet, but this is what it looked like:
from encodings import cp1006, cp1026
ImportError: cannot import name cp1026
'__import__' was called with only the first name in the 'arguments' list.
Tim Peters [Sun, 20 Aug 2000 05:57:36 +0000 (05:57 +0000)]
Changed the popen2.py _test function to use the "more" cmd when
os.name == "nt". This makes test_popen2 pass under Win98SE.
HOWEVER, the Win98 "more" invents a leading newline out
of thin air, and I'm not sure that the other Windows flavors
of "more" also do that.
So, somebody please try under other Windows flavors!
Tim Peters [Sun, 20 Aug 2000 04:18:40 +0000 (04:18 +0000)]
David Goodger's new getopt test module (thanks, David!).
https://sourceforge.net/patch/?func=detailpatch&patch_id=101110&group_id=5470
Accepted as-is, except for purging an "import *".
Thomas Wouters [Sat, 19 Aug 2000 20:55:02 +0000 (20:55 +0000)]
Disallow "import mod.submod as m", because the result is ambiguous. Does it
load mod.submod as m, or mod as m ? Both can be achieved differently, and
unambiguously. Also attempt to document this restriction (editor
appreciated!)
Note that this is an artificial check during compile, because incorporating
this in the grammar is hard, and then adjusting the compiler to do the right
thing with the right nodes is harder.
Added Tim O'Malley's Cookie.py module (master version at
http://www.timo-tasi.org/python/Cookie.py)
This is revision 2.26 according to Tim's RCS history.
Barry Warsaw [Fri, 18 Aug 2000 06:58:15 +0000 (06:58 +0000)]
PyUnicode_AsUTF8String(): Don't need to explicitly incref str since
PyUnicode_EncodeUTF8() already returns the created object with the
proper reference count. This fixes an Insure reported memory leak.
Barry Warsaw [Fri, 18 Aug 2000 05:09:50 +0000 (05:09 +0000)]
pattern_findall(): Plug small memory leak discovered by Insure.
PyList_Append() always incref's the inserted item. Be sure to decref
it regardless of whether the append succeeds or fails.
Barry Warsaw [Fri, 18 Aug 2000 05:04:08 +0000 (05:04 +0000)]
PyParser_ParseString(): When the err_ret structure is initialized, the
fields token and expected must also be initialized, otherwise the
tests in parsetok() can generate uninitialized memory read errors.
This quiets an Insure warning.
Barry Warsaw [Fri, 18 Aug 2000 05:02:16 +0000 (05:02 +0000)]
comples_from_string(): Move s_buffer[] up to the top-level function
scope. Previously, s_buffer[] was defined inside the
PyUnicode_Check() scope, but referred to in the outer scope via
assignment to s. This quiets an Insure portability warning.
Barry Warsaw [Fri, 18 Aug 2000 05:01:19 +0000 (05:01 +0000)]
make_pair(): When comparing the pointers, they must be cast to integer
types (i.e. Py_uintptr_t, our spelling of C9X's uintptr_t). ANSI
specifies that pointer compares other than == and != to non-related
structures are undefined. This quiets an Insure portability warning.
Barry Warsaw [Fri, 18 Aug 2000 05:00:03 +0000 (05:00 +0000)]
PyFloat_FromString(): Move s_buffer[] up to the top-level function
scope. Previously, s_buffer[] was defined inside the
PyUnicode_Check() scope, but referred to in the outer scope via
assignment to s. This quiets an Insure portability warning.
Barry Warsaw [Fri, 18 Aug 2000 04:57:32 +0000 (04:57 +0000)]
PyInstance_DoBinOp(): When comparing the pointers, they must be cast
to integer types (i.e. Py_uintptr_t, our spelling of C9X's uintptr_t).
ANSI specifies that pointer compares other than == and != to
non-related structures are undefined. This quiets an Insure
portability warning.
Barry Warsaw [Fri, 18 Aug 2000 04:53:33 +0000 (04:53 +0000)]
Added test for uintptr_t, the C9X acceptable way to spell "type to
which I can cast void* to and back again without losing information".
In pyport.h, we typedef Py_uintptr_t to mean this thing, which if the
platform supports, will be uintptr_t (otherwise, other accomodations
are made).
Barry Warsaw [Fri, 18 Aug 2000 04:48:18 +0000 (04:48 +0000)]
Moved LONG_LONG #define from longobject.h to here, since it's needed
by the following.
typedef in a portable way the Python name for the C9X uintptr_t type.
This latter is the most portable way to spell an integral type to
which a void* can be cast to and back again without losing
information. Parallel checkin hacks configure to check if the
platform/compiler supports the C9X name.
Fred Drake [Fri, 18 Aug 2000 03:12:38 +0000 (03:12 +0000)]
As pointed out by Denis S. Otkidach <den@analyt.chem.msu.ru>, xrange()
returns an xrange object, not a range object, despite the name of the
source file they're implemented in.
In the list of comparison operators, list != before <>, since <> is
described as obsolescent.
Thomas Wouters [Thu, 17 Aug 2000 22:55:00 +0000 (22:55 +0000)]
Apply SF patch #101135, adding 'import module as m' and 'from module import
name as n'. By doing some twists and turns, "as" is not a reserved word.
There is a slight change in semantics for 'from module import name' (it will
now honour the 'global' keyword) but only in cases that are explicitly
undocumented.
Thomas Wouters [Thu, 17 Aug 2000 22:37:32 +0000 (22:37 +0000)]
Apply SF patch #101029: call __getitem__ with a proper slice object if there
is no __getslice__ available. Also does the same for C extension types.
Includes rudimentary documentation (it could use a cross reference to the
section on slice objects, I couldn't figure out how to do that) and a test
suite for all Python __hooks__ I could think of, including the new
behaviour.
Fred Drake [Thu, 17 Aug 2000 22:29:31 +0000 (22:29 +0000)]
Revise the comments about the exceptions module to not refer to source
code; it is not sufficiently readable now that it in written in C, and
is less likely to be available to end users.
Jack Jansen [Thu, 17 Aug 2000 22:14:57 +0000 (22:14 +0000)]
The package with standard suites. These are used separately and as base classes for other suite packages (StdSuite is slightly magical, in that it is the gensuitemodule default base package).
Jack Jansen [Thu, 17 Aug 2000 22:11:45 +0000 (22:11 +0000)]
Generate packages in stead of separate modules. The package main module imports everything, it knows about the app signature, suites can extend standard suites, and lots more. Automatically finding declarations in other suites TBD.
Jack Jansen [Thu, 17 Aug 2000 20:04:26 +0000 (20:04 +0000)]
Removed temporary code to disable OT networking (this was a workaround for getpeername() not working in a previous release of GUSI, but it has been fixed).
Barry Warsaw [Wed, 16 Aug 2000 23:41:01 +0000 (23:41 +0000)]
Insure properly identifies the `interned' dictionary as leaking at
shutdown time, but CVS log entry for revision 2.45 explains why this
is so. Simply include a comment so we don't have to re-figure it out
again 5 years from now.