Commit graph

6054 commits

Author SHA1 Message Date
Barry Warsaw
d2b2e533c0 header_encode(), encode(): Use _floordiv() from the appropriate
compatibility module.
2002-06-02 19:08:31 +00:00
Barry Warsaw
21f77ac0bc Use absolute import paths for intrapackage imports. 2002-06-02 19:07:16 +00:00
Barry Warsaw
8ba76e8929 Use absolute import paths for intrapackage imports.
as_string(): Use Generator.flatten() for better performance.
2002-06-02 19:05:51 +00:00
Barry Warsaw
524af6f382 Use absolute import paths for intrapackage imports.
Use MIMENonMultipart as the base class so that you can't attach() to
these non-multipart message types.
2002-06-02 19:05:08 +00:00
Barry Warsaw
7dc865ad72 flatten(): Renamed from __call__() which is (silently) deprecated.
__call__() can be 2-3x slower than the equivalent normal method.

_handle_message(): The structure of message/rfc822 message has
changed.  Now parent's payload is a list of length 1, and the zeroth
element is the Message sub-object.  Adjust the printing of such
message trees to reflect this change.
2002-06-02 19:02:37 +00:00
Barry Warsaw
ff49279f7c _intdiv2() -> _floordiv(), merge of uncommitted changes. 2002-06-02 18:59:06 +00:00
Raymond Hettinger
e0d4972acc Replaced .keys() with dictionary iterators 2002-06-02 18:55:56 +00:00
Neal Norwitz
1fab9ee085 Get email test to pass. Barry, hope this is what you had in mind 2002-06-02 16:38:14 +00:00
Michael W. Hudson
1ccccc08c2 Make test_mhlib run again.
There's some wierdness here, but the test ran before and not after,
so I'm just hacking the change out.  Someone more motivated than
me can work out what's really happening.

Raymond: *PLEASE* run the test suite before checking things like
this in!
2002-06-02 16:12:06 +00:00
Martin v. Löwis
9ea6c19747 Patch #552060: Add SSLFakeSocket.sendall. Also committed for 2.2 maint. 2002-06-02 12:33:22 +00:00
Raymond Hettinger
10ff706e27 Replaced boolean tests with is None. 2002-06-02 03:04:52 +00:00
Raymond Hettinger
f13eb55d59 Replace boolean test with is None. 2002-06-02 00:40:05 +00:00
Raymond Hettinger
32200aeac6 Replaced obsolete stat module constants with equivalent attributes 2002-06-01 19:51:15 +00:00
Raymond Hettinger
16e3c427f3 Replace boolean test with is None. 2002-06-01 16:07:16 +00:00
Raymond Hettinger
793d4b4936 SF 563203. Replaced 'has_key()' with 'in'. 2002-06-01 14:25:41 +00:00
Raymond Hettinger
54f0222547 SF 563203. Replaced 'has_key()' with 'in'. 2002-06-01 14:18:47 +00:00
Barry Warsaw
9d5e4aa414 Bump to version 2.0.5, and also use absolute import paths. 2002-06-01 06:03:09 +00:00
Barry Warsaw
2f514a806d These two classes provide bases for more specific content type
subclasses.

