Commit Graph

24311 Commits

Author SHA1 Message Date
Neal Norwitz c18b308229 Fix a few docstrings, remove extra commas 2002-10-11 22:19:42 +00:00
Neal Norwitz 520cdf733a SF # 539360, webbrowser.py and konqueror, by Andy McKay
Fix Konqueror so it can start when calling open().
The assert needed to be on the raw URL, not openURL 'url...'

Will backport.
2002-10-11 22:04:22 +00:00
Neal Norwitz 98a355d0b3 SF #621948, update docstring for md5 by David M. Cooke. Will backport. 2002-10-11 21:53:01 +00:00
Raymond Hettinger 463bfafd24 Clarify deprecation of the floor div operator, modulo operator,
and divmod() function for complex numbers.

Closes SF Bug 621708: Unclear deprecation.
2002-10-11 21:08:02 +00:00
Guido van Rossum a5c0e6d6c8 Add checks for size overflow on list*n, list+list, tuple+tuple.
Will backport.
2002-10-11 21:05:56 +00:00
Guido van Rossum 6e08c1460c PyObject_Init[Var] is almost always called from the PyObject_NEW[_VAR]
macros.  The 'op' argument is then the result from PyObject_MALLOC,
and that can of course be NULL.  In that case, PyObject_Init[Var]
would raise a SystemError with "NULL object passed to
PyObject_Init[Var]".  But there's nothing the caller of the macro can
do about this.  So PyObject_Init[Var] should call just PyErr_NoMemory.

Will backport.
2002-10-11 20:37:24 +00:00
Tim Peters c78462fb94 The MS resource compiler simply cannot be convinced to do arithmetic
correctly.  So field3.py is a Python program that can.  This injects
another manual step into the Python release process for Windows; so
it goes.
2002-10-11 18:25:52 +00:00
Tim Peters ce2f663c48 Repair the DLL name -- this has to match the major.minor version numbers. 2002-10-11 17:51:44 +00:00
Jeremy Hylton e190663742 Typo in docstring 2002-10-11 17:27:55 +00:00
Jeremy Hylton 96f1129de8 Fix for SF bug #599836: Don't duplicate headers.
If the request object has a header, it should override the default
header provided by the OpenerDirector.
2002-10-11 17:26:46 +00:00
Fred Drake a0f453b2b1 Allow restricted code to get byteorder, getdefaultencoding(),
getrefcount(), maxunicode, and version_info.
2002-10-11 16:20:45 +00:00
Jeremy Hylton 83d0fd2fd1 Trying alphabet again 2002-10-11 16:05:07 +00:00
Jeremy Hylton a325c42b2d Sort names alphabetically. 2002-10-11 15:55:17 +00:00
Jeremy Hylton 69dc0c5bf5 Add hexversion to list of safe sys names (SF bug 621447).
Bug fix candidate.
2002-10-11 15:51:29 +00:00
Jeremy Hylton 3bd6fde4e3 Use fdopen() to create file from fd. 2002-10-11 14:36:24 +00:00
Michael W. Hudson 549ab8a98d A test for the recent overflow-in-format-crash bug.
Only runs when sys.maxint == 2**32 - 1; different things go wrong
on a 64-bit box.
2002-10-11 13:46:32 +00:00
Guido van Rossum cafe0eefc3 Back out news about SF patch 479898 -- it's withdrawn. 2002-10-11 11:47:28 +00:00
Martin v. Löwis a5f0907d79 Back out #479898. 2002-10-11 05:37:59 +00:00
Guido van Rossum 049cd6b563 Fix a nasty endcase reported by Armin Rigo in SF bug 618623:
'%2147483647d' % -123 segfaults.  This was because an integer overflow
in a comparison caused the string resize to be skipped.  After fixing
the overflow, this could call _PyString_Resize() with a negative size,
so I (1) test for that and raise MemoryError instead; (2) also added a
test for negative newsize to _PyString_Resize(), raising SystemError
as for all bad arguments.

An identical bug existed in unicodeobject.c, of course.

Will backport to 2.2.2.
2002-10-11 00:43:48 +00:00
Neal Norwitz f689b88e11 Add Greg Copeland for SF # 585913, Adds Galeon support to webbrowser.py 2002-10-10 22:50:53 +00:00
Neal Norwitz 8dd28eb973 SF # 585913, Adds Galeon support to webbrowser.py 2002-10-10 22:49:29 +00:00
Martin v. Löwis 36a4d8c20e Remove mentionings of DOS. 2002-10-10 18:24:54 +00:00
Martin v. Löwis e893f2f3b4 Remove more DOS support. 2002-10-10 18:17:08 +00:00
Fred Drake 5430f4e9c8 Document when unittest was added to Python. 2002-10-10 16:16:25 +00:00
Andrew M. Kuchling c309ccab64 Add new posix functions 2002-10-10 16:04:08 +00:00
Barry Warsaw 6f0f961741 Update email micro release number. 2002-10-10 15:58:19 +00:00
Barry Warsaw df88b9fadf Document that the Charset constructor coerces its argument to lower
case.
2002-10-10 15:23:38 +00:00
Barry Warsaw 57ce1430b2 Document that get_content_charset() coerces its return value to lower
case.
2002-10-10 15:22:16 +00:00
Barry Warsaw c986e54733 Bump version number to 2.4.2 to pick up the latest minor bug fixes. 2002-10-10 15:19:46 +00:00
Barry Warsaw dc8087b26e New tests to verify that charsets are case insensitive, and that by
default get_body_encoding() cannot be SHORTEST.
2002-10-10 15:14:22 +00:00
Barry Warsaw ee07cb1d70 get_content_charset(): RFC 2046 $4.1.2 says charsets are not case
sensitive.  Coerce the argument to lower case.
2002-10-10 15:13:26 +00:00
Barry Warsaw 14fc464ec9 __init__(): RFC 2046 $4.1.2 says charsets are not case sensitive.
Coerce the argument to lower case.  Also, since body encodings can't
be SHORTEST, default the CHARSETS failobj's second item to BASE64.
2002-10-10 15:11:20 +00:00
Guido van Rossum d4f7da3cd7 Add .PHONY targets, to declare targets that aren't real files.
Immediate benefit: when you use "make -t" to avoid a global recompile
after a trivial header file touchup, Make will no longer create files
named all, oldsharedmods, and sharedmods.

