python_lang:hongbins-mirror.git
8 years agoIt\s new siginterrupt-reset-issue8354
jean-paul.calderone [Sat, 8 May 2010 14:21:23 +0000 (14:21 +0000)]
It\s new

git-svn-id: http://svn.python.org/projects/python/branches/siginterrupt-reset-issue8354@80978 6015fed2-1504-0410-9fe1-9d1591cc4771

8 years agoReference the issue number for this change.
jean-paul.calderone [Fri, 7 May 2010 22:46:41 +0000 (22:46 +0000)]
Reference the issue number for this change.

git-svn-id: http://svn.python.org/projects/python/branches/siginterrupt-reset-issue8354@80945 6015fed2-1504-0410-9fe1-9d1591cc4771

8 years agouse assertTrue and assertFalse
jean-paul.calderone [Fri, 7 May 2010 22:46:33 +0000 (22:46 +0000)]
use assertTrue and assertFalse

git-svn-id: http://svn.python.org/projects/python/branches/siginterrupt-reset-issue8354@80944 6015fed2-1504-0410-9fe1-9d1591cc4771

8 years agoGet rid of the cb callback in readpipe_interrupted; just call siginterrupt in the...
jean-paul.calderone [Fri, 7 May 2010 22:43:43 +0000 (22:43 +0000)]
Get rid of the cb callback in readpipe_interrupted; just call siginterrupt in the test methods (if appropriate).

git-svn-id: http://svn.python.org/projects/python/branches/siginterrupt-reset-issue8354@80943 6015fed2-1504-0410-9fe1-9d1591cc4771

8 years agoFix run-on sentence
jean-paul.calderone [Fri, 7 May 2010 22:42:16 +0000 (22:42 +0000)]
Fix run-on sentence

git-svn-id: http://svn.python.org/projects/python/branches/siginterrupt-reset-issue8354@80942 6015fed2-1504-0410-9fe1-9d1591cc4771

8 years agoUse single blank line between methods
jean-paul.calderone [Fri, 7 May 2010 22:41:56 +0000 (22:41 +0000)]
Use single blank line between methods

git-svn-id: http://svn.python.org/projects/python/branches/siginterrupt-reset-issue8354@80941 6015fed2-1504-0410-9fe1-9d1591cc4771

8 years agoClean up the siginterrupt tests a lot. Add a test for multiple signal delivery. ...
jean-paul.calderone [Fri, 7 May 2010 07:28:40 +0000 (07:28 +0000)]
Clean up the siginterrupt tests a lot. Add a test for multiple signal delivery.  Apply the fixed pointed out by neologix, to not call PyOS_setsig if we're using sigaction.

git-svn-id: http://svn.python.org/projects/python/branches/siginterrupt-reset-issue8354@80913 6015fed2-1504-0410-9fe1-9d1591cc4771

8 years agoBranching to 'siginterrupt-reset-issue8354'
jean-paul.calderone [Fri, 7 May 2010 07:25:29 +0000 (07:25 +0000)]
Branching to 'siginterrupt-reset-issue8354'

git-svn-id: http://svn.python.org/projects/python/branches/siginterrupt-reset-issue8354@80912 6015fed2-1504-0410-9fe1-9d1591cc4771

8 years agoTestsuite for RFC3986 based parsing scenario. Related Issue1462525.
senthil.kumaran [Fri, 7 May 2010 04:07:29 +0000 (04:07 +0000)]
Testsuite for RFC3986 based parsing scenario. Related Issue1462525.

git-svn-id: http://svn.python.org/projects/python/trunk@80908 6015fed2-1504-0410-9fe1-9d1591cc4771

8 years agoAdd a new section on the development plan; add an item
andrew.kuchling [Fri, 7 May 2010 01:45:14 +0000 (01:45 +0000)]
Add a new section on the development plan; add an item

git-svn-id: http://svn.python.org/projects/python/trunk@80907 6015fed2-1504-0410-9fe1-9d1591cc4771

8 years agoensure that availability information is on its own line at the end of the function...
benjamin.peterson [Thu, 6 May 2010 22:49:28 +0000 (22:49 +0000)]
ensure that availability information is on its own line at the end of the function docs

git-svn-id: http://svn.python.org/projects/python/trunk@80896 6015fed2-1504-0410-9fe1-9d1591cc4771

8 years agoAvailability gets its own line
benjamin.peterson [Thu, 6 May 2010 22:33:46 +0000 (22:33 +0000)]
Availability gets its own line

git-svn-id: http://svn.python.org/projects/python/trunk@80894 6015fed2-1504-0410-9fe1-9d1591cc4771

8 years agoadds handle_error(self):raise to test modules using asyncore to provide a clearer...
giampaolo.rodola [Thu, 6 May 2010 20:19:32 +0000 (20:19 +0000)]
adds handle_error(self):raise to test modules using asyncore to provide a clearer error message in case something goes wrong

