Fred Drake [Wed, 16 Oct 2002 16:00:42 +0000 (16:00 +0000)]
Modernization: Use string methods, use str instead of
types.StringType, inherit from list instead of
UserList.
Fred Drake [Wed, 16 Oct 2002 15:30:17 +0000 (15:30 +0000)]
Use string methods.
Fred Drake [Wed, 16 Oct 2002 15:29:07 +0000 (15:29 +0000)]
Use string methods. Organize the imports in Python Normal Form.
Fred Drake [Wed, 16 Oct 2002 14:59:02 +0000 (14:59 +0000)]
Use string methods; minor code cleanup.
Thomas Heller [Tue, 15 Oct 2002 19:45:25 +0000 (19:45 +0000)]
Recreated after source changes.
Martin v. Löwis [Tue, 15 Oct 2002 15:11:13 +0000 (15:11 +0000)]
Patch #572628: Optional timeouts for put and get.
Thomas Heller [Tue, 15 Oct 2002 14:51:58 +0000 (14:51 +0000)]
Revert the previous checkin - it didn't work anyway.
Guido van Rossum [Tue, 15 Oct 2002 01:01:53 +0000 (01:01 +0000)]
For some reason (probably cut and paste), __ipow__ for new-style
classes was called with three arguments. This makes no sense, there's
no way to pass in the "modulo" 3rd argument as for __pow__, and
classic classes don't do this. [SF bug 620179]
I don't want to backport this to 2.2.2, because it could break
existing code that has developed a work-around. Code in 2.2.2 that
wants to use __ipow__ and wants to be forward compatible with 2.3
should be written like this:
def __ipow__(self, exponent, modulo=None):
...
Martin v. Löwis [Mon, 14 Oct 2002 21:11:34 +0000 (21:11 +0000)]
Don't drop old slots if _unicode_to_string did not change anything.
Martin v. Löwis [Mon, 14 Oct 2002 21:07:28 +0000 (21:07 +0000)]
Allow Unicode strings in __slots__, converting them to byte strings.
Martin v. Löwis [Mon, 14 Oct 2002 21:06:02 +0000 (21:06 +0000)]
Allow Unicode strings as message and module name.
Guido van Rossum [Mon, 14 Oct 2002 20:48:09 +0000 (20:48 +0000)]
[SF bug 620364]
In build_extensions(), don't proceed if srcdir is None. Probably
somebody who tried this on Windows. :-)
Martin v. Löwis [Mon, 14 Oct 2002 20:03:40 +0000 (20:03 +0000)]
Convert empty string literal to string. Speed up creation of idmap.
Guido van Rossum [Mon, 14 Oct 2002 19:59:54 +0000 (19:59 +0000)]
Fix for 1.33: urlsplit() should only add '//' if scheme != ''.
Will add test and backport.
Barry Warsaw [Mon, 14 Oct 2002 18:15:35 +0000 (18:15 +0000)]
I'd forgotten that tcsh was the default for 10.1, but SF's 10.1 system
uses bash and so does my 10.2 system. "limit stacksize 2048" is the
right invocation for tcsh/csh.
Barry Warsaw [Mon, 14 Oct 2002 18:04:39 +0000 (18:04 +0000)]
There was a typo in the MacOSX section regarding the stacksize issue.
There's no limit command near as I can tell. Should be the bash
builtin ulimit command.
Barry Warsaw [Mon, 14 Oct 2002 16:52:41 +0000 (16:52 +0000)]
append(): Fixing the test for convertability after consultation with
Ben. If s is a byte string, make sure it can be converted to unicode
with the input codec, and from unicode with the output codec, or raise
a UnicodeError exception early. Skip this test (and the unicode->byte
string conversion) when the charset is our faux 8bit raw charset.
Fred Drake [Mon, 14 Oct 2002 15:45:11 +0000 (15:45 +0000)]
Use the same shade of blue as the site navigation areas.
Barry Warsaw [Mon, 14 Oct 2002 15:26:17 +0000 (15:26 +0000)]
Two new tests for splitting (or not splitting) 8-bit header data.
Barry Warsaw [Mon, 14 Oct 2002 15:24:18 +0000 (15:24 +0000)]
Bump the __version__
Barry Warsaw [Mon, 14 Oct 2002 15:13:17 +0000 (15:13 +0000)]
__init__(): Fix an invariant, that the charset item in a chunk tuple
must be a Charset instance, not a string. The bug here was that
self._charset wasn't being converted to a Charset instance so later
.append() calls which used the default charset would break.
_split(): If the charset of the chunk is '8bit', return the chunk
unchanged. We can't safely split it, so this is the avenue of least
harm.
Barry Warsaw [Mon, 14 Oct 2002 15:09:30 +0000 (15:09 +0000)]
_split_header(): If we have a header which is a byte string containing
8-bit data, we cannot split it safely, so return the original string
unchanged.
_is8bitstring(): Helper function which returns True when we have a
byte string that contains non-ascii characters (i.e. mysterious 8-bit
data).
Barry Warsaw [Mon, 14 Oct 2002 15:06:55 +0000 (15:06 +0000)]
CHARSETS: Add faux '8bit' encoding for representing raw 8-bit data for
which we know nothing else.
Fred Drake [Mon, 14 Oct 2002 15:04:33 +0000 (15:04 +0000)]
Minor refactoring to avoid code duplication.
Tim Peters [Mon, 14 Oct 2002 15:01:44 +0000 (15:01 +0000)]
Update list of Windows buildnos for 2.2.2 final.
Guido van Rossum [Mon, 14 Oct 2002 12:22:17 +0000 (12:22 +0000)]
Add finditer to __all__ (when defining it at all).
SF bug 585882. Will forward-port.
Greg Ward [Sun, 13 Oct 2002 19:23:18 +0000 (19:23 +0000)]
Fix copyright date: the core of this code actually dates back to 1999
(rev. 1.4 of distutils/fancy_getopt.py).
Martin v. Löwis [Sun, 13 Oct 2002 13:54:50 +0000 (13:54 +0000)]
Patch #611760: read archives with comments.
Martin v. Löwis [Sun, 13 Oct 2002 10:28:04 +0000 (10:28 +0000)]
Patch #621891: Add askopenfile{name}s.
Martin v. Löwis [Sun, 13 Oct 2002 10:22:08 +0000 (10:22 +0000)]
Patch #621205: Tkinter updates for tk8.4.
Barry Warsaw [Sun, 13 Oct 2002 04:06:28 +0000 (04:06 +0000)]
_encode_chunks(), encode(): Don't modify self._chunks. As Ben says:
Also, it fixes a really egregious error in Header.encode() (really
in Header._encode_chunks()) that could cause a header to grow and
grow each time encode() was called if output_codec was different
from input_codec.
Also, fix a typo.
Barry Warsaw [Sun, 13 Oct 2002 04:00:45 +0000 (04:00 +0000)]
Update the urls and other information about the add-on Japanese,
Korean, and Chinese codecs.
Fred Drake [Sat, 12 Oct 2002 15:02:46 +0000 (15:02 +0000)]
Fix tildes in URLs. Closes SF bug #614821.
Guido van Rossum [Fri, 11 Oct 2002 23:39:35 +0000 (23:39 +0000)]
Darn! Don't divide by zero. Bad fix. :-)
Neal Norwitz [Fri, 11 Oct 2002 22:19:42 +0000 (22:19 +0000)]
Fix a few docstrings, remove extra commas
Neal Norwitz [Fri, 11 Oct 2002 22:04:22 +0000 (22:04 +0000)]
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.
Neal Norwitz [Fri, 11 Oct 2002 21:53:01 +0000 (21:53 +0000)]
SF #621948, update docstring for md5 by David M. Cooke. Will backport.
Raymond Hettinger [Fri, 11 Oct 2002 21:08:02 +0000 (21:08 +0000)]
Clarify deprecation of the floor div operator, modulo operator,
and divmod() function for complex numbers.
Closes SF Bug 621708: Unclear deprecation.
Guido van Rossum [Fri, 11 Oct 2002 21:05:56 +0000 (21:05 +0000)]
Add checks for size overflow on list*n, list+list, tuple+tuple.
Will backport.
Guido van Rossum [Fri, 11 Oct 2002 20:37:24 +0000 (20:37 +0000)]
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.
Tim Peters [Fri, 11 Oct 2002 18:25:52 +0000 (18:25 +0000)]
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.
Tim Peters [Fri, 11 Oct 2002 17:51:44 +0000 (17:51 +0000)]
Repair the DLL name -- this has to match the major.minor version numbers.
Jeremy Hylton [Fri, 11 Oct 2002 17:27:55 +0000 (17:27 +0000)]
Typo in docstring
Jeremy Hylton [Fri, 11 Oct 2002 17:26:46 +0000 (17:26 +0000)]
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.
Fred Drake [Fri, 11 Oct 2002 16:20:45 +0000 (16:20 +0000)]
Allow restricted code to get byteorder, getdefaultencoding(),
getrefcount(), maxunicode, and version_info.
Jeremy Hylton [Fri, 11 Oct 2002 16:05:07 +0000 (16:05 +0000)]
Trying alphabet again
Jeremy Hylton [Fri, 11 Oct 2002 15:55:17 +0000 (15:55 +0000)]
Sort names alphabetically.
Jeremy Hylton [Fri, 11 Oct 2002 15:51:29 +0000 (15:51 +0000)]
Add hexversion to list of safe sys names (SF bug 621447).
Bug fix candidate.
Jeremy Hylton [Fri, 11 Oct 2002 14:36:24 +0000 (14:36 +0000)]
Use fdopen() to create file from fd.
Michael W. Hudson [Fri, 11 Oct 2002 13:46:32 +0000 (13:46 +0000)]
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.
Guido van Rossum [Fri, 11 Oct 2002 11:47:28 +0000 (11:47 +0000)]
Back out news about SF patch 479898 -- it's withdrawn.
Martin v. Löwis [Fri, 11 Oct 2002 05:37:59 +0000 (05:37 +0000)]
Back out #479898.
Guido van Rossum [Fri, 11 Oct 2002 00:43:48 +0000 (00:43 +0000)]
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.
Neal Norwitz [Thu, 10 Oct 2002 22:50:53 +0000 (22:50 +0000)]
Add Greg Copeland for SF # 585913, Adds Galeon support to webbrowser.py
Neal Norwitz [Thu, 10 Oct 2002 22:49:29 +0000 (22:49 +0000)]
SF # 585913, Adds Galeon support to webbrowser.py
Martin v. Löwis [Thu, 10 Oct 2002 18:24:54 +0000 (18:24 +0000)]
Remove mentionings of DOS.
Martin v. Löwis [Thu, 10 Oct 2002 18:17:08 +0000 (18:17 +0000)]
Remove more DOS support.
Fred Drake [Thu, 10 Oct 2002 16:16:25 +0000 (16:16 +0000)]
Document when unittest was added to Python.
Andrew M. Kuchling [Thu, 10 Oct 2002 16:04:08 +0000 (16:04 +0000)]
Add new posix functions
Barry Warsaw [Thu, 10 Oct 2002 15:58:19 +0000 (15:58 +0000)]
Update email micro release number.
Barry Warsaw [Thu, 10 Oct 2002 15:23:38 +0000 (15:23 +0000)]
Document that the Charset constructor coerces its argument to lower
case.
Barry Warsaw [Thu, 10 Oct 2002 15:22:16 +0000 (15:22 +0000)]
Document that get_content_charset() coerces its return value to lower
case.
Barry Warsaw [Thu, 10 Oct 2002 15:19:46 +0000 (15:19 +0000)]
Bump version number to 2.4.2 to pick up the latest minor bug fixes.
Barry Warsaw [Thu, 10 Oct 2002 15:14:22 +0000 (15:14 +0000)]
New tests to verify that charsets are case insensitive, and that by
default get_body_encoding() cannot be SHORTEST.
Barry Warsaw [Thu, 10 Oct 2002 15:13:26 +0000 (15:13 +0000)]
get_content_charset(): RFC 2046 $4.1.2 says charsets are not case
sensitive. Coerce the argument to lower case.
Barry Warsaw [Thu, 10 Oct 2002 15:11:20 +0000 (15:11 +0000)]
__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.
Guido van Rossum [Thu, 10 Oct 2002 15:04:04 +0000 (15:04 +0000)]
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.)
Martin v. Löwis [Thu, 10 Oct 2002 14:36:13 +0000 (14:36 +0000)]
Patch #612602: Streamline configure methods.
Martin v. Löwis [Thu, 10 Oct 2002 14:27:30 +0000 (14:27 +0000)]
Patch #569139: Implementation of major, minor and makedev.
Andrew M. Kuchling [Thu, 10 Oct 2002 11:32:30 +0000 (11:32 +0000)]
[Bug #621039] Fix broken link
Andrew M. Kuchling [Thu, 10 Oct 2002 11:31:48 +0000 (11:31 +0000)]
[Bug #621038] Remove duplicated item
Kurt B. Kaiser [Thu, 10 Oct 2002 08:25:24 +0000 (08:25 +0000)]
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
Neal Norwitz [Wed, 9 Oct 2002 23:17:04 +0000 (23:17 +0000)]
SF #614596, fix for urllib2.AbstractBasicAuthHandler, John Williams (johnw42)
Make the regex case insensitive for some web sites which use Realm.
Fred Drake [Wed, 9 Oct 2002 22:33:23 +0000 (22:33 +0000)]
Accept Armin's documentation patch for SF bug #558179.
Adjusted some markup to make the descriptions more consistent.
Guido van Rossum [Wed, 9 Oct 2002 21:40:48 +0000 (21:40 +0000)]
News about repr() and 8-bit characters, and setlocale() in the
readline module.
Skip Montanaro [Wed, 9 Oct 2002 21:37:18 +0000 (21:37 +0000)]
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).
Guido van Rossum [Wed, 9 Oct 2002 21:27:33 +0000 (21:27 +0000)]
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.
Guido van Rossum [Wed, 9 Oct 2002 19:14:30 +0000 (19:14 +0000)]
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.
Guido van Rossum [Wed, 9 Oct 2002 19:07:53 +0000 (19:07 +0000)]
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.
Guido van Rossum [Wed, 9 Oct 2002 18:17:06 +0000 (18:17 +0000)]
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.
Martin v. Löwis [Wed, 9 Oct 2002 17:23:29 +0000 (17:23 +0000)]
Remove more DOS support.
Guido van Rossum [Wed, 9 Oct 2002 16:37:03 +0000 (16:37 +0000)]
Add a few people who were in the ACKS file in the 2.2.2 branch but not
on the trunk.
Andrew M. Kuchling [Wed, 9 Oct 2002 12:11:10 +0000 (12:11 +0000)]
Minor edits and markup fixes
Tim Peters [Wed, 9 Oct 2002 07:56:04 +0000 (07:56 +0000)]
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?!).
Tim Peters [Wed, 9 Oct 2002 01:07:11 +0000 (01:07 +0000)]
Logic for determining whether skipping test_pep277 is expected: whether
ths "should be" skipped depends on os.path.supports_unicode_filenames,
not really on the platform. Fiddled the expected-skip constructor
appropriately.
Tim Peters [Tue, 8 Oct 2002 21:01:07 +0000 (21:01 +0000)]
The
list(xrange(sys.maxint / 4))
test. Changed 4 to 2.
The belief is that this test intended to trigger a bit of code in
listobject.c's NRESIZE macro that's looking for arithmetic overflow. As
written, it doesn't achieve that, though, and leaves it up to the platform
realloc() as to whether it wants to allocate 2 gigabytes. Some platforms
say "sure!", although they don't appear to mean it, and disaster ensues.
Changing 4 to 2 (just barely) manages to trigger the arithmetic overflow
test instead, leaving the platform realloc() out of it.
I'll backport this to the 2.2 branch next.
Mark Hammond [Tue, 8 Oct 2002 02:44:31 +0000 (02:44 +0000)]
Add os.path.supports_unicode_filenames for all platforms,
sys.getwindowsversion() on Windows (new enahanced Tim-proof <wink>
version), and fix test_pep277.py in a few minor ways.
Including doc and NEWS entries.
Martin v. Löwis [Mon, 7 Oct 2002 19:01:07 +0000 (19:01 +0000)]
Document PEP 293.
Martin v. Löwis [Mon, 7 Oct 2002 18:52:29 +0000 (18:52 +0000)]
Document PEP 277 changes.
Martin v. Löwis [Mon, 7 Oct 2002 18:26:16 +0000 (18:26 +0000)]
Include wctype.h.
Martin v. Löwis [Mon, 7 Oct 2002 17:45:56 +0000 (17:45 +0000)]
Check for wctype.h.
Barry Warsaw [Mon, 7 Oct 2002 17:27:55 +0000 (17:27 +0000)]
openfile(): Go back to opening the files in text mode. This undoes
the change in revision 1.11 (test_email.py) in response to SF bug
#609988. We now think that was the wrong fix and that WinZip was the
real culprit there.
Barry Warsaw [Mon, 7 Oct 2002 17:27:35 +0000 (17:27 +0000)]
_parsebody(): Use get_content_type() instead of the deprecated
get_type(). Also, one of the regular expressions is constant so might
as well make it a module global. And, when splitting up digests,
handle lineseps that are longer than 1 character in length
(e.g. \r\n).
Martin v. Löwis [Mon, 7 Oct 2002 17:27:15 +0000 (17:27 +0000)]
Use escaped Unicode literals, according to PEP 8.
Barry Warsaw [Mon, 7 Oct 2002 17:20:25 +0000 (17:20 +0000)]
Bump the version to 2.4.1 (not 2.5 as previously mentioned) to sync it
with the standalone mimelib package.
Fred Drake [Mon, 7 Oct 2002 16:28:38 +0000 (16:28 +0000)]
Modified presentation of the grammar for calls to be easier to read
for both HTML and typeset renderings. Corresponds to revision
1.53.4.8 on the r22-maint branch.
Martin v. Löwis [Mon, 7 Oct 2002 13:55:50 +0000 (13:55 +0000)]
Patch #479898: Use multibyte C library for printing strings if available.
Martin v. Löwis [Mon, 7 Oct 2002 13:23:24 +0000 (13:23 +0000)]
Patch #448038: Add move(). Report errors from copytree as in shutil.Error.
Martin v. Löwis [Mon, 7 Oct 2002 06:44:21 +0000 (06:44 +0000)]
Apply file system default encoding to exec and spawn path and arguments.
Martin v. Löwis [Mon, 7 Oct 2002 06:21:41 +0000 (06:21 +0000)]
Fix quoting for Solaris LDSHARED. Will backport to 2.2.