(Not sure if I tracked down all such targets.  Not sure if I care.)
2002-10-10 15:04:04 +00:00
Martin v. Löwis 6ce1315bd3 Patch #612602: Streamline configure methods. 2002-10-10 14:36:13 +00:00
Martin v. Löwis dbe3f76270 Patch #569139: Implementation of major, minor and makedev. 2002-10-10 14:27:30 +00:00
Andrew M. Kuchling 3e3e1296f0 [Bug #621039] Fix broken link 2002-10-10 11:32:30 +00:00
Andrew M. Kuchling 83992480ed [Bug #621038] Remove duplicated item 2002-10-10 11:31:48 +00:00
Kurt B. Kaiser 5afa1dfb72 M CallTips.py Add support for getting calltip from subprocess,
refactor a bit and clean up.

M PyShell.py       Cosmetic changes, delete blank lines, add # on some
                   blank lines.

M rpc.py           Add more debugging capability

M run.py           Add support for getting calltip from subprocess
                   Move import statements
2002-10-10 08:25:24 +00:00
Neal Norwitz 853ddd5cb9 SF #614596, fix for urllib2.AbstractBasicAuthHandler, John Williams (johnw42)
Make the regex case insensitive for some web sites which use Realm.
2002-10-09 23:17:04 +00:00
Fred Drake aa02c8441b Accept Armin's documentation patch for SF bug #558179.
Adjusted some markup to make the descriptions more consistent.
2002-10-09 22:33:23 +00:00
Guido van Rossum 2b492b61c6 News about repr() and 8-bit characters, and setlocale() in the
readline module.
2002-10-09 21:40:48 +00:00
Skip Montanaro 628e3bf6cf MacOSX linker doesn't understand -R flag at all, no matter how you feed it
the flag.  Punt and return a -L flag instead (returning "" gums up the
command to be forked).
2002-10-09 21:37:18 +00:00
Guido van Rossum 60c8a3aba8 GNU readline() mistakenly sets the LC_CTYPE locale.
This is evil.  Only the user or the app's main() should do this!
We must save and restore the locale around the rl_initialize() call.
2002-10-09 21:27:33 +00:00
Guido van Rossum 8052f8921e Undo this part of the previous checkin:
Also fixed an error message -- %s argument has non-string str()
  doesn't make sense for %r, so the error message now differentiates
  between %s and %r.

because PyObject_Repr() and PyObject_Str() ensure that this can never
happen.  Added a helpful comment instead.
2002-10-09 19:14:30 +00:00
Guido van Rossum b00c07f038 The string formatting code has a test to switch to Unicode when %s
sees a Unicode argument.  Unfortunately this test was also executed
for %r, because %s and %r share almost all of their code.  This meant
that, if u is a unicode object while repr(u) is an 8-bit string
containing ASCII characters, '%r' % u is a *unicode* string containing
only ASCII characters!

Fixed by executing the test only for %s.

Also fixed an error message -- %s argument has non-string str()
doesn't make sense for %r, so the error message now differentiates
between %s and %r.
2002-10-09 19:07:53 +00:00
Guido van Rossum 06e2a5e052 Add special consideration for rlcompleter. As a side effect of
initializing GNU readline, setlocale(LC_CTYPE, "") is called, which
changes the <ctype.h> macros to use the "default" locale (which isn't
the *initial* locale -- the initial locale is the "C" locale in which
only ASCII characters are printable).  When the default locale is e.g.
Latin-1, the repr() of string objects can include 8-bit characters
with the high bit set; I believe this is due to the recent
PRINT_MULTIBYTE_STRING changes to stringobject.c.  This in turn screws
up test_pyexpat and test_rotor, which depend on the repr() of 8-bit
strings with high bit characters.

The solution (for now) is to force the LC_CTYPE locale to "C" after
importing rlcompleter.  This is the locale required by the test suite
anyway.
2002-10-09 18:17:06 +00:00
Martin v. Löwis 8b10f8988f Remove more DOS support. 2002-10-09 17:23:29 +00:00
Guido van Rossum ecaaf643e2 Add a few people who were in the ACKS file in the 2.2.2 branch but not
on the trunk.
2002-10-09 16:37:03 +00:00
Andrew M. Kuchling 0a6fa9619e Minor edits and markup fixes 2002-10-09 12:11:10 +00:00
Tim Peters 26bc25a6c4 Don't try to access sys.getwindowsversion unless it exists (ntpath is
imported on systems other than Windows, and in particular is imported
by test___all__; the compile farm reported that all Linux tests failed
due to this; isn't anyone in PythonDevLand running CVS on Linux?!).
2002-10-09 07:56:04 +00:00