4387 Commits

Author SHA1 Message Date
Guido van Rossum
22eb8bc48e Backport 1.60 -- because this is an annoyance that Zope folks run into
and Zope 2.6 (which requires Python 2.1.x) isn't dead yet.

Duh.  The do_EOF() implementation was bogus.  Make it more like
do_quit() -- but print a blank line first.
2003-02-13 21:13:17 +00:00
Guido van Rossum
cceafe2d0c Roll back the introduction of urlsplit() and urlunsplit() to
urlparse.py.  These were new features in 2.2, and shouldn't be added
to 2.1 this late in the game.  There was one use of urlsplit() in
httplib.py (the urlparse.py change was done as part of a backport of a
bugfix to httplib.py); this use is replaced with a call to urlparse()
without changing the effect (only the returned netloc is used).
2003-01-09 05:43:08 +00:00
Guido van Rossum
1caa072007 Backport (the relevant part of) rexec.py 1.41.
Address SF bug #577530: del __builtins__ breaks out of rexec

Using the suggestion there: add_module() forces __builtin__ back; this
fixes r_exec, r_eval, r_execfile.

This does not mean that rexec is now considered safe!  But for those
willing to take the risk, it's safer than before.  (Note that a safety
analysis of the code module would be wise if you plan to use the
interactive console for real -- I've only ever used it to play with
restricted mode.)
2002-09-15 06:18:29 +00:00
Guido van Rossum
b6e835c548 Backport:
Fix for SF bug 601077 by Zack Weinberg.

The new execvpe code would sometimes do the wrong thing when a
non-executable file existed earlier in the path and an executable file
of the same name existed later in the path.  This patch restores the
proper behavior (which is to execute the second file).  When only a
non-executable file exists, the correct error is still reported.
2002-09-04 11:41:51 +00:00
Jeremy Hylton
344f425034 Fix SF bug [ 599838 ] httplib.connect broken in 2.1 branch
Some IPv6-specific changes crept into the 2.1 branch when I backported
other bug fixes.
2002-08-29 20:12:26 +00:00
Guido van Rossum
d31a8036fe Backport of SF patch 590294: os._execvpe security fix (Zack Weinberg).
1) Do not attempt to exec a file which does not exist
just to find out what error the operating system
returns. This is an exploitable race on all platforms
that support symbolic links.

2) Immediately re-raise the exception if we get an
error other than errno.ENOENT or errno.ENOTDIR. This
may need to be adapted for other platforms.
2002-08-08 19:46:52 +00:00
Guido van Rossum
a1a5a89b48 Add a dummy test_queue output file to make regrtest happy. 2002-08-08 19:46:10 +00:00
Jeremy Hylton
25fae7caab Update test output. 2002-07-12 16:04:27 +00:00
Jeremy Hylton
def3b5051e Backport changes.
Change _begin() back to begin().
Fix for SF bug 579107.
Fix for SF bug #432621: httplib: multiple Set-Cookie headers
Fix SF bug #575360
Handle HTTP/0.9 responses.
2002-07-12 15:22:09 +00:00
Jeremy Hylton
f395df091e Backport various bug fixes from trunk.
The 2.1 maintenance branch is now identical to the trunk through rev
1.54 of httplib.py.
2002-07-02 20:42:50 +00:00
Jeremy Hylton
3ab1798f24 Add a special case code to deal with unexpected large files.
# On a Linux with large file support (LFS) using a Python without LFS,
# stat() will raise EOVERFLOW.  This unambiguously indicates that the
# file exists because it only occurs when the size of the file can't
# find into the stat struct.

This change is only needed for Python 2.1, because LFS is
automatically configured starting with Python 2.2.
2002-06-18 16:53:42 +00:00
Guido van Rossum
c883ad633c Backport to 2.1.x:
SF bug 533625 (Armin Rigo). rexec: potential security hole

If a rexec instance allows writing in the current directory (a common
thing to do), there's a way to execute bogus bytecode.  Fix this by
not allowing imports from .pyc files (in a way that allows a site to
configure things so that .pyc files *are* allowed, if writing is not
allowed).
2002-05-31 21:19:53 +00:00
Neal Norwitz
a5fd7ba939 Backport fix by tismer for #210682
fixed an old buglet that caused bdb to be unable to
continue in the botframe, after a breakpoint was set.
the key idea is not to set botframe to the bottom level frame,
but its f_back, which actually might be None.
Additional changes: migrated old exception trick to use
sys._getframe(), which exists both in 2.1 and 2.2 .

Note: I believe Mark Hammond needs to look over his code now.
F5 correctly starts up in the debugger, but later on doesn't stop at a given
breakpoint any longer.

kind regards - chris
2002-05-29 01:29:38 +00:00
Barry Warsaw
31cc898c79 Backport patch for revision 1.58 to the Py2.1.x maintenance branch.
This fixes parseaddr() for the following RFC 2822 valid field:

    To: User J. Person <person@dom.ain>
2002-05-03 04:23:02 +00:00
Fred Drake
b040bc1221 Update a SourceForge issue number; IDs less than 200000 are no longer valid.
(The issues were re-numbered, not lost.)
2002-05-02 16:37:31 +00:00
Fred Drake
1625eb8cc3 Added regression tests for xrange object attributes.
See SF bug #551285.
2002-05-02 16:25:30 +00:00
Fred Drake
d4a0500df5 Backport buffer() tests from trunk to avoid regression failures. 2002-05-02 05:27:28 +00:00
Anthony Baxter
047fa8194d *sigh* did a 'make test' in the wrong window. fixing this up to
not include 'True'. test_queue passes again.
2002-04-23 02:19:03 +00:00
Anthony Baxter
1f30f72442 backport mhammond's patch:
Fix bug 544473 - "Queue module can deadlock".
Use try/finally to ensure all Queue locks remain stable.
Includes test case.  Bugfix candidate.

Original patch(es):
python/dist/src/Lib/Queue.py:1.15
2002-04-23 01:55:29 +00:00
Jeremy Hylton
f599b7424d Backport fixes for two nested scopes bugs.
frameobject.c: make sure free and cell vars make it into locals, which
    makes eval work.

bltinmodule.c & ceval.c: make sure a code object with free variables
    that is passed to exec or eval raises an exception.

Also duplicate the current trunk test suite in the 2.1 branch, except
for certain necessary changes: different warnings raised by 2.1, need
for __future__.
2002-04-20 18:21:29 +00:00
cvs2svn
402a928ed3 This commit was manufactured by cvs2svn to create branch
'release21-maint'.
2002-04-19 00:11:32 +00:00
Anthony Baxter
2167a09dd8 backport gvanrossum's patch:
SF bug #543318 (Frank J. Tobin).

In DatagramRequestHandler.setup(), the wfile initialization should be
StringIO.StringIO(), not StringIO.StringIO(slf.packet).

Bugfix candidate (all the way back to Python 1.5.2 :-).


Original patches were:
python/dist/src/Lib/SocketServer.py:1.31
2002-04-18 05:13:38 +00:00
Anthony Baxter
1eca91d88c backport 1.47's "add sendall() to FakeSocket class" 2002-04-09 00:39:10 +00:00
cvs2svn
fc4afb313a This commit was manufactured by cvs2svn to create branch
'release21-maint'.
2002-04-08 04:42:09 +00:00
Fred Drake
9e3c42a15b Not sure why the regression test missed this, but the PyXML tests caught it.
We should get attributes from the right object.
2002-04-04 19:13:18 +00:00