]> granicus.if.org Git - python/log
python
22 years agoRestructure: move all wiki code into a separate module.
Guido van Rossum [Thu, 17 Oct 2002 15:53:02 +0000 (15:53 +0000)]
Restructure: move all wiki code into a separate module.

22 years agoAdd trailing newline when saving.
Guido van Rossum [Thu, 17 Oct 2002 13:34:01 +0000 (13:34 +0000)]
Add trailing newline when saving.

22 years agoSecurity fixes: reject non-wiki-word page names; set homedir to /tmp.
Guido van Rossum [Thu, 17 Oct 2002 11:45:54 +0000 (11:45 +0000)]
Security fixes: reject non-wiki-word page names; set homedir to /tmp.

Show errors returned by store().

A few nits.

22 years agoAdded missing entries to __all__.
Fred Drake [Wed, 16 Oct 2002 21:21:39 +0000 (21:21 +0000)]
Added missing entries to __all__.

22 years agoMake sure we test urlsplit() / urlunsplit() directly, rather than
Fred Drake [Wed, 16 Oct 2002 21:02:36 +0000 (21:02 +0000)]
Make sure we test urlsplit() / urlunsplit() directly, rather than
guessing that urlparse() / urlunparse() use them.

Add tests of urldefrag().

22 years agoSome really simple cgi examples. cgi3 is a MiniWiki.
Guido van Rossum [Wed, 16 Oct 2002 21:01:27 +0000 (21:01 +0000)]
Some really simple cgi examples. cgi3 is a MiniWiki.

22 years agoPatch #623780: Replace obsolete struct macros.
Martin v. Löwis [Wed, 16 Oct 2002 20:28:25 +0000 (20:28 +0000)]
Patch #623780: Replace obsolete struct macros.

22 years agoDocument urldefrag().
Fred Drake [Wed, 16 Oct 2002 20:07:54 +0000 (20:07 +0000)]
Document urldefrag().

22 years agoAdd n_unnamed_fields into the type.
Martin v. Löwis [Wed, 16 Oct 2002 19:10:03 +0000 (19:10 +0000)]
Add n_unnamed_fields into the type.

22 years agoCorrect stat_result float time stamps entry.
Martin v. Löwis [Wed, 16 Oct 2002 18:28:36 +0000 (18:28 +0000)]
Correct stat_result float time stamps entry.

22 years agoAdd PyStructSequence_UnnamedField. Add stat_float_times.
Martin v. Löwis [Wed, 16 Oct 2002 18:27:39 +0000 (18:27 +0000)]
Add PyStructSequence_UnnamedField. Add stat_float_times.
Use integers in stat tuple, optionally floats in named fields.

22 years agoRecreated after source changes.
Thomas Heller [Wed, 16 Oct 2002 17:51:38 +0000 (17:51 +0000)]
Recreated after source changes.

22 years agoposix_execve(): add missing argument for "et" format in PyArg_Parse()
Guido van Rossum [Wed, 16 Oct 2002 16:52:11 +0000 (16:52 +0000)]
posix_execve(): add missing argument for "et" format in PyArg_Parse()
call.  This caused mysterious crashes (hard to debug because it was
happening in a child process).

22 years agoUse string methods. Re-organize imports to Python Normal Form.
Fred Drake [Wed, 16 Oct 2002 16:06:07 +0000 (16:06 +0000)]
Use string methods.  Re-organize imports to Python Normal Form.

22 years agoOnly reset _is_empty if needed.
Fred Drake [Wed, 16 Oct 2002 16:02:08 +0000 (16:02 +0000)]
Only reset _is_empty if needed.

22 years agoModernization: Use string methods, use str instead of
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.

22 years agoUse string methods.
Fred Drake [Wed, 16 Oct 2002 15:30:17 +0000 (15:30 +0000)]
Use string methods.

22 years agoUse string methods. Organize the imports in Python Normal Form.
Fred Drake [Wed, 16 Oct 2002 15:29:07 +0000 (15:29 +0000)]
Use string methods.  Organize the imports in Python Normal Form.

22 years agoUse string methods; minor code cleanup.
Fred Drake [Wed, 16 Oct 2002 14:59:02 +0000 (14:59 +0000)]
Use string methods; minor code cleanup.

22 years agoRecreated after source changes.
Thomas Heller [Tue, 15 Oct 2002 19:45:25 +0000 (19:45 +0000)]
Recreated after source changes.

22 years agoPatch #572628: Optional timeouts for put and get.
Martin v. Löwis [Tue, 15 Oct 2002 15:11:13 +0000 (15:11 +0000)]
Patch #572628: Optional timeouts for put and get.

22 years agoRevert the previous checkin - it didn't work anyway.
Thomas Heller [Tue, 15 Oct 2002 14:51:58 +0000 (14:51 +0000)]
Revert the previous checkin - it didn't work anyway.

22 years agoFor some reason (probably cut and paste), __ipow__ for new-style
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):
      ...

