python
12 years agoFix doc typo noticed by Amaury Forgeot d'Arc
Eli Bendersky [Tue, 27 Mar 2012 02:57:23 +0000 (04:57 +0200)]
Fix doc typo noticed by Amaury Forgeot d'Arc

12 years agoFix time.steady(strict=True): don't use CLOCK_REALTIME
Victor Stinner [Mon, 26 Mar 2012 20:53:14 +0000 (22:53 +0200)]
Fix time.steady(strict=True): don't use CLOCK_REALTIME

12 years agoIssue #14383: Add _PyDict_GetItemId() and _PyDict_SetItemId() functions
Victor Stinner [Mon, 26 Mar 2012 20:10:51 +0000 (22:10 +0200)]
Issue #14383: Add _PyDict_GetItemId() and _PyDict_SetItemId() functions

These functions simplify the usage of static constant Unicode strings.
Generalize the usage of _Py_Identifier in ceval.c and typeobject.c.

12 years agoIssue #14368: _PyTime_gettimeofday() cannot fail
Victor Stinner [Mon, 26 Mar 2012 20:08:02 +0000 (22:08 +0200)]
Issue #14368: _PyTime_gettimeofday() cannot fail

floattime() must not raise an error if the current time is 1970.1.1 at 00:00.

12 years agoUpdate missed idlelib/NEWS.txt
Andrew Svetlov [Mon, 26 Mar 2012 19:14:13 +0000 (22:14 +0300)]
Update missed idlelib/NEWS.txt

12 years agoIDLE can be launched as python -m ildelib
Andrew Svetlov [Mon, 26 Mar 2012 19:11:46 +0000 (22:11 +0300)]
IDLE can be launched as python -m ildelib

12 years agoIssue #989712: update the code to process tkinter messages in IDLE
Andrew Svetlov [Mon, 26 Mar 2012 18:56:44 +0000 (21:56 +0300)]
Issue #989712: update the code to process tkinter messages in IDLE
  without mainloop.

  Thanks to Roger Serwy for patch.

12 years agogrammar
Benjamin Peterson [Mon, 26 Mar 2012 18:50:32 +0000 (14:50 -0400)]
grammar

12 years agoIssue #6488: Explain the XPath support of xml.etree.ElementTree, with code
Eli Bendersky [Mon, 26 Mar 2012 18:43:32 +0000 (20:43 +0200)]
Issue #6488: Explain the XPath support of xml.etree.ElementTree, with code
samples and a reference. Also fix the other nits mentioned in the issue.

This also partially addresses issue #14006.

12 years agoIssue #14410: merge with 3.2
Sandro Tosi [Mon, 26 Mar 2012 17:36:44 +0000 (19:36 +0200)]
Issue #14410: merge with 3.2

12 years agoIssue #14410: fix typo in argparse doc; patch by Tshepang Lekhonkhobe
Sandro Tosi [Mon, 26 Mar 2012 17:36:23 +0000 (19:36 +0200)]
Issue #14410: fix typo in argparse doc; patch by Tshepang Lekhonkhobe

12 years ago#14413: tweak word order in deprecation section
R David Murray [Mon, 26 Mar 2012 17:34:46 +0000 (13:34 -0400)]
#14413: tweak word order in deprecation section

12 years agoUpdated handler documentation.
Vinay Sajip [Mon, 26 Mar 2012 16:17:39 +0000 (17:17 +0100)]
Updated handler documentation.

12 years agoMinor documentation tweak.
Vinay Sajip [Mon, 26 Mar 2012 16:09:58 +0000 (17:09 +0100)]
Minor documentation tweak.

12 years agoIssue #3367: Merge fix from 3.2.
Stefan Krah [Mon, 26 Mar 2012 13:11:22 +0000 (15:11 +0200)]
Issue #3367: Merge fix from 3.2.

