Screenshot instructions:
Windows
Mac
Red Hat Linux
Ubuntu
Click URL instructions:
Right-click on ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)
You can subscribe to this list here.
2000 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
(107) |
Dec
(67) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2001 |
Jan
(76) |
Feb
(125) |
Mar
(72) |
Apr
(13) |
May
(18) |
Jun
(12) |
Jul
(129) |
Aug
(47) |
Sep
(1) |
Oct
(36) |
Nov
(128) |
Dec
(124) |
2002 |
Jan
(59) |
Feb
|
Mar
(14) |
Apr
(14) |
May
(72) |
Jun
(9) |
Jul
(3) |
Aug
(5) |
Sep
(18) |
Oct
(65) |
Nov
(28) |
Dec
(12) |
2003 |
Jan
(10) |
Feb
(2) |
Mar
(4) |
Apr
(33) |
May
(21) |
Jun
(9) |
Jul
(29) |
Aug
(34) |
Sep
(4) |
Oct
(8) |
Nov
(15) |
Dec
(4) |
2004 |
Jan
(26) |
Feb
(12) |
Mar
(11) |
Apr
(9) |
May
(7) |
Jun
|
Jul
(5) |
Aug
|
Sep
(3) |
Oct
(7) |
Nov
(1) |
Dec
(10) |
2005 |
Jan
(2) |
Feb
(72) |
Mar
(16) |
Apr
(39) |
May
(48) |
Jun
(97) |
Jul
(57) |
Aug
(13) |
Sep
(16) |
Oct
(24) |
Nov
(100) |
Dec
(24) |
2006 |
Jan
(15) |
Feb
(34) |
Mar
(33) |
Apr
(31) |
May
(79) |
Jun
(64) |
Jul
(41) |
Aug
(64) |
Sep
(31) |
Oct
(46) |
Nov
(55) |
Dec
(37) |
2007 |
Jan
(32) |
Feb
(61) |
Mar
(11) |
Apr
(58) |
May
(46) |
Jun
(30) |
Jul
(94) |
Aug
(93) |
Sep
(86) |
Oct
(69) |
Nov
(125) |
Dec
(177) |
2008 |
Jan
(169) |
Feb
(97) |
Mar
(74) |
Apr
(113) |
May
(120) |
Jun
(334) |
Jul
(215) |
Aug
(237) |
Sep
(72) |
Oct
(189) |
Nov
(126) |
Dec
(160) |
2009 |
Jan
(180) |
Feb
(45) |
Mar
(98) |
Apr
(140) |
May
(151) |
Jun
(71) |
Jul
(107) |
Aug
(119) |
Sep
(73) |
Oct
(121) |
Nov
(14) |
Dec
(6) |
2010 |
Jan
(13) |
Feb
(9) |
Mar
(10) |
Apr
(64) |
May
(3) |
Jun
(16) |
Jul
(7) |
Aug
(23) |
Sep
(17) |
Oct
(37) |
Nov
(5) |
Dec
(8) |
2011 |
Jan
(10) |
Feb
(11) |
Mar
(77) |
Apr
(11) |
May
(2) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
S | M | T | W | T | F | S |
---|---|---|---|---|---|---|
|
|
|
|
|
|
1
(3) |
2
(4) |
3
(2) |
4
(5) |
5
|
6
(2) |
7
|
8
|
9
(1) |
10
(24) |
11
(3) |
12
(1) |
13
(2) |
14
(1) |
15
|
16
(18) |
17
(9) |
18
(2) |
19
(4) |
20
|
21
(3) |
22
(7) |
23
(6) |
24
(3) |
25
(1) |
26
(5) |
27
|
28
|
29
(2) |
30
(5) |
31
(6) |
|
|
|
|
|
From: <leosoto@us...> - 2009-08-24 03:30:36
|
Revision: 6717 http://jython.svn.sourceforge.net/jython/?rev=6717&view=rev Author: leosoto Date: 2009-08-24 03:30:29 +0000 (Mon, 24 Aug 2009) Log Message: ----------- Fixing typo in org.pyton.modules.thread.thread docs Modified Paths: -------------- trunk/jython/src/org/python/modules/thread/thread.java Modified: trunk/jython/src/org/python/modules/thread/thread.java =================================================================== --- trunk/jython/src/org/python/modules/thread/thread.java 2009-08-24 00:10:42 UTC (rev 6716) +++ trunk/jython/src/org/python/modules/thread/thread.java 2009-08-24 03:30:29 UTC (rev 6717) @@ -64,7 +64,7 @@ /** * Interrupts all running threads spawned by the thread module. * - * This works in conjuntion with:<ul> + * This works in conjunction with:<ul> * <li>{@link PyTableCode#call(org.python.core.PyFrame, PyObject)}: * checks for the interrupted status of the current thread and raise * a SystemRestart exception if a interruption is detected.</li> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wmeissner@us...> - 2009-08-24 00:19:54
|
Revision: 6715 http://jython.svn.sourceforge.net/jython/?rev=6715&view=rev Author: wmeissner Date: 2009-08-23 22:47:12 +0000 (Sun, 23 Aug 2009) Log Message: ----------- Add jffi-Darwin.jar to build Modified Paths: -------------- branches/ctypes-jffi/build.xml Modified: branches/ctypes-jffi/build.xml =================================================================== --- branches/ctypes-jffi/build.xml 2009-08-23 22:46:49 UTC (rev 6714) +++ branches/ctypes-jffi/build.xml 2009-08-23 22:47:12 UTC (rev 6715) @@ -193,6 +193,7 @@ <pathelement path="${extlibs.dir}/jna.jar"/> <pathelement path="${extlibs.dir}/jna-posix.jar"/> <pathelement path="${extlibs.dir}/jffi.jar"/> + <pathelement path="${extlibs.dir}/jffi-Darwin.jar"/> <pathelement path="${extlibs.dir}/jffi-i386-SunOS.jar"/> <pathelement path="${extlibs.dir}/jffi-x86_64-SunOS.jar"/> </path> @@ -574,6 +575,7 @@ <rule pattern="org.objectweb.asm.**" result="org.python.objectweb.asm.@..."/> <zipfileset src="extlibs/jna.jar"/> <zipfileset src="extlibs/jffi.jar"/> + <zipfileset src="extlibs/jffi-Darwin.jar"/> <zipfileset src="extlibs/jffi-i386-SunOS.jar"/> <zipfileset src="extlibs/jffi-x86_64-SunOS.jar"/> <zipfileset src="extlibs/jna-posix.jar"/> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cgroves@us...> - 2009-08-24 00:11:03
|
Revision: 6716 http://jython.svn.sourceforge.net/jython/?rev=6716&view=rev Author: cgroves Date: 2009-08-24 00:10:42 +0000 (Mon, 24 Aug 2009) Log Message: ----------- Split out visiting and adding a method in a proxy, add a proxy maker that requires all abstract and interface methods be implemented in the Python class, and another overrides all possible superclass methods to allow the Python to method assignment and lookup at runtime. Modified Paths: -------------- branches/customizable-proxymaker/Lib/javaproxymaker.py branches/customizable-proxymaker/Lib/test/test_javaproxymaker.py branches/customizable-proxymaker/src/org/python/compiler/AdapterMaker.java branches/customizable-proxymaker/src/org/python/compiler/JavaMaker.java branches/customizable-proxymaker/src/org/python/compiler/ProxyMaker.java Modified: branches/customizable-proxymaker/Lib/javaproxymaker.py =================================================================== --- branches/customizable-proxymaker/Lib/javaproxymaker.py 2009-08-23 22:47:12 UTC (rev 6715) +++ branches/customizable-proxymaker/Lib/javaproxymaker.py 2009-08-24 00:10:42 UTC (rev 6716) @@ -1,8 +1,33 @@ +from java.lang.reflect import Modifier from org.python.compiler import JavaMaker as NamedProxyMaker def make_proxynamer(classname): + '''Creates a callable for use in __proxymaker__ that names the generated classes the given name + + If the given name is an invalid Java class name, an exception will be raised at class definition + time.''' def make_proxymaker(superclass, interfaces, pythonClassName, pythonClassDict): proxymaker = NamedProxyMaker(superclass, interfaces, pythonClassName, pythonClassDict) proxymaker.proxyClassName = classname return proxymaker return make_proxymaker + +class StrictProxyMaker(NamedProxyMaker): + '''Requires the Python class implement every abstract or interface Java method. + + If the Python class doesn't have a definition for an abstract or interface method on the class + itself, a TypeError will be raised at class definition time.''' + def visitMethod(self, meth): + if Modifier.isAbstract(meth.modifiers) and not meth.name in self.dict: + raise TypeError("%s must implement %s for %s" % + (self.proxyClassName, meth.name, meth.declaringClass)) + self.super__visitMethod(meth) + +class AllMethodProxyMaker(NamedProxyMaker): + '''Implements every overridable method in the proxy class + + This means that if a Python class doesn't implement a method in its definition, it can still + handle it from __getattribute__ unlike from regular proxy classes. Also, if the overriden + method is abstract and isn't handled by the Python class, a noop return will be performed.''' + def visitMethod(self, meth): + self.addMethod(meth) Modified: branches/customizable-proxymaker/Lib/test/test_javaproxymaker.py =================================================================== --- branches/customizable-proxymaker/Lib/test/test_javaproxymaker.py 2009-08-23 22:47:12 UTC (rev 6715) +++ branches/customizable-proxymaker/Lib/test/test_javaproxymaker.py 2009-08-24 00:10:42 UTC (rev 6716) @@ -8,9 +8,11 @@ from java.lang import Runnable -from javaproxymaker import make_proxynamer, NamedProxyMaker +from org.python.tests import Callbacker -class SettingJavaClassNameTest(unittest.TestCase): +from javaproxymaker import make_proxynamer, AllMethodProxyMaker, NamedProxyMaker, StrictProxyMaker + +class CustomProxyMakerTest(unittest.TestCase): def test_setting_name(self): class Fixedname(Runnable): __proxymaker__ = make_proxynamer('name.set.in.Python') @@ -34,6 +36,35 @@ except TypeError: pass + def test_strict_subclass(self): + try: + class NoRunRunnable(Runnable): + __proxymaker__ = StrictProxyMaker + self.fail("Not implementing Run should throw a TypeError") + except TypeError: + pass + class RunRunnable(Runnable): + __proxymaker__ = StrictProxyMaker + def run(self): + pass + + def test_all_method_subclass(self): + calls = [] + class RuntimeCallbacker(Callbacker.Callback): + __proxymaker__ = AllMethodProxyMaker + + def __getattribute__(self, name): + if name == 'call': + def call(arg=None): + calls.append(arg) + return call + else: + return getattr(self, name) + Callbacker.callNoArg(RuntimeCallbacker()) + self.assertEquals(None, calls[0]) + Callbacker.callOneArg(RuntimeCallbacker(), 12) + self.assertEquals(12, calls[1]) + class StaticProxyCompilationTest(unittest.TestCase): def setUp(self): self.orig_proxy_dir = sys.javaproxy_dir @@ -55,5 +86,4 @@ 0) def test_main(): - test_support.run_unittest(SettingJavaClassNameTest, - StaticProxyCompilationTest) + test_support.run_unittest(CustomProxyMakerTest, StaticProxyCompilationTest) Modified: branches/customizable-proxymaker/src/org/python/compiler/AdapterMaker.java =================================================================== --- branches/customizable-proxymaker/src/org/python/compiler/AdapterMaker.java 2009-08-23 22:47:12 UTC (rev 6715) +++ branches/customizable-proxymaker/src/org/python/compiler/AdapterMaker.java 2009-08-24 00:10:42 UTC (rev 6716) @@ -16,15 +16,15 @@ @Override protected void build() { classfile.addInterface(mapClass(interfaces[0])); - addMethods(interfaces[0], new HashSet<MethodDescr>()); - addConstructors(); + visitMethods(interfaces[0], new HashSet<MethodDescr>()); + visitConstructors(); for (String name : names) { classfile.addField(name, $pyObj, Opcodes.ACC_PUBLIC); } } @Override - protected void addMethod(Method method, int access) { + protected void addMethod(Method method) { Class<?>[] parameters = method.getParameterTypes(); Class<?> ret = method.getReturnType(); String name = method.getName(); Modified: branches/customizable-proxymaker/src/org/python/compiler/JavaMaker.java =================================================================== --- branches/customizable-proxymaker/src/org/python/compiler/JavaMaker.java 2009-08-23 22:47:12 UTC (rev 6715) +++ branches/customizable-proxymaker/src/org/python/compiler/JavaMaker.java 2009-08-24 00:10:42 UTC (rev 6716) @@ -69,14 +69,13 @@ } @Override - public void addMethod(Method method, int access) { - if (Modifier.isAbstract(access)) { - // TODO - Allow proxies to determine their handling of missing abstract methods - super.addMethod(method, access); + public void visitMethod(Method method) { + if (Modifier.isAbstract(method.getModifiers())) { + super.visitMethod(method); } else if (dict.__finditem__(method.getName().intern()) != null) { - super.addMethod(method, access); + super.visitMethod(method); } else if (Modifier.isProtected(method.getModifiers())) { - addSuperMethod(method, access); + addSuperMethod(method); } } Modified: branches/customizable-proxymaker/src/org/python/compiler/ProxyMaker.java =================================================================== --- branches/customizable-proxymaker/src/org/python/compiler/ProxyMaker.java 2009-08-23 22:47:12 UTC (rev 6715) +++ branches/customizable-proxymaker/src/org/python/compiler/ProxyMaker.java 2009-08-24 00:10:42 UTC (rev 6716) @@ -115,10 +115,10 @@ */ protected void build() { addProxy(); - addConstructors(); + visitConstructors(); classfile.addInterface("org/python/core/PyProxy"); - addMethods(); + visitMethods(); addClassDictInit(); } @@ -335,18 +335,13 @@ * <code>method</code> is abstract, the generated method will expect to find an object of the * method's name in the Python object and call it. If it isn't abstract, if an object is found * in the Python object, it'll be called. Otherwise the superclass will be called. - * - * @param modifier - the modifier to be used on the generated method. If the given modifier is - * abstract, that will be removed. */ - protected void addMethod(Method method, int modifier) { - boolean isAbstract = false; - if (Modifier.isAbstract(modifier)) { - modifier = modifier & ~Modifier.ABSTRACT; - isAbstract = true; - } + protected void addMethod(Method method) { + boolean isAbstract = Modifier.isAbstract(method.getModifiers()); + addMethod(method.getName(), method.getReturnType(), method.getParameterTypes(), - method.getExceptionTypes(), modifier, isAbstract ? null : method.getDeclaringClass()); + method.getExceptionTypes(), Modifier.PUBLIC, + isAbstract ? null : method.getDeclaringClass()); } /** @@ -394,7 +389,7 @@ code.label(callPython); code.aload(tmp); callMethod(code, name, parameters, ret, exceptions); - addSuperMethod("super__" + name, name, superClass, parameters, ret, access); + addSuperMethod("super__" + name, name, superClass, parameters, ret); } else { code.invokestatic("org/python/compiler/ProxyMaker", "findPython", makeSig($pyObj, $pyProxy, $str)); @@ -466,8 +461,12 @@ } } - protected void addMethods(Class<?> c, Set<MethodDescr> t) { - for (Method method : c.getDeclaredMethods()) { + /** + * Visits all methods declared on the given class and classes in its inheritance hierarchy. + * Methods visible to subclasses are added to <code>seen</code>. + */ + protected void visitMethods(Class<?> klass, Set<MethodDescr> seen) { + for (Method method : klass.getDeclaredMethods()) { int access = method.getModifiers(); if (Modifier.isStatic(access) || Modifier.isPrivate(access) || @@ -480,38 +479,40 @@ continue; } - if (!t.add(new MethodDescr(method))) { + if (!seen.add(new MethodDescr(method))) { // A method with the same signature has already been added, skip this. continue; } - if (Modifier.isNative(access)) { - access = access & ~Modifier.NATIVE; - } - // TODO - Track accessible final methods in their own Set, protect from overrides - if (Modifier.isProtected(access)) { - access = (access & ~Modifier.PROTECTED) | Modifier.PUBLIC; - if (Modifier.isFinal(access)) { - addSuperMethod(method, access); - continue; + if (Modifier.isFinal(access)) { + if (Modifier.isProtected(access)) { + addSuperMethod(method); } - } else if (Modifier.isFinal(access)) { continue; } - addMethod(method, access); + visitMethod(method); } - Class<?> sc = c.getSuperclass(); - if (sc != null) { - addMethods(sc, t); + Class<?> superClass = klass.getSuperclass(); + if (superClass != null) { + visitMethods(superClass, seen); } - for (Class<?> iface : c.getInterfaces()) { - addMethods(iface, t); + for (Class<?> iface : klass.getInterfaces()) { + visitMethods(iface, seen); } } + /** + * Called for every method on the proxy's superclass and interfaces that can be overriden by the + * proxy class. If the proxy wants to perform Python lookup and calling for the method, + * {@link #addMethod(Method)} should be called. For abstract methods, addMethod must be called. + */ + protected void visitMethod(Method method) { + addMethod(method); + } + /** Adds a constructor that calls through to superclass. */ protected void addConstructor(Class<?>[] parameters, int access) { String sig = makeSig(Void.TYPE, parameters); @@ -520,12 +521,11 @@ } /** - * Adds constructors from this proxy's superclass. + * Visits constructors from this proxy's superclass. */ - protected Set<ConstructorDescr> addConstructors() { + protected Set<ConstructorDescr> visitConstructors() { Set<ConstructorDescr> added = Generic.set(); - Constructor<?>[] constructors = superclass.getDeclaredConstructors(); - for (Constructor<?> constructor : constructors) { + for (Constructor<?> constructor : superclass.getDeclaredConstructors()) { int access = constructor.getModifiers(); if (Modifier.isPrivate(access)) { continue; @@ -556,25 +556,23 @@ // super__ prefix. This gives access to super. version or the // method. // - protected void addSuperMethod(Method method, int access) { + protected void addSuperMethod(Method method) { Class<?>[] parameters = method.getParameterTypes(); Class<?> ret = method.getReturnType(); String superClass = mapClass(method.getDeclaringClass()); String superName = method.getName(); String methodName = superName; - if (Modifier.isFinal(access)) { + if (Modifier.isFinal(method.getModifiers())) { methodName = "super__" + superName; - access &= ~Modifier.FINAL; } - addSuperMethod(methodName, superName, superClass, parameters, ret, access); + addSuperMethod(methodName, superName, superClass, parameters, ret); } protected void addSuperMethod(String methodName, String superName, String declClass, Class<?>[] parameters, - Class<?> ret, - int access) { + Class<?> ret) { if (methodName.startsWith("super__")) { /* rationale: JC java-class, P proxy-class subclassing JC in order to avoid infinite recursion P should define super__foo @@ -592,7 +590,7 @@ } } supernames.add(methodName); - Code code = classfile.addMethod(methodName, makeSig(ret, parameters), access); + Code code = classfile.addMethod(methodName, makeSig(ret, parameters), Modifier.PUBLIC); callSuper(code, superName, declClass, parameters, ret, true); } @@ -645,16 +643,16 @@ code.return_(); } - protected Set<MethodDescr> addMethods() { + protected Set<MethodDescr> visitMethods() { Set<MethodDescr> seenmethods = Generic.set(); - addMethods(superclass, seenmethods); + visitMethods(superclass, seenmethods); for (Class<?> iface : interfaces) { if (iface.isAssignableFrom(superclass)) { Py.writeWarning("compiler", "discarding redundant interface: " + iface.getName()); continue; } classfile.addInterface(mapClass(iface)); - addMethods(iface, seenmethods); + visitMethods(iface, seenmethods); } return seenmethods; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |