From: <fwi...@us...> - 2009-03-06 16:42:05
|
Revision: 6073 http://jython.svn.sourceforge.net/jython/?rev=6073&view=rev Author: fwierzbicki Date: 2009-03-06 16:15:19 +0000 (Fri, 06 Mar 2009) Log Message: ----------- Merged revisions 5752,5756-5758,5761-5763,5765-5775,5778-5816,5818-5840,5842-5847,5854,5857-5859,5863-5865,5869,5875,5877,5884-5885,5889-5893,5900-5901,5903-5906,5908,5912-5918,5920,5923,5925,5927,5930-5932,5934-5947,5950-5951,5953-5957,5959,5961,5965-5966,5971-5976,5978-5979,5981-5983,5992,6001,6003,6006-6014,6023,6031-6037,6039-6040,6045-6047,6049-6052,6061-6065,6071 via svnmerge from https://jython.svn.sourceforge.net/svnroot/jython/trunk/jython Modified Paths: -------------- branches/modjy/.classpath branches/modjy/CPythonLib.includes branches/modjy/CoreExposed.includes branches/modjy/LICENSE.txt branches/modjy/Lib/decimal.py branches/modjy/Lib/grp.py branches/modjy/Lib/marshal.py branches/modjy/Lib/new.py branches/modjy/Lib/os.py branches/modjy/Lib/platform.py branches/modjy/Lib/pwd.py branches/modjy/Lib/pydoc.py branches/modjy/Lib/site.py branches/modjy/Lib/socket.py branches/modjy/Lib/test/regrtest.py branches/modjy/Lib/test/string_tests.py branches/modjy/Lib/test/test_StringIO_jy.py branches/modjy/Lib/test/test_array.py branches/modjy/Lib/test/test_array_jy.py branches/modjy/Lib/test/test_builtin_jy.py branches/modjy/Lib/test/test_class_jy.py branches/modjy/Lib/test/test_cmd_line.py branches/modjy/Lib/test/test_codeop.py branches/modjy/Lib/test/test_descr_jy.py branches/modjy/Lib/test/test_eof_jy.py branches/modjy/Lib/test/test_func_syntax_jy.py branches/modjy/Lib/test/test_genexps_jy.py branches/modjy/Lib/test/test_grammar_jy.py branches/modjy/Lib/test/test_import_jy.py branches/modjy/Lib/test/test_java_integration.py branches/modjy/Lib/test/test_java_visibility.py branches/modjy/Lib/test/test_list_jy.py branches/modjy/Lib/test/test_select.py branches/modjy/Lib/test/test_socket.py branches/modjy/Lib/test/test_support.py branches/modjy/Lib/test/test_sys_jy.py branches/modjy/Lib/test/test_thread_jy.py branches/modjy/Lib/test/test_traceback.py branches/modjy/Lib/test/test_tuple.py branches/modjy/Lib/test/test_unicode_jy.py branches/modjy/Lib/test/test_zlib.py branches/modjy/Lib/threading.py branches/modjy/Lib/zlib.py branches/modjy/README.txt branches/modjy/ast/Python.asdl branches/modjy/ast/asdl_antlr.py branches/modjy/ast/astview.py branches/modjy/bugtests/README.txt branches/modjy/bugtests/test386.py branches/modjy/bugtests/test394.py branches/modjy/bugtests/test394jar/MANIFEST.MF branches/modjy/build.xml branches/modjy/extlibs/jna-posix.jar branches/modjy/grammar/Python.g branches/modjy/grammar/PythonPartial.g branches/modjy/registry branches/modjy/src/com/ziclix/python/sql/handler/RowIdHandler.java branches/modjy/src/org/python/antlr/GrammarActions.java branches/modjy/src/org/python/antlr/PythonTokenSource.java branches/modjy/src/org/python/antlr/adapter/AstAdapters.java branches/modjy/src/org/python/antlr/ast/AssertDerived.java branches/modjy/src/org/python/antlr/ast/AssignDerived.java branches/modjy/src/org/python/antlr/ast/AttributeDerived.java branches/modjy/src/org/python/antlr/ast/AugAssignDerived.java branches/modjy/src/org/python/antlr/ast/BinOpDerived.java branches/modjy/src/org/python/antlr/ast/BoolOpDerived.java branches/modjy/src/org/python/antlr/ast/BreakDerived.java branches/modjy/src/org/python/antlr/ast/CallDerived.java branches/modjy/src/org/python/antlr/ast/ClassDefDerived.java branches/modjy/src/org/python/antlr/ast/CompareDerived.java branches/modjy/src/org/python/antlr/ast/ContinueDerived.java branches/modjy/src/org/python/antlr/ast/DeleteDerived.java branches/modjy/src/org/python/antlr/ast/DictDerived.java branches/modjy/src/org/python/antlr/ast/EllipsisDerived.java branches/modjy/src/org/python/antlr/ast/ExceptHandler.java branches/modjy/src/org/python/antlr/ast/ExceptHandlerDerived.java branches/modjy/src/org/python/antlr/ast/ExecDerived.java branches/modjy/src/org/python/antlr/ast/ExprDerived.java branches/modjy/src/org/python/antlr/ast/ExpressionDerived.java branches/modjy/src/org/python/antlr/ast/ExtSliceDerived.java branches/modjy/src/org/python/antlr/ast/ForDerived.java branches/modjy/src/org/python/antlr/ast/FunctionDefDerived.java branches/modjy/src/org/python/antlr/ast/GeneratorExpDerived.java branches/modjy/src/org/python/antlr/ast/GlobalDerived.java branches/modjy/src/org/python/antlr/ast/IfDerived.java branches/modjy/src/org/python/antlr/ast/IfExpDerived.java branches/modjy/src/org/python/antlr/ast/ImportDerived.java branches/modjy/src/org/python/antlr/ast/ImportFromDerived.java branches/modjy/src/org/python/antlr/ast/IndexDerived.java branches/modjy/src/org/python/antlr/ast/InteractiveDerived.java branches/modjy/src/org/python/antlr/ast/LambdaDerived.java branches/modjy/src/org/python/antlr/ast/ListCompDerived.java branches/modjy/src/org/python/antlr/ast/ListDerived.java branches/modjy/src/org/python/antlr/ast/ModuleDerived.java branches/modjy/src/org/python/antlr/ast/NameDerived.java branches/modjy/src/org/python/antlr/ast/NumDerived.java branches/modjy/src/org/python/antlr/ast/PassDerived.java branches/modjy/src/org/python/antlr/ast/PrintDerived.java branches/modjy/src/org/python/antlr/ast/Raise.java branches/modjy/src/org/python/antlr/ast/RaiseDerived.java branches/modjy/src/org/python/antlr/ast/ReprDerived.java branches/modjy/src/org/python/antlr/ast/ReturnDerived.java branches/modjy/src/org/python/antlr/ast/SliceDerived.java branches/modjy/src/org/python/antlr/ast/StrDerived.java branches/modjy/src/org/python/antlr/ast/SubscriptDerived.java branches/modjy/src/org/python/antlr/ast/SuiteDerived.java branches/modjy/src/org/python/antlr/ast/TryExceptDerived.java branches/modjy/src/org/python/antlr/ast/TryFinallyDerived.java branches/modjy/src/org/python/antlr/ast/TupleDerived.java branches/modjy/src/org/python/antlr/ast/UnaryOpDerived.java branches/modjy/src/org/python/antlr/ast/WhileDerived.java branches/modjy/src/org/python/antlr/ast/WithDerived.java branches/modjy/src/org/python/antlr/ast/YieldDerived.java branches/modjy/src/org/python/antlr/ast/aliasDerived.java branches/modjy/src/org/python/antlr/ast/argumentsDerived.java branches/modjy/src/org/python/antlr/ast/comprehensionDerived.java branches/modjy/src/org/python/antlr/ast/keywordDerived.java branches/modjy/src/org/python/antlr/op/AddDerived.java branches/modjy/src/org/python/antlr/op/AndDerived.java branches/modjy/src/org/python/antlr/op/AugLoadDerived.java branches/modjy/src/org/python/antlr/op/AugStoreDerived.java branches/modjy/src/org/python/antlr/op/BitAndDerived.java branches/modjy/src/org/python/antlr/op/BitOrDerived.java branches/modjy/src/org/python/antlr/op/BitXorDerived.java branches/modjy/src/org/python/antlr/op/DelDerived.java branches/modjy/src/org/python/antlr/op/DivDerived.java branches/modjy/src/org/python/antlr/op/EqDerived.java branches/modjy/src/org/python/antlr/op/FloorDivDerived.java branches/modjy/src/org/python/antlr/op/GtDerived.java branches/modjy/src/org/python/antlr/op/GtEDerived.java branches/modjy/src/org/python/antlr/op/InDerived.java branches/modjy/src/org/python/antlr/op/InvertDerived.java branches/modjy/src/org/python/antlr/op/IsDerived.java branches/modjy/src/org/python/antlr/op/IsNotDerived.java branches/modjy/src/org/python/antlr/op/LShiftDerived.java branches/modjy/src/org/python/antlr/op/LoadDerived.java branches/modjy/src/org/python/antlr/op/LtDerived.java branches/modjy/src/org/python/antlr/op/LtEDerived.java branches/modjy/src/org/python/antlr/op/ModDerived.java branches/modjy/src/org/python/antlr/op/MultDerived.java branches/modjy/src/org/python/antlr/op/NotDerived.java branches/modjy/src/org/python/antlr/op/NotEqDerived.java branches/modjy/src/org/python/antlr/op/NotInDerived.java branches/modjy/src/org/python/antlr/op/OrDerived.java branches/modjy/src/org/python/antlr/op/ParamDerived.java branches/modjy/src/org/python/antlr/op/PowDerived.java branches/modjy/src/org/python/antlr/op/RShiftDerived.java branches/modjy/src/org/python/antlr/op/StoreDerived.java branches/modjy/src/org/python/antlr/op/SubDerived.java branches/modjy/src/org/python/antlr/op/UAddDerived.java branches/modjy/src/org/python/antlr/op/USubDerived.java branches/modjy/src/org/python/compiler/AdapterMaker.java branches/modjy/src/org/python/compiler/ClassFile.java branches/modjy/src/org/python/compiler/Code.java branches/modjy/src/org/python/compiler/CodeCompiler.java branches/modjy/src/org/python/compiler/Constant.java branches/modjy/src/org/python/compiler/Future.java branches/modjy/src/org/python/compiler/JavaMaker.java branches/modjy/src/org/python/compiler/Module.java branches/modjy/src/org/python/compiler/ProxyMaker.java branches/modjy/src/org/python/compiler/ScopeInfo.java branches/modjy/src/org/python/compiler/ScopesCompiler.java branches/modjy/src/org/python/core/AbstractArray.java branches/modjy/src/org/python/core/ArgParser.java branches/modjy/src/org/python/core/AstList.java branches/modjy/src/org/python/core/BaseSet.java branches/modjy/src/org/python/core/BytecodeLoader.java branches/modjy/src/org/python/core/CompilerFlags.java branches/modjy/src/org/python/core/JavaImporter.java branches/modjy/src/org/python/core/Options.java branches/modjy/src/org/python/core/ParserFacade.java branches/modjy/src/org/python/core/Py.java branches/modjy/src/org/python/core/PyArray.java branches/modjy/src/org/python/core/PyArrayDerived.java branches/modjy/src/org/python/core/PyBaseExceptionDerived.java branches/modjy/src/org/python/core/PyBoolean.java branches/modjy/src/org/python/core/PyBooleanDerived.java branches/modjy/src/org/python/core/PyBuiltinMethodNarrow.java branches/modjy/src/org/python/core/PyClassMethod.java branches/modjy/src/org/python/core/PyClassMethodDerived.java branches/modjy/src/org/python/core/PyComplex.java branches/modjy/src/org/python/core/PyComplexDerived.java branches/modjy/src/org/python/core/PyDictionary.java branches/modjy/src/org/python/core/PyDictionaryDerived.java branches/modjy/src/org/python/core/PyEnumerate.java branches/modjy/src/org/python/core/PyEnumerateDerived.java branches/modjy/src/org/python/core/PyException.java branches/modjy/src/org/python/core/PyFile.java branches/modjy/src/org/python/core/PyFileDerived.java branches/modjy/src/org/python/core/PyFloat.java branches/modjy/src/org/python/core/PyFloatDerived.java branches/modjy/src/org/python/core/PyFrame.java branches/modjy/src/org/python/core/PyFrozenSet.java branches/modjy/src/org/python/core/PyFrozenSetDerived.java branches/modjy/src/org/python/core/PyFunction.java branches/modjy/src/org/python/core/PyInstance.java branches/modjy/src/org/python/core/PyInteger.java branches/modjy/src/org/python/core/PyIntegerDerived.java branches/modjy/src/org/python/core/PyIterator.java branches/modjy/src/org/python/core/PyJavaPackage.java branches/modjy/src/org/python/core/PyJavaType.java branches/modjy/src/org/python/core/PyList.java branches/modjy/src/org/python/core/PyListDerived.java branches/modjy/src/org/python/core/PyLong.java branches/modjy/src/org/python/core/PyLongDerived.java branches/modjy/src/org/python/core/PyMethod.java branches/modjy/src/org/python/core/PyMethodDescr.java branches/modjy/src/org/python/core/PyModuleDerived.java branches/modjy/src/org/python/core/PyNewWrapper.java branches/modjy/src/org/python/core/PyObject.java branches/modjy/src/org/python/core/PyObjectDerived.java branches/modjy/src/org/python/core/PyObjectList.java branches/modjy/src/org/python/core/PyProperty.java branches/modjy/src/org/python/core/PyPropertyDerived.java branches/modjy/src/org/python/core/PyReflectedConstructor.java branches/modjy/src/org/python/core/PyReflectedFunction.java branches/modjy/src/org/python/core/PySequence.java branches/modjy/src/org/python/core/PySequenceList.java branches/modjy/src/org/python/core/PySet.java branches/modjy/src/org/python/core/PySetDerived.java branches/modjy/src/org/python/core/PySlice.java branches/modjy/src/org/python/core/PySliceDerived.java branches/modjy/src/org/python/core/PyStaticMethod.java branches/modjy/src/org/python/core/PyString.java branches/modjy/src/org/python/core/PyStringDerived.java branches/modjy/src/org/python/core/PyStringMap.java branches/modjy/src/org/python/core/PySuper.java branches/modjy/src/org/python/core/PySuperDerived.java branches/modjy/src/org/python/core/PySystemState.java branches/modjy/src/org/python/core/PyTableCode.java branches/modjy/src/org/python/core/PyTraceback.java branches/modjy/src/org/python/core/PyTuple.java branches/modjy/src/org/python/core/PyTupleDerived.java branches/modjy/src/org/python/core/PyType.java branches/modjy/src/org/python/core/PyTypeDerived.java branches/modjy/src/org/python/core/PyUnicode.java branches/modjy/src/org/python/core/PyUnicodeDerived.java branches/modjy/src/org/python/core/PyXRange.java branches/modjy/src/org/python/core/ReflectedArgs.java branches/modjy/src/org/python/core/SyspathJavaLoader.java branches/modjy/src/org/python/core/ThreadStateMapping.java branches/modjy/src/org/python/core/__builtin__.java branches/modjy/src/org/python/core/adapter/ClassicPyObjectAdapter.java branches/modjy/src/org/python/core/codecs.java branches/modjy/src/org/python/core/exceptions.java branches/modjy/src/org/python/core/imp.java branches/modjy/src/org/python/core/io/FileIO.java branches/modjy/src/org/python/core/io/IOBase.java branches/modjy/src/org/python/core/io/ServerSocketIO.java branches/modjy/src/org/python/core/packagecache/CachedJarsPackageManager.java branches/modjy/src/org/python/core/packagecache/PackageManager.java branches/modjy/src/org/python/core/packagecache/PathPackageManager.java branches/modjy/src/org/python/expose/BaseTypeBuilder.java branches/modjy/src/org/python/expose/generate/ClassMethodExposer.java branches/modjy/src/org/python/expose/generate/DescriptorExposer.java branches/modjy/src/org/python/expose/generate/ExposeTask.java branches/modjy/src/org/python/expose/generate/ExposedFieldFinder.java branches/modjy/src/org/python/expose/generate/ExposedMethodFinder.java branches/modjy/src/org/python/expose/generate/ExposedTypeProcessor.java branches/modjy/src/org/python/expose/generate/ExposedTypeVisitor.java branches/modjy/src/org/python/expose/generate/Exposer.java branches/modjy/src/org/python/expose/generate/InstanceMethodExposer.java branches/modjy/src/org/python/expose/generate/MethodExposer.java branches/modjy/src/org/python/expose/generate/NewExposer.java branches/modjy/src/org/python/expose/generate/OverridableNewExposer.java branches/modjy/src/org/python/expose/generate/PyTypes.java branches/modjy/src/org/python/expose/generate/RestrictiveAnnotationVisitor.java branches/modjy/src/org/python/expose/generate/TypeExposer.java branches/modjy/src/org/python/modules/ArrayModule.java branches/modjy/src/org/python/modules/Setup.java branches/modjy/src/org/python/modules/_collections/PyDefaultDictDerived.java branches/modjy/src/org/python/modules/_collections/PyDeque.java branches/modjy/src/org/python/modules/_collections/PyDequeDerived.java branches/modjy/src/org/python/modules/_csv/PyDialectDerived.java branches/modjy/src/org/python/modules/_csv/PyWriter.java branches/modjy/src/org/python/modules/_functools/PyPartialDerived.java branches/modjy/src/org/python/modules/_newmodule.java branches/modjy/src/org/python/modules/_py_compile.java branches/modjy/src/org/python/modules/_weakref/GlobalRef.java branches/modjy/src/org/python/modules/_weakref/ReferenceTypeDerived.java branches/modjy/src/org/python/modules/_weakref/WeakrefModule.java branches/modjy/src/org/python/modules/binascii.java branches/modjy/src/org/python/modules/cPickle.java branches/modjy/src/org/python/modules/cStringIO.java branches/modjy/src/org/python/modules/errno.java branches/modjy/src/org/python/modules/imp.java branches/modjy/src/org/python/modules/random/PyRandomDerived.java branches/modjy/src/org/python/modules/random/RandomModule.java branches/modjy/src/org/python/modules/sre/PatternObject.java branches/modjy/src/org/python/modules/struct.java branches/modjy/src/org/python/modules/thread/PyLocal.java branches/modjy/src/org/python/modules/thread/PyLocalDerived.java branches/modjy/src/org/python/modules/time/Time.java branches/modjy/src/org/python/modules/ucnhash.java branches/modjy/src/org/python/modules/zipimport/zipimport.java branches/modjy/src/org/python/modules/zipimport/zipimporter.java branches/modjy/src/org/python/modules/zipimport/zipimporterDerived.java branches/modjy/src/org/python/util/Generic.java branches/modjy/src/org/python/util/InteractiveConsole.java branches/modjy/src/org/python/util/JythoncAntTask.java branches/modjy/src/org/python/util/NameUnionAntType.java branches/modjy/src/org/python/util/jython.java branches/modjy/src/shell/jython branches/modjy/src/shell/jython.bat branches/modjy/src/templates/gderived-defs branches/modjy/src/templates/gderived.py branches/modjy/src/templates/mappings branches/modjy/src/templates/object.derived branches/modjy/tests/java/javatests/ListTest.java branches/modjy/tests/java/javatests/TestSupport.java branches/modjy/tests/java/org/python/expose/generate/DescriptorExposerTest.java branches/modjy/tests/java/org/python/expose/generate/ExposeMethodFinderTest.java branches/modjy/tests/java/org/python/expose/generate/ExposedTypeProcessorTest.java branches/modjy/tests/java/org/python/expose/generate/ExposedTypeVisitorTest.java branches/modjy/tests/java/org/python/expose/generate/MethodExposerTest.java branches/modjy/tests/java/org/python/expose/generate/NewExposerTest.java branches/modjy/tests/java/org/python/expose/generate/OverridableNewExposerTest.java branches/modjy/tests/java/org/python/expose/generate/TypeExposerTest.java branches/modjy/tests/java/org/python/tests/Callbacker.java branches/modjy/tests/java/org/python/tests/Invisible.java branches/modjy/tests/java/org/python/tests/SubVisible.java branches/modjy/tests/java/org/python/tests/VisibilityResults.java branches/modjy/tests/java/org/python/tests/Visible.java branches/modjy/tests/java/org/python/util/InterpreterTest.java Added Paths: ----------- branches/modjy/Lib/asyncore.py branches/modjy/Lib/pycimport.py branches/modjy/Lib/pyexpat.py branches/modjy/Lib/signal.py branches/modjy/Lib/test/access_protected_class.py branches/modjy/Lib/test/access_protected_field.py branches/modjy/Lib/test/anygui.py branches/modjy/Lib/test/bug1239.jar branches/modjy/Lib/test/call_protected_method.py branches/modjy/Lib/test/check_for_initializer_in_syspath.py branches/modjy/Lib/test/classimport.jar branches/modjy/Lib/test/classimport_Lib.jar branches/modjy/Lib/test/eof_fodder7.py branches/modjy/Lib/test/except_in_raising_code.py branches/modjy/Lib/test/import_nonexistent.py branches/modjy/Lib/test/import_star_from_java.py branches/modjy/Lib/test/invalid_utf_8_declared_encoding.py branches/modjy/Lib/test/latin1_no_encoding.py branches/modjy/Lib/test/output/test_signal branches/modjy/Lib/test/python_home.policy branches/modjy/Lib/test/sys_jy_test_module.py branches/modjy/Lib/test/syspath_import.jar branches/modjy/Lib/test/test_classpathimporter.py branches/modjy/Lib/test/test_codeop_jy.py branches/modjy/Lib/test/test_compile_jy.py branches/modjy/Lib/test/test_doctest.py branches/modjy/Lib/test/test_int_jy.py branches/modjy/Lib/test/test_java_subclasses.py branches/modjy/Lib/test/test_jython_initializer.py branches/modjy/Lib/test/test_listcomp_jy.py branches/modjy/Lib/test/test_marshal.py branches/modjy/Lib/test/test_new.py branches/modjy/Lib/test/test_pep263_jy.py branches/modjy/Lib/test/test_sax_jy.py branches/modjy/Lib/test/test_set_jy.py branches/modjy/Lib/test/test_signal.py branches/modjy/Lib/test/test_timeit.py branches/modjy/Lib/test/test_traceback_jy.py branches/modjy/Lib/test/test_xml_etree.py branches/modjy/Lib/test/test_xml_etree_c.py branches/modjy/Lib/test/test_xml_etree_jy.py branches/modjy/Lib/test/test_zipimport_jy.py branches/modjy/Lib/timeit.py branches/modjy/Lib/xml/etree/ branches/modjy/Lib/xml/etree/cElementTree.py branches/modjy/Lib/xml/parsers/ branches/modjy/Lib/xml/parsers/__init__.py branches/modjy/Lib/xml/parsers/expat.py branches/modjy/Misc/make_pydocs.py branches/modjy/Tools/pbcvm/ branches/modjy/Tools/pbcvm/extract.py branches/modjy/extlibs/antlr-3.1.2.jar branches/modjy/extlibs/antlr-runtime-3.1.2.jar branches/modjy/extlibs/cpptasks/ branches/modjy/extlibs/cpptasks/cpptasks.jar branches/modjy/extlibs/modjy_0_25_3.zip branches/modjy/extlibs/xercesImpl-2.9.1.jar branches/modjy/src/org/python/compiler/MTime.java branches/modjy/src/org/python/compiler/pbc/ branches/modjy/src/org/python/compiler/pbc/Bytecode.java branches/modjy/src/org/python/compiler/pbc/BytecodeCompiler.java branches/modjy/src/org/python/core/AnnotationReader.java branches/modjy/src/org/python/core/BuiltinDocs.java branches/modjy/src/org/python/core/ClasspathPyImporter.java branches/modjy/src/org/python/core/ClasspathPyImporterDerived.java branches/modjy/src/org/python/core/JythonInitializer.java branches/modjy/src/org/python/core/Opcode.java branches/modjy/src/org/python/core/PyBaseCode.java branches/modjy/src/org/python/core/PyBytecode.java branches/modjy/src/org/python/core/WrappedIterIterator.java branches/modjy/src/org/python/core/util/importer.java branches/modjy/src/org/python/modules/PyIOFile.java branches/modjy/src/org/python/modules/PyIOFileFactory.java branches/modjy/src/org/python/modules/_marshal.java branches/modjy/src/org/python/util/GlobMatchingTask.java branches/modjy/src/org/python/util/JycompileAntTask.java branches/modjy/src/templates/ClasspathPyImporter.derived branches/modjy/tests/data/ branches/modjy/tests/data/initializer/ branches/modjy/tests/data/initializer/META-INF/ branches/modjy/tests/data/initializer/META-INF/services/ branches/modjy/tests/data/initializer/META-INF/services/org.python.core.JythonInitializer branches/modjy/tests/data/initializer/SyspathAppendingInitializer.java branches/modjy/tests/java/javatests/PySetInJavaTest.java branches/modjy/tests/java/org/python/tests/BadStaticInitializer.java branches/modjy/tests/java/org/python/tests/BeanImplementation.java branches/modjy/tests/java/org/python/tests/BeanInterface.java branches/modjy/tests/java/org/python/tests/Child.java branches/modjy/tests/java/org/python/tests/Coercions.java branches/modjy/tests/java/org/python/tests/CustomizableMapHolder.java branches/modjy/tests/java/org/python/tests/ExceptionTest.java branches/modjy/tests/java/org/python/tests/HiddenSuper.java branches/modjy/tests/java/org/python/tests/Matryoshka.java branches/modjy/tests/java/org/python/tests/OnlySubclassable.java branches/modjy/tests/java/org/python/tests/OtherSubVisible.java branches/modjy/tests/java/org/python/tests/Parent.java branches/modjy/tests/java/org/python/tests/SomePyMethods.java branches/modjy/tests/java/org/python/tests/inbred/ branches/modjy/tests/java/org/python/tests/inbred/Metis.java branches/modjy/tests/java/org/python/tests/inbred/Zeus.java branches/modjy/tests/java/org/python/tests/mro/ branches/modjy/tests/java/org/python/tests/mro/ConfusedOnGetitemAdd.java branches/modjy/tests/java/org/python/tests/mro/ConfusedOnImport.java branches/modjy/tests/java/org/python/tests/mro/FirstAndPost.java branches/modjy/tests/java/org/python/tests/mro/FirstAndSecond.java branches/modjy/tests/java/org/python/tests/mro/FirstPredefinedGetitem.java branches/modjy/tests/java/org/python/tests/mro/GetitemAdder.java branches/modjy/tests/java/org/python/tests/mro/PostAndFirst.java branches/modjy/tests/java/org/python/tests/mro/PostdefinedGetitem.java branches/modjy/tests/java/org/python/tests/mro/SecondAndFirst.java branches/modjy/tests/java/org/python/tests/mro/SecondPredefinedGetitem.java Removed Paths: ------------- branches/modjy/Lib/asyncore.py branches/modjy/Lib/test/test_bool.py branches/modjy/Lib/test/test_exceptions.py branches/modjy/Lib/test/test_jsubclass.py branches/modjy/Lib/test/test_jy_compile.py branches/modjy/Lib/xml/etree/cElementTree.py branches/modjy/Lib/xml/parsers/__init__.py branches/modjy/Lib/xml/parsers/expat.py branches/modjy/Tools/pbcvm/extract.py branches/modjy/bugtests/classes/test090j.java branches/modjy/bugtests/classes/test092m/ branches/modjy/bugtests/classes/test119j.java branches/modjy/bugtests/classes/test121p/ branches/modjy/bugtests/classes/test139j1.java branches/modjy/bugtests/classes/test139j2.java branches/modjy/bugtests/classes/test139j3.java branches/modjy/bugtests/classes/test142j.java branches/modjy/bugtests/classes/test160j1.java branches/modjy/bugtests/classes/test160j2.java branches/modjy/bugtests/classes/test182j.java branches/modjy/bugtests/classes/test202j.java branches/modjy/bugtests/classes/test204j0.java branches/modjy/bugtests/classes/test204j1.java branches/modjy/bugtests/classes/test204j2.java branches/modjy/bugtests/classes/test204j3.java branches/modjy/bugtests/classes/test205j0.java branches/modjy/bugtests/classes/test205j1.java branches/modjy/bugtests/classes/test205j2.java branches/modjy/bugtests/classes/test206j0.java branches/modjy/bugtests/classes/test206j1.java branches/modjy/bugtests/classes/test208j.java branches/modjy/bugtests/classes/test208j0.java branches/modjy/bugtests/classes/test208j1.java branches/modjy/bugtests/classes/test208j2.java branches/modjy/bugtests/classes/test217p/ branches/modjy/bugtests/classes/test219e.java branches/modjy/bugtests/classes/test219i.java branches/modjy/bugtests/classes/test219j.java branches/modjy/bugtests/classes/test220e.java branches/modjy/bugtests/classes/test220i.java branches/modjy/bugtests/classes/test220j.java branches/modjy/bugtests/classes/test231j.java branches/modjy/bugtests/classes/test231j2.java branches/modjy/bugtests/classes/test232p/ branches/modjy/bugtests/classes/test236j1.java branches/modjy/bugtests/classes/test236j2.java branches/modjy/bugtests/classes/test246p/ branches/modjy/bugtests/classes/test248j.java branches/modjy/bugtests/classes/test288i.java branches/modjy/bugtests/classes/test288j.java branches/modjy/bugtests/classes/test395j1.java branches/modjy/bugtests/classes/test395j2.java branches/modjy/bugtests/classes/test396j.java branches/modjy/bugtests/test087.py branches/modjy/bugtests/test087m.py branches/modjy/bugtests/test088.py branches/modjy/bugtests/test088p/ branches/modjy/bugtests/test090.py branches/modjy/bugtests/test091.py branches/modjy/bugtests/test091j.java branches/modjy/bugtests/test092.py branches/modjy/bugtests/test093.py branches/modjy/bugtests/test094.py branches/modjy/bugtests/test100.py branches/modjy/bugtests/test100j.java branches/modjy/bugtests/test101.py branches/modjy/bugtests/test104.py branches/modjy/bugtests/test114.py branches/modjy/bugtests/test116.py branches/modjy/bugtests/test117.py branches/modjy/bugtests/test117j.java branches/modjy/bugtests/test119.py branches/modjy/bugtests/test120.py branches/modjy/bugtests/test121.py branches/modjy/bugtests/test122.py branches/modjy/bugtests/test122p/ branches/modjy/bugtests/test123.py branches/modjy/bugtests/test123j.java branches/modjy/bugtests/test125m.py branches/modjy/bugtests/test129.py branches/modjy/bugtests/test129j.java branches/modjy/bugtests/test132.py branches/modjy/bugtests/test132j.java branches/modjy/bugtests/test132m.py branches/modjy/bugtests/test137.py branches/modjy/bugtests/test137j.java branches/modjy/bugtests/test145.py branches/modjy/bugtests/test146.py branches/modjy/bugtests/test147.py branches/modjy/bugtests/test148.py branches/modjy/bugtests/test149.py branches/modjy/bugtests/test150.py branches/modjy/bugtests/test151.py branches/modjy/bugtests/test152.py branches/modjy/bugtests/test153.py branches/modjy/bugtests/test154.py branches/modjy/bugtests/test154p/ branches/modjy/bugtests/test155.py branches/modjy/bugtests/test156.py branches/modjy/bugtests/test157.py branches/modjy/bugtests/test157j.java branches/modjy/bugtests/test158.py branches/modjy/bugtests/test159.py branches/modjy/bugtests/test160.py branches/modjy/bugtests/test161.py branches/modjy/bugtests/test162.py branches/modjy/bugtests/test162m.py branches/modjy/bugtests/test163.py branches/modjy/bugtests/test164.py branches/modjy/bugtests/test165.py branches/modjy/bugtests/test166.py branches/modjy/bugtests/test167.py branches/modjy/bugtests/test168.py branches/modjy/bugtests/test168p/ branches/modjy/bugtests/test169.py branches/modjy/bugtests/test169c.py branches/modjy/bugtests/test170.py branches/modjy/bugtests/test170p/ branches/modjy/bugtests/test171.py branches/modjy/bugtests/test171p/ branches/modjy/bugtests/test172.py branches/modjy/bugtests/test172j.java branches/modjy/bugtests/test173.py branches/modjy/bugtests/test173p/ branches/modjy/bugtests/test174.py branches/modjy/bugtests/test175.py branches/modjy/bugtests/test176.py branches/modjy/bugtests/test177.py branches/modjy/bugtests/test178.py branches/modjy/bugtests/test179.py branches/modjy/bugtests/test180.py branches/modjy/bugtests/test181.py branches/modjy/bugtests/test182.py branches/modjy/bugtests/test182c.py branches/modjy/bugtests/test183.py branches/modjy/bugtests/test184.py branches/modjy/bugtests/test184s1.py branches/modjy/bugtests/test184s2.py branches/modjy/bugtests/test185.html branches/modjy/bugtests/test185.py branches/modjy/bugtests/test185a.py branches/modjy/bugtests/test185m.py branches/modjy/bugtests/test186.html branches/modjy/bugtests/test186.py branches/modjy/bugtests/test186a.py branches/modjy/bugtests/test187.py branches/modjy/bugtests/test187c.py branches/modjy/bugtests/test188.py branches/modjy/bugtests/test188c.py branches/modjy/bugtests/test189.py branches/modjy/bugtests/test189c.py branches/modjy/bugtests/test190.py branches/modjy/bugtests/test190c.py branches/modjy/bugtests/test191.py branches/modjy/bugtests/test191c.py branches/modjy/bugtests/test192.html branches/modjy/bugtests/test192.py branches/modjy/bugtests/test192c.py branches/modjy/bugtests/test192c1.py branches/modjy/bugtests/test192c2.py branches/modjy/bugtests/test193.py branches/modjy/bugtests/test193c.py branches/modjy/bugtests/test194.html branches/modjy/bugtests/test194.py branches/modjy/bugtests/test194c.py branches/modjy/bugtests/test194m/ branches/modjy/bugtests/test195.py branches/modjy/bugtests/test195c.py branches/modjy/bugtests/test196.py branches/modjy/bugtests/test196c.py branches/modjy/bugtests/test197.py branches/modjy/bugtests/test197c.py branches/modjy/bugtests/test198.py branches/modjy/bugtests/test198c.py branches/modjy/bugtests/test199.py branches/modjy/bugtests/test199c.py branches/modjy/bugtests/test200.py branches/modjy/bugtests/test200p1.py branches/modjy/bugtests/test201.py branches/modjy/bugtests/test201c.py branches/modjy/bugtests/test202.py branches/modjy/bugtests/test203.py branches/modjy/bugtests/test204.py branches/modjy/bugtests/test205.py branches/modjy/bugtests/test206.py branches/modjy/bugtests/test207.py branches/modjy/bugtests/test208.py branches/modjy/bugtests/test209.py branches/modjy/bugtests/test209p/ branches/modjy/bugtests/test210.py branches/modjy/bugtests/test211.py branches/modjy/bugtests/test212.py branches/modjy/bugtests/test213.py branches/modjy/bugtests/test214.html branches/modjy/bugtests/test214.py branches/modjy/bugtests/test214a.py branches/modjy/bugtests/test215.py branches/modjy/bugtests/test216.py branches/modjy/bugtests/test216s1.py branches/modjy/bugtests/test217.py branches/modjy/bugtests/test217c.py branches/modjy/bugtests/test217t.java branches/modjy/bugtests/test218.py branches/modjy/bugtests/test218c.py branches/modjy/bugtests/test219.py branches/modjy/bugtests/test220.py branches/modjy/bugtests/test220c.py branches/modjy/bugtests/test221.py branches/modjy/bugtests/test221c.py branches/modjy/bugtests/test222.py branches/modjy/bugtests/test222s.py branches/modjy/bugtests/test223.py branches/modjy/bugtests/test223s.py branches/modjy/bugtests/test224.py branches/modjy/bugtests/test224s.py branches/modjy/bugtests/test225.py branches/modjy/bugtests/test225s.py branches/modjy/bugtests/test226.py branches/modjy/bugtests/test226c.py branches/modjy/bugtests/test227.py branches/modjy/bugtests/test227c.py branches/modjy/bugtests/test228.py branches/modjy/bugtests/test228s.py branches/modjy/bugtests/test229.py branches/modjy/bugtests/test229c.py branches/modjy/bugtests/test230.py branches/modjy/bugtests/test231.py branches/modjy/bugtests/test232.py branches/modjy/bugtests/test233.py branches/modjy/bugtests/test234.py branches/modjy/bugtests/test235.py branches/modjy/bugtests/test235p/ branches/modjy/bugtests/test237.py branches/modjy/bugtests/test237m1.py branches/modjy/bugtests/test237m2.py branches/modjy/bugtests/test238.py branches/modjy/bugtests/test239.py branches/modjy/bugtests/test240.py branches/modjy/bugtests/test242.py branches/modjy/bugtests/test242c.py branches/modjy/bugtests/test245.py branches/modjy/bugtests/test245j.java branches/modjy/bugtests/test246.py branches/modjy/bugtests/test246c.py branches/modjy/bugtests/test247.py branches/modjy/bugtests/test247j.java branches/modjy/bugtests/test248.py branches/modjy/bugtests/test249.py branches/modjy/bugtests/test249c.py branches/modjy/bugtests/test250.py branches/modjy/bugtests/test250j.java branches/modjy/bugtests/test251.py branches/modjy/bugtests/test251c.py branches/modjy/bugtests/test251c2.py branches/modjy/bugtests/test252.py branches/modjy/bugtests/test252c.py branches/modjy/bugtests/test252c2.py branches/modjy/bugtests/test253.py branches/modjy/bugtests/test253c.py branches/modjy/bugtests/test253c2.py branches/modjy/bugtests/test254.html branches/modjy/bugtests/test254.py branches/modjy/bugtests/test254c.py branches/modjy/bugtests/test255.py branches/modjy/bugtests/test255s1.py branches/modjy/bugtests/test255s2.py branches/modjy/bugtests/test256.html branches/modjy/bugtests/test256.py branches/modjy/bugtests/test256a.py branches/modjy/bugtests/test257.py branches/modjy/bugtests/test258.py branches/modjy/bugtests/test258m1.py branches/modjy/bugtests/test259.py branches/modjy/bugtests/test259s.py branches/modjy/bugtests/test260.py branches/modjy/bugtests/test261.py branches/modjy/bugtests/test261p/ branches/modjy/bugtests/test262.py branches/modjy/bugtests/test262m.py branches/modjy/bugtests/test262p/ branches/modjy/bugtests/test263.py branches/modjy/bugtests/test263m.py branches/modjy/bugtests/test264.py branches/modjy/bugtests/test264c.py branches/modjy/bugtests/test265.py branches/modjy/bugtests/test265j.java branches/modjy/bugtests/test266.py branches/modjy/bugtests/test268.py branches/modjy/bugtests/test268j1.java branches/modjy/bugtests/test268j2.java branches/modjy/bugtests/test269.py branches/modjy/bugtests/test269p/ branches/modjy/bugtests/test270.py branches/modjy/bugtests/test270p/ branches/modjy/bugtests/test271.py branches/modjy/bugtests/test272.py branches/modjy/bugtests/test272c.py branches/modjy/bugtests/test273.py branches/modjy/bugtests/test273p/ branches/modjy/bugtests/test274.py branches/modjy/bugtests/test275.py branches/modjy/bugtests/test275s.py branches/modjy/bugtests/test276.py branches/modjy/bugtests/test276j.java branches/modjy/bugtests/test277.py branches/modjy/bugtests/test277p/ branches/modjy/bugtests/test278.py branches/modjy/bugtests/test278p/ branches/modjy/bugtests/test280.py branches/modjy/bugtests/test280c.py branches/modjy/bugtests/test281.py branches/modjy/bugtests/test281c.py branches/modjy/bugtests/test282.py branches/modjy/bugtests/test284.py branches/modjy/bugtests/test284j1.java branches/modjy/bugtests/test284j2.java branches/modjy/bugtests/test285.py branches/modjy/bugtests/test286.py branches/modjy/bugtests/test286c.py branches/modjy/bugtests/test287.py branches/modjy/bugtests/test288.py branches/modjy/bugtests/test289.py branches/modjy/bugtests/test289c.py branches/modjy/bugtests/test290.py branches/modjy/bugtests/test291.py branches/modjy/bugtests/test292.policy branches/modjy/bugtests/test292.py branches/modjy/bugtests/test293.py branches/modjy/bugtests/test293p/ branches/modjy/bugtests/test294.py branches/modjy/bugtests/test294j.java branches/modjy/bugtests/test295.py branches/modjy/bugtests/test296.py branches/modjy/bugtests/test296p/ branches/modjy/bugtests/test297.py branches/modjy/bugtests/test297c.py branches/modjy/bugtests/test298.py branches/modjy/bugtests/test298m1.py branches/modjy/bugtests/test299.py branches/modjy/bugtests/test300.py branches/modjy/bugtests/test301.py branches/modjy/bugtests/test301c.py branches/modjy/bugtests/test302.py branches/modjy/bugtests/test303.py branches/modjy/bugtests/test303j.java branches/modjy/bugtests/test304.py branches/modjy/bugtests/test304m.py branches/modjy/bugtests/test307.py branches/modjy/bugtests/test307foobar.template branches/modjy/bugtests/test307m.template branches/modjy/bugtests/test307p.template branches/modjy/bugtests/test308.py branches/modjy/bugtests/test308d/ branches/modjy/bugtests/test309.py branches/modjy/bugtests/test310.py branches/modjy/bugtests/test310c.py branches/modjy/bugtests/test311.py branches/modjy/bugtests/test312.py branches/modjy/bugtests/test313.py branches/modjy/bugtests/test313c.py branches/modjy/bugtests/test314.py branches/modjy/bugtests/test314c.py branches/modjy/bugtests/test315.py branches/modjy/bugtests/test315c.py branches/modjy/bugtests/test316.py branches/modjy/bugtests/test317.py branches/modjy/bugtests/test317c.py branches/modjy/bugtests/test318.py branches/modjy/bugtests/test319.py branches/modjy/bugtests/test319j.java branches/modjy/bugtests/test320.py branches/modjy/bugtests/test366.py branches/modjy/bugtests/test373.py branches/modjy/bugtests/test389.py branches/modjy/bugtests/test391.py branches/modjy/bugtests/test395.py branches/modjy/bugtests/test396.py branches/modjy/extlibs/antlr-3.1.1-runtime.jar branches/modjy/extlibs/antlr-3.1.1.jar branches/modjy/extlibs/cpptasks/cpptasks.jar branches/modjy/extlibs/modjy_0_22_3.zip branches/modjy/src/org/python/compiler/pbc/Bytecode.java branches/modjy/src/org/python/compiler/pbc/BytecodeCompiler.java branches/modjy/src/org/python/core/APIReader.java branches/modjy/src/org/python/core/PySetIterator.java branches/modjy/tests/data/initializer/ branches/modjy/tests/data/initializer/META-INF/ branches/modjy/tests/data/initializer/META-INF/services/ branches/modjy/tests/data/initializer/META-INF/services/org.python.core.JythonInitializer branches/modjy/tests/data/initializer/SyspathAppendingInitializer.java branches/modjy/tests/java/javatests/MethodInvokationTest.java branches/modjy/tests/java/org/python/tests/inbred/Metis.java branches/modjy/tests/java/org/python/tests/inbred/Zeus.java branches/modjy/tests/java/org/python/tests/mro/ConfusedOnGetitemAdd.java branches/modjy/tests/java/org/python/tests/mro/ConfusedOnImport.java branches/modjy/tests/java/org/python/tests/mro/FirstAndPost.java branches/modjy/tests/java/org/python/tests/mro/FirstAndSecond.java branches/modjy/tests/java/org/python/tests/mro/FirstPredefinedGetitem.java branches/modjy/tests/java/org/python/tests/mro/GetitemAdder.java branches/modjy/tests/java/org/python/tests/mro/PostAndFirst.java branches/modjy/tests/java/org/python/tests/mro/PostdefinedGetitem.java branches/modjy/tests/java/org/python/tests/mro/SecondAndFirst.java branches/modjy/tests/java/org/python/tests/mro/SecondPredefinedGetitem.java Property Changed: ---------------- branches/modjy/ Property changes on: branches/modjy ___________________________________________________________________ Modified: svn:externals - CPythonLib http://svn.python.org/projects/python/branches/release25-maint/Lib/ + CPythonLib -r70085 http://svn.python.org/projects/python/branches/release25-maint/Lib/ Modified: svnmerge-integrated - /trunk/jython:1-5749 + /trunk/jython:1-6072 Modified: branches/modjy/.classpath =================================================================== --- branches/modjy/.classpath 2009-03-06 15:21:04 UTC (rev 6072) +++ branches/modjy/.classpath 2009-03-06 16:15:19 UTC (rev 6073) @@ -12,8 +12,10 @@ <classpathentry kind="lib" path="extlibs/mysql-connector-java-5.1.6.jar"/> <classpathentry kind="lib" path="extlibs/postgresql-8.3-603.jdbc4.jar"/> <classpathentry kind="lib" path="extlibs/servlet-api-2.5.jar"/> - <classpathentry kind="lib" path="build/jarjar"/> <classpathentry kind="var" path="ANT_HOME/lib/ant.jar"/> - <classpathentry kind="lib" path="extlibs/antlr-3.1.1-runtime.jar"/> + <classpathentry kind="lib" path="extlibs/antlr-runtime-3.1.2.jar"/> + <classpathentry kind="lib" path="extlibs/asm-3.1.jar"/> + <classpathentry kind="lib" path="extlibs/asm-commons-3.1.jar"/> + <classpathentry kind="lib" path="extlibs/constantine-0.4.jar"/> <classpathentry kind="output" path="bugtests/classes"/> </classpath> Modified: branches/modjy/CPythonLib.includes =================================================================== --- branches/modjy/CPythonLib.includes 2009-03-06 15:21:04 UTC (rev 6072) +++ branches/modjy/CPythonLib.includes 2009-03-06 16:15:19 UTC (rev 6073) @@ -8,6 +8,7 @@ encodings/** logging/* test/** +xml/etree/** # Lib files, in alphabetical order: __future__.py @@ -51,6 +52,8 @@ DocXMLRPCServer.py dospath.py dumbdbm.py +dummy_thread.py +dummy_threading.py exceptions.py fileinput.py fnmatch.py Modified: branches/modjy/CoreExposed.includes =================================================================== --- branches/modjy/CoreExposed.includes 2009-03-06 15:21:04 UTC (rev 6072) +++ branches/modjy/CoreExposed.includes 2009-03-06 16:15:19 UTC (rev 6073) @@ -1,4 +1,5 @@ org/python/core/AstList.class +org/python/core/ClasspathPyImporter.class org/python/core/PyArray.class org/python/core/PyBaseString.class org/python/core/PyBaseException.class @@ -33,6 +34,7 @@ org/python/core/PyStaticMethod.class org/python/core/PyString.class org/python/core/PySuper.class +org/python/core/PyTraceback.class org/python/core/PyTuple.class org/python/core/PyType.class org/python/core/PyUnicode.class Modified: branches/modjy/LICENSE.txt =================================================================== --- branches/modjy/LICENSE.txt 2009-03-06 15:21:04 UTC (rev 6072) +++ branches/modjy/LICENSE.txt 2009-03-06 16:15:19 UTC (rev 6073) @@ -53,7 +53,7 @@ Jython 2.0, 2.1 License ================================ -Copyright (c) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 Jython Developers +Copyright (c) 2000-2009 Jython Developers. All rights reserved. Redistribution and use in source and binary forms, with or without Deleted: branches/modjy/Lib/asyncore.py =================================================================== --- branches/modjy/Lib/asyncore.py 2009-03-06 15:21:04 UTC (rev 6072) +++ branches/modjy/Lib/asyncore.py 2009-03-06 16:15:19 UTC (rev 6073) @@ -1,561 +0,0 @@ -# -*- Mode: Python -*- -# Id: asyncore.py,v 2.51 2000/09/07 22:29:26 rushing Exp -# Author: Sam Rushing <ru...@ni...> - -# ====================================================================== -# Copyright 1996 by Sam Rushing -# -# All Rights Reserved -# -# Permission to use, copy, modify, and distribute this software and -# its documentation for any purpose and without fee is hereby -# granted, provided that the above copyright notice appear in all -# copies and that both that copyright notice and this permission -# notice appear in supporting documentation, and that the name of Sam -# Rushing not be used in advertising or publicity pertaining to -# distribution of the software without specific, written prior -# permission. -# -# SAM RUSHING DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, -# INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN -# NO EVENT SHALL SAM RUSHING BE LIABLE FOR ANY SPECIAL, INDIRECT OR -# CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS -# OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, -# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN -# CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -# ====================================================================== - -"""Basic infrastructure for asynchronous socket service clients and servers. - -There are only two ways to have a program on a single processor do "more -than one thing at a time". Multi-threaded programming is the simplest and -most popular way to do it, but there is another very different technique, -that lets you have nearly all the advantages of multi-threading, without -actually using multiple threads. it's really only practical if your program -is largely I/O bound. If your program is CPU bound, then pre-emptive -scheduled threads are probably what you really need. Network servers are -rarely CPU-bound, however. - -If your operating system supports the select() system call in its I/O -library (and nearly all do), then you can use it to juggle multiple -communication channels at once; doing other work while your I/O is taking -place in the "background." Although this strategy can seem strange and -complex, especially at first, it is in many ways easier to understand and -control than multi-threaded programming. The module documented here solves -many of the difficult problems for you, making the task of building -sophisticated high-performance network servers and clients a snap. -""" - -import exceptions -import select -import socket -import sys -import time - -import os -from errno import EALREADY, EINPROGRESS, EWOULDBLOCK, ECONNRESET, \ - ENOTCONN, ESHUTDOWN, EINTR, EISCONN - -try: - socket_map -except NameError: - socket_map = {} - -class ExitNow(exceptions.Exception): - pass - -def read(obj): - try: - obj.handle_read_event() - except ExitNow: - raise - except: - obj.handle_error() - -def write(obj): - try: - obj.handle_write_event() - except ExitNow: - raise - except: - obj.handle_error() - -def readwrite(obj, flags): - try: - if flags & select.POLLIN: - obj.handle_read_event() - if flags & select.POLLOUT: - obj.handle_write_event() - except ExitNow: - raise - except: - obj.handle_error() - -def poll(timeout=0.0, map=None): - if map is None: - map = socket_map - if map: - r = []; w = []; e = [] - for fd, obj in map.items(): - if obj.readable(): - r.append(fd) - if obj.writable(): - w.append(fd) - if [] == r == w == e: - time.sleep(timeout) - else: - try: - r, w, e = select.select(r, w, e, timeout) - except select.error, err: - if err[0] != EINTR: - raise - else: - return - - for fd in r: - obj = map.get(fd) - if obj is None: - continue - read(obj) - - for fd in w: - obj = map.get(fd) - if obj is None: - continue - write(obj) - -def poll2(timeout=0.0, map=None): - import poll - if map is None: - map = socket_map - if timeout is not None: - # timeout is in milliseconds - timeout = int(timeout*1000) - if map: - l = [] - for fd, obj in map.items(): - flags = 0 - if obj.readable(): - flags = poll.POLLIN - if obj.writable(): - flags = flags | poll.POLLOUT - if flags: - l.append((fd, flags)) - r = poll.poll(l, timeout) - for fd, flags in r: - obj = map.get(fd) - if obj is None: - continue - readwrite(obj, flags) - -def poll3(timeout=0.0, map=None): - # Use the poll() support added to the select module in Python 2.0 - if map is None: - map = socket_map - if timeout is not None: - # timeout is in milliseconds - timeout = int(timeout*1000) - pollster = select.poll() - if map: - for fd, obj in map.items(): - flags = 0 - if obj.readable(): - flags = select.POLLIN - if obj.writable(): - flags = flags | select.POLLOUT - if flags: - pollster.register(fd, flags) - try: - r = pollster.poll(timeout) - except select.error, err: - if err[0] != EINTR: - raise - r = [] - for fd, flags in r: - obj = map.get(fd) - if obj is None: - continue - readwrite(obj, flags) - -def loop(timeout=30.0, use_poll=0, map=None): - if map is None: - map = socket_map - - if use_poll: - if hasattr(select, 'poll'): - poll_fun = poll3 - else: - poll_fun = poll2 - else: - poll_fun = poll - - while map: - poll_fun(timeout, map) - -class dispatcher: - - debug = 0 - connected = 0 - accepting = 0 - closing = 0 - addr = None - - def __init__(self, sock=None, map=None): - if sock: - self.set_socket(sock, map) - # I think it should inherit this anyway - self.socket.setblocking(0) - self.connected = 1 - # XXX Does the constructor require that the socket passed - # be connected? - try: - self.addr = sock.getpeername() - except socket.error: - # The addr isn't crucial - pass - else: - self.socket = None - - def __repr__(self): - status = [self.__class__.__module__+"."+self.__class__.__name__] - if self.accepting and self.addr: - status.append('listening') - elif self.connected: - status.append('connected') - if self.addr is not None: - try: - status.append('%s:%d' % self.addr) - except TypeError: - status.append(repr(self.addr)) - # On some systems (RH10) id() can be a negative number. - # work around this. - MAX = 2L*sys.maxint+1 - return '<%s at %#x>' % (' '.join(status), id(self)&MAX) - - def add_channel(self, map=None): - #self.log_info('adding channel %s' % self) - if map is None: - if hasattr(self, '_map'): - map = self._map - del self._map - else: - map = socket_map - if not hasattr(self, '_fileno'): - self._fileno = self.socket.fileno() - map[self._fileno] = self - - def del_channel(self, map=None): - fd = self._fileno - if map is None: - map = socket_map - if map.has_key(fd): - #self.log_info('closing channel %d:%s' % (fd, self)) - del map[fd] - - def create_socket(self, family, type): - self.family_and_type = family, type - self.socket = socket.socket(family, type) - self.socket.setblocking(0) - - def set_socket(self, sock, map=None): - self.socket = sock -## self.__dict__['socket'] = sock - if sock.fileno(): - self.add_channel(map) - else: - self._map = map - - def set_reuse_addr(self): - # try to re-use a server port if possible - try: - self.socket.setsockopt( - socket.SOL_SOCKET, socket.SO_REUSEADDR, - self.socket.getsockopt(socket.SOL_SOCKET, - socket.SO_REUSEADDR) | 1 - ) - except socket.error: - pass - - # ================================================== - # predicates for select() - # these are used as filters for the lists of sockets - # to pass to select(). - # ================================================== - - def readable(self): - return True - - if os.name == 'mac': - # The macintosh will select a listening socket for - # write if you let it. What might this mean? - def writable(self): - return not self.accepting - else: - def writable(self): - return True - - # ================================================== - # socket object methods. - # ================================================== - - def listen(self, num): - self.accepting = 1 - if os.name == 'nt' and num > 5: - num = 1 - ret = self.socket.listen(num) - self.add_channel() - return ret - - def bind(self, addr): - self.addr = addr - return self.socket.bind(addr) - - def connect(self, address): - self.connected = 0 - err = self.socket.connect_ex(address) - # XXX Should interpret Winsock return values - if err in (EINPROGRESS, EALREADY, EWOULDBLOCK): - return - if err in (0, EISCONN): - self.add_channel() - self.addr = address - self.connected = 1 - self.handle_connect() - else: - raise socket.error, err - - def accept(self): - # XXX can return either an address pair or None - try: - conn, addr = self.socket.accept() - self.add_channel() - return conn, addr - except socket.error, why: - if why[0] == EWOULDBLOCK: - pass - else: - raise socket.error, why - - def send(self, data): - try: - result = self.socket.send(data) - return result - except socket.error, why: - if why[0] == EWOULDBLOCK: - return 0 - else: - raise socket.error, why - return 0 - - def recv(self, buffer_size): - try: - data = self.socket.recv(buffer_size) - if not data: - # a closed connection is indicated by signaling - # a read condition, and having recv() return 0. - self.handle_close() - return '' - else: - return data - except socket.error, why: - # winsock sometimes throws ENOTCONN - if why[0] in [ECONNRESET, ENOTCONN, ESHUTDOWN]: - self.handle_close() - return '' - else: - raise socket.error, why - - def close(self): - self.del_channel() - self.socket.close() - - # cheap inheritance, used to pass all other attribute - # references to the underlying socket object. - def __getattr__(self, attr): - return getattr(self.socket, attr) - - # log and log_info may be overridden to provide more sophisticated - # logging and warning methods. In general, log is for 'hit' logging - # and 'log_info' is for informational, warning and error logging. - - def log(self, message): - sys.stderr.write('log: %s\n' % str(message)) - - def log_info(self, message, type='info'): - if __debug__ or type != 'info': - print '%s: %s' % (type, message) - - def handle_read_event(self): - if self.accepting: - # for an accepting socket, getting a read implies - # that we are connected - if not self.connected: - self.connected = 1 - self.handle_accept() - elif not self.connected: - self.handle_connect() - self.connected = 1 - self.handle_read() - else: - self.handle_read() - - def handle_write_event(self): - # getting a write implies that we are connected - if not self.connected: - self.handle_connect() - self.connected = 1 - self.handle_write() - - def handle_expt_event(self): - self.handle_expt() - - def handle_error(self): - nil, t, v, tbinfo = compact_traceback() - - # sometimes a user repr method will crash. - try: - self_repr = repr(self) - except: - self_repr = '<__repr__(self) failed for object at %0x>' % id(self) - - self.log_info( - 'uncaptured python exception, closing channel %s (%s:%s %s)' % ( - self_repr, - t, - v, - tbinfo - ), - 'error' - ) - self.close() - - def handle_expt(self): - self.log_info('unhandled exception', 'warning') - - def handle_read(self): - self.log_info('unhandled read event', 'warning') - - def handle_write(self): - self.log_info('unhandled write event', 'warning') - - def handle_connect(self): - self.log_info('unhandled connect event', 'warning') - - def handle_accept(self): - self.log_info('unhandled accept event', 'warning') - - def handle_close(self): - self.log_info('unhandled close event', 'warning') - self.close() - -# --------------------------------------------------------------------------- -# adds simple buffered output capability, useful for simple clients. -# [for more sophisticated usage use asynchat.async_chat] -# --------------------------------------------------------------------------- - -class dispatcher_with_send(dispatcher): - - def __init__(self, sock=None): - dispatcher.__init__(self, sock) - self.out_buffer = '' - - def initiate_send(self): - num_sent = 0 - num_sent = dispatcher.send(self, self.out_buffer[... [truncated message content] |