12 years agoIssue #3367: NULL-terminate argv[] copies to prevent an invalid access
Stefan Krah [Mon, 26 Mar 2012 13:05:22 +0000 (15:05 +0200)]
Issue #3367: NULL-terminate argv[] copies to prevent an invalid access
in sys_update_path().

12 years agomerge 3.2
Benjamin Peterson [Mon, 26 Mar 2012 02:41:16 +0000 (22:41 -0400)]
merge 3.2

12 years agomerge heads
Benjamin Peterson [Mon, 26 Mar 2012 02:41:06 +0000 (22:41 -0400)]
merge heads

12 years agokill this terribly outdated comment
Benjamin Peterson [Mon, 26 Mar 2012 02:40:54 +0000 (22:40 -0400)]
kill this terribly outdated comment

12 years agounittest.mock: removed another bit of Python 2 only code
Michael Foord [Sun, 25 Mar 2012 22:27:12 +0000 (23:27 +0100)]
unittest.mock: removed another bit of Python 2 only code

12 years agoAdding unittest.mock documentation
Michael Foord [Sun, 25 Mar 2012 22:12:55 +0000 (23:12 +0100)]
Adding unittest.mock documentation

12 years agounittest.mock: a mock created by patch with a spec as the list argument will be calla...
Michael Foord [Sun, 25 Mar 2012 18:53:18 +0000 (19:53 +0100)]
unittest.mock: a mock created by patch with a spec as the list argument will be callable if __call__ is in the spec

12 years agomerge with 3.2
Georg Brandl [Sun, 25 Mar 2012 18:41:06 +0000 (20:41 +0200)]
merge with 3.2

12 years agoAdd missing files for new doc theme.
Georg Brandl [Sun, 25 Mar 2012 18:40:57 +0000 (20:40 +0200)]
Add missing files for new doc theme.

12 years agomerge heads
Georg Brandl [Sun, 25 Mar 2012 18:38:15 +0000 (20:38 +0200)]
merge heads

12 years agounittest.mock: remove another piece of Python 2 specific code
Michael Foord [Sun, 25 Mar 2012 18:35:22 +0000 (19:35 +0100)]
unittest.mock: remove another piece of Python 2 specific code

12 years agomerge with 3.2
Georg Brandl [Sun, 25 Mar 2012 18:32:35 +0000 (20:32 +0200)]
merge with 3.2

12 years agoSwitch to new "lighter" doc design.
Georg Brandl [Sun, 25 Mar 2012 18:31:57 +0000 (20:31 +0200)]
Switch to new "lighter" doc design.

12 years agoRemove more Python 2 code from unittest.mock (obsolete function attributes)
Michael Foord [Sun, 25 Mar 2012 18:16:10 +0000 (19:16 +0100)]
Remove more Python 2 code from unittest.mock (obsolete function attributes)

12 years agoMinor changes to the unittest.mock.mock_open helper
Michael Foord [Sun, 25 Mar 2012 18:11:50 +0000 (19:11 +0100)]
Minor changes to the unittest.mock.mock_open helper

12 years agoAddition of docstrings to unittest.mock helpers
Michael Foord [Sun, 25 Mar 2012 18:07:33 +0000 (19:07 +0100)]
Addition of docstrings to unittest.mock helpers

12 years agounittest.mock: set file_spec on first use
Michael Foord [Sun, 25 Mar 2012 18:03:13 +0000 (19:03 +0100)]
unittest.mock: set file_spec on first use

12 years agoSupport subclassing unittest.mock._patch and fix various obscure bugs around patcher...
Michael Foord [Sun, 25 Mar 2012 17:57:58 +0000 (18:57 +0100)]
Support subclassing unittest.mock._patch and fix various obscure bugs around patcher spec arguments

12 years agoMerge
Michael Foord [Sun, 25 Mar 2012 17:16:26 +0000 (18:16 +0100)]
Merge

12 years agounittest.mock.MagicMock objects are now unorderable by default
Michael Foord [Sun, 25 Mar 2012 17:16:07 +0000 (18:16 +0100)]
unittest.mock.MagicMock objects are now unorderable by default

