Guido van Rossum [Sun, 14 Jan 2001 21:03:01 +0000 (21:03 +0000)]
SF Patch #103232 by dougfort: Preserve Nonstandard Port Number in Host
Header
Dougfort's comments: httplib does not include ':port ' in the HTTP 1.1
'Host:' header. This causes problems if the server is not listening
on Port 80. The test case I use is the login to /manage under Zope,
with Zope listening on port 8080. Zope returns a <frameset> with the
<frame> source URLs lacking the :8080.
Fredrik Lundh [Sun, 14 Jan 2001 15:06:11 +0000 (15:06 +0000)]
SRE fixes for 2.1 alpha:
-- added some more docstrings
-- fixed typo in scanner class (#125531)
-- the multiline flag (?m) should't affect the \Z operator (#127259)
-- fixed non-greedy backtracking bug (#123769, #127259)
-- added sre.DEBUG flag (currently dumps the parsed pattern structure)
-- fixed a couple of glitches in groupdict (the #126587 memory leak
had already been fixed by AMK)
Guido van Rossum [Sun, 14 Jan 2001 14:08:40 +0000 (14:08 +0000)]
- Added keyword argument 'append' to filterwarnings(); if true, this
appends to list of filters instead of inserting at the front. This
is useful to add a filter with a lower priority than -W options.
- Cosmetic improvements to a docstring and an error message.
Guido van Rossum [Sat, 13 Jan 2001 22:06:05 +0000 (22:06 +0000)]
Neil discovered a bad DECREF on warnoptions, that caused repeated
re-initializing Python (Py_Finalize() followed by Py_Initialize()) to
blow up quickly. With the DECREF removed I can't get it to fail any
more. (Except it still leaks, but that's probably a separate issue.)
Guido van Rossum [Sat, 13 Jan 2001 16:55:33 +0000 (16:55 +0000)]
SF Patch #103225 by Ping: httplib: smallest Python patch ever
The ASCII-art diagram at the top of httplib contains a backslash at
the end of a line, which causes Python to remove the newline. This
one-character patch adds a space after the backslash so it will
appear at the end of the line in the docstring as intended.
Tim Peters [Sat, 13 Jan 2001 03:04:02 +0000 (03:04 +0000)]
Guido found a brand new race in tempfile on Linux, due to Linux changing
pid across threads (but in that case, it's still the same process, and so
still sharing the "template" cache in tempfile.py). Repaired that, and
added a new std test.
On Linux, someone please run that standalone with more files and/or more
threads; e.g.,
Jack Jansen [Fri, 12 Jan 2001 23:39:00 +0000 (23:39 +0000)]
SetpopupData and GetPopupData are gone under Carbon, use {Get,Set}PopupMenu{Handle,ID} in stead.
The UserPane routines appear to be fixed in the current Universal Headers, so they're re-enabled.
Guido van Rossum [Fri, 12 Jan 2001 16:24:03 +0000 (16:24 +0000)]
Two changes to from...import:
1) "from M import X" now works even if M is not a real module; it's
basically a getattr() operation with AttributeError exceptions
changed into ImportError.
2) "from M import *" now looks for M.__all__ to decide which names to
import; if M.__all__ doesn't exist, it uses M.__dict__.keys() but
filters out names starting with '_' as before. Whether or not
__all__ exists, there's no restriction on the type of M.
Tim Peters [Fri, 12 Jan 2001 10:02:46 +0000 (10:02 +0000)]
A variant of SF patch 103028 (Make tempfile.mktemp threadsafe).
Tested on Windows. Should be tested on Linux. Should also be
tested on some platform without threads (I simulated that by
making the "import thread" fail, but that's not the same as
actually doing it!).
Thomas Wouters [Thu, 11 Jan 2001 14:46:40 +0000 (14:46 +0000)]
Move the _socket module closer to the SSL-_socket line (mmap and
xreadlines inserted themselves inbetween the two) and clarify that the
normal socket module should be commented out. (Someone also suggested the
latter on c.l.py some time ago, I forget who, sorry.)
Guido van Rossum [Wed, 10 Jan 2001 21:17:27 +0000 (21:17 +0000)]
Oops, one more part of the cygwin patch (SF patch #102409 by jlt63:
Cygwin Python DLL and Shared Extension Patch). Add module.dll as a
valid extension.
jlt63 writes: Note that his change essentially backs out the fix for
bug #115973. Should ".pyd" be retained instead for posterity?
Guido van Rossum [Wed, 10 Jan 2001 19:14:28 +0000 (19:14 +0000)]
Adapted version of SF Patch #103173 by pyretic: make uu.decode work
with spaces in filename.
I changed the module to use string methods instead of the string
module. Also, instead of stripping the last character of the filename
(assuming this is the linefeed), I strip trailing whitespace (assuming
creating files with trailing whitespace in their name cannot possibly
be a wise idea).
(Note that I believe that /F's "workaround for broken uuencoders" is
no longer needed since the recent fix to binascii.c, but I'll leave it
in since it appears pretty harmless.)
Tim Peters [Wed, 10 Jan 2001 05:42:18 +0000 (05:42 +0000)]
Windows mmap should (as the docs probably <wink> say) create a mapping
without a name when the optional tagname arg isn't specified. Was
actually creating a mapping with an empty string as the name.
Tim Peters [Tue, 9 Jan 2001 23:26:39 +0000 (23:26 +0000)]
Assorted xreadlines problems:
Wasn't built on Windows; not in config.c either.
Module init function missing DL_EXPORT magic.
test_xreadline output file obviously wrong (started w/ "test_xrl").
test program very unclear about what was expected.
Jack Jansen [Tue, 9 Jan 2001 22:22:58 +0000 (22:22 +0000)]
Carbon defines {Get,Set}ControlDataHandle, so unfortunately our variants on {Get,Set}ControlData have gotten an underscore: GetControlData_Handle, etc.
Jack Jansen [Tue, 9 Jan 2001 22:10:16 +0000 (22:10 +0000)]
Carbon defines {Get,Set}ControlDataHandle, so unfortunately our variants on {Get,Set}ControlData have gotten an underscore: GetControlData_Handle, etc. This is an incompatible change:-(
Fred Drake [Tue, 9 Jan 2001 22:02:10 +0000 (22:02 +0000)]
Added a --global-module-index option to specify a (possibly relative) URL
to the Global Module Index for a set of documents. This is used to include
a reference to the global index from the per-document module indexes, so
that it is just a little easier to find.
(Someone suggested this, but I do not remember who. Please let me know if
it was you -- thanks!)
Patch #102953: Fix bug #125452, where shlex.shlex hangs when it
encounters a string with an unmatched quote, by adding a check for
EOF in the 'quotes' state.
Anonymous SF bug report #128053 point out that the #ifdef for
including "tmpfile" in the posix_methods[] array is wrong -- should be
HAVE_TMPFILE, not HAVE_TMPNAM.