git-svn-id: http://svn.python.org/projects/python/trunk@80882 6015fed2-1504-0410-9fe1-9d1591cc4771

8 years agoprovides a clearer warning message when cheap inheritance with the underlying socket...
giampaolo.rodola [Thu, 6 May 2010 19:56:34 +0000 (19:56 +0000)]
provides a clearer warning message when cheap inheritance with the underlying socket object is used

git-svn-id: http://svn.python.org/projects/python/trunk@80880 6015fed2-1504-0410-9fe1-9d1591cc4771

8 years agoFix asyncore issues 8573 and 8483: _strerror might throw ValueError; asyncore.__getat...
giampaolo.rodola [Thu, 6 May 2010 17:57:06 +0000 (17:57 +0000)]
Fix asyncore issues 8573 and 8483: _strerror might throw ValueError; asyncore.__getattr__ cheap inheritance caused confusing error messages when accessing undefined class attributes; added an alias for __str__ which now is used as a fallback for __repr__

git-svn-id: http://svn.python.org/projects/python/trunk@80875 6015fed2-1504-0410-9fe1-9d1591cc4771

8 years agoAdd back in a line that was unneeded which advanced a pointer, but commented
brett.cannon [Thu, 6 May 2010 17:56:36 +0000 (17:56 +0000)]
Add back in a line that was unneeded which advanced a pointer, but commented
out as it is currently unneeded.

This effectively adds back in the line removed in r80809 as a comment.

git-svn-id: http://svn.python.org/projects/python/trunk@80874 6015fed2-1504-0410-9fe1-9d1591cc4771

8 years agoChange section title; point to unittest2
andrew.kuchling [Thu, 6 May 2010 17:27:57 +0000 (17:27 +0000)]
Change section title; point to unittest2

git-svn-id: http://svn.python.org/projects/python/trunk@80873 6015fed2-1504-0410-9fe1-9d1591cc4771

8 years agoAdd 2 items; record ideas for two initial sections; clarify wording
andrew.kuchling [Thu, 6 May 2010 17:21:59 +0000 (17:21 +0000)]
Add 2 items; record ideas for two initial sections; clarify wording

git-svn-id: http://svn.python.org/projects/python/trunk@80872 6015fed2-1504-0410-9fe1-9d1591cc4771

8 years agoDescribe ElementTree 1.3; rearrange new-module sections; describe dict views as sets...
andrew.kuchling [Thu, 6 May 2010 14:14:09 +0000 (14:14 +0000)]
Describe ElementTree 1.3; rearrange new-module sections; describe dict views as sets; small edits and items

git-svn-id: http://svn.python.org/projects/python/trunk@80870 6015fed2-1504-0410-9fe1-9d1591cc4771

8 years ago`self` doesn't exist here
antoine.pitrou [Thu, 6 May 2010 14:11:23 +0000 (14:11 +0000)]
`self` doesn't exist here

git-svn-id: http://svn.python.org/projects/python/trunk@80869 6015fed2-1504-0410-9fe1-9d1591cc4771

8 years agoUse anonymous hyperlinks
andrew.kuchling [Thu, 6 May 2010 13:03:39 +0000 (13:03 +0000)]
Use anonymous hyperlinks

git-svn-id: http://svn.python.org/projects/python/trunk@80866 6015fed2-1504-0410-9fe1-9d1591cc4771

8 years agoFix #7863. Properly identify Windows 7 and Server 2008 R2.
brian.curtin [Thu, 6 May 2010 02:54:44 +0000 (02:54 +0000)]
Fix #7863. Properly identify Windows 7 and Server 2008 R2.

Removed various unused code and added a way to correctly determine
server vs. workstation via the registry.

git-svn-id: http://svn.python.org/projects/python/trunk@80857 6015fed2-1504-0410-9fe1-9d1591cc4771

8 years agoAdd various items
andrew.kuchling [Thu, 6 May 2010 01:10:56 +0000 (01:10 +0000)]
Add various items

git-svn-id: http://svn.python.org/projects/python/trunk@80854 6015fed2-1504-0410-9fe1-9d1591cc4771

8 years agoReword paragraph; fix filename, which should be pyconfig.h
andrew.kuchling [Thu, 6 May 2010 01:09:47 +0000 (01:09 +0000)]
Reword paragraph; fix filename, which should be pyconfig.h

git-svn-id: http://svn.python.org/projects/python/trunk@80852 6015fed2-1504-0410-9fe1-9d1591cc4771

8 years agoHave the serve.py script announce the directory it is
r.david.murray [Thu, 6 May 2010 00:59:04 +0000 (00:59 +0000)]
Have the serve.py script announce the directory it is
serving and which port it is serving it on (I can
never remember the default port number it uses...)

git-svn-id: http://svn.python.org/projects/python/trunk@80849 6015fed2-1504-0410-9fe1-9d1591cc4771

8 years agoUntabify Modules/posixmodule.c (2)
victor.stinner [Thu, 6 May 2010 00:03:44 +0000 (00:03 +0000)]
Untabify Modules/posixmodule.c (2)