MIMENonMultipart: Base class for non-multipart/* content type subclass
specializations, e.g. image/gif.  This class overrides attach() which
raises an exception, since it makes no sense to attach a subpart to
e.g. an image/gif message.

MIMEMultipart: Base class for multipart/* content type subclass
specializations, e.g. multipart/mixed.  Does little more than provide
a useful constructor.
2002-06-01 05:59:12 +00:00
Barry Warsaw
1c30aa2292 The _compat modules now export _floordiv() instead of _intdiv2() for
better code reuse.

_split() Use _floordiv().
2002-06-01 05:49:17 +00:00
Barry Warsaw
c5d1c045ab Slightly better docstring 2002-06-01 05:45:37 +00:00
Barry Warsaw
bb98c8cff0 _is_unicode(): Use UnicodeType instead of the unicode builtin for
Python 2.1 compatibility.
2002-06-01 03:56:07 +00:00
Raymond Hettinger
936654bce0 Replaced boolean test with is None 2002-06-01 03:06:31 +00:00
Raymond Hettinger
094662a165 Replace boolean test with is None 2002-06-01 01:29:16 +00:00
Raymond Hettinger
0f4940c0a8 Replaced boolean test with 'is None' 2002-06-01 00:57:55 +00:00
Raymond Hettinger
8989ea6ce1 Use is None rather than general boolean 2002-06-01 00:06:20 +00:00
Raymond Hettinger
a144900b86 Use is None rather than general boolean 2002-05-31 23:54:44 +00:00
Raymond Hettinger
c0418609eb Use is None rather than general boolean 2002-05-31 23:03:33 +00:00
Raymond Hettinger
14bd6de0ec SF 560736. Optimize list iteration by filling the tp_iter slot. 2002-05-31 21:40:38 +00:00
Guido van Rossum
59b2a74c75 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).

I'll apply this to 2.2 and 2.1 too.
2002-05-31 21:12:53 +00:00
Neal Norwitz
ebb4190709 Use string methods, remove import string 2002-05-31 20:51:31 +00:00
Neal Norwitz
ab19962290 Use more string methods, remove import string 2002-05-31 20:46:39 +00:00
Raymond Hettinger
7fdfc2d231 Replace '== None' with 'is None' 2002-05-31 17:49:10 +00:00
Neal Norwitz
7616504dcf Fix printing plural (s or ""). 2002-05-31 14:15:11 +00:00
Neal Norwitz
5aee504ccb Remove import of re, it is not used 2002-05-31 14:14:06 +00:00
Neal Norwitz
7ce734cd72 Use string methods where possible, and remove import string 2002-05-31 14:13:04 +00:00
Jeremy Hylton
05ab2e693c Fix SF bug [ 561825 ] Confusing error for "del f()"
In the error message, say del for del and assign for everything else.
2002-05-31 14:08:29 +00:00
Andrew M. Kuchling
8c20916de2 Remove unneeded import 2002-05-30 19:15:16 +00:00
Jeremy Hylton
40b7703f1c Verify that the imp can find and load .py files. 2002-05-30 17:10:20 +00:00
Neal Norwitz
efbb67b1a7 Remove comment about inheritance, look one line up 2002-05-30 12:12:04 +00:00
Raymond Hettinger
1dbe6c0728 Move statement out of comment block 2002-05-30 00:06:01 +00:00
Guido van Rossum
ca948b40b4 Use floor division where appropriate. 2002-05-29 20:38:21 +00:00
Fred Drake
127ee1607f Minor cleanup:
- Add comment explaining the structure of the stack.
- Minor optimization: make stack tuple directly usable as part of return
  value for enter/exit events.
2002-05-29 19:40:36 +00:00
Raymond Hettinger
aef22fb9cd Patch 560023 adding docstrings. 2.2 Candidate (after verifying modules were not updated after 2.2). 2002-05-29 16:18:42 +00:00
Neal Norwitz
d68f5171eb As discussed on python-dev, add a mechanism to indicate features
that are in the process of deprecation (PendingDeprecationWarning).
Docs could be improved.
2002-05-29 15:54:55 +00:00
Neal Norwitz
72a2b4d43f Whitespace normalization 2002-05-29 00:54:38 +00:00
Guido van Rossum
1a7ac359a0 Importing Charset should not fail when Unicode is disabled. (XXX
Using Unicode-aware methods may still die with a NameError on unicode.
Maybe there's a more elegant solution but I doubt anybody cares.)
2002-05-28 18:49:03 +00:00
Christian Tismer
313a7513b0 This is a Python 2.1 and 2.2 bugfix candidate:
(or how do I "mark" something to be a candidate?)

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-28 08:04:00 +00:00
Steven M. Gava
72de9c7a9c Geiger Ho's patch for better subclassing 2002-05-27 21:58:05 +00:00
Michael W. Hudson
34f20eac98 This is patch
[ 559250 ] more POSIX signal stuff

Adds support (and docs and tests and autoconfery) for posix signal
mask handling -- sigpending, sigprocmask and sigsuspend.
2002-05-27 15:08:24 +00:00
Chui Tey
5d2af63cc3 GvR's rpc patch 2002-05-26 13:36:41 +00:00