From: <th...@us...> - 2008-10-21 10:53:35
|
Revision: 5497 http://jython.svn.sourceforge.net/jython/?rev=5497&view=rev Author: thobes Date: 2008-10-21 10:53:16 +0000 (Tue, 21 Oct 2008) Log Message: ----------- Merged revisions 5287-5295,5297,5301-5305,5307-5308,5313-5317,5320-5321,5323-5325,5327-5329,5333,5339-5444,5446-5447,5452-5460,5462-5480,5482-5495 via svnmerge from https://jython.svn.sourceforge.net/svnroot/jython/trunk/jython ........ r5287 | fwierzbicki | 2008-09-03 17:24:20 +0200 (Wed, 03 Sep 2008) | 3 lines Small cleanup of compiler package. Mainly remove unused imports and rename local vars that shadow member vars. ........ r5288 | fwierzbicki | 2008-09-04 18:57:30 +0200 (Thu, 04 Sep 2008) | 3 lines Fix for some offset problems -- the biggest one being dedents now take on the offset values of the previous token. ........ r5289 | fwierzbicki | 2008-09-05 05:36:04 +0200 (Fri, 05 Sep 2008) | 3 lines Adjustment to offset fix. Overthought the offsets for simple dedents. ........ r5290 | zyasoft | 2008-09-05 18:21:55 +0200 (Fri, 05 Sep 2008) | 4 lines PySystemState.warnoptions was not initialized before adding to it in the processing of the -W option. ........ r5291 | fwierzbicki | 2008-09-05 18:30:36 +0200 (Fri, 05 Sep 2008) | 2 lines Broke test_traceback.py in my last commit. This fixes it again. ........ r5292 | fwierzbicki | 2008-09-06 06:28:11 +0200 (Sat, 06 Sep 2008) | 2 lines Some tuning of node col and line positions to align better with CPython. ........ r5293 | fwierzbicki | 2008-09-06 20:31:14 +0200 (Sat, 06 Sep 2008) | 2 lines Switch back installer25 -> installer. Leaked in from asm branch. ........ r5294 | fwierzbicki | 2008-09-06 20:58:02 +0200 (Sat, 06 Sep 2008) | 2 lines increment version. ........ r5295 | fwierzbicki | 2008-09-06 21:34:07 +0200 (Sat, 06 Sep 2008) | 2 lines Update README. ........ r5297 | fwierzbicki | 2008-09-06 22:57:46 +0200 (Sat, 06 Sep 2008) | 2 lines Remove more leakage from asm branch into build.xml. ........ r5301 | fwierzbicki | 2008-09-07 07:57:26 +0200 (Sun, 07 Sep 2008) | 2 lines Committing Nicholas Riley's patch after getting test_ast.py to work. See http://bugs.jython.org/issue1758279. ........ r5302 | otmarhumbel | 2008-09-08 16:41:41 +0200 (Mon, 08 Sep 2008) | 9 lines Fix for issue #1123: Weird "unexpected at this time" error. The tests if environment variables JAVA_HOME or JYTHON_HOME are set did not work: - if the path contained a space - if the variable really was not set The passed (manual, so far) tests can be found in: http://bugs.jython.org/msg3489 ........ r5303 | leosoto | 2008-09-08 19:48:28 +0200 (Mon, 08 Sep 2008) | 1 line SystemRandom implementation taken from CPython. It depends on urandom(), which seems supported now through jna-posix ........ r5304 | fwierzbicki | 2008-09-09 20:42:57 +0200 (Tue, 09 Sep 2008) | 2 lines Fix some offset problems in DEDENT, INDENT, and EOF. ........ r5305 | fwierzbicki | 2008-09-09 21:06:17 +0200 (Tue, 09 Sep 2008) | 3 lines from: http://svn.python.org/projects/python/branches/release25-maint/Lib@66318 ........ r5307 | fwierzbicki | 2008-09-09 23:15:54 +0200 (Tue, 09 Sep 2008) | 2 lines Disable refcount test with is_jython check. ........ r5308 | otmarhumbel | 2008-09-10 00:34:55 +0200 (Wed, 10 Sep 2008) | 1 line applied leosoto's patch from http://bugs.jython.org/issue1077 to avoid duplicate entries in jython-complete.jar ........ r5313 | fwierzbicki | 2008-09-10 20:36:16 +0200 (Wed, 10 Sep 2008) | 3 lines Make it possible to get error nodes into the spots that are now casting to exprType. ........ r5314 | otmarhumbel | 2008-09-11 00:45:07 +0200 (Thu, 11 Sep 2008) | 3 lines since property cpythonlib.present is always true if jython is checked out correctly, but is evaluated too early (long before checkout) during a full-build, it has probably no usage any more ........ r5315 | otmarhumbel | 2008-09-11 01:06:04 +0200 (Thu, 11 Sep 2008) | 4 lines reintroduced the possibility to suppress checkout in full-build (setting do.checkout to 'false' does not prevent from checking out, but not setting the property at all really does) so full-build behaviour should remain the same ........ r5316 | fwierzbicki | 2008-09-11 02:37:30 +0200 (Thu, 11 Sep 2008) | 2 lines update readme for Jython 2.5a3. ........ r5317 | fwierzbicki | 2008-09-11 02:39:43 +0200 (Thu, 11 Sep 2008) | 2 lines Change defaults for alpha 3. ........ r5320 | fwierzbicki | 2008-09-11 21:48:35 +0200 (Thu, 11 Sep 2008) | 3 lines Transform if/elif/else into the correct If nodes in the grammar file instead of as a code post-processing step. ........ r5321 | fwierzbicki | 2008-09-11 22:18:43 +0200 (Thu, 11 Sep 2008) | 2 lines Allow the possibility of using error nodes for bad stmtType. ........ r5323 | leosoto | 2008-09-13 19:04:58 +0200 (Sat, 13 Sep 2008) | 1 line Test for the 'feature' described on #1089: cStringIO.StringIO.read always returns string objects ........ r5324 | amak | 2008-09-13 20:09:58 +0200 (Sat, 13 Sep 2008) | 11 lines Checking in fixes for 3 bugs http://bugs.jython.org/issue1119 - socket module has no attribute SO_ERROR http://bugs.jython.org/issue1120 - invalid socket shutdown gives AssertionError, should be "transport endpoint not connected" socket.error http://bugs.jython.org/issue1121 - listening socket shutdown expects the wrong kind of socket ........ r5325 | amak | 2008-09-13 20:31:07 +0200 (Sat, 13 Sep 2008) | 5 lines Change of mind on behaviour when shutting down server sockets. Instead to raising an exception, best to let the failure pass silently, as cpython does. http://bugs.jython.org/issue1121 ........ r5327 | zyasoft | 2008-09-13 21:02:55 +0200 (Sat, 13 Sep 2008) | 2 lines Tests that __module__ is available during class definition time, for #1022 ........ r5328 | zyasoft | 2008-09-14 02:08:28 +0200 (Sun, 14 Sep 2008) | 4 lines Adds tests: test_copy, test_profilehooks, test_random, test_syntax, test_trace that should be reasonable for Jython (possibly with modifications) Provides coverage for #1738411 ........ r5329 | pjenvey | 2008-09-14 02:27:02 +0200 (Sun, 14 Sep 2008) | 1 line small cleanup ........ r5333 | fwierzbicki | 2008-09-16 01:57:05 +0200 (Tue, 16 Sep 2008) | 2 lines make accept and traverse no-ops for error nodes. ........ r5339 | fwierzbicki | 2008-09-18 21:07:35 +0200 (Thu, 18 Sep 2008) | 3 lines Fixed another eof/whitespace parsing issue from Django. Turned all of these problems into a new test: test_eof_jy.py. ........ r5340 | fwierzbicki | 2008-09-18 21:37:19 +0200 (Thu, 18 Sep 2008) | 3 lines Unicode ast node is a kludge from long ago whose time has passed. I forgot to remove it when I unified str node handling in the parser. ........ r5341 | leosoto | 2008-09-20 04:08:34 +0200 (Sat, 20 Sep 2008) | 1 line PyType now exposes __repr__ and __str__ as documented on <http://wiki.python.org/jython/JythonDeveloperGuide/ImplementingStrAndRepr>. This fixes #1131 ........ r5342 | leosoto | 2008-09-21 02:20:23 +0200 (Sun, 21 Sep 2008) | 1 line importing test_support from the test package on test_exceptions.py ........ r5343 | pjenvey | 2008-09-24 21:44:25 +0200 (Wed, 24 Sep 2008) | 4 lines it's more correct for StdoutWrapper to write the object being printed to the file instead of __str__'ing it refs #1130 ........ r5344 | pjenvey | 2008-09-24 21:56:28 +0200 (Wed, 24 Sep 2008) | 1 line revert r5343, it's broken ........ r5345 | fwierzbicki | 2008-09-24 23:05:39 +0200 (Wed, 24 Sep 2008) | 4 lines Switched PythonPartial.g from being a "grammar" to being a "parser grammar", plus some additional related cleanup. This fixes all of the missing Token warnings. Thanks to Terrance Parr for suggesting this fix. ........ r5346 | thobes | 2008-09-25 00:12:23 +0200 (Thu, 25 Sep 2008) | 4 lines Fixed the bug of the __exit__ method not being invoked on the outer context manager in the case of nested with statements. The problem was that the exception handlers were not properly sorted. ........ r5347 | thobes | 2008-09-25 20:52:30 +0200 (Thu, 25 Sep 2008) | 7 lines Fix of the bug with "def f(): lambda x=(yield): 1". The problem was that the order of instructions were such that there was elements on the stack before the yield-point that does not get restored. I also found another problem in that the types for local variables in CodeCompiler are not proper java types, this is in error in nearly all places, and needs to be fixed in a later commit. ........ r5348 | pjenvey | 2008-09-25 23:12:28 +0200 (Thu, 25 Sep 2008) | 5 lines bump tarfile from 2.5.1 to 2.5.2, from: http://svn.python.org/projects/python/branches/release25-maint/Lib tarfile.py@60730 test/test_tarfile.py@60730 ........ r5349 | pjenvey | 2008-09-25 23:16:30 +0200 (Thu, 25 Sep 2008) | 6 lines reapply previous tarfile modifications: o don't assume a reference counting GC o ensure all file handles are closed to avoid os.remove problems on windows o always use the tempdir, even when testtar is a relative path (it is when ran via the regrtest) ........ r5350 | fwierzbicki | 2008-09-26 16:41:55 +0200 (Fri, 26 Sep 2008) | 3 lines Correct this for new __class__.__name__ package truncating behavior of Java classes. ........ r5351 | thobes | 2008-09-26 17:37:19 +0200 (Fri, 26 Sep 2008) | 4 lines Fix to allow the yield statement to apear in the first iterator of a generator expression. This exposes another problem where the stack state is not persisted from yielding to resuming. ........ r5352 | fwierzbicki | 2008-09-26 19:01:58 +0200 (Fri, 26 Sep 2008) | 3 lines Fixes an infinite loop that occurs when there is an unterminated triple string and ListErrorHandler is being used. ........ r5353 | fwierzbicki | 2008-10-01 04:01:33 +0200 (Wed, 01 Okt 2008) | 3 lines Added castSlice and castSlices to allow optional error nodes for sliceType. Also renamed makeExpr(s) and makeStmt(s) to castExpr(s) and castStmt(s). ........ r5354 | pjenvey | 2008-10-02 02:13:21 +0200 (Thu, 02 Okt 2008) | 2 lines remove more remnants of org.python.antlr.ast.Unicode ........ r5355 | pjenvey | 2008-10-02 02:16:29 +0200 (Thu, 02 Okt 2008) | 1 line whitespace ........ r5356 | pjenvey | 2008-10-02 04:31:03 +0200 (Thu, 02 Okt 2008) | 3 lines from: http://svn.python.org/projects/python/branches/release25-maint/Lib/test/test_asynchat.py@46906 ........ r5357 | pjenvey | 2008-10-05 02:00:24 +0200 (Sun, 05 Okt 2008) | 3 lines avoid test_asynchat on BSD where it deadlocks refs #1064 ........ r5358 | pjenvey | 2008-10-05 02:01:52 +0200 (Sun, 05 Okt 2008) | 1 line fix mislabeled names ........ r5359 | zyasoft | 2008-10-06 05:02:29 +0200 (Mon, 06 Okt 2008) | 3 lines From http://svn.python.org/projects/python/branches/release25-maint/Lib/test/test_random.py@53510 ........ r5360 | zyasoft | 2008-10-06 05:12:34 +0200 (Mon, 06 Okt 2008) | 6 lines Removed older version of random.py in favor of CPythonLib's; added _random.getrandbits (in PyRandom); modified test_random so that it doesn't test implementation specific aspects of the random generator, since we actually use java.util.Random, not the Mersenne Twister. ........ r5361 | zyasoft | 2008-10-06 20:57:58 +0200 (Mon, 06 Okt 2008) | 6 lines Fixed test_quopri by encoding space or tab before newline and resetting the column count upon a newline Fixed #1144 so that -mMODULE works and remaining args are passed in sys.argv ........ r5362 | zyasoft | 2008-10-06 22:42:04 +0200 (Mon, 06 Okt 2008) | 3 lines From http://svn.python.org/projects/python/branches/release25-maint/Lib/test/test_trace.py@60582 ........ r5363 | zyasoft | 2008-10-06 23:48:03 +0200 (Mon, 06 Okt 2008) | 6 lines Removed test cases not applicable to Jython. Although it's not possible to implement jump when compiled to Java bytecode, it's possible that we can better align our trace with what is done in CPython, so this should be revisited at some point. ........ r5364 | zyasoft | 2008-10-07 00:00:46 +0200 (Tue, 07 Okt 2008) | 3 lines From http://svn.python.org/projects/python/branches/release25-maint/Lib/test/test_profilehooks.py@35570 ........ r5365 | zyasoft | 2008-10-07 00:08:13 +0200 (Tue, 07 Okt 2008) | 5 lines Similar mass removal of tests as in test_trace, these all are related to some fundamental differences in our VM, especially around exception handling. ........ r5366 | pjenvey | 2008-10-10 01:23:05 +0200 (Fri, 10 Okt 2008) | 3 lines fix lambdas within decorator args causing an NPE. we weren't initializing their scopes ........ r5367 | fwierzbicki | 2008-10-10 20:12:58 +0200 (Fri, 10 Okt 2008) | 2 lines Cleaning up dead code. ........ r5368 | zyasoft | 2008-10-11 04:24:42 +0200 (Sat, 11 Okt 2008) | 3 lines From http://svn.python.org/projects/python/branches/release25-maint/Lib/test/test_copy.py@42573 ........ r5369 | zyasoft | 2008-10-11 04:38:55 +0200 (Sat, 11 Okt 2008) | 9 lines Make "extended" builtin functions in __builtin__ (that is, functions like max which use a class like MaxFunction for their definition) copyable by copy.copy and return the correct type. This fixes test_copy, along with enabling reflexive structures to be compared, since we don't prohibit or otherwise detect them in the copying anyway. ........ r5370 | zyasoft | 2008-10-11 05:37:39 +0200 (Sat, 11 Okt 2008) | 2 lines Patch from #1075, thanks Matt Boersma! ........ r5371 | pjenvey | 2008-10-11 07:08:23 +0200 (Sat, 11 Okt 2008) | 3 lines disable test_compiler as we don't intend to support the parser module compiler relies on, with _ast being the way forward ........ r5372 | pjenvey | 2008-10-11 08:42:35 +0200 (Sat, 11 Okt 2008) | 3 lines fix solid_base potentially resolving the wrong type when called before the mro was initialized. caused best_base to blowup with a TypeError ........ r5373 | fwierzbicki | 2008-10-11 22:54:47 +0200 (Sat, 11 Okt 2008) | 3 lines Throw a Python exception for two internal compiler errors that where just printing a less useful error message and going on to an NPE. ........ r5374 | fwierzbicki | 2008-10-11 23:29:29 +0200 (Sat, 11 Okt 2008) | 11 lines A very basic start to supporting pep 328 style relative imports like from . import foo This patch just passes the "level" (that is number of dots) information from the compile to the import machinary without actually using it, and forbids from . import * As Python 2.5 does. ........ r5375 | pjenvey | 2008-10-12 01:16:54 +0200 (Sun, 12 Okt 2008) | 2 lines fix unicodedata.lookup to return unicode instead of the codepoint int ........ r5376 | zyasoft | 2008-10-12 02:18:38 +0200 (Sun, 12 Okt 2008) | 3 lines From http://svn.python.org/projects/python/branches/release25-maint/Lib/test/test_struct.py@60892 ........ r5377 | zyasoft | 2008-10-12 02:24:30 +0200 (Sun, 12 Okt 2008) | 2 lines Implemented struct.Struct as well as other updates in the struct module for 2.5 ........ r5378 | zyasoft | 2008-10-12 02:25:07 +0200 (Sun, 12 Okt 2008) | 2 lines Missing module for previous commit! ........ r5379 | fwierzbicki | 2008-10-12 18:28:15 +0200 (Sun, 12 Okt 2008) | 7 lines More groundwork for absolute_import. Passing level info into most of the places it needs to go, also now sending the correct level information when "from __future__ import absolute_import" is issued. Added a constant in imp.java DEFAULT_LEVEL, so that it can be changed in one place when absolute import becomes the default behavior. ........ r5380 | pjenvey | 2008-10-12 22:10:04 +0200 (Sun, 12 Okt 2008) | 5 lines fix bad bytecode generated for: a[[b for b, c in d]] = e the store was losing track of the value (e) here because the list comp/tuple unpack combo overwrote where e's location was held ........ r5381 | pjenvey | 2008-10-13 00:18:06 +0200 (Mon, 13 Okt 2008) | 2 lines better unhashable TypeError messages ........ r5382 | pjenvey | 2008-10-13 00:37:53 +0200 (Mon, 13 Okt 2008) | 2 lines update the deriveds for better unhashable TypeError messages ........ r5383 | pjenvey | 2008-10-13 01:00:34 +0200 (Mon, 13 Okt 2008) | 1 line fix the renamed _collections ........ r5384 | fwierzbicki | 2008-10-13 19:19:47 +0200 (Mon, 13 Okt 2008) | 2 lines Fixed issue http://bugs.jython.org/issue1111: keyword arguments not supported on __import__ ........ r5385 | fwierzbicki | 2008-10-13 19:31:05 +0200 (Mon, 13 Okt 2008) | 4 lines disable test_transformer for the same reason we disabled test_compiler: we don't intend to support the parser module compiler relies on, with _ast being the way forward. transformer.py is in the same area of code. ........ r5386 | fwierzbicki | 2008-10-13 20:50:06 +0200 (Mon, 13 Okt 2008) | 7 lines Fixed "expected skips" that wheren't actually being skipped. Also added test_peepholer and test_profile to expected failures since these are platform specific tests. This is a work around, we should (most likely) go back and force these expected failures to skip in Jython, but I want to do that in one future sweep. ........ r5387 | fwierzbicki | 2008-10-13 21:41:45 +0200 (Mon, 13 Okt 2008) | 3 lines from http://svn.python.org/projects/python/branches/release25-maint/Lib/test/test_with.py@66619 ........ r5388 | fwierzbicki | 2008-10-13 22:38:36 +0200 (Mon, 13 Okt 2008) | 4 lines Disabling tests of "as" and "with" semi-keyword status, for now it's too hard to get antlr to treat them as almost-keywords. I want to revisit, but this is a low priority compared to other problems. ........ r5389 | cgroves | 2008-10-14 03:47:30 +0200 (Tue, 14 Okt 2008) | 1 line Jarjar if antlr changed more recently than the jarjar'd jar. Jar. ........ r5390 | leosoto | 2008-10-14 05:20:10 +0200 (Tue, 14 Okt 2008) | 1 line Now String is mapped to PyUnicode on ClassicPyObjectAdapter (instead of mapping it to PyString). Thus, for APIs which really need to return bytestrings (such as PyFile) we now have to explicitely declare the return type as PyString (and on code written in Python, use StringUtil.asPyString(String)). Fixes #1128 ........ r5391 | fwierzbicki | 2008-10-14 18:43:46 +0200 (Tue, 14 Okt 2008) | 4 lines Fix or skips for most remaining problems in test_syntax.py. All remaining problems are due to the lack of enforcement on continuations not being permitted in finally. ........ r5392 | fwierzbicki | 2008-10-14 21:28:28 +0200 (Tue, 14 Okt 2008) | 4 lines Added inFinally parameter to suite rule, and a dynamically scoped parameter continueIllegal to support disallowing continue in a finally clause. This fixes test_syntax. ........ r5393 | pjenvey | 2008-10-15 01:08:45 +0200 (Wed, 15 Okt 2008) | 5 lines o fix the socket hostname functions returning unicode hostnames instead of strs. was causing test_wsgiref to fail on environments where socket.getfqdn('localhost') != 'localhost' o fix getaddrinfo default family and handling of bad familys ........ r5394 | pjenvey | 2008-10-15 02:46:02 +0200 (Wed, 15 Okt 2008) | 2 lines fix solid_base considering slotted objects with a __dict__ as solid ........ r5395 | cgroves | 2008-10-15 06:42:15 +0200 (Wed, 15 Okt 2008) | 8 lines Remove build/exposed from the classpath. Having it in there meant any source navigation like F3 or Open Type would go to the exposed version rather than the source version that you were really after. Not having it in there means you need to add the exposed dir to the classpath of any run configurations in Eclipse, but that felt like a lesser evil than my smiting my keyboard in frustration every time Eclipse opened the wrong file. ........ r5396 | otmarhumbel | 2008-10-15 07:35:53 +0200 (Wed, 15 Okt 2008) | 1 line fixed typo: _JAVA_HOME has to be JAVA_HOME ........ r5397 | otmarhumbel | 2008-10-15 10:10:37 +0200 (Wed, 15 Okt 2008) | 7 lines safely test if JAVA_HOME or JYTHON_HOME is set we can now handle both quoted and unquoted settings like: JAVA_HOME=C:\Program Files\Java\jdk1.6.0_07 JAVA_HOME="C:\Program Files\Java\jdk1.6.0_07" this should fix issue #1125 ........ r5398 | otmarhumbel | 2008-10-15 17:56:58 +0200 (Wed, 15 Okt 2008) | 1 line applied lsoto's PyString change (revision 5390) to this handler as well ........ r5399 | fwierzbicki | 2008-10-15 19:06:58 +0200 (Wed, 15 Okt 2008) | 6 lines New dotted and absolute import support. I have local tests, but have not figured out how to integrate them into the regression tests. Examining the tests in CPython does not appear to give much guidance here, the testing of these features looks pretty thin (mainly they test features around __package__ which is new in 2.6). Maybe I just haven't found the relevant tests? ........ r5400 | fwierzbicki | 2008-10-15 22:10:46 +0200 (Wed, 15 Okt 2008) | 2 lines ? was replaced by <module> in info. ........ r5401 | fwierzbicki | 2008-10-15 22:16:53 +0200 (Wed, 15 Okt 2008) | 5 lines Guard the Java-specific top imports with an is_jython. This way some of the bugtests can run in pure python to make it easier to tilt at this windmill: http://code.google.com/p/google-highly-open-participation-psf/source/browse/trunk/submissions/jython-tests-26-50.txt?r=424 Windmill summary: Turn all bugtests into real unit tests or kill. ........ r5402 | fwierzbicki | 2008-10-15 22:22:02 +0200 (Wed, 15 Okt 2008) | 2 lines Move bugtests/test076.py into regrtest. ........ r5403 | fwierzbicki | 2008-10-15 22:23:35 +0200 (Wed, 15 Okt 2008) | 2 lines test077.py is well tested in our current unit tests. ........ r5404 | fwierzbicki | 2008-10-15 22:35:18 +0200 (Wed, 15 Okt 2008) | 2 lines test078.py is outdated. ........ r5405 | fwierzbicki | 2008-10-15 22:37:54 +0200 (Wed, 15 Okt 2008) | 2 lines "find" is well tested and doesn't need this extra test. ........ r5406 | fwierzbicki | 2008-10-15 22:41:18 +0200 (Wed, 15 Okt 2008) | 3 lines test_pkgimport.py already does a reasonable job of checking multiple imports of the same .py file. ........ r5407 | fwierzbicki | 2008-10-15 22:42:47 +0200 (Wed, 15 Okt 2008) | 2 lines cleanup dead code. ........ r5408 | fwierzbicki | 2008-10-15 22:44:08 +0200 (Wed, 15 Okt 2008) | 2 lines This basic re functionality is well tested in our existing unit tests. ........ r5409 | fwierzbicki | 2008-10-15 22:52:30 +0200 (Wed, 15 Okt 2008) | 4 lines test089.py looks like it is very confused :) Maybe string.replace changed oh so long ago? /me shrugs and deletes. ........ r5410 | fwierzbicki | 2008-10-15 22:55:46 +0200 (Wed, 15 Okt 2008) | 6 lines Comment at the top Does not work, will never work. Wow. Deleted. ........ r5411 | fwierzbicki | 2008-10-16 03:48:49 +0200 (Thu, 16 Okt 2008) | 2 lines another "will never work" test. Deleted. ........ r5412 | fwierzbicki | 2008-10-16 03:53:07 +0200 (Thu, 16 Okt 2008) | 3 lines Just tests the existance of a __name__ and __doc__ for the exceptions module. Not enough of a test to preserve. ........ r5413 | fwierzbicki | 2008-10-16 03:53:49 +0200 (Thu, 16 Okt 2008) | 2 lines deleting completely empty test. ........ r5414 | fwierzbicki | 2008-10-16 04:21:51 +0200 (Thu, 16 Okt 2008) | 2 lines Moved unique id test to test_jy_internals ........ r5415 | fwierzbicki | 2008-10-16 04:56:10 +0200 (Thu, 16 Okt 2008) | 2 lines First get test102.py working again... ........ r5416 | fwierzbicki | 2008-10-16 05:11:28 +0200 (Thu, 16 Okt 2008) | 2 lines test102 moved to test_jy_internals.py ........ r5417 | fwierzbicki | 2008-10-16 05:14:39 +0200 (Thu, 16 Okt 2008) | 2 lines Another empty test. ........ r5418 | fwierzbicki | 2008-10-16 05:15:27 +0200 (Thu, 16 Okt 2008) | 2 lines Another "does not work" ........ r5419 | pjenvey | 2008-10-16 05:28:52 +0200 (Thu, 16 Okt 2008) | 2 lines another unicode/str regression: co_name and co_filename should be a str ........ r5420 | pjenvey | 2008-10-16 08:38:43 +0200 (Thu, 16 Okt 2008) | 3 lines fix os.access not handling multiple modes, and make its X_OK work via jna-posix's stat ........ r5421 | fwierzbicki | 2008-10-16 14:07:24 +0200 (Thu, 16 Okt 2008) | 3 lines Move essential part of test106 to test_jy_compile.py (bare return not permitted in exec). ........ r5422 | fwierzbicki | 2008-10-16 14:15:26 +0200 (Thu, 16 Okt 2008) | 2 lines First make test107 pass in both python and jython ........ r5423 | fwierzbicki | 2008-10-16 14:42:06 +0200 (Thu, 16 Okt 2008) | 2 lines move test107 to test_jy_internals.py ........ r5424 | fwierzbicki | 2008-10-16 16:26:23 +0200 (Thu, 16 Okt 2008) | 2 lines Moved test108 to test_dict_jy ........ r5425 | fwierzbicki | 2008-10-16 16:27:55 +0200 (Thu, 16 Okt 2008) | 2 lines This basic functionality is well tested. ........ r5426 | fwierzbicki | 2008-10-16 16:29:48 +0200 (Thu, 16 Okt 2008) | 2 lines Basic dict functionality that is well tested in the unit tests. ........ r5427 | fwierzbicki | 2008-10-16 16:31:14 +0200 (Thu, 16 Okt 2008) | 3 lines Pretty much just a test for lists being disallowed as a key which is already in the unit tests. ........ r5428 | fwierzbicki | 2008-10-16 16:33:33 +0200 (Thu, 16 Okt 2008) | 2 lines Basic slice ops that are already well tested. ........ r5429 | fwierzbicki | 2008-10-16 16:34:25 +0200 (Thu, 16 Okt 2008) | 2 lines This test doesn't make much sense. ........ r5430 | fwierzbicki | 2008-10-16 16:36:02 +0200 (Thu, 16 Okt 2008) | 2 lines basic test of int subclasses which is well covered by current tests. ........ r5431 | fwierzbicki | 2008-10-16 18:13:52 +0200 (Thu, 16 Okt 2008) | 2 lines Leftover for long-gone test049. ........ r5432 | fwierzbicki | 2008-10-16 18:18:04 +0200 (Thu, 16 Okt 2008) | 2 lines move test124 to test_jy_internals. ........ r5433 | pjenvey | 2008-10-16 18:54:06 +0200 (Thu, 16 Okt 2008) | 1 line typo ........ r5434 | fwierzbicki | 2008-10-16 19:48:03 +0200 (Thu, 16 Okt 2008) | 3 lines The reload builtin is tested in a number of places in the unit tests, so this basic test of it can be deleted. ........ r5435 | fwierzbicki | 2008-10-16 19:48:56 +0200 (Thu, 16 Okt 2008) | 2 lines Very basic test of assert that is no longer needed as assert is well tested. ........ r5436 | fwierzbicki | 2008-10-16 19:50:37 +0200 (Thu, 16 Okt 2008) | 2 lines This test is already covered by a test in test_jy_internals. ........ r5437 | fwierzbicki | 2008-10-16 19:51:59 +0200 (Thu, 16 Okt 2008) | 2 lines Covered in test_jy_internals already. ........ r5438 | fwierzbicki | 2008-10-16 20:56:04 +0200 (Thu, 16 Okt 2008) | 2 lines moved test130 to test_cmp_jy. ........ r5439 | fwierzbicki | 2008-10-16 20:58:39 +0200 (Thu, 16 Okt 2008) | 2 lines This is well tested in test_hexoct.py ........ r5440 | fwierzbicki | 2008-10-16 22:19:50 +0200 (Thu, 16 Okt 2008) | 2 lines moved test131 into test_java_integration ........ r5441 | fwierzbicki | 2008-10-16 22:22:15 +0200 (Thu, 16 Okt 2008) | 2 lines test_glob thoroughly tests glob. ........ r5442 | fwierzbicki | 2008-10-16 22:24:04 +0200 (Thu, 16 Okt 2008) | 3 lines This really just tests that copy.copy exists. We run the real test_copy and so have no need for this test. ........ r5443 | fwierzbicki | 2008-10-16 22:32:40 +0200 (Thu, 16 Okt 2008) | 2 lines moved test136 to test_java_integration.py ........ r5444 | fwierzbicki | 2008-10-16 22:34:32 +0200 (Thu, 16 Okt 2008) | 2 lines better name for test method. ........ r5446 | cgroves | 2008-10-16 22:59:53 +0200 (Thu, 16 Okt 2008) | 9 lines Use assertRaises instead of try: code except ExpectedException: pass else: self.fail ........ r5447 | fwierzbicki | 2008-10-16 23:15:59 +0200 (Thu, 16 Okt 2008) | 3 lines put in null guard for cflags call. cflags can definitely be null at this point in the code. ........ r5452 | pjenvey | 2008-10-17 02:04:42 +0200 (Fri, 17 Okt 2008) | 2 lines minor xrange optimization: use the small int cache ........ r5453 | cgroves | 2008-10-17 09:06:39 +0200 (Fri, 17 Okt 2008) | 1 line A couple slices from Occam's razor, and speedups for items and keys by making arrays for PyList directly instead of making Lists and letting PyList turn them into arrays ........ r5454 | thobes | 2008-10-17 20:15:50 +0200 (Fri, 17 Okt 2008) | 3 lines Modifying the generated bytecode so that yield as an expression does not empty the stack. ........ r5455 | thobes | 2008-10-17 21:28:20 +0200 (Fri, 17 Okt 2008) | 2 lines Removed some erronious code in visitYield. ........ r5456 | thobes | 2008-10-17 22:46:47 +0200 (Fri, 17 Okt 2008) | 4 lines Improved the scope analysis for generator expressions. Also fixed a bug in my recent commit where the fix for yield as an expression accidentially reordered the value to be yielded on the stack. ........ r5457 | thobes | 2008-10-17 23:21:36 +0200 (Fri, 17 Okt 2008) | 4 lines Added a check for return and yield in the same scope in ScopesCompiler, There are cases that can be missed in CodeCompiler due to dead code elimination, this gets around that. ........ r5458 | pjenvey | 2008-10-18 01:55:52 +0200 (Sat, 18 Okt 2008) | 3 lines allow more heap for the regrtest to avoid the OutOfMemory errors. we don't seem to actually be leaking -- we just have more test modules ........ r5459 | pjenvey | 2008-10-18 01:56:07 +0200 (Sat, 18 Okt 2008) | 2 lines remove stray print statement that was preventing this from passing ........ r5460 | pjenvey | 2008-10-18 03:58:29 +0200 (Sat, 18 Okt 2008) | 4 lines store the symbol name info in a LinkedHashMap to maintain the order they're encountered in. fixes test_code technically this should bump the bytecode magic but it's not that important ........ r5462 | pjenvey | 2008-10-18 22:23:01 +0200 (Sat, 18 Okt 2008) | 3 lines fix os.access to never raise an exception with a valid mode, which I broke in r5420 ........ r5463 | pjenvey | 2008-10-19 02:01:20 +0200 (Sun, 19 Okt 2008) | 7 lines fix forgetting to free the var/starargs of Calls, which produced bad byte for: def gen(): if True: # or b(**c) a = b(*c) yield d ........ r5464 | cgroves | 2008-10-19 05:04:44 +0200 (Sun, 19 Okt 2008) | 1 line Some formatting and cleanup ........ r5465 | cgroves | 2008-10-19 07:14:22 +0200 (Sun, 19 Okt 2008) | 8 lines Rename PyBuiltinFunction to PyBuiltinCallable, and remake PyBuiltinFunction as a base for functions with the basic function stuff from PyBuiltinFunctionSet. Extend that with PyBuiltinFunctionNarrow for functions with a fixed set of args to match PyBuiltinMethodNarrow. Use the new function stuff to implement the builtin functions that were using ExtendedBuiltinFunction as real functions instead of PyObjects. ........ r5466 | cgroves | 2008-10-19 07:17:07 +0200 (Sun, 19 Okt 2008) | 1 line Missed a sppot ........ r5467 | pjenvey | 2008-10-19 08:51:07 +0200 (Sun, 19 Okt 2008) | 3 lines fix visitCompare leaving the left side on the stack, causing a minor short term memory leak ........ r5468 | zyasoft | 2008-10-19 17:16:29 +0200 (Sun, 19 Okt 2008) | 3 lines from http://svn.python.org/projects/python/branches/release25-maint/Lib/test/test_codeccallbacks.py@46456 ........ r5469 | pjenvey | 2008-10-19 22:51:56 +0200 (Sun, 19 Okt 2008) | 3 lines move the last visitCompare fix to after the end label so we also avoid the issue when a chained comparison fails fast ........ r5470 | zyasoft | 2008-10-20 00:04:51 +0200 (Mon, 20 Okt 2008) | 5 lines Make error handling in codecs so that it is also surrogate-aware. Fixes test_codeccallbacks Skip tests from test_threading not applicable to Jython. ........ r5471 | cgroves | 2008-10-20 01:17:44 +0200 (Mon, 20 Okt 2008) | 1 line Add a couple tests for subclass constructor visibility ........ r5472 | zyasoft | 2008-10-20 01:18:22 +0200 (Mon, 20 Okt 2008) | 7 lines PEP 342 specifies that an exception raised by close during finalization should be output to stderr, so we now do that. Fixed a minor doctest output formatting issue so that the desired syntax error is properly seen. ........ r5473 | cgroves | 2008-10-20 01:30:32 +0200 (Mon, 20 Okt 2008) | 1 line Replace StringUtil.asPyString with Py.newString ........ r5474 | pjenvey | 2008-10-20 02:44:52 +0200 (Mon, 20 Okt 2008) | 2 lines bump java's stack size to 768k on solaris, to fix test_cpickle there ........ r5475 | cgroves | 2008-10-20 03:01:39 +0200 (Mon, 20 Okt 2008) | 8 lines Add an ant resource collection that's like union except it combines based on the name of the resource instead of its full path. Use this to exclude the unexposed version of classes from jython.jar to keep it quiet. Resource collections didn't appear until Ant 1.7, but that came out nearly 2 years ago, so I'm hoping most people already have it. ........ r5476 | cgroves | 2008-10-20 03:40:25 +0200 (Mon, 20 Okt 2008) | 1 line Remove newcompiler since it's not being used now and it's going to be replaced by the advanced compiler ........ r5477 | cgroves | 2008-10-20 03:41:32 +0200 (Mon, 20 Okt 2008) | 1 line Move BaseTypeBuilder out of TypeExposer so the compile time bits of the exposing system can be excluded from jython.jar ........ r5478 | cgroves | 2008-10-20 04:03:44 +0200 (Mon, 20 Okt 2008) | 1 line Cleanup, modernization ........ r5479 | cgroves | 2008-10-20 08:29:50 +0200 (Mon, 20 Okt 2008) | 9 lines The pain of not having the generic inferring statics from Google collections finally got to the point where I felt the need to whip up version for Jython. Add Generic with static methods to make Lists, Maps and Sets that infer their generic types from the generics of whatever they're being assigned to. I went for brevity in naming the methods as I felt they'd be idiomatic enough in Jython to read well, but could be convinced that more descriptive names - newArrayList() instead of list() for example - would be better. ........ r5480 | thobes | 2008-10-20 13:13:38 +0200 (Mon, 20 Okt 2008) | 3 lines Fixed the evaluation order bug made visual by test_generators. Added a test file for evaluation order tests. ........ r5482 | thobes | 2008-10-20 19:19:57 +0200 (Mon, 20 Okt 2008) | 5 lines Added support for class decorators. The test file added for this (test_classdecorators) should be removed when we import test_decorators from CPython 3.x, because that is where the caes come from. This is also documented in that file. ........ r5483 | pjenvey | 2008-10-20 22:01:14 +0200 (Mon, 20 Okt 2008) | 2 lines make sock.listen() explicitly require the backlog argument to match CPython ........ r5484 | pjenvey | 2008-10-20 22:05:02 +0200 (Mon, 20 Okt 2008) | 4 lines revert r5474 and bump Java's stack size to 1024k, matching 64 bit Java's default. 32 bit needs an increase to at least 512k to pass test_cpickle, but we don't want to shrink 64 bit's default ........ r5485 | pjenvey | 2008-10-20 23:18:08 +0200 (Mon, 20 Okt 2008) | 5 lines o delete references to test.test_ modules in the test package after running them to conserve memory o bump ant regrtest's heap to 144m which is about the minimum needed for Apple's 64 bit Java 6 (server VM) ........ r5486 | fwierzbicki | 2008-10-20 23:37:06 +0200 (Mon, 20 Okt 2008) | 6 lines PythonPartial.g should allow decorators without classes or functions so that @foo is a valid partial sentence. ........ r5487 | pjenvey | 2008-10-21 01:53:47 +0200 (Tue, 21 Okt 2008) | 2 lines __iter__ is just another file_self call ........ r5488 | pjenvey | 2008-10-21 01:54:14 +0200 (Tue, 21 Okt 2008) | 3 lines allow abuse of _fileobject by fixing its close() to act like CPython's when the underlying _sock isn't a Jython socket. fixes test_urllib2net ........ r5489 | fwierzbicki | 2008-10-21 02:21:45 +0200 (Tue, 21 Okt 2008) | 2 lines moved test138 to test_str_jy. ........ r5490 | fwierzbicki | 2008-10-21 02:24:00 +0200 (Tue, 21 Okt 2008) | 2 lines spelling fix. ........ r5491 | fwierzbicki | 2008-10-21 02:35:49 +0200 (Tue, 21 Okt 2008) | 3 lines Charlie Groves pushed me over the "maybe the test is just dumb?" barrier. ........ r5492 | fwierzbicki | 2008-10-21 02:38:12 +0200 (Tue, 21 Okt 2008) | 3 lines This one looks like it is testing multiple inheritance of Java classes which is long gone. Also it imports a module which shouldn't exist. Deleting. ........ r5493 | fwierzbicki | 2008-10-21 02:40:02 +0200 (Tue, 21 Okt 2008) | 2 lines These three tests are well covered by existing tests. ........ r5494 | fwierzbicki | 2008-10-21 02:40:55 +0200 (Tue, 21 Okt 2008) | 2 lines This is well tested by existing unit tests. ........ r5495 | fwierzbicki | 2008-10-21 02:47:13 +0200 (Tue, 21 Okt 2008) | 2 lines Doesn't really test anything... ........ Revision Links: -------------- http://jython.svn.sourceforge.net/jython/?rev=5390&view=rev Modified Paths: -------------- branches/advanced/.classpath branches/advanced/CoreExposed.includes branches/advanced/Lib/javapath.py branches/advanced/Lib/os.py branches/advanced/Lib/socket.py branches/advanced/Lib/tarfile.py branches/advanced/Lib/test/regrtest.py branches/advanced/Lib/test/test_ast.py branches/advanced/Lib/test/test_class_jy.py branches/advanced/Lib/test/test_cmp_jy.py branches/advanced/Lib/test/test_dict_jy.py branches/advanced/Lib/test/test_exceptions.py branches/advanced/Lib/test/test_exceptions_jy.py branches/advanced/Lib/test/test_generators.py branches/advanced/Lib/test/test_java_integration.py branches/advanced/Lib/test/test_java_visibility.py branches/advanced/Lib/test/test_jy_compile.py branches/advanced/Lib/test/test_jy_internals.py branches/advanced/Lib/test/test_socket.py branches/advanced/Lib/test/test_syntax.py branches/advanced/Lib/test/test_tarfile.py branches/advanced/Lib/test/test_threading.py branches/advanced/Lib/unicodedata.py branches/advanced/Lib/zlib.py branches/advanced/NEWS branches/advanced/README.txt branches/advanced/ast/Python.asdl branches/advanced/ast/astview.py branches/advanced/ast/jastlib.py branches/advanced/bugtests/support.py branches/advanced/bugtests/test081.py branches/advanced/build.xml branches/advanced/compiler/org/python/compiler/DirectGenerator.java branches/advanced/compiler/org/python/compiler/FlowGraphGenerator.java branches/advanced/compiler/org/python/compiler/advanced/ast/AstToBytecode.java branches/advanced/grammar/Python.g branches/advanced/grammar/PythonPartial.g branches/advanced/src/com/ziclix/python/sql/DataHandler.java branches/advanced/src/com/ziclix/python/sql/JDBC20DataHandler.java branches/advanced/src/com/ziclix/python/sql/Jython22DataHandler.java branches/advanced/src/com/ziclix/python/sql/handler/InformixDataHandler.java branches/advanced/src/com/ziclix/python/sql/handler/MySQLDataHandler.java branches/advanced/src/com/ziclix/python/sql/handler/PostgresqlDataHandler.java branches/advanced/src/org/python/antlr/ExpressionParser.java branches/advanced/src/org/python/antlr/GrammarActions.java branches/advanced/src/org/python/antlr/InteractiveParser.java branches/advanced/src/org/python/antlr/PythonTokenSource.java branches/advanced/src/org/python/antlr/PythonTreeAdaptor.java branches/advanced/src/org/python/antlr/ast/ClassDef.java branches/advanced/src/org/python/antlr/ast/ErrorExpr.java branches/advanced/src/org/python/antlr/ast/ErrorMod.java branches/advanced/src/org/python/antlr/ast/ErrorSlice.java branches/advanced/src/org/python/antlr/ast/ErrorStmt.java branches/advanced/src/org/python/antlr/ast/VisitorBase.java branches/advanced/src/org/python/antlr/ast/VisitorIF.java branches/advanced/src/org/python/compiler/AdapterMaker.java branches/advanced/src/org/python/compiler/ArgListCompiler.java branches/advanced/src/org/python/compiler/ClassFile.java branches/advanced/src/org/python/compiler/Code.java branches/advanced/src/org/python/compiler/CodeCompiler.java branches/advanced/src/org/python/compiler/Constant.java branches/advanced/src/org/python/compiler/Future.java branches/advanced/src/org/python/compiler/JavaMaker.java branches/advanced/src/org/python/compiler/Module.java branches/advanced/src/org/python/compiler/ProxyMaker.java branches/advanced/src/org/python/compiler/ScopeInfo.java branches/advanced/src/org/python/compiler/ScopesCompiler.java branches/advanced/src/org/python/core/ArgParser.java branches/advanced/src/org/python/core/BytecodeLoader.java branches/advanced/src/org/python/core/ParserFacade.java branches/advanced/src/org/python/core/Py.java branches/advanced/src/org/python/core/PyArray.java branches/advanced/src/org/python/core/PyArrayDerived.java branches/advanced/src/org/python/core/PyBaseExceptionDerived.java branches/advanced/src/org/python/core/PyBeanEvent.java branches/advanced/src/org/python/core/PyBeanEventProperty.java branches/advanced/src/org/python/core/PyBooleanDerived.java branches/advanced/src/org/python/core/PyBuiltinFunction.java branches/advanced/src/org/python/core/PyBuiltinFunctionSet.java branches/advanced/src/org/python/core/PyBuiltinMethod.java branches/advanced/src/org/python/core/PyBuiltinMethodNarrow.java branches/advanced/src/org/python/core/PyBuiltinMethodSet.java branches/advanced/src/org/python/core/PyClass.java branches/advanced/src/org/python/core/PyClassMethodDerived.java branches/advanced/src/org/python/core/PyClassMethodDescr.java branches/advanced/src/org/python/core/PyComplexDerived.java branches/advanced/src/org/python/core/PyDictionary.java branches/advanced/src/org/python/core/PyDictionaryDerived.java branches/advanced/src/org/python/core/PyEnumerate.java branches/advanced/src/org/python/core/PyEnumerateDerived.java branches/advanced/src/org/python/core/PyFile.java branches/advanced/src/org/python/core/PyFileDerived.java branches/advanced/src/org/python/core/PyFloatDerived.java branches/advanced/src/org/python/core/PyFrozenSetDerived.java branches/advanced/src/org/python/core/PyFunction.java branches/advanced/src/org/python/core/PyGenerator.java branches/advanced/src/org/python/core/PyInstance.java branches/advanced/src/org/python/core/PyIntegerDerived.java branches/advanced/src/org/python/core/PyJavaClass.java branches/advanced/src/org/python/core/PyList.java branches/advanced/src/org/python/core/PyListDerived.java branches/advanced/src/org/python/core/PyLongDerived.java branches/advanced/src/org/python/core/PyMethodDescr.java branches/advanced/src/org/python/core/PyModuleDerived.java branches/advanced/src/org/python/core/PyNewWrapper.java branches/advanced/src/org/python/core/PyObject.java branches/advanced/src/org/python/core/PyObjectDerived.java branches/advanced/src/org/python/core/PyPropertyDerived.java branches/advanced/src/org/python/core/PySet.java branches/advanced/src/org/python/core/PySetDerived.java branches/advanced/src/org/python/core/PySlice.java branches/advanced/src/org/python/core/PySliceDerived.java branches/advanced/src/org/python/core/PyStringDerived.java branches/advanced/src/org/python/core/PyStringMap.java branches/advanced/src/org/python/core/PySuper.java branches/advanced/src/org/python/core/PySuperDerived.java branches/advanced/src/org/python/core/PySystemState.java branches/advanced/src/org/python/core/PyTableCode.java branches/advanced/src/org/python/core/PyTraceback.java branches/advanced/src/org/python/core/PyTupleDerived.java branches/advanced/src/org/python/core/PyType.java branches/advanced/src/org/python/core/PyTypeDerived.java branches/advanced/src/org/python/core/PyUnicode.java branches/advanced/src/org/python/core/PyUnicodeDerived.java branches/advanced/src/org/python/core/PyXRange.java branches/advanced/src/org/python/core/__builtin__.java branches/advanced/src/org/python/core/adapter/ClassicPyObjectAdapter.java branches/advanced/src/org/python/core/codecs.java branches/advanced/src/org/python/core/exceptions.java branches/advanced/src/org/python/core/imp.java branches/advanced/src/org/python/expose/generate/ExposeTask.java branches/advanced/src/org/python/expose/generate/ExposedMethodFinder.java branches/advanced/src/org/python/expose/generate/ExposedTypeProcessor.java branches/advanced/src/org/python/expose/generate/PyTypes.java branches/advanced/src/org/python/expose/generate/TypeExposer.java branches/advanced/src/org/python/modules/_collections/PyDefaultDict.java branches/advanced/src/org/python/modules/_collections/PyDefaultDictDerived.java branches/advanced/src/org/python/modules/_collections/PyDeque.java branches/advanced/src/org/python/modules/_collections/PyDequeDerived.java branches/advanced/src/org/python/modules/_csv/PyDialectDerived.java branches/advanced/src/org/python/modules/_functools/PyPartial.java branches/advanced/src/org/python/modules/_functools/PyPartialDerived.java branches/advanced/src/org/python/modules/_jython.java branches/advanced/src/org/python/modules/_weakref/ReferenceType.java branches/advanced/src/org/python/modules/_weakref/ReferenceTypeDerived.java branches/advanced/src/org/python/modules/binascii.java branches/advanced/src/org/python/modules/cPickle.java branches/advanced/src/org/python/modules/cStringIO.java branches/advanced/src/org/python/modules/operator.java branches/advanced/src/org/python/modules/random/PyRandom.java branches/advanced/src/org/python/modules/random/PyRandomDerived.java branches/advanced/src/org/python/modules/struct.java branches/advanced/src/org/python/modules/thread/PyLocalDerived.java branches/advanced/src/org/python/modules/time/Time.java branches/advanced/src/org/python/modules/zipimport/zipimporterDerived.java branches/advanced/src/org/python/util/jython.java branches/advanced/src/shell/jython branches/advanced/src/shell/jython.bat branches/advanced/src/templates/mappings branches/advanced/src/templates/object.derived branches/advanced/tests/java/org/python/antlr/PythonPartialTester.java branches/advanced/tests/java/org/python/expose/generate/ExposedTypeProcessorTest.java branches/advanced/tests/java/org/python/expose/generate/MethodExposerTest.java branches/advanced/tests/java/org/python/tests/VisibilityResults.java branches/advanced/tests/java/org/python/tests/Visible.java Added Paths: ----------- branches/advanced/Lib/test/eof_fodder1.py branches/advanced/Lib/test/eof_fodder2.py branches/advanced/Lib/test/eof_fodder3.py branches/advanced/Lib/test/eof_fodder4.py branches/advanced/Lib/test/eof_fodder5.py branches/advanced/Lib/test/eof_fodder6.py branches/advanced/Lib/test/test_StringIO_jy.py branches/advanced/Lib/test/test_asynchat.py branches/advanced/Lib/test/test_classdecorators.py branches/advanced/Lib/test/test_codeccallbacks.py branches/advanced/Lib/test/test_copy.py branches/advanced/Lib/test/test_eof_jy.py branches/advanced/Lib/test/test_evalorder.py branches/advanced/Lib/test/test_os.py branches/advanced/Lib/test/test_profilehooks.py branches/advanced/Lib/test/test_random.py branches/advanced/Lib/test/test_struct.py branches/advanced/Lib/test/test_trace.py branches/advanced/Lib/test/test_with.py branches/advanced/src/org/python/core/PyBuiltinCallable.java branches/advanced/src/org/python/core/PyBuiltinFunctionNarrow.java branches/advanced/src/org/python/expose/BaseTypeBuilder.java branches/advanced/src/org/python/modules/PyStruct.java branches/advanced/src/org/python/util/Generic.java branches/advanced/src/org/python/util/NameUnionAntType.java Removed Paths: ------------- branches/advanced/Lib/random.py branches/advanced/Lib/test/testtar.tar branches/advanced/bugtests/test049p/ branches/advanced/bugtests/test076.py branches/advanced/bugtests/test077.py branches/advanced/bugtests/test078.py branches/advanced/bugtests/test079.py branches/advanced/bugtests/test080.py branches/advanced/bugtests/test085.py branches/advanced/bugtests/test089.py branches/advanced/bugtests/test095.py branches/advanced/bugtests/test096.py branches/advanced/bugtests/test097.py branches/advanced/bugtests/test098.py branches/advanced/bugtests/test099.py branches/advanced/bugtests/test102.py branches/advanced/bugtests/test103.py branches/advanced/bugtests/test105.py branches/advanced/bugtests/test106.py branches/advanced/bugtests/test107.py branches/advanced/bugtests/test108.py branches/advanced/bugtests/test109.py branches/advanced/bugtests/test110.py branches/advanced/bugtests/test111.py branches/advanced/bugtests/test112.py branches/advanced/bugtests/test113.py branches/advanced/bugtests/test115.py branches/advanced/bugtests/test118.py branches/advanced/bugtests/test124.py branches/advanced/bugtests/test125.py branches/advanced/bugtests/test126.py branches/advanced/bugtests/test127.py branches/advanced/bugtests/test128.py branches/advanced/bugtests/test130.py branches/advanced/bugtests/test131.py branches/advanced/bugtests/test133.py branches/advanced/bugtests/test134.py branches/advanced/bugtests/test135.py branches/advanced/bugtests/test136.py branches/advanced/bugtests/test138.py branches/advanced/bugtests/test139.py branches/advanced/bugtests/test140.py branches/advanced/bugtests/test141.py branches/advanced/bugtests/test142.py branches/advanced/bugtests/test143.py branches/advanced/bugtests/test144.py branches/advanced/src/org/python/antlr/ast/Unicode.java branches/advanced/src/org/python/newcompiler/ Property Changed: ---------------- branches/advanced/ Property changes on: branches/advanced ___________________________________________________________________ Modified: svnmerge-integrated - /trunk/jython:1-5285 + /trunk/jython:1-5496 Modified: branches/advanced/.classpath =================================================================== --- branches/advanced/.classpath 2008-10-21 06:00:37 UTC (rev 5496) +++ branches/advanced/.classpath 2008-10-21 10:53:16 UTC (rev 5497) @@ -1,6 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> <classpath> - <classpathentry kind="lib" path="build/exposed"/> <classpathentry excluding="com/ziclix/python/sql/handler/InformixDataHandler.java|com/ziclix/python/sql/handler/OracleDataHandler.java" kind="src" output="build/classes" path="src"/> <classpathentry kind="src" output="build/classes" path="build/gensrc"/> <classpathentry kind="src" output="build/classes" path="tests/java"/> Modified: branches/advanced/CoreExposed.includes =================================================================== --- branches/advanced/CoreExposed.includes 2008-10-21 06:00:37 UTC (rev 5496) +++ branches/advanced/CoreExposed.includes 2008-10-21 10:53:16 UTC (rev 5497) @@ -2,7 +2,7 @@ org/python/core/PyBaseString.class org/python/core/PyBaseException.class org/python/core/PyBoolean.class -org/python/core/PyBuiltinFunction.class +org/python/core/PyBuiltinCallable.class org/python/core/PyCell.class org/python/core/PyClassMethod.class org/python/core/PyClassMethodDescr.class @@ -52,4 +52,5 @@ org/python/modules/thread/PyLocal.class org/python/modules/time/PyTimeTuple.class org/python/modules/zipimport/zipimporter.class +org/python/modules/PyStruct.class org/python/modules/PyTeeIterator.class Modified: branches/advanced/Lib/javapath.py =================================================================== --- branches/advanced/Lib/javapath.py 2008-10-21 06:00:37 UTC (rev 5496) +++ branches/advanced/Lib/javapath.py 2008-10-21 10:53:16 UTC (rev 5497) @@ -20,7 +20,9 @@ from java.lang import System import os +from org.python.core.Py import newString as asPyString + def _tostr(s, method): if isinstance(s, basestring): return s @@ -40,7 +42,7 @@ def dirname(path): """Return the directory component of a pathname""" path = _tostr(path, "dirname") - result = File(path).getParent() + result = asPyString(File(path).getParent()) if not result: if isabs(path): result = path # Must be root @@ -51,7 +53,7 @@ def basename(path): """Return the final component of a pathname""" path = _tostr(path, "basename") - return File(path).getName() + return asPyString(File(path).getName()) def split(path): """Split a pathname. @@ -128,7 +130,7 @@ if a == "": a = os.sep f = File(f, a) - return f.getPath() + return asPyString(f.getPath()) def normcase(path): """Normalize case of pathname. @@ -137,7 +139,7 @@ """ path = _tostr(path, "normcase") - return File(path).getPath() + return asPyString(File(path).getPath()) def commonprefix(m): "Given a list of pathnames, return the longest common leading component" @@ -197,7 +199,7 @@ if not c: return gethome() if c == os.sep: - return File(gethome(), path[2:]).getPath() + return asPyString(File(gethome(), path[2:]).getPath()) return path def getuser(): @@ -252,7 +254,7 @@ def _abspath(path): # Must use normpath separately because getAbsolutePath doesn't normalize # and getCanonicalPath would eliminate symlinks. - return normpath(File(sys.getPath(path)).getAbsolutePath()) + return normpath(asPyString(File(sys.getPath(path)).getAbsolutePath())) def realpath(path): """Return an absolute path normalized and symbolic links eliminated""" @@ -261,7 +263,7 @@ def _realpath(path): try: - return File(sys.getPath(path)).getCanonicalPath() + return asPyString(File(sys.getPath(path)).getCanonicalPath()) except java.io.IOException: return _abspath(path) Modified: branches/advanced/Lib/os.py =================================================================== --- branches/advanced/Lib/os.py 2008-10-21 06:00:37 UTC (rev 5496) +++ branches/advanced/Lib/os.py 2008-10-21 10:53:16 UTC (rev 5497) @@ -48,6 +48,7 @@ from java.io import File from org.python.core import PyFile from org.python.core.io import FileDescriptors, FileIO, IOBase +from org.python.core.Py import newString as asPyString # Mapping of: os._name: [name list, shell command list] _os_map = dict(nt=[ @@ -205,15 +206,15 @@ if i < 0 or i > 9: raise IndexError(i) return getattr(self, stat_result._stat_members[i][0]) - + def __setitem__(self, x, value): raise TypeError("object doesn't support item assignment") - + def __setattr__(self, name, value): if name in [x[0] for x in stat_result._stat_members]: raise TypeError(name) raise AttributeError("readonly attribute") - + def __len__(self): return 10 @@ -264,7 +265,7 @@ l = File(sys.getPath(path)).list() if l is None: raise OSError(0, 'No such directory', path) - return list(l) + return [asPyString(entry) for entry in l] def chmod(path, mode): """chmod(path, mode) @@ -303,14 +304,14 @@ # if making a /x/y/z/., java.io.File#mkdirs inexplicably fails. So we need # to force it - + # need to use _path instead of path, because param is hiding # os.path module in namespace! head, tail = _path.split(sys_path) if tail == curdir: if File(_path.join(head)).mkdirs(): return - + raise OSError(0, "couldn't make directories", path) def remove(path): @@ -362,7 +363,12 @@ """rmdir(path) Remove a directory.""" - if not File(sys.getPath(path)).delete(): + f = File(sys.getPath(path)) + if not f.exists(): + raise OSError(errno.ENOENT, errno.strerror(errno.ENOENT), path) + elif not f.isDirectory(): + raise OSError(errno.ENOTDIR, errno.strerror(errno.ENOTDIR), path) + elif not f.delete(): raise OSError(0, "couldn't delete directory", path) #XXX: copied from CPython 2.5.1 @@ -392,7 +398,7 @@ def strerror(code): """strerror(code) -> string - + Translate an error code to a message string. """ if not isinstance(code, (int, long)): @@ -404,7 +410,7 @@ def access(path, mode): """access(path, mode) -> True if granted, False otherwise - + Use the real uid/gid to test for access to a path. Note that most operations will use the effective uid/gid, therefore this routine can be used in a suid/sgid environment to test if the invoking user has the @@ -415,15 +421,20 @@ raise TypeError('an integer is required') f = File(sys.getPath(path)) + result = True if not f.exists(): - return False + result = False if mode & R_OK and not f.canRead(): - return False + result = False if mode & W_OK and not f.canWrite(): - return False + result = False if mode & X_OK: - return False - return True + # NOTE: always False without jna-posix stat + try: + result = (stat(path).st_mode & _stat.S_IEXEC) != 0 + except OSError: + result = False + return result def stat(path): """stat(path) -> stat result @@ -458,7 +469,7 @@ def lstat(path): """lstat(path) -> stat result - + Like stat(path), but do not follow symbolic links. """ abs_path = sys.getPath(path) @@ -545,7 +556,7 @@ """ftruncate(fd, length) Truncate a file to a specified length. - """ + """ rawio = FileDescriptors.get(fd) try: rawio.truncate(length) @@ -624,7 +635,7 @@ from org.python.core.util import StringUtil rawio = FileDescriptors.get(fd) buf = _handle_oserror(rawio.read, buffersize) - return str(StringUtil.fromBytes(buf)) + return asPyString(StringUtil.fromBytes(buf)) def write(fd, string): """write(fd, string) -> byteswritten @@ -647,7 +658,7 @@ if _name == 'posix' and _native_posix: def link(src, dst): """link(src, dst) - + Create a hard link to a file. """ _posix.link(sys.getPath(src), sys.getPath(dst)) @@ -661,7 +672,7 @@ def readlink(path): """readlink(path) -> path - + Return a string representing the path to which the symbolic link points. """ @@ -863,7 +874,7 @@ def putenv(key, value): """putenv(key, value) - + Change or add an environment variable. """ environ[key] = value Deleted: branches/advanced/Lib/random.py =================================================================== --- branches/advanced/Lib/random.py 2008-10-21 06:00:37 UTC (rev 5496) +++ branches/advanced/Lib/random.py 2008-10-21 10:53:16 UTC (rev 5497) @@ -1,863 +0,0 @@ -"""Random variable generators. - - integers - -------- - uniform within range - - sequences - --------- - pick random element - pick random sample - generate random permutation - - distributions on the real line: - ------------------------------ - uniform - normal (Gaussian) - lognormal - negative exponential - gamma - beta - pareto - Weibull - - distributions on the circle (angles 0 to 2pi) - --------------------------------------------- - circular uniform - ... [truncated message content] |