22 years agoDon't drop old slots if _unicode_to_string did not change anything.
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.

22 years agoAllow Unicode strings in __slots__, converting them to byte strings.
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.

22 years agoAllow Unicode strings as message and module name.
Martin v. Löwis [Mon, 14 Oct 2002 21:06:02 +0000 (21:06 +0000)]
Allow Unicode strings as message and module name.

22 years ago[SF bug 620364]
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. :-)

22 years agoConvert empty string literal to string. Speed up creation of idmap.
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.

22 years agoFix for 1.33: urlsplit() should only add '//' if scheme != ''.
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.

22 years agoI'd forgotten that tcsh was the default for 10.1, but SF's 10.1 system
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.

22 years agoThere was a typo in the MacOSX section regarding the stacksize issue.
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.

22 years agoappend(): Fixing the test for convertability after consultation with
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.

22 years agoUse the same shade of blue as the site navigation areas.
Fred Drake [Mon, 14 Oct 2002 15:45:11 +0000 (15:45 +0000)]
Use the same shade of blue as the site navigation areas.

22 years agoTwo new tests for splitting (or not splitting) 8-bit header data.
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.

22 years agoBump the __version__
Barry Warsaw [Mon, 14 Oct 2002 15:24:18 +0000 (15:24 +0000)]
Bump the __version__

22 years ago__init__(): Fix an invariant, that the charset item in a chunk tuple
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.

22 years ago_split_header(): If we have a header which is a byte string containing
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).

22 years agoCHARSETS: Add faux '8bit' encoding for representing raw 8-bit data for
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.

22 years agoMinor refactoring to avoid code duplication.
Fred Drake [Mon, 14 Oct 2002 15:04:33 +0000 (15:04 +0000)]
Minor refactoring to avoid code duplication.

22 years agoUpdate list of Windows buildnos for 2.2.2 final.
Tim Peters [Mon, 14 Oct 2002 15:01:44 +0000 (15:01 +0000)]
Update list of Windows buildnos for 2.2.2 final.

22 years agoAdd finditer to __all__ (when defining it at all).
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.

22 years agoFix copyright date: the core of this code actually dates back to 1999
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).

22 years agoPatch #611760: read archives with comments.
Martin v. Löwis [Sun, 13 Oct 2002 13:54:50 +0000 (13:54 +0000)]
Patch #611760: read archives with comments.

22 years agoPatch #621891: Add askopenfile{name}s.
Martin v. Löwis [Sun, 13 Oct 2002 10:28:04 +0000 (10:28 +0000)]
Patch #621891: Add askopenfile{name}s.

22 years agoPatch #621205: Tkinter updates for tk8.4.
Martin v. Löwis [Sun, 13 Oct 2002 10:22:08 +0000 (10:22 +0000)]
Patch #621205: Tkinter updates for tk8.4.

22 years ago_encode_chunks(), encode(): Don't modify self._chunks. As Ben says:
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.

22 years agoUpdate the urls and other information about the add-on Japanese,
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.

22 years agoFix tildes in URLs. Closes SF bug #614821.
Fred Drake [Sat, 12 Oct 2002 15:02:46 +0000 (15:02 +0000)]
Fix tildes in URLs.  Closes SF bug #614821.

22 years agoDarn! Don't divide by zero. Bad fix. :-)
Guido van Rossum [Fri, 11 Oct 2002 23:39:35 +0000 (23:39 +0000)]
Darn!  Don't divide by zero.  Bad fix. :-)

22 years agoFix a few docstrings, remove extra commas
Neal Norwitz [Fri, 11 Oct 2002 22:19:42 +0000 (22:19 +0000)]
Fix a few docstrings, remove extra commas

22 years agoSF # 539360, webbrowser.py and konqueror, by Andy McKay
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.

22 years agoSF #621948, update docstring for md5 by David M. Cooke. 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.

22 years agoClarify deprecation of the floor div operator, modulo operator,
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.

22 years agoAdd checks for size overflow on list*n, list+list, tuple+tuple.
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.

22 years agoPyObject_Init[Var] is almost always called from the PyObject_NEW[_VAR]
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.

22 years agoThe MS resource compiler simply cannot be convinced to do arithmetic
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.

22 years agoRepair the DLL name -- this has to match the major.minor version numbers.
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.

22 years agoTypo in docstring
Jeremy Hylton [Fri, 11 Oct 2002 17:27:55 +0000 (17:27 +0000)]
Typo in docstring

22 years agoFix for SF bug #599836: Don't duplicate headers.
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.

22 years agoAllow restricted code to get byteorder, getdefaultencoding(),
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.

22 years agoTrying alphabet again
Jeremy Hylton [Fri, 11 Oct 2002 16:05:07 +0000 (16:05 +0000)]
Trying alphabet again

22 years agoSort names alphabetically.
Jeremy Hylton [Fri, 11 Oct 2002 15:55:17 +0000 (15:55 +0000)]
Sort names alphabetically.