12 years agoRaise MemoryError instead of InvalidOperation/MallocError for compatibility
Stefan Krah [Sun, 25 Mar 2012 16:59:21 +0000 (18:59 +0200)]
Raise MemoryError instead of InvalidOperation/MallocError for compatibility
with decimal.py. The standard specifies InsufficientStorage (MallocError) as
a sub-condition of InvalidOperation. This allows a calculation to continue
with NaN results when allocation fails.

12 years agoRemove extra spaces in doc example.
Andrew Svetlov [Sun, 25 Mar 2012 08:44:59 +0000 (11:44 +0300)]
Remove extra spaces in doc example.

12 years agoIssue #14200 — now displayhook for IDLE works in non-subprocess mode as well as subpr...
Andrew Svetlov [Sun, 25 Mar 2012 08:43:02 +0000 (11:43 +0300)]
Issue #14200 — now displayhook for IDLE works in non-subprocess mode as well as subprecess.

12 years agomerge with 3.2
Georg Brandl [Sun, 25 Mar 2012 06:43:32 +0000 (08:43 +0200)]
merge with 3.2

12 years agoCloses #14401: fix typos in curses howto.
Georg Brandl [Sun, 25 Mar 2012 06:43:22 +0000 (08:43 +0200)]
Closes #14401: fix typos in curses howto.

12 years agoIssue #13902: Fix a random test_threading failure on FreeBSD 6 buildbots (due
Charles-François Natali [Sat, 24 Mar 2012 19:37:01 +0000 (20:37 +0100)]
Issue #13902: Fix a random test_threading failure on FreeBSD 6 buildbots (due
to a known bug in pthread implementation on FreeBSD < 7).

12 years agoIssue #13902: Fix a random test_threading failure on FreeBSD 6 buildbots (due
Charles-François Natali [Sat, 24 Mar 2012 19:36:09 +0000 (20:36 +0100)]
Issue #13902: Fix a random test_threading failure on FreeBSD 6 buildbots (due
to a known bug in pthread implementation on FreeBSD < 7).

12 years agoIssue #14349: Fix the doc of the MAKE_FUNCTION opcode in Doc/library/dis.rst to
Eli Bendersky [Sat, 24 Mar 2012 16:52:45 +0000 (18:52 +0200)]
Issue #14349: Fix the doc of the MAKE_FUNCTION opcode in Doc/library/dis.rst to
correctly list the stack params it expects.

12 years agomerge 3.2
Martin v. Löwis [Sat, 24 Mar 2012 16:40:50 +0000 (17:40 +0100)]
merge 3.2

12 years agoIssue #14400: Fix typo.
Martin v. Löwis [Sat, 24 Mar 2012 16:39:57 +0000 (17:39 +0100)]
Issue #14400: Fix typo.

12 years agoIssue #14154: Reimplement the bigmem test memory watchdog as a subprocess.
Charles-François Natali [Sat, 24 Mar 2012 09:06:23 +0000 (10:06 +0100)]
Issue #14154: Reimplement the bigmem test memory watchdog as a subprocess.

12 years agoFix indentation.
Georg Brandl [Sat, 24 Mar 2012 07:12:41 +0000 (08:12 +0100)]
Fix indentation.

12 years agoIssue #7652: Enable linking of _decimal.so against an installed libmpdec.
Stefan Krah [Fri, 23 Mar 2012 18:06:27 +0000 (19:06 +0100)]
Issue #7652: Enable linking of _decimal.so against an installed libmpdec.

12 years agoMerge.
Stefan Krah [Fri, 23 Mar 2012 15:37:41 +0000 (16:37 +0100)]
Merge.

12 years agoFix formatting after removing tabs.
Stefan Krah [Fri, 23 Mar 2012 15:34:41 +0000 (16:34 +0100)]
Fix formatting after removing tabs.

12 years agoWhitespace.
Stefan Krah [Fri, 23 Mar 2012 15:22:05 +0000 (16:22 +0100)]
Whitespace.

