Commit Graph

5768 Commits

Author SHA1 Message Date
Guido van Rossum
d412a12fb7 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:08:27 +00:00
Martin v. Löwis
5346d01151 Add windows-125[678]. Fixes #607302. 2002-09-11 16:29:52 +00:00
Neal Norwitz
bfff5a720a Try to get test to pass on Windows 2002-09-07 05:58:28 +00:00
Raymond Hettinger
9c1d3e46bb Change UserDict to IterableUserDict 2002-09-07 04:49:09 +00:00
Raymond Hettinger
aa36d87f0e Have os.environ inherit from the iterable version of UserDict.
Closes SF bug 605731.
2002-09-06 19:35:22 +00:00
Neal Norwitz
df4626fb8a Backport of SF bug # 585792, Invalid mmap crashes Python interpreter
Raise ValueError if user passes a size to mmap which is larger
than the file.

Also need Tim's fix in test_mmap.py, 1.22 which flushes the file
before mmap'ing it.
2002-09-05 22:30:03 +00:00
Guido van Rossum
10c7ab740c 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-03 16:36:59 +00:00
Michael W. Hudson
e4d6c0c517 backport effbot's checkin of
revision 1.13 of pre.py



Fix bug #570057: Broken pre.subn() (and pre.sub())

This should be backported to the 2.2.X series (how
do I do that?)
2002-08-23 16:34:08 +00:00
Michael W. Hudson
f2a62c37a6 backport gvanrossum's checkin of
revision 1.19 of test_weakref.py

SF patch 564549 (Erik Andersén).

The WeakKeyDictionary constructor didn't work when a dict arg was
given.  Fixed by moving a line.  Also adding a unit test.

Bugfix candidate.
2002-08-23 16:29:27 +00:00
Michael W. Hudson
4437f2c301 backport gvanrossum's checkin of
revision 1.17 of weakref.py

SF patch 564549 (Erik Andersén).

The WeakKeyDictionary constructor didn't work when a dict arg was
given.  Fixed by moving a line.  Also adding a unit test.

Bugfix candidate.
2002-08-23 16:29:01 +00:00
Michael W. Hudson
bb580d3eda backport montanaro's checkin of
revision 1.9 of test_gzip.py

force gzip module to open files using 'b'inary mode.
closes patch #536278.
2002-08-23 16:10:13 +00:00
Michael W. Hudson
91848deb30 backport montanaro's checkin of
revision 1.33 of gzip.py

force gzip module to open files using 'b'inary mode.
closes patch #536278.

This looked like a bugfix candidate to me at some point...
2002-08-23 16:09:52 +00:00
Michael W. Hudson
caa276401b backport gvanrossum's checkin of
revision 1.22 of test_fcntl.py

SF 554663.  Add OpenBSD3.  Bugfix candidate if anyone cares.
2002-08-23 16:06:46 +00:00
Michael W. Hudson
94da31bb97 backport tim_one's checkin of
revision 1.21 of test_mmap.py

SF bug 544733:  Cygwin test_mmap fix for Python 2.2.1
Close a file before trying to unlink it, and apparently Cygwin needs
writes to an mmap'ed file to get flushed before they're visible.

Bugfix candidate, but I think only for the 2.2 line (it's testing
features that I think were new in 2.2).
2002-08-23 15:50:57 +00:00
Michael W. Hudson
d494d119de backport gvanrossum's checkin of
revision 1.52 of pdb.py

date: 2002/04/15 00:48:24;  author: gvanrossum;  state: Exp;  lines: +4 -1
Add exit as alias for quit, as the easiest way to address SF bug
#543674.

Bugfix candidate.
2002-08-23 15:42:27 +00:00
Michael W. Hudson
82f3bac561 backport loewis' checkin of
revision 1.161 of Tkinter.py

Ignore widgets with unknown names in winfo_children. Fixes #518283.
2.2.2 candidate.
2002-08-23 15:27:52 +00:00
Raymond Hettinger
8df7f2ba43 SF 595846. Backport deltas from 1.26 to 1.28. 2002-08-20 23:59:33 +00:00
Guido van Rossum
96303ce055 Fix some endcase bugs in unicode rfind()/rindex() and endswith().
These were reported and fixed by Inyeol Lee in SF bug 595350.  The
endswith() bug is already fixed in 2.3; I'll fix the others in
2.3 next.
2002-08-20 16:57:58 +00:00
Tim Peters
4c7e2022a9 A trip down memory lane. Barry checked in this test with 2.3-style
imports of test_support.  That causes multiple copies of test_support
to get loaded, and the one used by test_base64.py didn't see the proper
value of verbose=False, so spewed output.  That in turn apparenly caused
Barry to check in an expected-results output file, but a unitttest-based
test should never have one of those.  I noticed this because, on Windows,
the final unittest output line contains the number of seconds needed to
run the test, and that varied on *some* runs when I tried it, causing
bogus test failures.

Anyway, this gets rid of the expected-output file again, and changes
the imports to work with 2.2's way of doing this.
2002-08-19 01:20:09 +00:00
Raymond Hettinger
bc5282fec7 Modify splituser() method to allow an @ in the userinfo field.
Jeremy reported that this is not allowed by RFC 2396; however,
other tools support unescaped @'s so we should also.

Apply SF patch 596581 closing bug 581529.
2002-08-18 20:10:08 +00:00
Barry Warsaw
0c25da5823 Backport of fix for SF bug #595671 from Python 2.3cvs:
base64.decodestring('') should return '' instead of raising an
    exception.  The bug fix for SF #430849 wasn't quite right.  This
    closes SF bug #595671.  I'll backport this to Python 2.2.

One addition here is that there was no test of the base64 module in
Python 2.2 cvs yet, so I added that too.
2002-08-15 22:18:11 +00:00
cvs2svn
3218fa4df6 This commit was manufactured by cvs2svn to create branch
'release22-maint'.
2002-08-15 22:18:11 +00:00
Neal Norwitz
0299b1c99f SF bug #574235, convert_path fails with empty pathname 2002-08-13 17:49:18 +00:00
Guido van Rossum
dc1febb667 Backport:
Make sure that *any* object whose id() is used as a memo key is kept
alive in the memo.  This fixes SF bug 592567.
2002-08-12 20:21:43 +00:00
Neal Norwitz
fa1cf942d9 Fix SF bug #593696 telnetlib raises UnboundLocalError
Backported from:

revision 1.18
SF 554073.  Fix typo in error reporting of unrecognized character
following IAC.  Bugfix candidate if anyone cares.
2002-08-11 20:07:38 +00:00