Fix some more functions by hand

git-svn-id: http://svn.python.org/projects/python/trunk@80845 6015fed2-1504-0410-9fe1-9d1591cc4771

8 years agoUntabify Modules/posixmodule.c
victor.stinner [Wed, 5 May 2010 23:33:33 +0000 (23:33 +0000)]
Untabify Modules/posixmodule.c

Run Antoine Pitrou "untabify" script + manual editions (OS/2 and some
continuation lines).

git-svn-id: http://svn.python.org/projects/python/trunk@80844 6015fed2-1504-0410-9fe1-9d1591cc4771

8 years agoRevert a change where an expression is not needed now, but could be in the future.
brett.cannon [Wed, 5 May 2010 23:11:08 +0000 (23:11 +0000)]
Revert a change where an expression is not needed now, but could be in the future.

git-svn-id: http://svn.python.org/projects/python/trunk@80843 6015fed2-1504-0410-9fe1-9d1591cc4771

8 years agoIssue #1533: test_range in test_builtin: fix test comment and add test
mark.dickinson [Wed, 5 May 2010 22:42:51 +0000 (22:42 +0000)]
Issue #1533:  test_range in test_builtin: fix test comment and add test
for rejection of small floats.  Thanks Alexander Belopolsky.

git-svn-id: http://svn.python.org/projects/python/trunk@80839 6015fed2-1504-0410-9fe1-9d1591cc4771

8 years agoremoved non needed lines
tarek.ziade [Wed, 5 May 2010 22:41:25 +0000 (22:41 +0000)]
removed non needed lines

git-svn-id: http://svn.python.org/projects/python/trunk@80837 6015fed2-1504-0410-9fe1-9d1591cc4771

8 years agoIssue #8625: Turn off gcc optimization in debug builds.
mark.dickinson [Wed, 5 May 2010 22:23:58 +0000 (22:23 +0000)]
Issue #8625:  Turn off gcc optimization in debug builds.

git-svn-id: http://svn.python.org/projects/python/trunk@80832 6015fed2-1504-0410-9fe1-9d1591cc4771

8 years agoFixed #4265: shutil.copyfile() was leaking file descriptors when disk fills
tarek.ziade [Wed, 5 May 2010 22:15:31 +0000 (22:15 +0000)]
Fixed #4265: shutil.copyfile() was leaking file descriptors when disk fills

git-svn-id: http://svn.python.org/projects/python/trunk@80830 6015fed2-1504-0410-9fe1-9d1591cc4771

8 years agoIssue 8628: fix incorrect documentation for numbers.Complex.imag.
mark.dickinson [Wed, 5 May 2010 21:52:39 +0000 (21:52 +0000)]
Issue 8628: fix incorrect documentation for numbers.Complex.imag.

git-svn-id: http://svn.python.org/projects/python/trunk@80826 6015fed2-1504-0410-9fe1-9d1591cc4771

8 years agoMention how Clang's static anaylzer was run over Objects/ and Python/.
brett.cannon [Wed, 5 May 2010 20:54:53 +0000 (20:54 +0000)]
Mention how Clang's static anaylzer was run over Objects/ and Python/.

git-svn-id: http://svn.python.org/projects/python/trunk@80823 6015fed2-1504-0410-9fe1-9d1591cc4771

8 years agoRemove an unneeded variable assignment.
brett.cannon [Wed, 5 May 2010 20:53:20 +0000 (20:53 +0000)]
Remove an unneeded variable assignment.

Found using Clang's static analyzer.

git-svn-id: http://svn.python.org/projects/python/trunk@80822 6015fed2-1504-0410-9fe1-9d1591cc4771

8 years agoExplicitly add stdio.h and string.h to make strtod.c work standalone.
brett.cannon [Wed, 5 May 2010 20:50:03 +0000 (20:50 +0000)]
Explicitly add stdio.h and string.h to make strtod.c work standalone.

Found using Clang's static analyzer.

git-svn-id: http://svn.python.org/projects/python/trunk@80821 6015fed2-1504-0410-9fe1-9d1591cc4771

8 years agoChange to a Py_XDECREF and fix some whitespace.
brett.cannon [Wed, 5 May 2010 20:38:52 +0000 (20:38 +0000)]
Change to a Py_XDECREF and fix some whitespace.

Found using Clang's static analyzer.

git-svn-id: http://svn.python.org/projects/python/trunk@80820 6015fed2-1504-0410-9fe1-9d1591cc4771

8 years agoRemove an unnecessary variable assignment.
brett.cannon [Wed, 5 May 2010 20:35:24 +0000 (20:35 +0000)]
Remove an unnecessary variable assignment.

Found using Clang's static analyzer.

git-svn-id: http://svn.python.org/projects/python/trunk@80819 6015fed2-1504-0410-9fe1-9d1591cc4771

