]> granicus.if.org Git - python/log
python
12 years agouse assertWarns instead of check_warnings - Issue14341
Senthil Kumaran [Wed, 11 Apr 2012 15:05:49 +0000 (23:05 +0800)]
use assertWarns instead of check_warnings - Issue14341

12 years agoMake the trace module ignore modules whose names start with "<" and
Brett Cannon [Wed, 11 Apr 2012 01:05:53 +0000 (21:05 -0400)]
Make the trace module ignore modules whose names start with "<" and
end with ">", i.e. follow convention.

12 years ago1) Remove claim of an input invariant that is only true for static mpd_t.
Stefan Krah [Tue, 10 Apr 2012 21:11:54 +0000 (23:11 +0200)]
1) Remove claim of an input invariant that is only true for static mpd_t.
   Resizing is used _inside_ libmpdec functions, and it is permitted to
   change x->alloc several times while setting x->len at the end of the
   function. Therefore, for dynamic mpd_t x->alloc can _temporarily_ drop
   below x->len. Of course the final result always has x->len <= x->alloc.

   For static mpd_t this cannot happen, since resizing to a smaller
   coefficient is a no-op.

2) Remove micro optimization in mpd_switch_to_dyn(): Previously only the
   valid initialized part of the existing coefficient up to x->len was
   copied to the new dynamic memory area. Now copying does the same as
   realloc() and the entire old memory area is copied.

   The rationale for this change is that it is no longer needed to memorize
   the explanation given in 1).

12 years agoFix stale comment.
Stefan Krah [Tue, 10 Apr 2012 21:08:29 +0000 (23:08 +0200)]
Fix stale comment.

12 years agoMerge
Antoine Pitrou [Tue, 10 Apr 2012 20:51:26 +0000 (22:51 +0200)]
Merge

12 years agoSmall improvements to the threading docs: better publicize support for the with state...
Antoine Pitrou [Tue, 10 Apr 2012 20:47:55 +0000 (22:47 +0200)]
Small improvements to the threading docs: better publicize support for the with statement.

12 years agoFix some markup in the threading docs.
Antoine Pitrou [Tue, 10 Apr 2012 20:35:53 +0000 (22:35 +0200)]
Fix some markup in the threading docs.

12 years agoIssue #8799: Fix and improve the threading.Condition documentation.
Antoine Pitrou [Tue, 10 Apr 2012 20:24:05 +0000 (22:24 +0200)]
Issue #8799: Fix and improve the threading.Condition documentation.

12 years agomerge heads
Senthil Kumaran [Tue, 10 Apr 2012 19:18:25 +0000 (03:18 +0800)]
merge heads

12 years agomerge heads
Senthil Kumaran [Tue, 10 Apr 2012 19:17:44 +0000 (03:17 +0800)]
merge heads

12 years agomerge - fix the incorrect changes made for PATH_INFO value - Issue10484
Senthil Kumaran [Tue, 10 Apr 2012 19:16:16 +0000 (03:16 +0800)]
merge - fix the incorrect changes made for PATH_INFO value - Issue10484

12 years ago3.2- fix the incorrect changes made for PATH_INFO value - Issue10484
Senthil Kumaran [Tue, 10 Apr 2012 19:15:28 +0000 (03:15 +0800)]
3.2- fix the incorrect changes made for PATH_INFO value - Issue10484

12 years agoMerged updates to logging reference and HOWTO from 3.2.
Vinay Sajip [Tue, 10 Apr 2012 19:00:43 +0000 (20:00 +0100)]
Merged updates to logging reference and HOWTO from 3.2.

12 years agoUpdated logging reference and HOWTO.
Vinay Sajip [Tue, 10 Apr 2012 18:59:50 +0000 (19:59 +0100)]
Updated logging reference and HOWTO.

12 years agoIssue #14541: Merged addition of test/sndhdrdata to Makefile.pre.in from 3.2.
Vinay Sajip [Tue, 10 Apr 2012 17:44:41 +0000 (18:44 +0100)]
Issue #14541: Merged addition of test/sndhdrdata to Makefile.pre.in from 3.2.

12 years agoIssue #14541: Added test/sndhdrdata to Makefile.pre.in for installation.
Vinay Sajip [Tue, 10 Apr 2012 17:41:48 +0000 (18:41 +0100)]
Issue #14541: Added test/sndhdrdata to Makefile.pre.in for installation.