22 years agoAdd hexversion to list of safe sys names (SF bug 621447).
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.

22 years agoUse fdopen() to create file from fd.
Jeremy Hylton [Fri, 11 Oct 2002 14:36:24 +0000 (14:36 +0000)]
Use fdopen() to create file from fd.

22 years agoA test for the recent overflow-in-format-crash bug.
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.

22 years agoBack out news about SF patch 479898 -- it's withdrawn.
Guido van Rossum [Fri, 11 Oct 2002 11:47:28 +0000 (11:47 +0000)]
Back out news about SF patch 479898 -- it's withdrawn.

22 years agoBack out #479898.
Martin v. Löwis [Fri, 11 Oct 2002 05:37:59 +0000 (05:37 +0000)]
Back out #479898.

22 years agoFix a nasty endcase reported by Armin Rigo in SF bug 618623:
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.

22 years agoAdd Greg Copeland for SF # 585913, Adds Galeon support to webbrowser.py
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

22 years agoSF # 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

22 years agoRemove mentionings of DOS.
Martin v. Löwis [Thu, 10 Oct 2002 18:24:54 +0000 (18:24 +0000)]
Remove mentionings of DOS.

22 years agoRemove more DOS support.
Martin v. Löwis [Thu, 10 Oct 2002 18:17:08 +0000 (18:17 +0000)]
Remove more DOS support.

22 years agoDocument when unittest was added to Python.
Fred Drake [Thu, 10 Oct 2002 16:16:25 +0000 (16:16 +0000)]
Document when unittest was added to Python.

22 years agoAdd new posix functions
Andrew M. Kuchling [Thu, 10 Oct 2002 16:04:08 +0000 (16:04 +0000)]
Add new posix functions

22 years agoUpdate email micro release number.
Barry Warsaw [Thu, 10 Oct 2002 15:58:19 +0000 (15:58 +0000)]
Update email micro release number.

22 years agoDocument that the Charset constructor coerces its argument to lower
Barry Warsaw [Thu, 10 Oct 2002 15:23:38 +0000 (15:23 +0000)]
Document that the Charset constructor coerces its argument to lower
case.

22 years agoDocument that get_content_charset() coerces its return value to lower
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.

22 years agoBump version number to 2.4.2 to pick up the latest minor bug fixes.
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.

22 years agoNew tests to verify that charsets are case insensitive, and that by
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.

22 years agoget_content_charset(): RFC 2046 $4.1.2 says charsets are not case
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.

22 years ago__init__(): RFC 2046 $4.1.2 says charsets are not case sensitive.
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.

22 years agoAdd .PHONY targets, to declare targets that aren't real files.
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.)

22 years agoPatch #612602: Streamline configure methods.
Martin v. Löwis [Thu, 10 Oct 2002 14:36:13 +0000 (14:36 +0000)]
Patch #612602: Streamline configure methods.

22 years agoPatch #569139: Implementation of major, minor and makedev.
Martin v. Löwis [Thu, 10 Oct 2002 14:27:30 +0000 (14:27 +0000)]
Patch #569139: Implementation of major, minor and makedev.

22 years ago[Bug #621039] Fix broken link
Andrew M. Kuchling [Thu, 10 Oct 2002 11:32:30 +0000 (11:32 +0000)]
[Bug #621039] Fix broken link

22 years ago[Bug #621038] Remove duplicated item
Andrew M. Kuchling [Thu, 10 Oct 2002 11:31:48 +0000 (11:31 +0000)]
[Bug #621038] Remove duplicated item

22 years agoM CallTips.py Add support for getting calltip from subprocess,
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

22 years agoSF #614596, fix for urllib2.AbstractBasicAuthHandler, John Williams (johnw42)
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.

22 years agoAccept Armin's documentation patch for SF bug #558179.
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.

22 years agoNews about repr() and 8-bit characters, and setlocale() in the
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.

22 years agoMacOSX linker doesn't understand -R flag at all, no matter how you feed it
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).

22 years agoGNU readline() mistakenly sets the LC_CTYPE locale.
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.

22 years agoUndo this part of the previous checkin:
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.

22 years agoThe string formatting code has a test to switch to Unicode when %s
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.

22 years agoAdd special consideration for rlcompleter. As a side effect of
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.

22 years agoRemove more DOS support.
Martin v. Löwis [Wed, 9 Oct 2002 17:23:29 +0000 (17:23 +0000)]
Remove more DOS support.

22 years agoAdd a few people who were in the ACKS file in the 2.2.2 branch but not
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.

22 years agoMinor edits and markup fixes
Andrew M. Kuchling [Wed, 9 Oct 2002 12:11:10 +0000 (12:11 +0000)]
Minor edits and markup fixes

22 years agoDon't try to access sys.getwindowsversion unless it exists (ntpath is
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?!).

22 years agoLogic for determining whether skipping test_pep277 is expected: whether
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.