[Jython-checkins] jython (merge 2.5 -> default): merge 2.5
philip.jenvey
jython-checkins at python.org
Fri Feb 8 21:01:17 CET 2013
http://hg.python.org/jython/rev/a8b0a3007ed3
changeset: 7014:a8b0a3007ed3
parent: 7010:f29453ef0415
parent: 7013:f9c6dc60c4eb
user: Philip Jenvey <pjenvey at underboss.org>
date: Fri Feb 08 12:00:57 2013 -0800
summary:
merge 2.5
files:
.hgtags | 1 +
Lib/test/test_threading_jy.py | 9 ++++++
NEWS | 4 ++
src/org/python/modules/_threading/Condition.java | 14 ++++++---
4 files changed, 23 insertions(+), 5 deletions(-)
diff --git a/.hgtags b/.hgtags
--- a/.hgtags
+++ b/.hgtags
@@ -63,3 +63,4 @@
4f5e3c12edc040058d724d4469a53e8649e64420 v2.7.0a1
ac5609677c1382f14d0e04178fe6dd4108e4c231 v2.7.0a2
3d2dbae23c5292b7f31ac4c92fa6d1afd8bd8eb2 v2.5.3
+f5b12dc4ff970c9594c99fc895772958c4a669a0 v2.5.4rc1
diff --git a/Lib/test/test_threading_jy.py b/Lib/test/test_threading_jy.py
--- a/Lib/test/test_threading_jy.py
+++ b/Lib/test/test_threading_jy.py
@@ -43,6 +43,15 @@
def _sleep(self, n):
time.sleep(random.random())
+ def test_issue1988(self):
+ cond = threading.Condition(threading.Lock())
+ locked = False
+ try:
+ locked = cond.acquire(False)
+ finally:
+ if locked:
+ cond.release()
+
class TwistedTestCase(unittest.TestCase):
diff --git a/NEWS b/NEWS
--- a/NEWS
+++ b/NEWS
@@ -35,6 +35,10 @@
Bugs Fixed
- [ 1880 ] Sha 224 library not present in Jython
+Jython 2.5.4rc2
+ Bugs Fixed
+ - [ 1988 ] API for threading.condition fails to accept *args for acquire
+
Jython 2.5.4rc1
Bugs Fixed
- [ 1936 ] JBoss 7, vfs protocol in use for jarFileName in PySystemState.
diff --git a/src/org/python/modules/_threading/Condition.java b/src/org/python/modules/_threading/Condition.java
--- a/src/org/python/modules/_threading/Condition.java
+++ b/src/org/python/modules/_threading/Condition.java
@@ -38,12 +38,16 @@
}
public boolean acquire() {
- return Condition_acquire();
+ return Condition_acquire(true);
}
- @ExposedMethod
- final boolean Condition_acquire() {
- return _lock.acquire();
+ public boolean acquire(boolean blocking) {
+ return Condition_acquire(blocking);
+ }
+
+ @ExposedMethod(defaults = "true")
+ final boolean Condition_acquire(boolean blocking) {
+ return _lock.acquire(blocking);
}
public PyObject __enter__(ThreadState ts) {
@@ -53,7 +57,7 @@
@ExposedMethod
final PyObject Condition___enter__() {
- Condition_acquire();
+ Condition_acquire(true);
return this;
}
--
Repository URL: http://hg.python.org/jython
More information about the Jython-checkins
mailing list