12 years agoNull merge for backported fix.
Vinay Sajip [Fri, 23 Mar 2012 14:38:12 +0000 (14:38 +0000)]
Null merge for backported fix.

12 years agoCloses #14314: backported fix.
Vinay Sajip [Fri, 23 Mar 2012 14:36:22 +0000 (14:36 +0000)]
Closes #14314: backported fix.

12 years agoattempt to fix asyncore buildbot failure
Giampaolo Rodola' [Fri, 23 Mar 2012 14:09:58 +0000 (15:09 +0100)]
attempt to fix asyncore buildbot failure

12 years agoattempt to fix asyncore buildbot failure
Giampaolo Rodola' [Fri, 23 Mar 2012 14:07:07 +0000 (15:07 +0100)]
attempt to fix asyncore buildbot failure

12 years agoUse the same exception hierarchy as decimal.py. FloatOperation now also
Stefan Krah [Fri, 23 Mar 2012 13:46:48 +0000 (14:46 +0100)]
Use the same exception hierarchy as decimal.py. FloatOperation now also
inherits from TypeError. Cleanup in module initialization to make repeated
import failures robust.

12 years agoMerge with 3.2
Kristján Valur Jónsson [Fri, 23 Mar 2012 12:52:11 +0000 (12:52 +0000)]
Merge with 3.2

12 years agoFix typo when "PyObject*" was changed to "identifier"
Kristján Valur Jónsson [Fri, 23 Mar 2012 12:50:53 +0000 (12:50 +0000)]
Fix typo when "PyObject*" was changed to "identifier"

12 years agomerge
Giampaolo Rodola' [Fri, 23 Mar 2012 12:29:49 +0000 (13:29 +0100)]
merge

12 years agofix failing asyncore test as per http://bugs.python.org/issue10340#msg156586
Giampaolo Rodola' [Fri, 23 Mar 2012 12:29:01 +0000 (13:29 +0100)]
fix failing asyncore test as per http://bugs.python.org/issue10340#msg156586

12 years agoIssue #13782: streamline argument type-checking in ET.Element
Eli Bendersky [Fri, 23 Mar 2012 12:24:20 +0000 (14:24 +0200)]
Issue #13782: streamline argument type-checking in ET.Element

append, extend and insert now consistently type-check their argument in both
the C and Python implementations, and raise TypeError for non-Element
argument.

Added tests

12 years ago#14380: Make actual default match docs, fix __init__ order.
R David Murray [Fri, 23 Mar 2012 02:40:44 +0000 (22:40 -0400)]
#14380: Make actual default match docs, fix __init__ order.

Éric pointed out that given that the default was documented as None, someone
would reasonably pass that to get the default behavior.  In fixing the code to
use None, I noticed that the change to _charset was being done after it had
already been passed to MIMENonMultipart.  The change to the test verifies that
the order is now correct.

12 years ago#14380: Have MIMEText defaults to utf-8 when passed non-ASCII unicode
R David Murray [Fri, 23 Mar 2012 02:17:51 +0000 (22:17 -0400)]
#14380: Have MIMEText defaults to utf-8 when passed non-ASCII unicode

Previously it would just accept the unicode, which would wind up as unicode in
the transfer-encoded message object, which is just wrong.

Patch by Jeff Knupp.

