python/dscho.git
20 years agoThis commit was manufactured by cvs2svn to create tag 'r22b2-fork'.svn/tags/r22b2-forkr22b2-fork
(no author) [Thu, 15 Nov 2001 23:55:12 +0000 (15 23:55 +0000)]
This commit was manufactured by cvs2svn to create tag 'r22b2-fork'.

git-svn-id: http://svn.python.org/projects/python/tags/r22b2-fork@24271 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoA few minor updates to make it clear(er) that pickle should be used
bwarsaw [Thu, 15 Nov 2001 23:55:12 +0000 (15 23:55 +0000)]
A few minor updates to make it clear(er) that pickle should be used
instead of marshal for object serialization.

Fred, please proofread!

git-svn-id: http://svn.python.org/projects/python/trunk@24269 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoA change to sync with pickle.py:
bwarsaw [Thu, 15 Nov 2001 23:45:26 +0000 (15 23:45 +0000)]
A change to sync with pickle.py:

find_class(): We no longer mask all exceptions[1] by transforming them
into SystemError.  The latter is definitely not the right thing to do,
so we let any exceptions that occur in the PyObject_GetAttr() call to
simply propagate up if they occur.

[1] Note that pickle only masked ImportError, KeyError, and
AttributeError, but cPickle masked all exceptions.

git-svn-id: http://svn.python.org/projects/python/trunk@24268 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoTwo changes:
bwarsaw [Thu, 15 Nov 2001 23:42:58 +0000 (15 23:42 +0000)]
Two changes:

load_inst(): Implement the security hook that cPickle already had.
When unpickling callables which are not classes, we look to see if the
object has an attribute __safe_for_unpickling__.  If this exists and
has a true value, then we can call it to create the unpickled object.
Otherwise we raise an UnpicklingError.

find_class(): We no longer mask ImportError, KeyError, and
AttributeError by transforming them into SystemError.  The latter is
definitely not the right thing to do, so we let the former three
exceptions simply propagate up if they occur, i.e. we remove the
try/except!

git-svn-id: http://svn.python.org/projects/python/trunk@24267 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoA massive rewrite affecting both the pickle and cPickle module
bwarsaw [Thu, 15 Nov 2001 23:39:07 +0000 (15 23:39 +0000)]
A massive rewrite affecting both the pickle and cPickle module
documentation.  This addresses previously undocumented parts of the
public interfaces, the differences between pickle and cPickle,
security concerns, and on and on.

Fred please proofread!

git-svn-id: http://svn.python.org/projects/python/trunk@24266 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoMinor updates to add more pointers to the pickle documentation, and to
bwarsaw [Thu, 15 Nov 2001 23:37:26 +0000 (15 23:37 +0000)]
Minor updates to add more pointers to the pickle documentation, and to
clarify some of the interface.

git-svn-id: http://svn.python.org/projects/python/trunk@24265 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoThe turtle docs will be moving to another location in the Tkinter chapter.
fdrake [Thu, 15 Nov 2001 22:10:46 +0000 (15 22:10 +0000)]
The turtle docs will be moving to another location in the Tkinter chapter.

git-svn-id: http://svn.python.org/projects/python/trunk@24264 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoClean up the descriptions of multi-signature functions so we do the right
fdrake [Thu, 15 Nov 2001 20:41:03 +0000 (15 20:41 +0000)]
Clean up the descriptions of multi-signature functions so we do the right
thing in the index.

git-svn-id: http://svn.python.org/projects/python/trunk@24263 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoGroup dict[ionary] news together; and use dict() instead of
gvanrossum [Thu, 15 Nov 2001 20:33:10 +0000 (15 20:33 +0000)]
Group dict[ionary] news together; and use dict() instead of
dictionary().

git-svn-id: http://svn.python.org/projects/python/trunk@24262 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoCorrect the description of mixed multiple inheritance: the code
gvanrossum [Thu, 15 Nov 2001 20:27:54 +0000 (15 20:27 +0000)]
Correct the description of mixed multiple inheritance: the code
special-cases classic classes, it doesn't do anything about other
cases where different metaclasses are involved (except for the trivial
case where one metaclass is a subclass of the others).  Also note that
it's metaclass, not metatype.

git-svn-id: http://svn.python.org/projects/python/trunk@24261 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoNews about mixing classic and new-style classes in MI.
tim_one [Thu, 15 Nov 2001 20:02:21 +0000 (15 20:02 +0000)]
News about mixing classic and new-style classes in MI.