12 years agoIssue #14478: Cache the hash of a Decimal in the C version.
Stefan Krah [Tue, 10 Apr 2012 14:27:58 +0000 (16:27 +0200)]
Issue #14478: Cache the hash of a Decimal in the C version.

12 years agomerge - minor .rst fix
Senthil Kumaran [Tue, 10 Apr 2012 11:51:58 +0000 (19:51 +0800)]
merge - minor .rst fix

12 years agominor .rst fix
Senthil Kumaran [Tue, 10 Apr 2012 11:51:00 +0000 (19:51 +0800)]
minor .rst fix

12 years agoMerge.
Stefan Krah [Mon, 9 Apr 2012 19:31:06 +0000 (21:31 +0200)]
Merge.

12 years agoIssue #14520: Add __sizeof__() method to the Decimal object.
Stefan Krah [Mon, 9 Apr 2012 19:27:20 +0000 (21:27 +0200)]
Issue #14520: Add __sizeof__() method to the Decimal object.

12 years agomerge 3.2
Benjamin Peterson [Mon, 9 Apr 2012 19:05:47 +0000 (15:05 -0400)]
merge 3.2

12 years agomerge heads
Benjamin Peterson [Mon, 9 Apr 2012 19:05:23 +0000 (15:05 -0400)]
merge heads

12 years agomerge heads
Benjamin Peterson [Mon, 9 Apr 2012 19:05:13 +0000 (15:05 -0400)]
merge heads