12 years agoMerge with 3.2 (Issue #14387)
Kristján Valur Jónsson [Thu, 22 Mar 2012 23:13:48 +0000 (23:13 +0000)]
Merge with 3.2 (Issue #14387)

12 years agoIssue #14387 : undefine 'small' so that it doesn't clash with Windows headers.
Kristján Valur Jónsson [Thu, 22 Mar 2012 23:10:37 +0000 (23:10 +0000)]
Issue #14387 : undefine 'small' so that it doesn't clash with Windows headers.

12 years agoFix indentation.
Georg Brandl [Thu, 22 Mar 2012 21:20:21 +0000 (22:20 +0100)]
Fix indentation.

12 years agoIssue #14382: Ensure new unittest.test.testmock is installed.
Ned Deily [Thu, 22 Mar 2012 20:34:11 +0000 (13:34 -0700)]
Issue #14382: Ensure new unittest.test.testmock is installed.
(Original patch by Vinay Sajip)

12 years agomerge 3.2
Benjamin Peterson [Thu, 22 Mar 2012 19:30:03 +0000 (15:30 -0400)]
merge 3.2

12 years agofix #10340: properly handle EINVAL on OSX and also avoid to call handle_connect(...
Giampaolo Rodola' [Thu, 22 Mar 2012 15:24:33 +0000 (16:24 +0100)]
fix #10340: properly handle EINVAL on OSX and also avoid to call handle_connect() in case of a disconnetected socket which is not meant to connect.

12 years agoissue 10340 - forgot to update Misc/NEWS
Giampaolo Rodola' [Thu, 22 Mar 2012 15:22:06 +0000 (16:22 +0100)]
issue 10340 - forgot to update Misc/NEWS

12 years agomerge 79422b3684f1 in 3.3 branch (issue 10340)
Giampaolo Rodola' [Thu, 22 Mar 2012 15:19:45 +0000 (16:19 +0100)]
merge 79422b3684f1 in 3.3 branch (issue 10340)

12 years agofix #10340: properly handle EINVAL on OSX and also avoid to call handle_connect(...
Giampaolo Rodola' [Thu, 22 Mar 2012 15:17:43 +0000 (16:17 +0100)]
fix #10340: properly handle EINVAL on OSX and also avoid to call handle_connect() in case of a disconnetected socket which is not meant to connect.

12 years agomerge 3.2
Benjamin Peterson [Thu, 22 Mar 2012 14:40:20 +0000 (10:40 -0400)]
merge 3.2

12 years agothis should technicaly be identifier
Benjamin Peterson [Thu, 22 Mar 2012 14:39:16 +0000 (10:39 -0400)]
this should technicaly be identifier

12 years agoIssue #14387: Do not include accu.h from Python.h.
Antoine Pitrou [Thu, 22 Mar 2012 13:42:18 +0000 (14:42 +0100)]
Issue #14387: Do not include accu.h from Python.h.

12 years agoIssue #14387: Do not include accu.h from Python.h.
Antoine Pitrou [Thu, 22 Mar 2012 13:38:16 +0000 (14:38 +0100)]
Issue #14387: Do not include accu.h from Python.h.

12 years agomerge 3.2
Benjamin Peterson [Thu, 22 Mar 2012 12:56:27 +0000 (08:56 -0400)]
merge 3.2

12 years agocheck for NULL
Benjamin Peterson [Thu, 22 Mar 2012 12:56:15 +0000 (08:56 -0400)]
check for NULL

12 years agomerge 3.2 (#14378)
Benjamin Peterson [Thu, 22 Mar 2012 12:19:50 +0000 (08:19 -0400)]
merge 3.2 (#14378)

12 years agocheck by equality for __future__ not identity (closes #14378)
Benjamin Peterson [Thu, 22 Mar 2012 12:19:04 +0000 (08:19 -0400)]
check by equality for __future__ not identity (closes #14378)

12 years agoFix typo.
Georg Brandl [Thu, 22 Mar 2012 06:42:31 +0000 (07:42 +0100)]
Fix typo.

12 years agoMicro-optimize PyObject_GetAttrString()
Victor Stinner [Thu, 22 Mar 2012 01:09:08 +0000 (02:09 +0100)]
Micro-optimize PyObject_GetAttrString()

w cannot be NULL so use Py_DECREF() instead of Py_XDECREF().

12 years agoIssue #14204: The ssl module now has support for the Next Protocol Negotiation extens...
Antoine Pitrou [Wed, 21 Mar 2012 23:23:03 +0000 (00:23 +0100)]
Issue #14204: The ssl module now has support for the Next Protocol Negotiation extension, if available in the underlying OpenSSL library.
Patch by Colin Marc.

12 years agoIssue #3035: Unused functions from tkinter are marked as pending peprecated.
Andrew Svetlov [Wed, 21 Mar 2012 21:52:59 +0000 (23:52 +0200)]
Issue #3035: Unused functions from tkinter are marked as pending peprecated.

12 years agoMerge.
Stefan Krah [Wed, 21 Mar 2012 19:27:33 +0000 (20:27 +0100)]
Merge.

12 years agoWhitespace.
Stefan Krah [Wed, 21 Mar 2012 19:21:20 +0000 (20:21 +0100)]
Whitespace.

12 years agoMerge #12757: Make doctest skipping in -OO mode work with unittest/regrtest -v
R David Murray [Wed, 21 Mar 2012 18:55:04 +0000 (14:55 -0400)]
Merge #12757: Make doctest skipping in -OO mode work with unittest/regrtest -v

12 years ago#12757: Make doctest skipping in -OO mode work with unittest/regrtest -v
R David Murray [Wed, 21 Mar 2012 18:53:42 +0000 (14:53 -0400)]
#12757: Make doctest skipping in -OO mode work with unittest/regrtest -v

12 years agolong() -> int()
Benjamin Peterson [Wed, 21 Mar 2012 18:51:14 +0000 (14:51 -0400)]
long() -> int()

12 years agomake _PyNumber_ConvertIntegralToInt static, since it's only used in abstract.c
Benjamin Peterson [Wed, 21 Mar 2012 18:44:43 +0000 (14:44 -0400)]
make _PyNumber_ConvertIntegralToInt static, since it's only used in abstract.c

12 years agorewrite this function, which was still accounting for classic classes
Benjamin Peterson [Wed, 21 Mar 2012 18:38:11 +0000 (14:38 -0400)]
rewrite this function, which was still accounting for classic classes

12 years agomerge heads
Benjamin Peterson [Wed, 21 Mar 2012 18:26:09 +0000 (14:26 -0400)]
merge heads

12 years agoDocument decimal.MIN_ETINY.
Stefan Krah [Wed, 21 Mar 2012 17:47:20 +0000 (18:47 +0100)]
Document decimal.MIN_ETINY.

12 years agoIssue #7652: Integrate the decimal floating point libmpdec library to speed
Stefan Krah [Wed, 21 Mar 2012 17:25:23 +0000 (18:25 +0100)]
Issue #7652: Integrate the decimal floating point libmpdec library to speed
up the decimal module. Performance gains of the new C implementation are
between 12x and 80x, depending on the application.

12 years agoRemove non-existing file from pythoncore project.
krisvale [Wed, 21 Mar 2012 11:37:09 +0000 (11:37 +0000)]
Remove non-existing file from pythoncore project.

12 years agoMerge from 3.2 for issue #3573, fix Misc/NEWS as Ned Deily guess.
Andrew Svetlov [Wed, 21 Mar 2012 11:31:12 +0000 (13:31 +0200)]
Merge from 3.2 for issue #3573, fix Misc/NEWS as Ned Deily guess.

12 years ago#3573: idle now doesn't hungs if launched as: idle -e <directory>
Andrew Svetlov [Wed, 21 Mar 2012 11:23:41 +0000 (13:23 +0200)]
#3573: idle now doesn't hungs if launched as: idle -e <directory>

Patch by Guilherme Polo.

12 years agocorrectly lookup __trunc__ in int() constructor
Benjamin Peterson [Wed, 21 Mar 2012 03:48:11 +0000 (23:48 -0400)]
correctly lookup __trunc__ in int() constructor

12 years agosome more identifier goodness
Benjamin Peterson [Wed, 21 Mar 2012 03:26:41 +0000 (23:26 -0400)]
some more identifier goodness

12 years agouse identifier api
Benjamin Peterson [Wed, 21 Mar 2012 03:17:04 +0000 (23:17 -0400)]
use identifier api