git-svn-id: http://svn.python.org/projects/python/trunk@24260 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoBump Windows buildno for 2.2b2.
tim_one [Thu, 15 Nov 2001 19:50:51 +0000 (15 19:50 +0000)]
Bump Windows buildno for 2.2b2.

git-svn-id: http://svn.python.org/projects/python/trunk@24259 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoThanks for the Tkinter chapter, Mike!
fdrake [Thu, 15 Nov 2001 17:26:10 +0000 (15 17:26 +0000)]
Thanks for the Tkinter chapter, Mike!

git-svn-id: http://svn.python.org/projects/python/trunk@24258 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoAdd entries for the new Tkinter chapter.
fdrake [Thu, 15 Nov 2001 17:25:29 +0000 (15 17:25 +0000)]
Add entries for the new Tkinter chapter.

git-svn-id: http://svn.python.org/projects/python/trunk@24257 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoTkinter chapter, contributed by Mike Clarkson. Based in part on the "Tkinter
fdrake [Thu, 15 Nov 2001 17:22:04 +0000 (15 17:22 +0000)]
Tkinter chapter, contributed by Mike Clarkson.  Based in part on the "Tkinter
Life Preserver" by Matt Conway.

git-svn-id: http://svn.python.org/projects/python/trunk@24256 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoMore simple test cases for mixed classic+new multiple inheritance.
tim_one [Wed, 14 Nov 2001 23:56:45 +0000 (14 23:56 +0000)]
More simple test cases for mixed classic+new multiple inheritance.

git-svn-id: http://svn.python.org/projects/python/trunk@24255 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoChanging diapers reminded Guido that he wanted to allow for some measure
tim_one [Wed, 14 Nov 2001 23:32:33 +0000 (14 23:32 +0000)]
Changing diapers reminded Guido that he wanted to allow for some measure
of multiple inheritance from a mix of new- and classic-style classes.
This is his patch, plus a start at some test cases from me.  Will check
in more, plus a NEWS blurb, later tonight.

git-svn-id: http://svn.python.org/projects/python/trunk@24254 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoFinally commit the font changes that have been live on the development site
fdrake [Wed, 14 Nov 2001 22:35:59 +0000 (14 22:35 +0000)]
Finally commit the font changes that have been live on the development site
for a month or more.

git-svn-id: http://svn.python.org/projects/python/trunk@24253 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoBump release number & date.
fdrake [Wed, 14 Nov 2001 22:28:26 +0000 (14 22:28 +0000)]
Bump release number & date.

git-svn-id: http://svn.python.org/projects/python/trunk@24252 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoFred observes that the typo was not the only problem with this sentence.
jhylton [Wed, 14 Nov 2001 21:38:13 +0000 (14 21:38 +0000)]
Fred observes that the typo was not the only problem with this sentence.

git-svn-id: http://svn.python.org/projects/python/trunk@24251 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agotypo
jhylton [Wed, 14 Nov 2001 21:32:27 +0000 (14 21:32 +0000)]
typo

git-svn-id: http://svn.python.org/projects/python/trunk@24250 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoDon't initialize tp_type statically, it won't work on Windows. Spotted
jackjansen [Wed, 14 Nov 2001 15:48:13 +0000 (14 15:48 +0000)]
Don't initialize tp_type statically, it won't work on Windows. Spotted
by Thomas Heller (patch 459442).