8 years agoRemove two unneeded branches to an 'if' statement by applying De Morgan's Law
brett.cannon [Wed, 5 May 2010 20:30:30 +0000 (20:30 +0000)]
Remove two unneeded branches to an 'if' statement by applying De Morgan's Law
and creating a single 'if' statement along with a NULL default value for a
variable.

Also clean up a bunch of whitespace.

Found using Clang's static analyzer.

git-svn-id: http://svn.python.org/projects/python/trunk@80818 6015fed2-1504-0410-9fe1-9d1591cc4771

8 years agoRemove an unneeded variable increment.
brett.cannon [Wed, 5 May 2010 20:27:49 +0000 (20:27 +0000)]
Remove an unneeded variable increment.

Found using Clang's static analyzer.

git-svn-id: http://svn.python.org/projects/python/trunk@80817 6015fed2-1504-0410-9fe1-9d1591cc4771

8 years agoRemove an unneeded variable and fix a little whitespace.
brett.cannon [Wed, 5 May 2010 20:26:58 +0000 (20:26 +0000)]
Remove an unneeded variable and fix a little whitespace.

Found using Clang's static analyzer.

git-svn-id: http://svn.python.org/projects/python/trunk@80816 6015fed2-1504-0410-9fe1-9d1591cc4771

8 years agoFix whitespace.
brett.cannon [Wed, 5 May 2010 20:25:47 +0000 (20:25 +0000)]
Fix whitespace.

git-svn-id: http://svn.python.org/projects/python/trunk@80815 6015fed2-1504-0410-9fe1-9d1591cc4771

8 years agoPartially revert the over-reaching r80813.
brett.cannon [Wed, 5 May 2010 20:24:30 +0000 (20:24 +0000)]
Partially revert the over-reaching r80813.

git-svn-id: http://svn.python.org/projects/python/trunk@80814 6015fed2-1504-0410-9fe1-9d1591cc4771

8 years agoRemove three unneeded variable assignments.
brett.cannon [Wed, 5 May 2010 20:20:19 +0000 (20:20 +0000)]
Remove three unneeded variable assignments.

Found using Clang's static analyzer.

git-svn-id: http://svn.python.org/projects/python/trunk@80813 6015fed2-1504-0410-9fe1-9d1591cc4771

8 years agoRemove an unneeded assignment.
brett.cannon [Wed, 5 May 2010 20:19:26 +0000 (20:19 +0000)]
Remove an unneeded assignment.

Found using Clang's static analyzer.

git-svn-id: http://svn.python.org/projects/python/trunk@80812 6015fed2-1504-0410-9fe1-9d1591cc4771

8 years agoRemove an unneeded variable assignment.
brett.cannon [Wed, 5 May 2010 20:18:23 +0000 (20:18 +0000)]
Remove an unneeded variable assignment.

Found using Clang's static analyzer.

git-svn-id: http://svn.python.org/projects/python/trunk@80811 6015fed2-1504-0410-9fe1-9d1591cc4771

8 years agoRemove an unneeded variable.
brett.cannon [Wed, 5 May 2010 20:16:50 +0000 (20:16 +0000)]
Remove an unneeded variable.

Found using Clang's static analyzer.

git-svn-id: http://svn.python.org/projects/python/trunk@80810 6015fed2-1504-0410-9fe1-9d1591cc4771

8 years agoRemove an unneeded variable increment.
brett.cannon [Wed, 5 May 2010 20:16:09 +0000 (20:16 +0000)]
Remove an unneeded variable increment.

Found using Clang's static analyzer.

git-svn-id: http://svn.python.org/projects/python/trunk@80809 6015fed2-1504-0410-9fe1-9d1591cc4771

8 years agoRemove extraneous whitespace.
brett.cannon [Wed, 5 May 2010 20:15:14 +0000 (20:15 +0000)]
Remove extraneous whitespace.

git-svn-id: http://svn.python.org/projects/python/trunk@80808 6015fed2-1504-0410-9fe1-9d1591cc4771

8 years agoRemove an unnecessary variable.
brett.cannon [Wed, 5 May 2010 20:14:27 +0000 (20:14 +0000)]
Remove an unnecessary variable.

Found using Clang's static analyzer.

git-svn-id: http://svn.python.org/projects/python/trunk@80807 6015fed2-1504-0410-9fe1-9d1591cc4771

8 years agoIn a number of places code still revers
ronald.oussoren [Wed, 5 May 2010 19:09:31 +0000 (19:09 +0000)]
In a number of places code still revers
to "sys.platform == 'mac'" and that is
dead code because it refers to a platform
that is no longer supported (and hasn't been
supported for several releases).

Fixes issue #7908 for the trunk.

git-svn-id: http://svn.python.org/projects/python/trunk@80804 6015fed2-1504-0410-9fe1-9d1591cc4771

8 years agoIssue #8600: fix test_gdb failures when gdb issues some spurious warnings.
antoine.pitrou [Wed, 5 May 2010 18:29:02 +0000 (18:29 +0000)]
Issue #8600: fix test_gdb failures when gdb issues some spurious warnings.

