Commit Graph

30452 Commits

Author SHA1 Message Date
Tim Peters 9ca3f8551a Whitespace normalization. 2004-08-08 01:05:14 +00:00
Tim Peters ec8c5a9311 Bug 1003471: Python 1.5.2 security vulnerability still present in 2.3.4
That's the title of the report, but the hole was probably plugged since
Python 2.0.  See corresponding checkin to PC/getpathp.c:  a crucial
precondition for joinpath() was neither documented nor verified, and there
are so many callers with so many conditional paths that no "eyeball
analysis" is satisfactory.  Now Python dies with a fatal error if the
precondition isn't satisfied, instead of allowing a buffer overrun.

NOT TESTED!  The Windows version of the patch was, but not this one.  I
don't feel like waiting for someone to notice the patch I attached to the
bug report.  If it doesn't compile, sorry, but fix it <wink>.  If it
does compile, it's "obviously correct".
2004-08-08 01:00:47 +00:00
Tim Peters 95334a5d1e Purged Berkeley code of references to the long-obsolete whrandom. 2004-08-08 00:54:21 +00:00
Andrew M. Kuchling 60395120f4 Trigger DeprecationWarning 2004-08-07 21:44:37 +00:00
Andrew M. Kuchling 7219cbea8d Remove MacOS 9 ref 2004-08-07 21:35:06 +00:00
Andrew M. Kuchling c16affa811 Remove MacOS 9 refs 2004-08-07 21:33:44 +00:00
Andrew M. Kuchling 67ca703aca [Patch #862531] Update version numbers. 2004-08-07 21:30:13 +00:00
Armin Rigo 8b2cbfd180 Let's not use string exceptions any more. 2004-08-07 21:27:43 +00:00
Michael W. Hudson e6e77e5fe7 Fix
[ 777659 ] Uninitialized variable used in Tools/faqwiz/faqwiz.py

with help from jlgijsbers on #python-dev IRC.
2004-08-07 21:13:46 +00:00
Armin Rigo 618fbf5469 This was quite a dark bug in my recent in-place string concatenation
hack: it would resize *interned* strings in-place!  This occurred because
their reference counts do not have their expected value -- stringobject.c
hacks them.  Mea culpa.
2004-08-07 20:58:32 +00:00
Armin Rigo 25847813c1 Removing tests that fail because of changes in PyString_InternInPlace(),
as discussed on IRC.  The equivalent tests for the new behavior are in
test_builtin.py.
2004-08-07 20:30:03 +00:00
Andrew M. Kuchling 2ee6a7027a [Patch #999280 ] Update kwargs in pickle docs to match implementations 2004-08-07 20:25:55 +00:00
Andrew M. Kuchling 4eb1a00cc1 [Patch #1003861 from Dima Dorfman] Fix markup in concrete.tex:
PyObject* o -> PyObject *o to be consistent with the
rest of the file
- Correct markup for Py_True
- Remove duplicate description of PyBool_Check
2004-08-07 20:19:24 +00:00
Andrew M. Kuchling 672d2ba773 Use LaTeX markup 2004-08-07 20:17:48 +00:00
Andrew M. Kuchling 17e33e4c93 [Bug #914375] Crude modulefinder docs, but the module's code is very hard to read and it's not clear which bits are public and which aren't. The module's author should really be doing this (and using docstrings in the code, too) 2004-08-07 20:13:34 +00:00
Michael W. Hudson 8c47f4a657 eval_frame now has a PyAPI-style name 2004-08-07 20:11:22 +00:00
Armin Rigo 79f7ad228b Fixed some compiler warnings. 2004-08-07 19:27:39 +00:00
Jeremy Hylton 4336eda886 Add a trivial test for the compiler package, guarded by compiler resource.
This test is insanely slow, so it requires a resource.  On my machine,
it also appears to dump core.  I think the problem is a stack
overflow, but haven't been able to confirm.
2004-08-07 19:25:33 +00:00
Andrew M. Kuchling 32dbddafd5 Remove various modules that have been documented 2004-08-07 19:21:59 +00:00
Jeremy Hylton 2876f5ad21 SF patch 836879.
Don't generate code for asserts in -O mode.
2004-08-07 19:21:56 +00:00
Jeremy Hylton 4c989ddc9c Subclasses of string can no longer be interned. The semantics of
interning were not clear here -- a subclass could be mutable, for
example -- and had bugs.  Explicitly interning a subclass of string
via intern() will raise a TypeError.  Internal operations that attempt
to intern a string subclass will have no effect.

Added a few tests to test_builtin that includes the old buggy code and
verifies that calls like PyObject_SetAttr() don't fail.  Perhaps these
tests should have gone in test_string.
2004-08-07 19:20:05 +00:00
Andrew M. Kuchling cbd81556bb [Bug #827209] Add footnote from Alex M. about listcomps leaking their index variables 2004-08-07 19:16:32 +00:00
Tim Peters 8484fbf0f6 SF bug 1003471: Python 1.5.2 security vulnerability
This was probably fixed in rev 1.32 of getpath.c, but there are so
many paths thru the code that invoke joinpath() it's not at all
obvious that it *is* fixed.  It doesn't help confidence that a crucial
precondition for calling joinpath() was neither documented nor verified.
It is now, and joinpath() will barf with a fatal error now rather than
overrun the buffer, if the precondition isn't met.

Note that this patch only changes the Windows flavor.  I attached another
patch to the bug report for the POSIX flavor (which I can't test
conveniently).
2004-08-07 19:12:27 +00:00
Andrew M. Kuchling 59a27f1d6e Various minor edits 2004-08-07 19:10:36 +00:00
Andrew M. Kuchling 4cbe95cdd1 [Bug #866222] Update docs to match the module 2004-08-07 19:06:48 +00:00
Andrew M. Kuchling b839c1f33f [Bug #866222] Update docstrings. 2004-08-07 19:02:19 +00:00
Michael W. Hudson 34553388ef Fix
[ 991812 ] PyArg_ParseTuple can miss errors with warnings as exceptions

as suggested in the report.

This is definitely a 2.3 candidate (as are most of the checkins I've
made in the last month...)
2004-08-07 17:57:16 +00:00
Andrew M. Kuchling fe80b63663 [Bug #991883] Document calling condition 2004-08-07 17:53:05 +00:00
Andrew M. Kuchling 43ab0cd174 [Bug #990792] Mention that repl can be a callable 2004-08-07 17:41:54 +00:00
Jeremy Hylton 5d9c3031c8 Fix urllib2.urlopen() handling of chunked content encoding.
The change to use the newer httplib interface admitted the possibility
that we'd get an HTTP/1.1 chunked response, but the code didn't handle
it correctly.  The raw socket object can't be pass to addinfourl(),
because it would read the undecoded response.  Instead, addinfourl()
must call HTTPResponse.read(), which will handle the decoding.

One extra wrinkle is that the HTTPReponse object can't be passed to
addinfourl() either, because it doesn't implement readline() or
readlines().  As a quick hack, use socket._fileobject(), which
implements those methods on top of a read buffer.  (suggested by mwh)

Finally, add some tests based on test_urllibnet.

Thanks to Andrew Sawyers for originally reporting the chunked problem.
2004-08-07 17:40:50 +00:00
Michael W. Hudson 1baa248021 Fix
[ 1000841 ] "make pdf" failure w/ 2.4 docs

in the suggested way, by uglifying a URL.
2004-08-07 17:39:35 +00:00
Andrew M. Kuchling 0188cdb115 [Bug #998066] Mention result mismatch 2004-08-07 17:28:17 +00:00
Andrew M. Kuchling e5dd162a07 [Bug #923315] Produce correct result on AIX 2004-08-07 17:21:27 +00:00
Michael W. Hudson b6d9fc38e8 Patch:
[ 1003863 ] adds an index entry for __all__ to the tutorial
2004-08-07 17:05:42 +00:00
Andrew M. Kuchling 8def876d36 [Bug #873146] Document pickletools module (haven't tested the LaTeX yet) 2004-08-07 16:53:59 +00:00
Andrew M. Kuchling d0c53fedd0 Add argument to docstring 2004-08-07 16:51:30 +00:00
Michael W. Hudson 049e7aaa0f Point out that the setdefault defaults the value to None. Inspired by
Michael Chermside's thinking about patch #748126 (the chief upshot of
which thinking was "reject it!").
2004-08-07 16:41:34 +00:00
Barry Warsaw e8bedeb45b Resolution of bug #997368, "strftime() backward compatibility".
Specifically, time.strftime() no longer accepts a 0 in the yday position of a
time tuple, since that can crash some platform strftime() implementations.

parsedate_tz(): Change the return value to return 1 in the yday position.

Update tests in test_rfc822.py and test_email.py
2004-08-07 16:38:40 +00:00
Jeremy Hylton 2c178253bd SF bug 874842 and patch 997626: httplib bugs
Hack httplib to work with broken Akamai proxies.
Make sure that httplib doesn't add extract Accept-Encoding or
Content-Length headers if the client has already set them.
2004-08-07 16:28:14 +00:00
Andrew M. Kuchling dc54f2be3f Make 'bin' argument trigger DeprecationWarning 2004-08-07 16:27:24 +00:00
Andrew M. Kuchling cbbee6fed5 [Bug #984952] Include more material from PEP 307.
I haven't tried to include all the material on old-style classes using protocols 0,1.  The details are lengthy; someone who knows
more about the pickle module should decide if they're important enough
to be in the docs or not.
2004-08-07 16:24:18 +00:00
Barry Warsaw 8896bf56a2 Resolution of SF bug #1002475 and patch #1003693; Header lines that end in
\r\n only get the \n stripped, not the \r (unless it's the last header which
does get the \r stripped).  Patch by Tony Meyer.

test_whitespace_continuation_last_header(),
test_strip_line_feed_and_carriage_return_in_headers(): New tests.

_parse_headers(): Be sure to strip \r\n from the right side of header lines.
2004-08-07 15:57:52 +00:00
Andrew M. Kuchling 14d535c3d4 [Bug #984952] Include some material from PEP 307 2004-08-07 15:49:24 +00:00
Michael W. Hudson 2b3feec58f This is more-or-less:
[ 1005123 ] test_curses fails on MacOS X 10.3

Be a bit more guarded about what we expect a terminal to be capable
of.
2004-08-07 15:27:16 +00:00
Michael W. Hudson 3fdd43ef35 Somehow (no idea how!) I missed half of patch #1005008. Sorry about that. 2004-08-07 15:20:15 +00:00
Michael W. Hudson 09ad235f99 This is patch
[ 1005008 ] curses.wrapper should also forward keyword args

Plus my rewrite to use finally as opposed to painfully doing the
equivalent by hand.
2004-08-07 15:18:07 +00:00
Andrew M. Kuchling 6f937b1c30 [Bug #998307] Use open() instead of file() in docs 2004-08-07 15:11:24 +00:00
Fred Drake 9bae19e8b1 fix two typos in markup 2004-08-07 14:28:37 +00:00
Andrew M. Kuchling 955d00922c Add name 2004-08-07 14:17:50 +00:00
Andrew M. Kuchling b34a6bc19d Create section for 2.4a3; remove empty sections in 2.4a2 2004-08-07 14:03:33 +00:00