Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Python: Checkins

cpython (merge 3.2 -> default): merge 3.2

 

 

First page Previous page 1 2 3 4 5 6 7 8 Next page Last page  View All Python checkins RSS feed   Index | Next | Previous | View Threaded


python-checkins at python

Mar 22, 2012, 12:30 PM

Post #176 of 192 (295 views)
Permalink
cpython (merge 3.2 -> default): merge 3.2 [In reply to]

http://hg.python.org/cpython/rev/5f0ec33b3b1b
changeset: 75886:5f0ec33b3b1b
parent: 75884:13cefcbcc7da
parent: 75883:8c1fd9276b25
user: Benjamin Peterson <benjamin [at] python>
date: Thu Mar 22 15:30:03 2012 -0400
summary:
merge 3.2

files:



--
Repository URL: http://hg.python.org/cpython


python-checkins at python

Mar 24, 2012, 9:40 AM

Post #177 of 192 (295 views)
Permalink
cpython (merge 3.2 -> default): merge 3.2 [In reply to]

http://hg.python.org/cpython/rev/79deef49082d
changeset: 75914:79deef49082d
parent: 75911:53a2488605e3
parent: 75913:ff679f22682b
user: Martin v. Löwis <martin [at] v>
date: Sat Mar 24 17:40:50 2012 +0100
summary:
merge 3.2

files:
Doc/howto/cporting.rst | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)


diff --git a/Doc/howto/cporting.rst b/Doc/howto/cporting.rst
--- a/Doc/howto/cporting.rst
+++ b/Doc/howto/cporting.rst
@@ -257,7 +257,7 @@
returns failure. (Since there's no way to store a name
in a CObject, noisy failure of :c:func:`PyCapsule_SetName`
was deemed preferable to silent failure here. If this is
- inconveient, feel free to modify your local
+ inconvenient, feel free to modify your local
copy as you see fit.)

You can find :file:`capsulethunk.h` in the Python source distribution

--
Repository URL: http://hg.python.org/cpython


python-checkins at python

Mar 25, 2012, 7:42 PM

Post #178 of 192 (296 views)
Permalink
cpython (merge 3.2 -> default): merge 3.2 [In reply to]

http://hg.python.org/cpython/rev/51016ff7f8c9
changeset: 75942:51016ff7f8c9
parent: 75939:f8d01c8baf6a
parent: 75941:66117d4bb586
user: Benjamin Peterson <benjamin [at] python>
date: Sun Mar 25 22:41:16 2012 -0400
summary:
merge 3.2

files:
Objects/unicodeobject.c | 4 ----
1 files changed, 0 insertions(+), 4 deletions(-)


diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c
--- a/Objects/unicodeobject.c
+++ b/Objects/unicodeobject.c
@@ -13173,10 +13173,6 @@
}