git-svn-id: http://svn.python.org/projects/python/trunk@24249 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoOSX tests used specific version numbers to test for new features and
jackjansen [Wed, 14 Nov 2001 10:59:57 +0000 (14 10:59 +0000)]
OSX tests used specific version numbers to test for new features and
used the default Darwin/* for the old code. Reversed those tests so
that compatibility code is in a switch leg with a specific version and
newer systems take the default leg.

This should allow Python to build on OSX 10.1.1 (which jumps from Darwin/1.4
to Darwin/5.1 due to a new numbering scheme).

git-svn-id: http://svn.python.org/projects/python/trunk@24248 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoRemoved print that executes only on Unix boxes; that made it impossible
tim_one [Tue, 13 Nov 2001 23:39:47 +0000 (13 23:39 +0000)]
Removed print that executes only on Unix boxes; that made it impossible
to have single "expected output" file.

git-svn-id: http://svn.python.org/projects/python/trunk@24247 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoCVS patch #477161: New "access" keyword for mmap, from Jay T Miller.
tim_one [Tue, 13 Nov 2001 23:11:19 +0000 (13 23:11 +0000)]
CVS patch #477161:  New "access" keyword for mmap, from Jay T Miller.
This gives mmap() on Windows the ability to create read-only, write-
through and copy-on-write mmaps.  A new keyword argument is introduced
because the mmap() signatures diverged between Windows and Unix, so
while they (now) both support this functionality, there wasn't a way to
spell it in a common way without introducing a new spelling gimmick.
The old spellings are still accepted, so there isn't a backward-
compatibility issue here.

git-svn-id: http://svn.python.org/projects/python/trunk@24246 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoPyOS_getsig(), PyOS_setsig(): The minimal amount of work to avoid the
bwarsaw [Tue, 13 Nov 2001 23:08:26 +0000 (13 23:08 +0000)]
PyOS_getsig(), PyOS_setsig(): The minimal amount of work to avoid the
uninitialized memory reads reported in bug #478001.

Note that this doesn't address the following larger issues:

- Error conditions are not documented for PyOS_*sig() in the C API.

- Nothing that actually calls PyOS_*sig() in the core interpreter and
  extension modules actually /checks/ the return value of the call.

Fixing those is left as an exercise for a later day.

git-svn-id: http://svn.python.org/projects/python/trunk@24245 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoDon't munge __debug__ and leave it that way.
jhylton [Tue, 13 Nov 2001 22:03:20 +0000 (13 22:03 +0000)]
Don't munge __debug__ and leave it that way.

git-svn-id: http://svn.python.org/projects/python/trunk@24244 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoWhitespace normalization.
tim_one [Tue, 13 Nov 2001 21:51:26 +0000 (13 21:51 +0000)]
Whitespace normalization.

git-svn-id: http://svn.python.org/projects/python/trunk@24243 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoA specific test for bug #481221, getaddrlist() failing on long
bwarsaw [Tue, 13 Nov 2001 21:33:52 +0000 (13 21:33 +0000)]
A specific test for bug #481221, getaddrlist() failing on long
addresses.  Commented out because it still takes too long to run.

git-svn-id: http://svn.python.org/projects/python/trunk@24242 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoFix for bug #481221, getaddrlist() failing on long addresses.
bwarsaw [Tue, 13 Nov 2001 21:30:37 +0000 (13 21:30 +0000)]
Fix for bug #481221, getaddrlist() failing on long addresses.

git-svn-id: http://svn.python.org/projects/python/trunk@24241 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoCommitting the second part of patch #480902, an improved test suite
bwarsaw [Tue, 13 Nov 2001 20:16:52 +0000 (13 20:16 +0000)]
Committing the second part of patch #480902, an improved test suite
for dumbdbm.py, by Skip Montanaro.  The first half of Skip's patch has
been postponed until Py2.3 since it adds new features.

git-svn-id: http://svn.python.org/projects/python/trunk@24240 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agonew_code(): The last patch to this left behind an unreferenced local;
tim_one [Tue, 13 Nov 2001 20:11:55 +0000 (13 20:11 +0000)]
new_code():  The last patch to this left behind an unreferenced local;
deleted its declaration.

git-svn-id: http://svn.python.org/projects/python/trunk@24239 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoAdd tests for bug #478115, parsedate_tz() IndexError when a Date:
bwarsaw [Tue, 13 Nov 2001 18:01:37 +0000 (13 18:01 +0000)]
Add tests for bug #478115, parsedate_tz() IndexError when a Date:
field exists with an empty value.

git-svn-id: http://svn.python.org/projects/python/trunk@24238 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoparsedate_tz(): If data is false, return None. Fixes bug #478115,
bwarsaw [Tue, 13 Nov 2001 18:00:40 +0000 (13 18:00 +0000)]
parsedate_tz(): If data is false, return None.  Fixes bug #478115,
IndexError when a Date: field exists with an empty value.

git-svn-id: http://svn.python.org/projects/python/trunk@24237 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoload_string(): Force use of unsigned compare in a context that was
tim_one [Mon, 12 Nov 2001 22:26:10 +0000 (12 22:26 +0000)]
load_string():  Force use of unsigned compare in a context that was
clearly (but incorrectly) assuming it.

git-svn-id: http://svn.python.org/projects/python/trunk@24236 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoOSX notes:
jackjansen [Mon, 12 Nov 2001 14:11:13 +0000 (12 14:11 +0000)]
OSX notes:
- Added a note about the limit stack command
- Revoved the note about largefile
- Added a note about /usr/local not existing by default.

git-svn-id: http://svn.python.org/projects/python/trunk@24235 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoNo need to preprocess the header files - use ctags -I flag instead to
theller [Mon, 12 Nov 2001 12:52:01 +0000 (12 12:52 +0000)]
No need to preprocess the header files - use ctags -I flag instead to
remove DL_IMPORT.

git-svn-id: http://svn.python.org/projects/python/trunk@24234 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoFix obvious typos.
theller [Mon, 12 Nov 2001 07:46:31 +0000 (12 07:46 +0000)]
Fix obvious typos.

git-svn-id: http://svn.python.org/projects/python/trunk@24233 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoLimit string size on one-character-strings. Fixes #480384.
loewis [Sun, 11 Nov 2001 14:49:15 +0000 (11 14:49 +0000)]
Limit string size on one-character-strings. Fixes #480384.

git-svn-id: http://svn.python.org/projects/python/trunk@24232 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoPatch in bug report #477700: Fix memory leaks in gdbm & curses.
loewis [Sun, 11 Nov 2001 14:24:05 +0000 (11 14:24 +0000)]
Patch in bug report #477700: Fix memory leaks in gdbm & curses.

git-svn-id: http://svn.python.org/projects/python/trunk@24231 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoPatch #473002: Update Demo/tix tixwidgets.py et al.
loewis [Sun, 11 Nov 2001 14:07:37 +0000 (11 14:07 +0000)]
Patch #473002: Update Demo/tix tixwidgets.py et al.

git-svn-id: http://svn.python.org/projects/python/trunk@24230 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoAdd the MSL C library to the set of standard libraries
jackjansen [Sat, 10 Nov 2001 23:21:55 +0000 (10 23:21 +0000)]
Add the MSL C library to the set of standard libraries
linked against. Most, but not all, of it is included in
PythonCore, but extensions may want to use some of
the routines not included. Fixes a bug reported by
Tom Loredo.

git-svn-id: http://svn.python.org/projects/python/trunk@24229 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoThe libraries argument was completely ignored, fixed. Reported by
jackjansen [Sat, 10 Nov 2001 23:20:22 +0000 (10 23:20 +0000)]
The libraries argument was completely ignored, fixed. Reported by
Tom Loredo.

git-svn-id: http://svn.python.org/projects/python/trunk@24228 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoPatch #473265: UpdatePairedHandlers nonsensical.
loewis [Sat, 10 Nov 2001 13:59:16 +0000 (10 13:59 +0000)]
Patch #473265: UpdatePairedHandlers nonsensical.

git-svn-id: http://svn.python.org/projects/python/trunk@24227 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoMerge 1.42 from PyXML: Flag errors resulting from argument conversion problems.
loewis [Sat, 10 Nov 2001 13:57:55 +0000 (10 13:57 +0000)]
Merge 1.42 from PyXML: Flag errors resulting from argument conversion problems.
Fixes problem with not detecting UTF-8 errors.

git-svn-id: http://svn.python.org/projects/python/trunk@24226 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoFixed various problems with command-dot handling (some very old):
jackjansen [Sat, 10 Nov 2001 00:41:43 +0000 (10 00:41 +0000)]
Fixed various problems with command-dot handling (some very old):
- Don't scan for cmd-. unless in the foreground
- Scan before switching out to other processes, not after
- don't scan if SchedParams.check_interrupt is false (!)
  - But: do scan if we're blocked on I/O

One problem remains: in the last case KeyboardInterrupt is raised
too late.

git-svn-id: http://svn.python.org/projects/python/trunk@24225 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoAdded version annotations, remove hard tabs.
fdrake [Fri, 9 Nov 2001 23:34:26 +0000 (9 23:34 +0000)]
Added version annotations, remove hard tabs.

git-svn-id: http://svn.python.org/projects/python/trunk@24224 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoUse PyObject_CheckReadBuffer().
jhylton [Fri, 9 Nov 2001 22:02:48 +0000 (9 22:02 +0000)]
Use PyObject_CheckReadBuffer().

git-svn-id: http://svn.python.org/projects/python/trunk@24223 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoAdd PyObject_CheckReadBuffer(), which returns true if its argument
jhylton [Fri, 9 Nov 2001 21:59:42 +0000 (9 21:59 +0000)]
Add PyObject_CheckReadBuffer(), which returns true if its argument
supports the single-segment readable buffer interface.

Add documentation for this and other PyObject_XXXBuffer() calls.

git-svn-id: http://svn.python.org/projects/python/trunk@24222 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoNo need to have documentation for a module which not accepted in the library.
fdrake [Fri, 9 Nov 2001 21:45:55 +0000 (9 21:45 +0000)]
No need to have documentation for a module which not accepted in the library.

git-svn-id: http://svn.python.org/projects/python/trunk@24221 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoAdd note about assignment to __debug__ being an error.
jhylton [Fri, 9 Nov 2001 21:06:24 +0000 (9 21:06 +0000)]
Add note about assignment to __debug__ being an error.

git-svn-id: http://svn.python.org/projects/python/trunk@24220 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoInclude sys_getdefaultencoding in #ifdef Py_USING_UNICODE. Fixes #479571.
loewis [Fri, 9 Nov 2001 20:59:39 +0000 (9 20:59 +0000)]
Include sys_getdefaultencoding in #ifdef Py_USING_UNICODE. Fixes #479571.

git-svn-id: http://svn.python.org/projects/python/trunk@24219 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoopen_the_file(): Explicitly set errno to 0 before calling fopen().
tim_one [Fri, 9 Nov 2001 20:59:14 +0000 (9 20:59 +0000)]
open_the_file():  Explicitly set errno to 0 before calling fopen().

git-svn-id: http://svn.python.org/projects/python/trunk@24218 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agogetnameinfo() appears to raise socket.error instead of
bwarsaw [Fri, 9 Nov 2001 20:37:43 +0000 (9 20:37 +0000)]
getnameinfo() appears to raise socket.error instead of
socket.gaierror. :( This allows test_socket to pass on a RH6.1-ish
Linux system.

git-svn-id: http://svn.python.org/projects/python/trunk@24217 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoFix SF buf #480096: Assign to __debug__ still allowed
jhylton [Fri, 9 Nov 2001 20:37:13 +0000 (9 20:37 +0000)]
Fix SF buf #480096: Assign to __debug__ still allowed

Easy enough to catch assignment in the compiler.  The perverse user
can still change the value of __debug__, but that may be the least he
can do.

git-svn-id: http://svn.python.org/projects/python/trunk@24216 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoFix SF buf #480096: Assign to __debug__ still allowed
jhylton [Fri, 9 Nov 2001 19:50:08 +0000 (9 19:50 +0000)]
Fix SF buf #480096: Assign to __debug__ still allowed

Easy enough to catch assignment in the compiler.  The perverse user
can still change the value of __debug__, but that may be the least he
can do.

git-svn-id: http://svn.python.org/projects/python/trunk@24215 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoFiddle with new test cases -- verify that we get a sensible error
jhylton [Fri, 9 Nov 2001 19:34:43 +0000 (9 19:34 +0000)]
Fiddle with new test cases -- verify that we get a sensible error
message for bad mode argument -- so that it doesn't fail on Windows.

It's hack.  We know that errno is set to 0 in this case on Windows, so
check for that specifically.

git-svn-id: http://svn.python.org/projects/python/trunk@24214 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agotest_formatdate(): Dang. Typo.
bwarsaw [Fri, 9 Nov 2001 19:31:34 +0000 (9 19:31 +0000)]
test_formatdate(): Dang.  Typo.

git-svn-id: http://svn.python.org/projects/python/trunk@24213 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agotest_formatdate(): Don't do the localtime test if we don't have
bwarsaw [Fri, 9 Nov 2001 19:30:58 +0000 (9 19:30 +0000)]
test_formatdate(): Don't do the localtime test if we don't have
strptime() -- I'm too lazy to code it otherwise.

git-svn-id: http://svn.python.org/projects/python/trunk@24212 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoopen_the_file(): this routine has a borrowed reference to the file
tim_one [Fri, 9 Nov 2001 19:23:47 +0000 (9 19:23 +0000)]
open_the_file():  this routine has a borrowed reference to the file
object, so the "Metroworks only" section should not decref it in case
of error (the caller is responsible for decref'ing in case of error --
and does).

git-svn-id: http://svn.python.org/projects/python/trunk@24211 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoAdd sys/types.h and stdio.h into getaddrinfo test, based on itojun's message
loewis [Fri, 9 Nov 2001 17:50:52 +0000 (9 17:50 +0000)]
Add sys/types.h and stdio.h into getaddrinfo test, based on itojun's message
in http://mail.python.org/pipermail/python-dev/2001-November/018473.html

git-svn-id: http://svn.python.org/projects/python/trunk@24210 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agotest_formatdate(): A test for email.Utils.formatdate().
bwarsaw [Fri, 9 Nov 2001 17:46:17 +0000 (9 17:46 +0000)]
test_formatdate(): A test for email.Utils.formatdate().

git-svn-id: http://svn.python.org/projects/python/trunk@24209 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoForgot to import time.
bwarsaw [Fri, 9 Nov 2001 17:45:48 +0000 (9 17:45 +0000)]
Forgot to import time.

git-svn-id: http://svn.python.org/projects/python/trunk@24208 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoUpdated the documentation for formatdate().
bwarsaw [Fri, 9 Nov 2001 17:08:13 +0000 (9 17:08 +0000)]
Updated the documentation for formatdate().

git-svn-id: http://svn.python.org/projects/python/trunk@24207 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoformatdate(): A better docstring.
bwarsaw [Fri, 9 Nov 2001 17:07:28 +0000 (9 17:07 +0000)]
formatdate(): A better docstring.

git-svn-id: http://svn.python.org/projects/python/trunk@24206 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoRemove my name, probably bad style.
theller [Fri, 9 Nov 2001 17:04:43 +0000 (9 17:04 +0000)]
Remove my name, probably bad style.

git-svn-id: http://svn.python.org/projects/python/trunk@24205 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoformatdate(): An implementation to replace the one borrowed from
bwarsaw [Fri, 9 Nov 2001 16:59:56 +0000 (9 16:59 +0000)]
formatdate(): An implementation to replace the one borrowed from
rfc822.py.  The old rfc822.formatdate() produced date strings using
obsolete syntax.  The new version produces the preferred RFC 2822
dates.

Also, an optional argument `localtime' is added, which if true,
produces a date relative to the local timezone, with daylight savings
time properly taken into account.

git-svn-id: http://svn.python.org/projects/python/trunk@24204 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoScript to print undocumented symbols found in Python header files.
theller [Fri, 9 Nov 2001 16:50:35 +0000 (9 16:50 +0000)]
Script to print undocumented symbols found in Python header files.

git-svn-id: http://svn.python.org/projects/python/trunk@24203 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoFix SF bug 468948 & 451295: urllib2 authentication problems
jhylton [Fri, 9 Nov 2001 16:46:51 +0000 (9 16:46 +0000)]
Fix SF bug 468948 & 451295: urllib2 authentication problems

Fix contributed by Jeffrey C. Ollie.

I haven't tested the fix because the situation is non-trivial to
reproduce.

The basic solution is to get rid of the __current_realm attribute of
authentication handlers.  Instead, prevent infinite retries by
checking for the presence of an Authenticate: header in the request
object that exactly matches the Authenticate: header that would be
added.

The problem prevent authentication from working correctly in the
presence of retries.

Ollie mentioned that digest authentication has the same problem and I
applied the same solution there.

git-svn-id: http://svn.python.org/projects/python/trunk@24202 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoFix SF bug #479186: compiler generates bad code for "del"
jhylton [Fri, 9 Nov 2001 16:24:34 +0000 (9 16:24 +0000)]
Fix SF bug #479186: compiler generates bad code for "del"

Fix by Neil Schemenauer.  Visit the Subscript node when trying to find
the operation for a statement.

XXX Not sure if there are other nodes that should be visited.

git-svn-id: http://svn.python.org/projects/python/trunk@24201 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoFix SF buf #476953: Bad more for opening file gives bad msg.
jhylton [Fri, 9 Nov 2001 16:17:24 +0000 (9 16:17 +0000)]
Fix SF buf #476953: Bad more for opening file gives bad msg.

If fopen() fails with EINVAL it means that the mode argument is
invalid.  Return the mode in the error message instead of the
filename.

git-svn-id: http://svn.python.org/projects/python/trunk@24200 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoA better new, unique object
jhylton [Fri, 9 Nov 2001 16:15:04 +0000 (9 16:15 +0000)]
A better new, unique object

git-svn-id: http://svn.python.org/projects/python/trunk@24199 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoFix memory leak. This is part of SF patch #478006.
fdrake [Fri, 9 Nov 2001 16:00:41 +0000 (9 16:00 +0000)]
Fix memory leak.  This is part of SF patch #478006.

git-svn-id: http://svn.python.org/projects/python/trunk@24198 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoFix memory leak. This is (very!) similar to part of SF patch #478006.
fdrake [Fri, 9 Nov 2001 15:59:36 +0000 (9 15:59 +0000)]
Fix memory leak.  This is (very!) similar to part of SF patch #478006.

git-svn-id: http://svn.python.org/projects/python/trunk@24197 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoFixes to compile cPickle.c & socketmodule.c on cygwin and possibly
mwh [Fri, 9 Nov 2001 10:06:23 +0000 (9 10:06 +0000)]
Fixes to compile cPickle.c & socketmodule.c on cygwin and possibly
other platforms that have funny ideas about whether addresses of
functions in dlls are compile-time constants.

git-svn-id: http://svn.python.org/projects/python/trunk@24196 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoCleaned up some markup stupidity and a usage problem reported by Detlef
fdrake [Fri, 9 Nov 2001 05:03:05 +0000 (9 05:03 +0000)]
Cleaned up some markup stupidity and a usage problem reported by Detlef
Lannert.  Added descriptions of HTTP_PORT and HTTPS_PORT.

git-svn-id: http://svn.python.org/projects/python/trunk@24195 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoFix a variety of typographical, grammatical, and clarity problems reported
fdrake [Fri, 9 Nov 2001 03:49:29 +0000 (9 03:49 +0000)]
Fix a variety of typographical, grammatical, and clarity problems reported
by Detlef Lannert.

git-svn-id: http://svn.python.org/projects/python/trunk@24194 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoMerge directory chooser into tkFileDialog.
loewis [Thu, 8 Nov 2001 17:51:33 +0000 (8 17:51 +0000)]
Merge directory chooser into tkFileDialog.

git-svn-id: http://svn.python.org/projects/python/trunk@24193 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoClean up one comment, fix typos in others.
fdrake [Thu, 8 Nov 2001 17:19:29 +0000 (8 17:19 +0000)]
Clean up one comment, fix typos in others.

git-svn-id: http://svn.python.org/projects/python/trunk@24192 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoBacking out the fast path for interned string compares again as requested.
lemburg [Thu, 8 Nov 2001 08:34:43 +0000 (8 08:34 +0000)]
Backing out the fast path for interned string compares again as requested.

git-svn-id: http://svn.python.org/projects/python/trunk@24191 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoPatch #478654: Expose tk_chooseDirectory.
loewis [Wed, 7 Nov 2001 22:38:08 +0000 (7 22:38 +0000)]
Patch #478654: Expose tk_chooseDirectory.
Also delegate kw arguments through ** calls.

git-svn-id: http://svn.python.org/projects/python/trunk@24190 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoAdd fast-path for comparing interned (true) string objects.
lemburg [Wed, 7 Nov 2001 14:54:49 +0000 (7 14:54 +0000)]
Add fast-path for comparing interned (true) string objects.

This patch boosts performance for comparing identical string object
by some 20% on my machine while not causing any noticable slow-down
for other operations (according to tests done with pybench).

git-svn-id: http://svn.python.org/projects/python/trunk@24189 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoFix memory leaks detecting in bug report #478003.
loewis [Wed, 7 Nov 2001 08:31:03 +0000 (7 08:31 +0000)]
Fix memory leaks detecting in bug report #478003.

git-svn-id: http://svn.python.org/projects/python/trunk@24188 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoWhen referring to a formal parameter from the description, use the name given
fdrake [Wed, 7 Nov 2001 06:28:47 +0000 (7 06:28 +0000)]
When referring to a formal parameter from the description, use the name given
with the signature, not an ad hoc abbreviated form.

git-svn-id: http://svn.python.org/projects/python/trunk@24187 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoAnother name!
fdrake [Wed, 7 Nov 2001 06:23:27 +0000 (7 06:23 +0000)]
Another name!

git-svn-id: http://svn.python.org/projects/python/trunk@24186 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoapply() documentation: Remove a detail about the implementation that does
fdrake [Wed, 7 Nov 2001 06:22:25 +0000 (7 06:22 +0000)]
apply() documentation:  Remove a detail about the implementation that does
not affect the API.  Clean up the text about call syntax apply() is
equivalent to.  Based on comments by Thomas Guettler.

git-svn-id: http://svn.python.org/projects/python/trunk@24185 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoSF bug #478949 Windows installer start menu registry.
tim_one [Wed, 7 Nov 2001 04:42:04 +0000 (7 04:42 +0000)]
SF bug #478949 Windows installer start menu registry.
I'm guessing at this, pending more info from the bug submitter.  Wise
changed how the %GROUP% vrbl got defined between versions 5.0a (used
before Python 2.2) and 8.14, to hold the full path to Start Menu group
instead of just the group name.  If I'm guessing correctly, the info
the bug report is complaining about is in one of the registry keys
we set up that neither Windows nor Python cares about.  We did store
a full path there in 2.2b1 instead of just the group name; the patch cuts
it back to just the name again.

git-svn-id: http://svn.python.org/projects/python/trunk@24184 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoAdjust the module synopsis to avoid margin overruns in the PDF format.
fdrake [Tue, 6 Nov 2001 22:14:35 +0000 (6 22:14 +0000)]
Adjust the module synopsis to avoid margin overruns in the PDF format.

git-svn-id: http://svn.python.org/projects/python/trunk@24183 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoA variety of small cleanups, including one to avoid a margin overrun in the
fdrake [Tue, 6 Nov 2001 22:13:19 +0000 (6 22:13 +0000)]
A variety of small cleanups, including one to avoid a margin overrun in the
PDF version.

git-svn-id: http://svn.python.org/projects/python/trunk@24182 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoRemove stray quotes; probably left over from conversion from docstrings.
fdrake [Tue, 6 Nov 2001 22:11:34 +0000 (6 22:11 +0000)]
Remove stray quotes; probably left over from conversion from docstrings.

git-svn-id: http://svn.python.org/projects/python/trunk@24181 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoRemove extra period.
fdrake [Tue, 6 Nov 2001 22:10:47 +0000 (6 22:10 +0000)]
Remove extra period.

git-svn-id: http://svn.python.org/projects/python/trunk@24180 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoAdd a regression test for SF bug #478536: If a value cannot be weakly
fdrake [Tue, 6 Nov 2001 16:38:34 +0000 (6 16:38 +0000)]
Add a regression test for SF bug #478536:  If a value cannot be weakly
referenced, WeakKeyDictionary.has_key() should return 0 instead of raising
TypeError.

git-svn-id: http://svn.python.org/projects/python/trunk@24179 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoWeakKeyDictionary.has_key(): If the key being tested is not weakly
fdrake [Tue, 6 Nov 2001 16:36:53 +0000 (6 16:36 +0000)]
WeakKeyDictionary.has_key():  If the key being tested is not weakly
referencable (weakref.ref() raises TypeError), return 0 instead of
propogating the TypeError.
This closes SF bug #478536; bugfix candidate.

git-svn-id: http://svn.python.org/projects/python/trunk@24178 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoChanged names, added bridge functions to macfs.fsref objects and
jackjansen [Tue, 6 Nov 2001 15:57:59 +0000 (6 15:57 +0000)]
Changed names, added bridge functions to macfs.fsref objects and
generally did things to get it working.

git-svn-id: http://svn.python.org/projects/python/trunk@24177 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoAdded an error message when using FSRef objects on platforms that don't
jackjansen [Tue, 6 Nov 2001 15:57:26 +0000 (6 15:57 +0000)]
Added an error message when using FSRef objects on platforms that don't
support them.

git-svn-id: http://svn.python.org/projects/python/trunk@24176 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoAdded hfsplusapi module.
jackjansen [Tue, 6 Nov 2001 15:56:56 +0000 (6 15:56 +0000)]
Added hfsplusapi module.

git-svn-id: http://svn.python.org/projects/python/trunk@24175 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoAdded longlong routines.
jackjansen [Tue, 6 Nov 2001 15:55:23 +0000 (6 15:55 +0000)]
Added longlong routines.

git-svn-id: http://svn.python.org/projects/python/trunk@24174 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoEnabled WITH_LONG_LONG. No reason it was disabled, it has been supported by the Metro...
jackjansen [Tue, 6 Nov 2001 12:11:05 +0000 (6 12:11 +0000)]
Enabled WITH_LONG_LONG. No reason it was disabled, it has been supported by the Metrowerks compiler for quite some time.

git-svn-id: http://svn.python.org/projects/python/trunk@24173 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoRemoved unused variable.
jackjansen [Tue, 6 Nov 2001 12:10:05 +0000 (6 12:10 +0000)]
Removed unused variable.

git-svn-id: http://svn.python.org/projects/python/trunk@24172 6015fed2-1504-0410-9fe1-9d1591cc4771

20 years agoFirst couple of fixes to make it compile with Universal 3.3.2.
jackjansen [Tue, 6 Nov 2001 12:06:39 +0000 (6 12:06 +0000)]
First couple of fixes to make it compile with Universal 3.3.2.

git-svn-id: http://svn.python.org/projects/python/trunk@24171 6015fed2-1504-0410-9fe1-9d1591cc4771