git-svn-id: http://svn.python.org/projects/python/trunk@80802 6015fed2-1504-0410-9fe1-9d1591cc4771

8 years agoIssue #7472: remove unused code from email.encoders.encode_7or8bit.
r.david.murray [Wed, 5 May 2010 17:31:03 +0000 (17:31 +0000)]
Issue #7472: remove unused code from email.encoders.encode_7or8bit.

Yukihiro Nakadaira noticed a typo in encode_7or8bit that was trying
to special case iso-2022 codecs.  It turns out that the code in
question is never used, because whereas it was designed to trigger
if the payload encoding was eight bit but its output encoding was
7 bit, in practice the payload is always converted to the 7bit
encoding before encode_7or8bit is called.  Patch by Shawat Anand.

git-svn-id: http://svn.python.org/projects/python/trunk@80800 6015fed2-1504-0410-9fe1-9d1591cc4771

8 years agoUntabify Modules/_io/fileio.c
antoine.pitrou [Wed, 5 May 2010 16:27:30 +0000 (16:27 +0000)]
Untabify Modules/_io/fileio.c

git-svn-id: http://svn.python.org/projects/python/trunk@80796 6015fed2-1504-0410-9fe1-9d1591cc4771

8 years agoNEWS
barry.warsaw [Wed, 5 May 2010 16:17:22 +0000 (16:17 +0000)]
NEWS

git-svn-id: http://svn.python.org/projects/python/trunk@80794 6015fed2-1504-0410-9fe1-9d1591cc4771

8 years agoBug 7755: audiotest.au is arguably copyrighted material, but definitely makes
barry.warsaw [Wed, 5 May 2010 16:15:09 +0000 (16:15 +0000)]
Bug 7755: audiotest.au is arguably copyrighted material, but definitely makes
Debian unhappy.  The actual contents of the audio clip are unimportant, so
replace it with something that we know is okay.  Guido likes woodpeckers.

git-svn-id: http://svn.python.org/projects/python/trunk@80793 6015fed2-1504-0410-9fe1-9d1591cc4771

8 years agoUntabify Modules/_ssl.c
antoine.pitrou [Wed, 5 May 2010 15:53:45 +0000 (15:53 +0000)]
Untabify Modules/_ssl.c

git-svn-id: http://svn.python.org/projects/python/trunk@80789 6015fed2-1504-0410-9fe1-9d1591cc4771

8 years agoForce exit using os._exit instead of sys.exit,
ronald.oussoren [Wed, 5 May 2010 15:32:39 +0000 (15:32 +0000)]
Force exit using os._exit instead of sys.exit,
this makes sure that the child does not continue
testing.

git-svn-id: http://svn.python.org/projects/python/trunk@80787 6015fed2-1504-0410-9fe1-9d1591cc4771

8 years agoThe C function used by uuid.uuid4 is broken on
ronald.oussoren [Wed, 5 May 2010 14:48:37 +0000 (14:48 +0000)]
The C function used by uuid.uuid4 is broken on
OSX 10.6 in that after os.fork() the parent and
child generate the same sequence of UUIDs.

This patch falls back to the the Python implementation
on OSX 10.6 or later.

Fixes issue #8621.

git-svn-id: http://svn.python.org/projects/python/trunk@80784 6015fed2-1504-0410-9fe1-9d1591cc4771

8 years agoUpdate the NEWS entry for issue #8211.
marc-andre.lemburg [Wed, 5 May 2010 13:30:01 +0000 (13:30 +0000)]
Update the NEWS entry for issue #8211.

git-svn-id: http://svn.python.org/projects/python/trunk@80782 6015fed2-1504-0410-9fe1-9d1591cc4771

8 years agoIssue #8313: traceback.format_exception_only() encodes unicode message to
victor.stinner [Wed, 5 May 2010 12:40:49 +0000 (12:40 +0000)]
Issue #8313: traceback.format_exception_only() encodes unicode message to
ASCII with backslashreplace error handler if str(value) failed

git-svn-id: http://svn.python.org/projects/python/trunk@80777 6015fed2-1504-0410-9fe1-9d1591cc4771

8 years agoRemove reference to unused source file.
thomas.heller [Tue, 4 May 2010 19:08:18 +0000 (19:08 +0000)]
Remove reference to unused source file.

git-svn-id: http://svn.python.org/projects/python/trunk@80766 6015fed2-1504-0410-9fe1-9d1591cc4771

8 years agoFix test_gzip failure on OS X. The failure was a result of trying to fflush
mark.dickinson [Tue, 4 May 2010 18:45:27 +0000 (18:45 +0000)]
Fix test_gzip failure on OS X.  The failure was a result of trying to fflush
a file that wasn't open for writing.  Patch by Antoine Pitrou.

git-svn-id: http://svn.python.org/projects/python/trunk@80762 6015fed2-1504-0410-9fe1-9d1591cc4771

