Commit graph

17574 commits

Author SHA1 Message Date
R David Murray
73bd0448b9 Merge #11606: improved body_encode algorithm, no longer produces overlong lines 2011-03-24 12:28:39 -04:00
R David Murray
c7d28be62f Merge #11606: improved body_encode algorithm, no longer produces overlong lines 2011-03-24 12:27:23 -04:00
R David Murray
b938c8c253 #11606: improved body_encode algorithm, no longer produces overlong lines
Algorithm and initial patch by Michael Henry.
2011-03-24 12:19:26 -04:00
Victor Stinner
f09e652a0e Merge 3.2 2011-03-24 16:39:34 +01:00
Victor Stinner
900189b414 Merge 3.1 2011-03-24 16:39:07 +01:00
Victor Stinner
29943aa120 test_multiprocessing: use assertLess() to see the timeout on error 2011-03-24 16:24:07 +01:00
Antoine Pitrou
bace3b9ac6 Add tests for the atexit hook in concurrent.futures (part of #11635) 2011-03-24 15:48:26 +01:00
Antoine Pitrou
aebac0b55a Add tests for the atexit hook in concurrent.futures (part of #11635) 2011-03-24 15:47:39 +01:00
Senthil Kumaran
ea8b024d11 issue11236 getpass.getpass to respond ctrl-c or ctrl-z 2011-03-24 22:27:01 +08:00
Senthil Kumaran
e6ead3905d issue10883 - Silence some ftp related ResourceWarnings in test_urllib2net. Patch by Nadeem Vawda 2011-03-24 11:47:29 +08:00
Senthil Kumaran
2024acd36f issue10883 - Silence some ftp related ResourceWarnings in test_urllib2net. Patch by Nadeem Vawda. 2011-03-24 11:46:19 +08:00
Raymond Hettinger
f6d3e8eaef Add tests for _source to importable and exec'able.
Move __name__ back out of the template; the responsibility
for setting __name__ lies with the caller (which knows
something about the new namespace), not with the class
definition (which doesn't know about the namespace it is
being built in).
2011-03-23 20:33:30 -07:00
Brett Cannon
5d43cff623 Remove a stale comment. 2011-03-23 18:12:24 -07:00
Brett Cannon
442c9b92d8 Make importlib compatible with __import__ by "fixing" code.co_filename
paths.

__import__ does a little trick when importing from bytecode by
back-patching the co_filename paths to point to the file location
where the code object was loaded from, *not* where the code object was
originally created. This allows co_filename to point to a valid path.
Problem is that co_filename is immutable from Python, so a private
function -- imp._fix_co_filename() -- had to be introduced in order to
get things working properly. Originally the plan was to add a file
argument to marshal.loads(), but that failed as the algorithm used by
__import__ is not fully recursive as one might expect, so to be fully
backwards-compatible the code used by __import__ needed to be exposed.

This closes issue #6811 by taking a different approach than outlined
in the issue.
2011-03-23 16:14:42 -07:00
Brett Cannon
a7468bc5c6 Have importlib use the repr of a module name in error messages.
This makes it obvious that an import failed because of some extraneous
whitespace (e.g., a newline).

This is a partial fix for issue #8754.
2011-03-23 16:06:00 -07:00
Antoine Pitrou
f3c524d535 Issue #11653: fix -W with -j in regrtest. 2011-03-23 23:05:07 +01:00
Antoine Pitrou
293954dd76 Issue #11653: fix -W with -j in regrtest 2011-03-23 23:01:49 +01:00
Raymond Hettinger
15d0c1d073 Minor clean-ups. 2011-03-23 14:38:39 -07:00
Raymond Hettinger
41da10e62c Merge 2011-03-23 12:53:32 -07:00
Raymond Hettinger
2ebea41d31 Expose the namedtuple source with a _source attribute. 2011-03-23 12:52:23 -07:00
R David Murray
5839b9635c Merge #11590: fix quoprimime decode handling of empty strings and line endings. 2011-03-23 15:37:26 -04:00
R David Murray
523b41c4b3 Merge #11590: fix quoprimime decode handling of empty strings and line endings. 2011-03-23 15:27:04 -04:00
R David Murray
cafd79d904 #11590: fix quoprimime decode handling of empty strings and line endings. 2011-03-23 15:25:55 -04:00
Antoine Pitrou
6ab79d9d5b Allow "-j0" as an argument to regrtest, to automatically select an
appropriate number of parallel workers.
2011-03-23 20:17:45 +01:00
Antoine Pitrou
5066b03361 Fix transmitting warning options to the children when running tests in
parallel (thanks Michael for pointing this).
2011-03-23 20:10:18 +01:00
Raymond Hettinger
843a751369 Move namespace setup inside the template. 2011-03-23 11:49:56 -07:00
R David Murray
3dcf745a61 Merge #11589: add additional tests for the email quoprimime module. 2011-03-23 14:29:49 -04:00
R David Murray
3d9e973abd Merge #11589: add additional tests for the email quoprimime module. 2011-03-23 14:27:18 -04:00
R David Murray
ec1b5b88ee #11589: add additional tests for the email quoprimime module.
Patch by Michael Henry.
2011-03-23 14:19:05 -04:00
Mark Dickinson
7c9e803284 Issue #11244: Remove outdated peepholer check that was preventing the peepholer from folding -0 and -0.0. Thanks Eugene Toder for the patch. 2011-03-23 17:59:37 +00:00
Raymond Hettinger
b2d0945c87 Minor named tuple clean-ups. 2011-03-22 22:36:21 -07:00
Raymond Hettinger
fef854602b Factor-out named tuple class definition template strings. 2011-03-22 21:14:41 -07:00
Éric Araujo
e84c4df786 Branch merge 2011-03-23 04:53:10 +01:00
Antoine Pitrou
c28af1f05f Use transient_internet() consistently in test_imaplib 2011-03-23 03:11:21 +01:00
Antoine Pitrou
924cbea467 Use transient_internet() consistently in test_imaplib 2011-03-23 03:10:14 +01:00
Éric Araujo
48049911d6 Fix obscure set crashers (#8420). Backport of d56b3cafb1e6, reviewed by Raymond. 2011-03-23 02:08:07 +01:00
Éric Araujo
c09fca67e7 Do not touch sys.path when site is imported and python was started with -S.
Original patch by Carl Meyer, review by Brett Cannon, small doc editions by
yours truly.  Fixes #11591.
2011-03-23 02:06:24 +01:00
Raymond Hettinger
09cbadd005 Issue 10787: Document the probability density function for random.gammavariate. 2011-03-22 15:57:03 -07:00
Raymond Hettinger
27f870982f Issue 10787: Document the probability density function for random.gammavariate. 2011-03-22 15:56:41 -07:00
Raymond Hettinger
a8e4d6eb6e Issue 10787: Document the probability density function for random.gammavariate. 2011-03-22 15:55:51 -07:00
Raymond Hettinger
74b015e243 Clean-up whitespace. 2011-03-22 14:22:52 -07:00
Raymond Hettinger
3e82ae0aae Replace **locals() with explicit field names. 2011-03-22 14:21:38 -07:00
Raymond Hettinger
9a3f4cbfc3 Simplify the named tuple template by using the new string format syntax. 2011-03-22 14:07:23 -07:00
Raymond Hettinger
50105d3840 Improve readability by replacing '\n' in template with real newlines. 2011-03-22 13:34:03 -07:00
Raymond Hettinger
c46759ad0b Issue #11333: Add __slots__ to the collections ABCs. 2011-03-22 11:46:25 -07:00
Antoine Pitrou
36920354c7 Merge 2011-03-22 18:33:33 +01:00
Antoine Pitrou
8e5e942c59 Use shorter timings in test_concurrent_futures to make it a bit faster
(it's still very slow)
2011-03-22 18:30:30 +01:00
Raymond Hettinger
0a4edd5435 Issue #11628: cmp_to_key should use __slots__. 2011-03-21 17:54:04 -07:00
Raymond Hettinger
a0d1d96771 Issue #11628: cmp_to_key should use __slots__. 2011-03-21 17:50:28 -07:00
R David Murray
39bc38c39c Fix rename spelling error. 2011-03-21 17:36:15 -04:00