12 years agomerge 3.2 (#14509)
Benjamin Peterson [Mon, 9 Apr 2012 19:04:39 +0000 (15:04 -0400)]
merge 3.2 (#14509)

12 years agomerge 3.1 (#14509)
Benjamin Peterson [Mon, 9 Apr 2012 19:01:02 +0000 (15:01 -0400)]
merge 3.1 (#14509)

12 years agofix build without Py_DEBUG and DNDEBUG (closes #14509)
Benjamin Peterson [Mon, 9 Apr 2012 18:53:07 +0000 (14:53 -0400)]
fix build without Py_DEBUG and DNDEBUG (closes #14509)

12 years agoResize the coefficient to MPD_MINALLOC also if the requested size is below
Stefan Krah [Mon, 9 Apr 2012 18:47:57 +0000 (20:47 +0200)]
Resize the coefficient to MPD_MINALLOC also if the requested size is below
MPD_MINALLOC. Previously the resize was skipped as a micro optimization.

12 years agoMerged comment correction from 3.2.
Vinay Sajip [Mon, 9 Apr 2012 18:47:16 +0000 (19:47 +0100)]
Merged comment correction from 3.2.

12 years agoCorrected comment in cookbook example script.
Vinay Sajip [Mon, 9 Apr 2012 18:46:24 +0000 (19:46 +0100)]
Corrected comment in cookbook example script.

12 years ago_decimal is now 100x faster than the Python version in the pi benchmark.
Stefan Krah [Mon, 9 Apr 2012 18:31:15 +0000 (20:31 +0200)]
_decimal is now 100x faster than the Python version in the pi benchmark.

12 years agoSpeed up _decimal by 30-40% for numerical workloads by improving the cache
Stefan Krah [Mon, 9 Apr 2012 18:24:57 +0000 (20:24 +0200)]
Speed up _decimal by 30-40% for numerical workloads by improving the cache
locality for regularly sized coefficients.

12 years agoUse the MPD() accessor macro.
Stefan Krah [Mon, 9 Apr 2012 17:20:46 +0000 (19:20 +0200)]
Use the MPD() accessor macro.

12 years agoUpdate description of benchmarks and mention the benchmarks repo
Antoine Pitrou [Mon, 9 Apr 2012 15:06:44 +0000 (17:06 +0200)]
Update description of benchmarks and mention the benchmarks repo

12 years agoFix whitespace
Antoine Pitrou [Mon, 9 Apr 2012 15:04:14 +0000 (17:04 +0200)]
Fix whitespace

12 years agoIssue #13165: stringbench is now available in the Tools/stringbench folder.
Antoine Pitrou [Mon, 9 Apr 2012 15:03:32 +0000 (17:03 +0200)]
Issue #13165: stringbench is now available in the Tools/stringbench folder.
It used to live in its own SVN project.

12 years agoRename test_ file that is really a support file to remove test_ prefix.
R David Murray [Mon, 9 Apr 2012 13:37:52 +0000 (09:37 -0400)]
Rename test_ file that is really a support file to remove test_ prefix.

I thought I had run the full test suite before the last checkin, but
obviously I didn't.  test_multibytecodec_support.py isn't really a test file,
it is a support file that contains a base test class.  Rename it to
multibytecodec_support so that regrtest test discovery doesn't think it is a
test file that should be run.

12 years agoReflow paragraph (not that it helped much).
R David Murray [Mon, 9 Apr 2012 13:12:57 +0000 (09:12 -0400)]
Reflow paragraph (not that it helped much).

12 years ago#14533: if a test has no test_main, use loadTestsFromModule.
R David Murray [Mon, 9 Apr 2012 12:55:42 +0000 (08:55 -0400)]
#14533: if a test has no test_main, use loadTestsFromModule.

This moves us further in the direction of using normal unittest facilities
instead of specialized regrtest ones.  Any test module that can be correctly
run currently using 'python unittest -m test.test_xxx' can now be converted to
use normal unittest test loading by simply deleting its test_main, thus no
longer requiring manual maintenance of the list of tests to run.  (Not all
tests can be converted that easily, since test_main sometimes does some
additional things (such as reap_children or reap_threads).  In those cases the
extra code may be moved to setUpModule/tearDownModule methods, or perhaps the
same ends can be achieved in a different way, such as moving the decorators to
the test classes that need them, etc.)

I don't advocate going through and making this change wholesale, but any time
a list of tests in test_main would otherwise need to be updated, consideration
should instead be given to deleting test_main.

12 years ago#12537: in mailbox avoid depending on knowledge of email package internals
R David Murray [Mon, 9 Apr 2012 02:36:07 +0000 (22:36 -0400)]
#12537: in mailbox avoid depending on knowledge of email package internals

Previously mailbox was copying a list of attributes from one message object to
another in order to "copy the message data".  This means that any time new
attributes were added to email.message.Message, mailbox broke.  Now instead it
copies all attributes from the source object to the target object, skipping
any mailbox-object-specific attributes to produce the same clean initial
state it was previously getting by copying only the "known" attributes.

David Lam assisted in the development of this patch.

12 years agoRemove redundancy in listing of all mailbox classes in test_mailbox.
R David Murray [Mon, 9 Apr 2012 01:00:27 +0000 (21:00 -0400)]
Remove redundancy in listing of all mailbox classes in test_mailbox.

12 years agoNull merge
Antoine Pitrou [Sun, 8 Apr 2012 23:41:00 +0000 (01:41 +0200)]
Null merge

12 years agoFix the patch for issue #7978: select() raises select.error before 3.3, not OSError.
Antoine Pitrou [Sun, 8 Apr 2012 23:37:19 +0000 (01:37 +0200)]
Fix the patch for issue #7978: select() raises select.error before 3.3, not OSError.

12 years agoFix flakiness in test_socketserver
Antoine Pitrou [Sun, 8 Apr 2012 23:18:07 +0000 (01:18 +0200)]
Fix flakiness in test_socketserver

12 years agoFix flakiness in test_socketserver
Antoine Pitrou [Sun, 8 Apr 2012 23:16:47 +0000 (01:16 +0200)]
Fix flakiness in test_socketserver

12 years agoIssue #7978: socketserver now restarts the select() call when EINTR is returned.
Antoine Pitrou [Sun, 8 Apr 2012 22:49:17 +0000 (00:49 +0200)]
Issue #7978: socketserver now restarts the select() call when EINTR is returned.
This avoids crashing the server loop when a signal is received.
Patch by Jerzy Kozera.

12 years agoIssue #7978: socketserver now restarts the select() call when EINTR is returned.
Antoine Pitrou [Sun, 8 Apr 2012 22:47:24 +0000 (00:47 +0200)]
Issue #7978: socketserver now restarts the select() call when EINTR is returned.
This avoids crashing the server loop when a signal is received.
Patch by Jerzy Kozera.

12 years agoMerge: Make test_mailbox runnable via python -m unittest.
R David Murray [Sun, 8 Apr 2012 22:35:35 +0000 (18:35 -0400)]
Merge: Make test_mailbox runnable via python -m unittest.

12 years agoMake test_mailbox runnable via python -m unittest.
R David Murray [Sun, 8 Apr 2012 20:46:18 +0000 (16:46 -0400)]
Make test_mailbox runnable via python -m unittest.

12 years agoRemove unused variable from gcmodule.c. The code no longer tests for the
Kristján Valur Jónsson [Sun, 8 Apr 2012 13:56:25 +0000 (13:56 +0000)]
Remove unused variable from gcmodule.c.  The code no longer tests for the
presence of a __del__ attribute on objects, rather it uses the tp_del slot.

12 years agoMerged logging cookbook update from 3.2.
Vinay Sajip [Sun, 8 Apr 2012 00:51:29 +0000 (01:51 +0100)]
Merged logging cookbook update from 3.2.

12 years agoAdded multiprocessing example to logging cookbook.
Vinay Sajip [Sun, 8 Apr 2012 00:49:12 +0000 (01:49 +0100)]
Added multiprocessing example to logging cookbook.

12 years agoIssue #14522: Avoid duplicating socket handles in multiprocessing.connection.
Antoine Pitrou [Sat, 7 Apr 2012 20:38:52 +0000 (22:38 +0200)]
Issue #14522: Avoid duplicating socket handles in multiprocessing.connection.
Patch by sbt.

12 years agoIssue #14310: Catch testing errors when trying to create unsupported socket
Kristján Valur Jónsson [Sat, 7 Apr 2012 20:38:44 +0000 (20:38 +0000)]
Issue #14310: Catch testing errors when trying to create unsupported socket
types on some platforms.

12 years agostruct timeval.tv_usec is 4 bytes on 64-bit OS X as it should be, but
Brett Cannon [Sat, 7 Apr 2012 18:59:29 +0000 (14:59 -0400)]
struct timeval.tv_usec is 4 bytes on 64-bit OS X as it should be, but
is defined as an int while everyone else expects a long regardless of
length.

12 years agoDetermine opensearch URL from current version.
Georg Brandl [Sat, 7 Apr 2012 17:24:40 +0000 (19:24 +0200)]
Determine opensearch URL from current version.

12 years agoCloses #14511: merge with 3.2
Georg Brandl [Sat, 7 Apr 2012 17:23:00 +0000 (19:23 +0200)]
Closes #14511: merge with 3.2

12 years agoCloses #14511: fix wrong opensearch link for 3.2 docs.
Georg Brandl [Sat, 7 Apr 2012 17:22:17 +0000 (19:22 +0200)]
Closes #14511: fix wrong opensearch link for 3.2 docs.

12 years agoMerge.
Stefan Krah [Sat, 7 Apr 2012 14:10:04 +0000 (16:10 +0200)]
Merge.

12 years ago1) Fix comment.
Stefan Krah [Sat, 7 Apr 2012 13:57:59 +0000 (15:57 +0200)]
1) Fix comment.

2) Assert that the source operand is not special. Prevent resulting assert
   failure (harmless) by initializing flags before calling mpd_qshiftr_inplace.

3) Save a couple of instructions (mpd_zerocoeff already sets digits and len).
   Reorder initialization to match the order in the mpd_t struct.

12 years agoIssue #14310: inter-process socket duplication for windows
Kristján Valur Jónsson [Sat, 7 Apr 2012 11:23:31 +0000 (11:23 +0000)]
Issue #14310: inter-process socket duplication for windows

12 years agoDon't Py_DECREF NULL variable in io.IncrementalNewlineDecoder.
Ross Lagerwall [Sat, 7 Apr 2012 05:09:57 +0000 (07:09 +0200)]
Don't Py_DECREF NULL variable in io.IncrementalNewlineDecoder.

Found with Clang's Static Analyzer.

12 years agomerge 3.2
Benjamin Peterson [Fri, 6 Apr 2012 17:20:49 +0000 (13:20 -0400)]
merge 3.2

12 years agomerge heads
Benjamin Peterson [Fri, 6 Apr 2012 17:20:39 +0000 (13:20 -0400)]
merge heads

12 years agomerge heads
Benjamin Peterson [Fri, 6 Apr 2012 17:20:25 +0000 (13:20 -0400)]
merge heads

12 years agomerge 3.2
Benjamin Peterson [Fri, 6 Apr 2012 17:20:16 +0000 (13:20 -0400)]
merge 3.2

12 years agoport 3.1.5rc2 tag
Benjamin Peterson [Fri, 6 Apr 2012 17:20:01 +0000 (13:20 -0400)]
port 3.1.5rc2 tag

12 years agomerge 3.1
Benjamin Peterson [Fri, 6 Apr 2012 17:19:52 +0000 (13:19 -0400)]
merge 3.1

12 years agoAdded tag v3.1.5 for changeset 7395330e495e
Benjamin Peterson [Fri, 6 Apr 2012 17:17:30 +0000 (13:17 -0400)]
Added tag v3.1.5 for changeset 7395330e495e

12 years agobump to 3.1.5 final v3.1.5
Benjamin Peterson [Fri, 6 Apr 2012 17:17:25 +0000 (13:17 -0400)]
bump to 3.1.5 final

12 years agoIssue #14500: Fix importlib.test.import_.test_packages to clean up
Brett Cannon [Fri, 6 Apr 2012 17:13:08 +0000 (13:13 -0400)]
Issue #14500: Fix importlib.test.import_.test_packages to clean up
after itself properly.

12 years agomerge
Brett Cannon [Fri, 6 Apr 2012 16:54:57 +0000 (12:54 -0400)]
merge

12 years agoSet a time threshold in test_asyncore.capture_server so that tests don't
Kristján Valur Jónsson [Fri, 6 Apr 2012 14:37:45 +0000 (14:37 +0000)]
Set a time threshold in test_asyncore.capture_server so that tests don't
deadlock if the main thread fails before sending all the data.

12 years agoIssue #14502: it's RuntimeError on 3.3
Sandro Tosi [Fri, 6 Apr 2012 09:15:06 +0000 (11:15 +0200)]
Issue #14502: it's RuntimeError on 3.3

12 years agoMerge #14492: fix some bugs in Tools/scripts/pdeps.py.
R David Murray [Fri, 6 Apr 2012 03:01:13 +0000 (23:01 -0400)]
Merge #14492: fix some bugs in Tools/scripts/pdeps.py.

Initial patch by Popa Claudiu.

12 years ago#14492: fix some bugs in Tools/scripts/pdeps.py.
R David Murray [Fri, 6 Apr 2012 02:59:13 +0000 (22:59 -0400)]
#14492: fix some bugs in Tools/scripts/pdeps.py.

Initial patch by Popa Claudiu.

12 years agomerge 3.2
Benjamin Peterson [Fri, 6 Apr 2012 02:57:10 +0000 (22:57 -0400)]
merge 3.2

12 years agomerge heads
Sandro Tosi [Thu, 5 Apr 2012 20:59:41 +0000 (22:59 +0200)]
merge heads

12 years agoClose #14249: Use bit shifts instead of an union, it's more efficient.
Victor Stinner [Thu, 5 Apr 2012 20:54:49 +0000 (22:54 +0200)]
Close #14249: Use bit shifts instead of an union, it's more efficient.
Patch written by Serhiy Storchaka

12 years agoIssue #14502: merge with 3.2
Sandro Tosi [Thu, 5 Apr 2012 20:53:21 +0000 (22:53 +0200)]
Issue #14502: merge with 3.2

12 years agoIssue #14502: release() and unlocked lock generates a ThreadError
Sandro Tosi [Thu, 5 Apr 2012 20:51:54 +0000 (22:51 +0200)]
Issue #14502: release() and unlocked lock generates a ThreadError

12 years agoClarify that the purpose of computing all the miscellaneous collection types is to...
Raymond Hettinger [Thu, 5 Apr 2012 20:31:12 +0000 (13:31 -0700)]
Clarify that the purpose of computing all the miscellaneous collection types is to register them with the appropriate ABCs.

12 years agoIssue #8515: Set __file__ when run file in IDLE.
Andrew Svetlov [Thu, 5 Apr 2012 18:54:39 +0000 (21:54 +0300)]
Issue #8515: Set __file__ when run file in IDLE.

12 years agoMerge.
Stefan Krah [Thu, 5 Apr 2012 14:25:21 +0000 (16:25 +0200)]
Merge.

12 years agoWhitespace.
Stefan Krah [Thu, 5 Apr 2012 14:15:25 +0000 (16:15 +0200)]
Whitespace.

12 years agoReduce array size.
Stefan Krah [Thu, 5 Apr 2012 14:07:22 +0000 (16:07 +0200)]
Reduce array size.

12 years agoMerge from 3.2
Andrew Svetlov [Thu, 5 Apr 2012 14:04:28 +0000 (17:04 +0300)]
Merge from 3.2

12 years agoIssue #14496: Fix wrong name in idlelib/tabbedpages.py.
Andrew Svetlov [Thu, 5 Apr 2012 13:58:05 +0000 (16:58 +0300)]
Issue #14496: Fix wrong name in idlelib/tabbedpages.py.
  Patch by Popa Claudiu.

12 years agoFormatting.
Stefan Krah [Thu, 5 Apr 2012 13:48:59 +0000 (15:48 +0200)]
Formatting.

12 years agoAllow printing a leading '-' and the maximum number of exponent digits
Stefan Krah [Thu, 5 Apr 2012 13:46:19 +0000 (15:46 +0200)]
Allow printing a leading '-' and the maximum number of exponent digits
rather than raising RuntimeError (allocated space is sufficient for the
additional character).

12 years agoRaise InvalidOperation if exponents of zeros are clamped during exact
Stefan Krah [Thu, 5 Apr 2012 13:21:58 +0000 (15:21 +0200)]
Raise InvalidOperation if exponents of zeros are clamped during exact
conversion in the Decimal constructor. Exact here refers to the
representation and not to the value (clamping does not change the value).

12 years agoClose #14249: Use an union instead of a long to short pointer to avoid aliasing
Victor Stinner [Thu, 5 Apr 2012 11:44:34 +0000 (13:44 +0200)]
Close #14249: Use an union instead of a long to short pointer to avoid aliasing
issue. Speed up UTF-16 by 20%.

12 years agoIssue #3033: Add displayof parameter to tkinter font.
Andrew Svetlov [Thu, 5 Apr 2012 09:41:20 +0000 (12:41 +0300)]
Issue #3033: Add displayof parameter to tkinter font.
Patch by Guilherme Polo.

12 years agoReplace ThreadError by RuntimeError: the former is now an obsolete alias of the latter.
Georg Brandl [Thu, 5 Apr 2012 07:53:04 +0000 (09:53 +0200)]
Replace ThreadError by RuntimeError: the former is now an obsolete alias of the latter.

12 years agoReformat by replacing tabs with 4-spaces. Makes the code more PEP-7 compliant
Eli Bendersky [Thu, 5 Apr 2012 03:42:48 +0000 (06:42 +0300)]
Reformat by replacing tabs with 4-spaces. Makes the code more PEP-7 compliant
and gets rid of some gross formatting on tab=4-space-configured editors.

12 years agoA few tweaks to whatsnew/3.3 (fixes #14362)
Éric Araujo [Thu, 5 Apr 2012 03:01:01 +0000 (23:01 -0400)]
A few tweaks to whatsnew/3.3 (fixes #14362)

12 years agoReplace bootstrap imports with real C API calls.
Eli Bendersky [Thu, 5 Apr 2012 02:40:58 +0000 (05:40 +0300)]
Replace bootstrap imports with real C API calls.

12 years agoMerge: test_tools fix: don't import analyze_dxp if no _thread module
R David Murray [Thu, 5 Apr 2012 02:38:26 +0000 (22:38 -0400)]
Merge: test_tools fix: don't import analyze_dxp if no _thread module

12 years agotest_tools fix: don't import analyze_dxp if no _thread module
R David Murray [Thu, 5 Apr 2012 02:37:50 +0000 (22:37 -0400)]
test_tools fix: don't import analyze_dxp if no _thread module

12 years agoMerge #14490, #14491: add 'sundry'-style import tests for Tools/scripts.
R David Murray [Thu, 5 Apr 2012 01:29:03 +0000 (21:29 -0400)]
Merge #14490, #14491: add 'sundry'-style import tests for Tools/scripts.

This patch changes a few of the scripts to have __name__=='__main__'
clauses so that they are importable without running.  Also fixes the
syntax errors revealed by the tests.