static PyMethodDef unicode_methods[] = {
-
- /* Order is according to common usage: often used methods should
- appear first, since lookup is done sequentially. */
-
{"encode", (PyCFunction) unicode_encode, METH_VARARGS | METH_KEYWORDS, encode__doc__},
{"replace", (PyCFunction) unicode_replace, METH_VARARGS, replace__doc__},
{"split", (PyCFunction) unicode_split, METH_VARARGS | METH_KEYWORDS, split__doc__},

--
Repository URL: http://hg.python.org/cpython


python-checkins at python

Apr 1, 2012, 3:51 PM

Post #179 of 192 (291 views)
Permalink
cpython (merge 3.2 -> default): merge 3.2 [In reply to]

http://hg.python.org/cpython/rev/1c80a7bcbd6b
changeset: 76060:1c80a7bcbd6b
parent: 76055:1f5701ffa077
parent: 76059:d746ffc34e0f
user: Benjamin Peterson <benjamin [at] python>
date: Sun Apr 01 18:51:37 2012 -0400
summary:
merge 3.2

files:
Objects/typeobject.c | 22 +++++++++-------------
1 files changed, 9 insertions(+), 13 deletions(-)


diff --git a/Objects/typeobject.c b/Objects/typeobject.c
--- a/Objects/typeobject.c
+++ b/Objects/typeobject.c
@@ -490,26 +490,22 @@
for (i = 0; i < PyTuple_GET_SIZE(value); i++) {
ob = PyTuple_GET_ITEM(value, i);
if (!PyType_Check(ob)) {
- PyErr_Format(
- PyExc_TypeError,
- "%s.__bases__ must be tuple of classes, not '%s'",
- type->tp_name, Py_TYPE(ob)->tp_name);
- return -1;
+ PyErr_Format(PyExc_TypeError,
+ "%s.__bases__ must be tuple of classes, not '%s'",
+ type->tp_name, Py_TYPE(ob)->tp_name);
+ return -1;
}
- if (PyType_Check(ob)) {
- if (PyType_IsSubtype((PyTypeObject*)ob, type)) {
- PyErr_SetString(PyExc_TypeError,
- "a __bases__ item causes an inheritance cycle");
- return -1;
- }
+ if (PyType_IsSubtype((PyTypeObject*)ob, type)) {
+ PyErr_SetString(PyExc_TypeError,
+ "a __bases__ item causes an inheritance cycle");
+ return -1;
}
}

new_base = best_base(value);

- if (!new_base) {
+ if (!new_base)
return -1;
- }

if (!compatible_for_assignment(type->tp_base, new_base, "__bases__"))
return -1;

--
Repository URL: http://hg.python.org/cpython


python-checkins at python

Apr 2, 2012, 8:28 AM

Post #180 of 192 (290 views)
Permalink
cpython (merge 3.2 -> default): merge 3.2 [In reply to]

http://hg.python.org/cpython/rev/b92e34c1e07c
changeset: 76069:b92e34c1e07c
parent: 76065:883689757a2e
parent: 76068:60ad83716733
user: Benjamin Peterson <benjamin [at] python>
date: Mon Apr 02 11:28:49 2012 -0400
summary:
merge 3.2

files:
Lib/test/test_thread.py | 24 ++++++++++++++++++++++++
Misc/NEWS | 3 +++
Modules/_threadmodule.c | 3 +++
3 files changed, 30 insertions(+), 0 deletions(-)


diff --git a/Lib/test/test_thread.py b/Lib/test/test_thread.py
--- a/Lib/test/test_thread.py
+++ b/Lib/test/test_thread.py
@@ -128,6 +128,30 @@
time.sleep(0.01)
self.assertEqual(thread._count(), orig)

+ def test_save_exception_state_on_error(self):
+ # See issue #14474
+ def task():
+ started.release()
+ sys.stderr = stderr
+ raise SyntaxError
+ def mywrite(self, *args):
+ try:
+ raise ValueError
+ except ValueError:
+ pass
+ real_write(self, *args)
+ c = thread._count()
+ started = thread.allocate_lock()
+ with support.captured_output("stderr") as stderr:
+ real_write = stderr.write
+ stderr.write = mywrite
+ started.acquire()
+ thread.start_new_thread(task, ())
+ started.acquire()
+ while thread._count() > c:
+ pass
+ self.assertIn("Traceback", stderr.getvalue())
+

class Barrier:
def __init__(self, num_threads):
diff --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -10,6 +10,9 @@
Core and Builtins
-----------------

+- Issue #14474: Save and restore exception state in thread.start_new_thread()
+ while writing error message if the thread leaves a unhandled exception.
+
- Issue #13019: Fix potential reference leaks in bytearray.extend(). Patch
by Suman Saha.

diff --git a/Modules/_threadmodule.c b/Modules/_threadmodule.c
--- a/Modules/_threadmodule.c
+++ b/Modules/_threadmodule.c
@@ -1001,14 +1001,17 @@
PyErr_Clear();
else {
PyObject *file;
+ PyObject *exc, *value, *tb;
PySys_WriteStderr(
"Unhandled exception in thread started by ");
+ PyErr_Fetch(&exc, &value, &tb);
file = PySys_GetObject("stderr");
if (file != NULL && file != Py_None)
PyFile_WriteObject(boot->func, file, 0);
else
PyObject_Print(boot->func, stderr, 0);
PySys_WriteStderr("\n");
+ PyErr_Restore(exc, value, tb);
PyErr_PrintEx(0);
}
}

--
Repository URL: http://hg.python.org/cpython


python-checkins at python

Apr 2, 2012, 11:26 AM

Post #181 of 192 (289 views)
Permalink
cpython (merge 3.2 -> default): merge 3.2 [In reply to]

http://hg.python.org/cpython/rev/e97940f701be
changeset: 76076:e97940f701be
parent: 76073:09cff57b5541
parent: 76075:98ab6e322c40
user: Benjamin Peterson <benjamin [at] python>
date: Mon Apr 02 14:25:55 2012 -0400
summary:
merge 3.2

files:
Lib/test/test_thread.py | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)


diff --git a/Lib/test/test_thread.py b/Lib/test/test_thread.py
--- a/Lib/test/test_thread.py
+++ b/Lib/test/test_thread.py
@@ -132,7 +132,6 @@
# See issue #14474
def task():
started.release()
- sys.stderr = stderr
raise SyntaxError
def mywrite(self, *args):
try:

--
Repository URL: http://hg.python.org/cpython


python-checkins at python

Apr 2, 2012, 9:35 PM

Post #182 of 192 (287 views)
Permalink
cpython (merge 3.2 -> default): merge 3.2 [In reply to]

http://hg.python.org/cpython/rev/ff7587546a1d
changeset: 76085:ff7587546a1d
parent: 76076:e97940f701be
parent: 76084:43606a4085b0
user: Benjamin Peterson <benjamin [at] python>
date: Tue Apr 03 00:35:36 2012 -0400
summary:
merge 3.2

files:
Python/pythonrun.c | 57 ++++++++++++++++++++-------------
1 files changed, 34 insertions(+), 23 deletions(-)


diff --git a/Python/pythonrun.c b/Python/pythonrun.c
--- a/Python/pythonrun.c
+++ b/Python/pythonrun.c
@@ -1356,56 +1356,67 @@
_Py_IDENTIFIER(offset);
_Py_IDENTIFIER(text);

+ *message = NULL;
+
/* new style errors. `err' is an instance */
-
- if (! (v = _PyObject_GetAttrId(err, &PyId_msg)))
- goto finally;
- *message = v;
-
- if (!(v = _PyObject_GetAttrId(err, &PyId_filename)))
- goto finally;
- if (v == Py_None)
- *filename = NULL;
- else if (! (*filename = _PyUnicode_AsString(v)))
+ *message = _PyObject_GetAttrId(err, &PyId_msg);
+ if (!*message)
goto finally;

- Py_DECREF(v);
- if (!(v = _PyObject_GetAttrId(err, &PyId_lineno)))
+ v = _PyObject_GetAttrId(err, &PyId_filename);
+ if (!v)
+ goto finally;
+ if (v == Py_None) {
+ Py_DECREF(v);
+ *filename = NULL;
+ }
+ else {
+ *filename = _PyUnicode_AsString(v);
+ Py_DECREF(v);
+ if (!*filename)
+ goto finally;
+ }
+
+ v = _PyObject_GetAttrId(err, &PyId_lineno);
+ if (!v)
goto finally;
hold = PyLong_AsLong(v);
Py_DECREF(v);
- v = NULL;
if (hold < 0 && PyErr_Occurred())
goto finally;
*lineno = (int)hold;

- if (!(v = _PyObject_GetAttrId(err, &PyId_offset)))
+ v = _PyObject_GetAttrId(err, &PyId_offset);
+ if (!v)
goto finally;
if (v == Py_None) {
*offset = -1;
Py_DECREF(v);
- v = NULL;
} else {
hold = PyLong_AsLong(v);
Py_DECREF(v);
- v = NULL;
if (hold < 0 && PyErr_Occurred())
goto finally;
*offset = (int)hold;
}

- if (!(v = _PyObject_GetAttrId(err, &PyId_text)))
+ v = _PyObject_GetAttrId(err, &PyId_text);
+ if (!v)
goto finally;
- if (v == Py_None)
+ if (v == Py_None) {
+ Py_DECREF(v);
*text = NULL;
- else if (!PyUnicode_Check(v) ||
- !(*text = _PyUnicode_AsString(v)))
- goto finally;
- Py_DECREF(v);
+ }
+ else {
+ *text = _PyUnicode_AsString(v);
+ Py_DECREF(v);
+ if (!*text)
+ goto finally;
+ }
return 1;

finally:
- Py_XDECREF(v);
+ Py_XDECREF(*message);
return 0;
}


--
Repository URL: http://hg.python.org/cpython


python-checkins at python

Apr 5, 2012, 7:57 PM

Post #183 of 192 (286 views)
Permalink
cpython (merge 3.2 -> default): merge 3.2 [In reply to]

http://hg.python.org/cpython/rev/9506e636bd9f
changeset: 76133:9506e636bd9f
parent: 76132:ec3e0f1a3b8d
parent: 76130:acea9d95a6d8
user: Benjamin Peterson <benjamin [at] python>
date: Thu Apr 05 22:57:10 2012 -0400
summary:
merge 3.2

files:
Doc/library/threading.rst | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)


diff --git a/Doc/library/threading.rst b/Doc/library/threading.rst
--- a/Doc/library/threading.rst
+++ b/Doc/library/threading.rst
@@ -452,7 +452,7 @@
are blocked waiting for the lock to become unlocked, allow exactly one of them
to proceed.

- When invoked on an unlocked lock, a :exc:`RuntimeError` is raised.
+ When invoked on an unlocked lock, a :exc:`ThreadError` is raised.

There is no return value.


