Tim Peters [Mon, 8 Apr 2002 04:19:50 +0000 (04:19 +0000)]
SF bug 538827: Python open w/ MSVC6: bad error msgs.
open_the_file: Some (not all) flavors of Windows set errno to EINVAL
when passed a syntactically invalid filename. Python turned that into an
incomprehensible complaint about the mode string. Fixed by special-casing
MSVC.
- A type can now inherit its metatype from its base type. Previously,
when PyType_Ready() was called, if ob_type was found to be NULL, it
was always set to &PyType_Type; now it is set to base->ob_type,
where base is tp_base, defaulting to &PyObject_Type.
Some more news. (There's also a fix to _localemodule.c that I don't
dare describe, and of course lots of jiggling of the docs and the
Windows installer metadata.)
backport fdrake's checkin of
revision 1.4 of test_commands.py
Make test_commands work on more systems. This removes much of the dependency
on how a system is configured.
This closes SF bug #497160 (which has the patch) and #460613.
Fred Drake [Thu, 4 Apr 2002 17:58:53 +0000 (17:58 +0000)]
Avoid creating circular references between the ExpatParser and the
ContentHandler. While GC will eventually clean up, it can take longer than
normal for applications that create a lot of strings (or other immutables)
rather without creating many containers.
This closes SF bug #535474.
The body of_PyObject_GC_UnTrack() should only be compiled #ifdef
WITH_CYCLE_GC. (Neil pointed this out before the weekend, and I fixed
it right away, but forgot to check it in.)
Fred Drake [Mon, 1 Apr 2002 18:59:24 +0000 (18:59 +0000)]
Update from trunk:
- make \url force horizontal mode (so it works at the start of a line)
- make \verbatiminput produce results that look like a verbatim
environment
Guido van Rossum [Fri, 29 Mar 2002 14:47:18 +0000 (14:47 +0000)]
Backport to 2.2.1:
This is Neil's fix for SF bug 535905 (Evil Trashcan and GC interaction).
The fix makes it possible to call PyObject_GC_UnTrack() more than once
on the same object, and then move the PyObject_GC_UnTrack() call to
*before* the trashcan code is invoked.
Guido van Rossum [Thu, 28 Mar 2002 20:36:50 +0000 (20:36 +0000)]
Backport to 2.2.1:
This is Neil's fix for SF bug 535905 (Evil Trashcan and GC interaction).
The fix makes it possible to call PyObject_GC_UnTrack() more than once
on the same object, and then move the PyObject_GC_UnTrack() call to
*before* the trashcan code is invoked.
Guido van Rossum [Thu, 28 Mar 2002 20:18:48 +0000 (20:18 +0000)]
Backport to 2.2.1.
Fix an issue that was reported in but unrelated to the main problem of
SF bug 535905 (Evil Trashcan and GC interaction).
The SETLOCAL() macro should not DECREF the local variable in-place and
then store the new value; it should copy the old value to a temporary
value, then store the new value, and then DECREF the temporary value.
This is because it is possible that during the DECREF the frame is
accessed by other code (e.g. a __del__ method or gc.collect()) and the
variable would be pointing to already-freed memory.
Jack Jansen [Tue, 26 Mar 2002 12:50:40 +0000 (12:50 +0000)]
Backport of 1.15 and 1.14:
Make object browser work in OSX (by rewriting the old browser
LDEF in Python). If at all possible, this should go into 2.2.1.
Use the Carbon scrap manager interface if the old interface isn't available.
backport jackjansen's checkin of
revision 1.211 of socketmodule.c
Due to interaction between the MSL C library and the GUSI I/O library I can get reads from sockets to work consistently either for unbuffered binary files or for buffered binary files, but not for both:-(
The workaround is to force socket.makefile() to disable buffering for binary files.
backport akuchling's checkin of
revision 1.14 of netrc.py
[Bug #532115] netrc module was broken
* 'macdef' (macro definition) wasn't parsed correctly
* account value not reset for a subsequent 'default' line
* typo: 'whitepace' -> 'whitespace'
backport tim_one's checkin of
revision 2.55 of complexobject.c
SF bug 533198: Complex power underflow raises exception.
Konrad was too kind. Not only did it raise an exception, the specific
exception it raised made no sense. These are old bugs in complex_pow()
and friends:
1. Raising 0 to a negative power isn't a range error, it's a domain
error, so changed c_pow() to set errno to EDOM in that case instead
of ERANGE.
2. Changed complex_pow() to:
A. Used the Py_ADJUST_ERANGE2 macro to try to clear errno of a spurious
ERANGE error due to underflow in the libm pow() called by c_pow().
B. Produced different exceptions depending on the errno value:
i) For errno==EDOM, raise ZeroDivisionError instead of ValueError.
This is for consistency with the non-complex cases 0.0**-2 and
0**-2 and 0L**-2.
ii) For errno==ERANGE, raise OverflowError.
Jack Jansen [Mon, 25 Mar 2002 12:33:48 +0000 (12:33 +0000)]
Backport of 1.27, 1.29 and 1.30:
CodeWarrior includes Waste and Internet Config nowadays, obviating the need for separate downloads.
- Weaklink InterfaceLib in _Res module
- forgot to pass libraryflags and stdlibraryflags on to ppc/carbon
project generation.
First half of fix to 531398.
Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, inShould finally fix 531398. 2.2.1 candidate.se an exception.
backport akuchling's checkin of
revision 1.47 of httplib.py
[Bug #531616] Make HTTPS work again by adding a sendall method to the
FakeSocket class. Without it, the sendall() call got the method on
the underlying socket object, and that messed up SSL.
Does httplib use other methods of sockets that FakeSocket doesn't support?
Someone should take a look... (I'll try to give it a once-over.)
Jack Jansen [Mon, 25 Mar 2002 12:24:50 +0000 (12:24 +0000)]
Backport of _Cmmodule.c 1.8 and cmsupport.py 1.6:
Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Should finally fix 531398. 2.2.1 candidate.
Also blacklisted some constants with definitions that were not Python-compatible.
backport bwarsaw's checkin of
revision 4.8 of python-mode.el
(py-temp-directory): Add /var/tmp to the list of directories this
searches. This is added after /tmp. Closes SF bug #505488, except
that /var/tmp comes after /tmp instead of the patch's suggestion of
putting it before /usr/tmp.
Jack Jansen [Mon, 25 Mar 2002 12:20:43 +0000 (12:20 +0000)]
Backport of _Qdmodule.c 1.8, qdsupport.py 1.38:
Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Should finally fix 531398. 2.2.1 candidate.
Also blacklisted some constants with definitions that were not Python-compatible.
Jack Jansen [Mon, 25 Mar 2002 12:17:28 +0000 (12:17 +0000)]
Backport of _Dragmodule.c 1.8, dragsupport.py 1.10:
Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Should finally fix 531398. 2.2.1 candidate.
Also blacklisted some constants with definitions that were not Python-compatible.
Jack Jansen [Mon, 25 Mar 2002 11:14:28 +0000 (11:14 +0000)]
Backport of _Evtmodule.c 1.6, evtsupport.py 1.15:
Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Should finally fix 531398. 2.2.1 candidate.
Also blacklisted some constants with definitions that were not Python-compatible.
Jack Jansen [Mon, 25 Mar 2002 10:56:59 +0000 (10:56 +0000)]
Backport of _Fmmodule.c 1.6 and fmsupport.py 1.6:
Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Should finally fix 531398. 2.2.1 candidate.
Also blacklisted some constants with definitions that were not Python-compatible.
Jack Jansen [Mon, 25 Mar 2002 10:45:21 +0000 (10:45 +0000)]
Backport of _Icnmodule.c 1.5, icnsupport.py 1.7:
Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Should finally fix 531398. 2.2.1 candidate.
Also blacklisted some constants with definitions that were not Python-compatible.
Jack Jansen [Mon, 25 Mar 2002 10:43:35 +0000 (10:43 +0000)]
Backport of _Qdoffsmodule.c 1.7, qdoffssupport.py 1.8:
Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Should finally fix 531398. 2.2.1 candidate.
Also blacklisted some constants with definitions that were not Python-compatible.
Jack Jansen [Mon, 25 Mar 2002 10:41:18 +0000 (10:41 +0000)]
Backport of _TEmodule.c 1.8, tesupport.py 1.10:
Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Should finally fix 531398. 2.2.1 candidate.
Also blacklisted some constants with definitions that were not Python-compatible.
Jack Jansen [Mon, 25 Mar 2002 10:38:57 +0000 (10:38 +0000)]
Backport of _Qtmocule.c 1.7, qtsupport.py 1.19:
Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Should finally fix 531398. 2.2.1 candidate.
Also blacklisted some constants with definitions that were not Python-compatible.