8 years agoOn Windows, ctypes does no longer check the stack before and after
thomas.heller [Tue, 4 May 2010 18:44:42 +0000 (18:44 +0000)]
On Windows, ctypes does no longer check the stack before and after
calling a foreign function.  This allows to use the unmodified libffi
library.

Remove most files from _ctypes/libffi_msvc, only two include files
stay (updated from _ctypes/libffi/...).  Other files are used in the
cross-platform _ctypes/libffi directory.

git-svn-id: http://svn.python.org/projects/python/trunk@80761 6015fed2-1504-0410-9fe1-9d1591cc4771

8 years agoFix trailing whitespace.
mark.dickinson [Tue, 4 May 2010 16:19:06 +0000 (16:19 +0000)]
Fix trailing whitespace.

git-svn-id: http://svn.python.org/projects/python/trunk@80759 6015fed2-1504-0410-9fe1-9d1591cc4771

8 years agoIssue #1533: fix inconsistency in range function argument processing:
mark.dickinson [Tue, 4 May 2010 16:18:25 +0000 (16:18 +0000)]
Issue #1533: fix inconsistency in range function argument processing:
any non-float non-integer argument is now converted to an integer (if
possible) using its __int__ method.  Previously, only small arguments
were treated this way; larger arguments (those whose __int__ was
outside the range of a C long) would produce a TypeError.

Patch by Alexander Belopolsky (with minor modifications).

git-svn-id: http://svn.python.org/projects/python/trunk@80758 6015fed2-1504-0410-9fe1-9d1591cc4771

8 years agoIssue #8567: Fix incorrect precedence of signals in Decimal module.
mark.dickinson [Tue, 4 May 2010 14:25:50 +0000 (14:25 +0000)]
Issue #8567: Fix incorrect precedence of signals in Decimal module.

When a Decimal operation raises multiple signals and more than one of
those signals is trapped, the specification determines the order in
which the signals should be handled.  In many cases this order wasn't
being followed, leading to the wrong Python exception being raised.
This commit fixes those cases, and adds extra tests.  The tests are
only enabled when EXTENDEDERRORTESTS is True, since they involve
rerunning each Decimal testcase several times.

git-svn-id: http://svn.python.org/projects/python/trunk@80753 6015fed2-1504-0410-9fe1-9d1591cc4771

8 years ago_pyio: Fix TextIOWrapper constructor: os has no device_encoding() function
victor.stinner [Tue, 4 May 2010 11:35:36 +0000 (11:35 +0000)]
_pyio: Fix TextIOWrapper constructor: os has no device_encoding() function

_io module doesn't call this function which was introduced in Python3.

git-svn-id: http://svn.python.org/projects/python/trunk@80752 6015fed2-1504-0410-9fe1-9d1591cc4771

8 years agoIssue #8404: Fix set operations on dictionary views.
alexandre.vassalotti [Tue, 4 May 2010 03:21:51 +0000 (03:21 +0000)]
Issue #8404: Fix set operations on dictionary views.

git-svn-id: http://svn.python.org/projects/python/trunk@80749 6015fed2-1504-0410-9fe1-9d1591cc4771

8 years agoAdd some more items; the urlparse change is added twice
andrew.kuchling [Tue, 4 May 2010 01:24:22 +0000 (01:24 +0000)]
Add some more items; the urlparse change is added twice

git-svn-id: http://svn.python.org/projects/python/trunk@80748 6015fed2-1504-0410-9fe1-9d1591cc4771

8 years agoPull a NULL pointer check up to cover more cases in the function.
brett.cannon [Tue, 4 May 2010 01:23:36 +0000 (01:23 +0000)]
Pull a NULL pointer check up to cover more cases in the function.

Found using Clang's static analyzer.

git-svn-id: http://svn.python.org/projects/python/trunk@80747 6015fed2-1504-0410-9fe1-9d1591cc4771

8 years agoRemove an unneeded variable and assignment.
brett.cannon [Tue, 4 May 2010 01:16:51 +0000 (01:16 +0000)]
Remove an unneeded variable and assignment.

Found using Clang's static analyzer.

git-svn-id: http://svn.python.org/projects/python/trunk@80746 6015fed2-1504-0410-9fe1-9d1591cc4771

8 years agoMention the code clean-up thanks to Clang's static analyzer in Modules.
brett.cannon [Tue, 4 May 2010 01:04:53 +0000 (01:04 +0000)]
Mention the code clean-up thanks to Clang's static analyzer in Modules.

Was not applied to modules that will not compile under OS X, dbmmodule.c,
getaddrinfo.c, and getnameinfo.c.

git-svn-id: http://svn.python.org/projects/python/trunk@80745 6015fed2-1504-0410-9fe1-9d1591cc4771

8 years agoFix some whitespace.
brett.cannon [Tue, 4 May 2010 01:01:00 +0000 (01:01 +0000)]
Fix some whitespace.

git-svn-id: http://svn.python.org/projects/python/trunk@80744 6015fed2-1504-0410-9fe1-9d1591cc4771