--
Repository URL: http://hg.python.org/cpython


python-checkins at python

Apr 6, 2012, 10:21 AM

Post #184 of 192 (283 views)
Permalink
cpython (merge 3.2 -> default): merge 3.2 [In reply to]

http://hg.python.org/cpython/rev/a0a4b99182ad
changeset: 76145:a0a4b99182ad
parent: 76139:fbbb14604e94
parent: 76144:6020f4d20f99
user: Benjamin Peterson <benjamin [at] python>
date: Fri Apr 06 13:20:16 2012 -0400
summary:
merge 3.2

files:
.hgtags | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)


diff --git a/.hgtags b/.hgtags
--- a/.hgtags
+++ b/.hgtags
@@ -78,6 +78,8 @@
32fcb9e94985cb19ce37ba9543f091c0dbe9d7dd v3.1.4rc1
c918ec9f3a76d6afedfbb5d455004de880443a3d v3.1.4
ee26aca3219cf4bb0b93352e83edcc9cb28c7802 v3.1.5rc1
+75db2bc69fc9a3e4801e94e3e19801cb096208d8 v3.1.5rc2
+7395330e495ec3316862ca1f6ce0aaf7bdf6785b v3.1.5
b37b7834757492d009b99cf0ca4d42d2153d7fac v3.2a1
56d4373cecb73c8b45126ba7b045b3c7b3f94b0b v3.2a2
da012d9a2c23d144e399d2e01a55b8a83ad94573 v3.2a3

--
Repository URL: http://hg.python.org/cpython


python-checkins at python

Apr 6, 2012, 10:21 AM

Post #185 of 192 (281 views)
Permalink
cpython (merge 3.2 -> default): merge 3.2 [In reply to]

http://hg.python.org/cpython/rev/388016438a50
changeset: 76148:388016438a50
parent: 76146:7e041dd3f496
parent: 76147:5b68fd4246fc
user: Benjamin Peterson <benjamin [at] python>
date: Fri Apr 06 13:20:49 2012 -0400
summary:
merge 3.2

files:



--
Repository URL: http://hg.python.org/cpython


python-checkins at python

Apr 9, 2012, 12:06 PM

Post #186 of 192 (282 views)
Permalink
cpython (merge 3.2 -> default): merge 3.2 [In reply to]

http://hg.python.org/cpython/rev/bada51b0c408
changeset: 76196:bada51b0c408
parent: 76194:211aded9df41
parent: 76195:aa6f9ab45da8
user: Benjamin Peterson <benjamin [at] python>
date: Mon Apr 09 15:05:47 2012 -0400
summary:
merge 3.2

files:



--
Repository URL: http://hg.python.org/cpython


python-checkins at python

Apr 11, 2012, 9:36 AM

Post #187 of 192 (279 views)
Permalink
cpython (merge 3.2 -> default): Merge 3.2 [In reply to]

http://hg.python.org/cpython/rev/e5cca3cdf210
changeset: 76243:e5cca3cdf210
parent: 76241:751c7b81f6ee
parent: 76240:6b9e24539a70
user: Georg Brandl <georg [at] python>
date: Wed Apr 11 18:36:46 2012 +0200
summary:
Merge 3.2

files:
.hgtags | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)


diff --git a/.hgtags b/.hgtags
--- a/.hgtags
+++ b/.hgtags
@@ -98,5 +98,6 @@
137e45f15c0bd262c9ad4c032d97425bc0589456 v3.2.2
7085403daf439adb3f9e70ef13f6bedb1c447376 v3.2.3rc1
428f05cb7277e1d42bb9dd8d1af6b6270ebc6112 v3.2.3rc2
+3d0686d90f55a78f96d9403da2c52dc2411419d0 v3.2.3
f1a9a6505731714f0e157453ff850e3b71615c45 v3.3.0a1
2f69db52d6de306cdaef0a0cc00cc823fb350b01 v3.3.0a2

--
Repository URL: http://hg.python.org/cpython


python-checkins at python

Apr 13, 2012, 8:59 AM

Post #188 of 192 (273 views)
Permalink
cpython (merge 3.2 -> default): merge 3.2 [In reply to]

http://hg.python.org/cpython/rev/4d1349013dd4
changeset: 76286:4d1349013dd4
parent: 76284:a6236a68212e
parent: 76285:5cc359804d61
user: Benjamin Peterson <benjamin [at] python>
date: Fri Apr 13 11:59:52 2012 -0400
summary:
merge 3.2

files:
Python/pystate.c | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)


diff --git a/Python/pystate.c b/Python/pystate.c
--- a/Python/pystate.c
+++ b/Python/pystate.c
@@ -22,6 +22,9 @@
#endif
#endif

+#ifdef __cplusplus
+extern "C" {
+#endif

#ifdef WITH_THREAD
#include "pythread.h"
@@ -30,10 +33,6 @@
#define HEAD_LOCK() PyThread_acquire_lock(head_mutex, WAIT_LOCK)
#define HEAD_UNLOCK() PyThread_release_lock(head_mutex)

-#ifdef __cplusplus
-extern "C" {
-#endif
-
/* The single PyInterpreterState used by this process'
GILState implementation
*/

--
Repository URL: http://hg.python.org/cpython


python-checkins at python

Apr 13, 2012, 3:07 PM

Post #189 of 192 (274 views)
Permalink
cpython (merge 3.2 -> default): merge 3.2 [In reply to]

http://hg.python.org/cpython/rev/6d239e55e65a
changeset: 76292:6d239e55e65a
parent: 76290:06c4792143ab
parent: 76291:49f52d14b65c
user: Benjamin Peterson <benjamin [at] python>
date: Fri Apr 13 18:06:42 2012 -0400
summary:
merge 3.2

files:
Python/pystate.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)


diff --git a/Python/pystate.c b/Python/pystate.c
--- a/Python/pystate.c
+++ b/Python/pystate.c
@@ -726,10 +726,10 @@
PyEval_SaveThread();
}

+#endif /* WITH_THREAD */
+
#ifdef __cplusplus
}
#endif

-#endif /* WITH_THREAD */

-

--
Repository URL: http://hg.python.org/cpython


python-checkins at python

Apr 18, 2012, 8:26 AM

Post #190 of 192 (266 views)
Permalink
cpython (merge 3.2 -> default): merge 3.2 [In reply to]

http://hg.python.org/cpython/rev/220efaf42216
changeset: 76397:220efaf42216
parent: 76394:0695f5d028a7
parent: 76396:d368cc86dbc9
user: Benjamin Peterson <benjamin [at] python>
date: Wed Apr 18 11:26:02 2012 -0400
summary:
merge 3.2

files:
Misc/NEWS | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)


diff --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -19,7 +19,7 @@
- Issue #14592: Attempting a relative import w/o __package__ or __name__ set in
globals raises a KeyError.

-- Issue #14607: Fix defaults keyword-only arguments which started with ``__``.
+- Issue #14607: Fix keyword-only arguments which started with ``__``.

- Issue #10854: The ImportError raised when an extension module on Windows
fails to import now uses the new path and name attributes from

--
Repository URL: http://hg.python.org/cpython


python-checkins at python

Apr 23, 2012, 7:09 AM

Post #191 of 192 (252 views)
Permalink
cpython (merge 3.2 -> default): merge 3.2 [In reply to]

http://hg.python.org/cpython/rev/b1bd900cc723
changeset: 76482:b1bd900cc723
parent: 76478:1da623513b26
parent: 76481:1040e3811485
user: Benjamin Peterson <benjamin [at] python>
date: Mon Apr 23 10:08:20 2012 -0400
summary:
merge 3.2

files:
Lib/test/test_thread.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)


diff --git a/Lib/test/test_thread.py b/Lib/test/test_thread.py
--- a/Lib/test/test_thread.py
+++ b/Lib/test/test_thread.py
@@ -148,7 +148,7 @@
thread.start_new_thread(task, ())
started.acquire()
while thread._count() > c:
- pass
+ time.sleep(0.01)
self.assertIn("Traceback", stderr.getvalue())



--
Repository URL: http://hg.python.org/cpython


python-checkins at python

Apr 23, 2012, 8:26 AM

Post #192 of 192 (249 views)
Permalink
cpython (merge 3.2 -> default): merge 3.2 [In reply to]

http://hg.python.org/cpython/rev/9a84cab7ff9d
changeset: 76488:9a84cab7ff9d
parent: 76485:6e5855854a2e
parent: 76486:505828be1711
user: Benjamin Peterson <benjamin [at] python>
date: Mon Apr 23 11:25:49 2012 -0400
summary:
merge 3.2

files:
Misc/ACKS | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)


diff --git a/Misc/ACKS b/Misc/ACKS
--- a/Misc/ACKS
+++ b/Misc/ACKS
@@ -933,6 +933,7 @@
Denis Severson
Ian Seyer
Ha Shao
+Mark Shannon
Richard Shapiro
Bruce Sherwood
Alexander Shigin

--
Repository URL: http://hg.python.org/cpython

First page Previous page 1 2 3 4 5 6 7 8 Next page Last page  View All Python checkins RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.