8 years agoRemove an unneeded variable assignment.
brett.cannon [Tue, 4 May 2010 00:57:44 +0000 (00:57 +0000)]
Remove an unneeded variable assignment.

Found using Clang's static analyzer.

git-svn-id: http://svn.python.org/projects/python/trunk@80743 6015fed2-1504-0410-9fe1-9d1591cc4771

8 years agoStrip out extraneous whitespace, cast a some `const char *` to `void *` when
brett.cannon [Tue, 4 May 2010 00:52:41 +0000 (00:52 +0000)]
Strip out extraneous whitespace, cast a some `const char *` to `void *` when
passed to free() and make a `char *` to a `const char *` as found by Clang's
static analyzer.

git-svn-id: http://svn.python.org/projects/python/trunk@80742 6015fed2-1504-0410-9fe1-9d1591cc4771

8 years agoFix a Py_DECREF to a Py_XDECREF.
brett.cannon [Tue, 4 May 2010 00:48:11 +0000 (00:48 +0000)]
Fix a Py_DECREF to a Py_XDECREF.

Found using Clang's static analyzer.

git-svn-id: http://svn.python.org/projects/python/trunk@80741 6015fed2-1504-0410-9fe1-9d1591cc4771

8 years agoPrevent a possible NULL de-reference and an unneeded variable assignment.
brett.cannon [Tue, 4 May 2010 00:36:00 +0000 (00:36 +0000)]
Prevent a possible NULL de-reference and an unneeded variable assignment.

Found using Clang's static analyzer.

git-svn-id: http://svn.python.org/projects/python/trunk@80739 6015fed2-1504-0410-9fe1-9d1591cc4771

8 years agoRemove a redundant string length check and variable assignment.
brett.cannon [Tue, 4 May 2010 00:30:17 +0000 (00:30 +0000)]
Remove a redundant string length check and variable assignment.

Found with Clang's static analyzer.

git-svn-id: http://svn.python.org/projects/python/trunk@80738 6015fed2-1504-0410-9fe1-9d1591cc4771

8 years agoFix two potential uninitialization errors and an unneeded assignment.
brett.cannon [Mon, 3 May 2010 23:57:15 +0000 (23:57 +0000)]
Fix two potential uninitialization errors and an unneeded assignment.

Found using Clang's static analyzer.

git-svn-id: http://svn.python.org/projects/python/trunk@80737 6015fed2-1504-0410-9fe1-9d1591cc4771

8 years agoRemove unused variables and a variable initialization.
brett.cannon [Mon, 3 May 2010 23:51:28 +0000 (23:51 +0000)]
Remove unused variables and a variable initialization.

Found using Clang's static analyzer.

git-svn-id: http://svn.python.org/projects/python/trunk@80736 6015fed2-1504-0410-9fe1-9d1591cc4771

8 years agoRemove unneeded variable assignment.
brett.cannon [Mon, 3 May 2010 23:44:54 +0000 (23:44 +0000)]
Remove unneeded variable assignment.

Found using Clang's static analyzer.

git-svn-id: http://svn.python.org/projects/python/trunk@80735 6015fed2-1504-0410-9fe1-9d1591cc4771

8 years agoRemove unneeded variable mutation and initializations.
brett.cannon [Mon, 3 May 2010 23:43:49 +0000 (23:43 +0000)]
Remove unneeded variable mutation and initializations.

Found using Clang's static analyzer.

git-svn-id: http://svn.python.org/projects/python/trunk@80734 6015fed2-1504-0410-9fe1-9d1591cc4771

8 years agoClean up whitespace and remove unneeded variable initialization as found by
brett.cannon [Mon, 3 May 2010 23:42:40 +0000 (23:42 +0000)]
Clean up whitespace and remove unneeded variable initialization as found by
Clang.

git-svn-id: http://svn.python.org/projects/python/trunk@80733 6015fed2-1504-0410-9fe1-9d1591cc4771

8 years agoRemove an unused variable.
brett.cannon [Mon, 3 May 2010 23:41:51 +0000 (23:41 +0000)]
Remove an unused variable.

Found using Clang's static analyzer.

git-svn-id: http://svn.python.org/projects/python/trunk@80732 6015fed2-1504-0410-9fe1-9d1591cc4771

8 years agoRemove unneeded variable initialization.
brett.cannon [Mon, 3 May 2010 23:41:23 +0000 (23:41 +0000)]
Remove unneeded variable initialization.

Found using Clang's static analyzer.

git-svn-id: http://svn.python.org/projects/python/trunk@80731 6015fed2-1504-0410-9fe1-9d1591cc4771

8 years agoIssue #7865: The close() method of :mod:`io` objects should not swallow
antoine.pitrou [Mon, 3 May 2010 16:25:33 +0000 (16:25 +0000)]
Issue #7865: The close() method of :mod:`io` objects should not swallow
exceptions raised by the implicit flush().  Also ensure that calling
close() several times is supported.  Patch by Pascal Chambon.

git-svn-id: http://svn.python.org/projects/python/trunk@80720 6015fed2-1504-0410-9fe1-9d1591cc4771

8 years agowbits negative was documented SEVEN years ago
jesus.cea [Mon, 3 May 2010 16:09:21 +0000 (16:09 +0000)]
wbits negative was documented SEVEN years ago

git-svn-id: http://svn.python.org/projects/python/trunk@80716 6015fed2-1504-0410-9fe1-9d1591cc4771

8 years agoIssue #8576: logging updated to remove usage of find_unused_port().
vinay.sajip [Mon, 3 May 2010 15:11:53 +0000 (15:11 +0000)]
Issue #8576: logging updated to remove usage of find_unused_port().

git-svn-id: http://svn.python.org/projects/python/trunk@80712 6015fed2-1504-0410-9fe1-9d1591cc4771

8 years agoUpdate the Vim syntax highlight file.
brett.cannon [Sun, 2 May 2010 21:51:23 +0000 (21:51 +0000)]
Update the Vim syntax highlight file.

git-svn-id: http://svn.python.org/projects/python/trunk@80710 6015fed2-1504-0410-9fe1-9d1591cc4771

8 years agoFix unittest tests to not abuse traceback.format_exception
michael.foord [Sun, 2 May 2010 20:39:42 +0000 (20:39 +0000)]
Fix unittest tests to not abuse traceback.format_exception

git-svn-id: http://svn.python.org/projects/python/trunk@80708 6015fed2-1504-0410-9fe1-9d1591cc4771

8 years agoIssue #4687: Fix accuracy of garbage collection runtimes displayed with
antoine.pitrou [Sun, 2 May 2010 19:51:14 +0000 (19:51 +0000)]
Issue #4687: Fix accuracy of garbage collection runtimes displayed with
gc.DEBUG_STATS.

git-svn-id: http://svn.python.org/projects/python/trunk@80704 6015fed2-1504-0410-9fe1-9d1591cc4771

8 years agoSmall update to r80698 to ensure that webbrowser.open
ronald.oussoren [Sun, 2 May 2010 09:55:57 +0000 (09:55 +0000)]
Small update to r80698 to ensure that webbrowser.open
uses the default browser.

git-svn-id: http://svn.python.org/projects/python/trunk@80700 6015fed2-1504-0410-9fe1-9d1591cc4771

8 years agoFor for issue #7192: with this patch webbrowser.get("firefox")
ronald.oussoren [Sun, 2 May 2010 09:48:21 +0000 (09:48 +0000)]
For for issue #7192: with this patch webbrowser.get("firefox")
works on OSX

git-svn-id: http://svn.python.org/projects/python/trunk@80698 6015fed2-1504-0410-9fe1-9d1591cc4771

8 years agoImprove error message from nb_int returning a non-integer, in various PyInt_As* funct...
mark.dickinson [Sun, 2 May 2010 09:38:43 +0000 (09:38 +0000)]
Improve error message from nb_int returning a non-integer, in various PyInt_As* functions:

git-svn-id: http://svn.python.org/projects/python/trunk@80695 6015fed2-1504-0410-9fe1-9d1591cc4771

8 years agoRemove duplicate test
antoine.pitrou [Sat, 1 May 2010 20:26:58 +0000 (20:26 +0000)]
Remove duplicate test

git-svn-id: http://svn.python.org/projects/python/trunk@80690 6015fed2-1504-0410-9fe1-9d1591cc4771

8 years agoFix attribution. Travis didn't do much and he did a bad work.
antoine.pitrou [Sat, 1 May 2010 12:16:39 +0000 (12:16 +0000)]
Fix attribution. Travis didn't do much and he did a bad work.
(yes, this is a sensitive subject, sorry)

git-svn-id: http://svn.python.org/projects/python/trunk@80686 6015fed2-1504-0410-9fe1-9d1591cc4771

8 years agoDescribe memoryview
andrew.kuchling [Sat, 1 May 2010 12:06:51 +0000 (12:06 +0000)]
Describe memoryview

git-svn-id: http://svn.python.org/projects/python/trunk@80685 6015fed2-1504-0410-9fe1-9d1591cc4771

8 years agoMinor grammar fix
andrew.kuchling [Sat, 1 May 2010 12:05:52 +0000 (12:05 +0000)]
Minor grammar fix

git-svn-id: http://svn.python.org/projects/python/trunk@80684 6015fed2-1504-0410-9fe1-9d1591cc4771

8 years agoFix incorrect use of a list as the target of an 'except' clause in test_decimal.py.
mark.dickinson [Sat, 1 May 2010 11:46:20 +0000 (11:46 +0000)]
Fix incorrect use of a list as the target of an 'except' clause in test_decimal.py.

git-svn-id: http://svn.python.org/projects/python/trunk@80681 6015fed2-1504-0410-9fe1-9d1591cc4771