Commit Graph

1324 Commits

Author SHA1 Message Date
Benjamin Peterson 1e71a5c392 Add a simple (hopefully) cross-python marshaller
Will rewrite the tests soon...

--HG--
branch : trunk
2009-09-22 21:08:40 -05:00
Benjamin Peterson b3ca12d435 update docstring
--HG--
branch : trunk
2009-09-22 21:07:50 -05:00
Benjamin Peterson 8af3ede092 allow a path to explicity given for py.lookup
--HG--
branch : trunk
2009-09-22 21:04:25 -05:00
holger krekel 6ddea4a1bc visit() now returns paths in depth-first order. fixes issue #47
--HG--
branch : trunk
2009-09-22 19:13:33 +02:00
holger krekel e3b34c9da3 * allowing arbitrary keys for xspecs but adding some sanity checks to xspec-parsing and makegateway.
* fixing a python3 IO issue - we need to retain sys.stdout/stdin
  references to keep the underlying byte stream open.

--HG--
branch : trunk
2009-09-22 18:40:20 +02:00
Samuele Pedroni 1b97d06a09 (micke, pedronis)
teach the resultlog plugin about the xfail tweaked outcomes

--HG--
branch : trunk
2009-09-17 15:31:35 +02:00
Jurko 9fd1367845 Corrected the constructed system path value (broken by the env.cmd, env.sh & env.py file move in 4abc620bb044).
--HG--
branch : trunk
2009-09-12 00:35:57 +02:00
Jurko 62a4cf68e8 Fixed a typo in error.py causing it to fail on Windows.
--HG--
branch : trunk
2009-09-12 00:16:13 +02:00
holger krekel 47bad98c07 * various cleanups and detailed doc string for gateway_base module
* remove old multi-file-send mechanism/tests now that
  only gateway_base is send to the other side.
* adding some (c) notices where i am pretty sure about them.

--HG--
branch : trunk
2009-09-11 16:26:19 +02:00
holger krekel 22c1ad9f7b fix a bug with funcarg setup and remove XXX comment because "scope=module" now would work but leaving it as session for now.
--HG--
branch : trunk
2009-09-09 23:07:42 +02:00
holger krekel 5df58c619d * move gateway management code to py/test/dist because it's not clear
how generally useful it is.
* provide pytest_dist_makegateway(txspec) hook so that plugins
  can add their own interpretation/keywords.

--HG--
branch : trunk
2009-09-09 20:12:03 +02:00
holger krekel b70c7a209d * moving execnet tests to funcarg-style, some cleanup
* slight refinement to FAQ license topic

--HG--
branch : trunk
2009-09-08 10:10:36 +02:00
holger krekel 0f29b503ef monkeypatch, doc, apiwarn, deprecation fixes
--HG--
branch : trunk
2009-09-07 17:53:50 +02:00
holger krekel 29d437489d some fixes to support Jython better
--HG--
branch : trunk
2009-09-07 14:59:26 +02:00
holger krekel c8119d89b6 move test files out of py lib proper
* separate all tests from plugins
* simplify implicit inclusion of plugins under test
* have test_initpkg perform direct checks instead of yielding tests
* fix example tests for 3k

--HG--
branch : trunk
2009-09-06 16:59:39 +02:00
holger krekel 5cf27098cf execnet cleanup/refinements: avoid creating a shell for each subprocess
* introduce HostNotFound, raised for Socket and SshGateways
* factored out basic tests, cleaned up existing tests
* removed sshgateway identity argument which was deprecated in 1.0

--HG--
branch : trunk
2009-09-06 13:38:21 +02:00
holger krekel 734a40eb28 seems like compile is way slower than just parser.suite so
we try to see if it's available (only jython doesn't have it)

--HG--
branch : trunk
2009-09-06 12:35:52 +02:00
holger krekel 518194537e * refactor some setup/teardown/ensuretemp usages to use funcargs
* introduce monkeypatch.syspath_prepend for safe monkey patching of module import path
* fix monkeypatch naming

--HG--
branch : trunk
2009-09-05 23:21:58 +02:00
holger krekel 783c714a2c get py.test to run at least basically on top of jython
* allow and document calling of monkeypatch.undo() from a test
* default to 'sys' on platforms there no 'os.dup' is available
* use "compile" to perform "tryparsing" checks

--HG--
branch : trunk
2009-09-05 16:54:52 +02:00
holger krekel 7ab98c1b25 * delete or text files to hacking/ directory.
* split license file into authors and license file, minor fixes.
* minor unicode fixes

--HG--
branch : trunk
2009-09-05 16:09:44 +02:00
holger krekel bde56a8246 * fixing lots of remaining 3k compatibility issues, mostly with py.test itself.
* removing very old import-tests that IIRC relate to a time when there
  was a custom import hook in use.

* basically py.test internal tests pass now except py3/py2 distributed
  testing tests

--HG--
branch : trunk
2009-09-04 21:47:49 +02:00
holger krekel 1e51844519 introduce py.builtin._tryimport to try importing modules in a row, fix a few places
--HG--
branch : trunk
2009-09-04 19:08:10 +02:00
holger krekel 32e2bf7d08 make xmlgen a single file + a single file test instead of a whole directory
--HG--
branch : trunk
2009-09-04 18:30:48 +02:00
holger krekel a0d7ab2244 reviewing, refactoring, porting xml/html object/tree generation to work with 3k
--HG--
branch : trunk
2009-09-04 18:16:10 +02:00
holger krekel 6823fa634b various 3k related fixes and cleanups
removal of virtually unused py/rest/rst.py helpers

--HG--
branch : trunk
2009-09-04 18:15:41 +02:00
holger krekel 5851471009 fix remaining execnet 3k issues until all tests pass
--HG--
branch : trunk
2009-09-04 16:51:29 +02:00
holger krekel 45b98d4915 remove so-far superflous _getcode and pickle from builtins, some streamlining
--HG--
branch : trunk
2009-09-04 16:32:49 +02:00
Benjamin Peterson 99af33b26d I think this is supposed to be immutable
--HG--
branch : trunk
2009-09-03 17:14:12 -05:00
Benjamin Peterson 1c9760d123 fix xfail
--HG--
branch : trunk
2009-09-03 16:47:04 -05:00
Benjamin Peterson 86da34b874 add a helper to get a function's dictionary
--HG--
branch : trunk
2009-09-03 16:45:28 -05:00
Benjamin Peterson 499a982860 give code objects a filename in the replacement execfile
--HG--
branch : trunk
2009-09-03 16:38:15 -05:00
holger krekel c7f11745cd * fix various remaining 3k issues until test_gateway.py passes with python3 py/bin/py.test
* we now wait on gateway initialization until we got a byte back after
  we sent the bootstrap

--HG--
branch : trunk
2009-09-02 21:05:08 +02:00
holger krekel 6c3e961bc5 * simplify stdout/stderr handling and modules and for now remove support
for directly stdout/stderr directly on remote_exec

--HG--
branch : trunk
2009-09-02 19:39:24 +02:00
holger krekel 73fc2f01f2 filter out and test exception printing
--HG--
branch : trunk
2009-09-02 19:05:34 +02:00
holger krekel e30aeed876 * more tests and fixes for cross-python compatibility
* use byte-buffer files if available for io
* shift receivelock to gateway object
* kill dead code

--HG--
branch : trunk
2009-09-02 18:56:43 +02:00
holger krekel 5d2504df0a * simplify lock acquiration for received messages, review code
* try to fix seldomly occuring race condition with setcallback/receive and closing of channel

--HG--
branch : trunk
2009-09-02 15:45:59 +02:00
holger krekel f636ed8ced * make Gateway interface more asymetric: remote_* methods
and  cleanup/atexit handling now live exclusively with the "InitiatingGateway"

* fix some cross-python io related handling

--HG--
branch : trunk
2009-09-02 14:31:48 +02:00
holger krekel c1fcf9c4d8 * use py.builtin._getimself instead of getattr(..., '*self*') everywhere
* fix logging to work with 3k, implement buffering manually
* fix unicode capturing issue - re-introduce EncodedFile for <3K file writes

--HG--
branch : trunk
2009-09-01 16:10:21 +02:00
holger krekel 43b8bd7df7 * refactor gateway code and tests to live in fewer files, remove some lock usage
* move text files to a new "hacking" directory

--HG--
branch : trunk
2009-09-01 11:39:27 +02:00
holger krekel 54709bcae1 enable assertion reinterpretation on 3k
--HG--
branch : trunk
2009-08-31 20:06:55 +02:00
holger krekel c791610998 * simplify and refactor path tests to use funcargs instead of the layered xunit-setup mess
* port py/path to pass 3.11
* added py.builtin._totext, _tobytes, _isbytes, _istext helpers

--HG--
branch : trunk
2009-08-31 19:51:25 +02:00
Benjamin Peterson e336683cdb add test for conversion to string
--HG--
branch : trunk
2009-08-30 08:25:48 -05:00
Benjamin Peterson 749bfa46c4 convert argument to string
--HG--
branch : trunk
2009-08-30 08:25:40 -05:00
Ronny Pfannschmidt 318a935b89 fix module name reuse in execnet
--HG--
branch : trunk
2009-08-30 15:00:26 +02:00
Benjamin Peterson 04dd0810c3 no unbound methods in py3
--HG--
branch : trunk
2009-08-29 16:22:34 -05:00
Benjamin Peterson ee17858cce get rid of usage of the new module
--HG--
branch : trunk
2009-08-29 16:12:06 -05:00
Benjamin Peterson ee86950af4 use correct attribute to find the instance of a bound method
--HG--
branch : trunk
2009-08-29 16:07:48 -05:00
Benjamin Peterson a051eb1a05 only use cmp() in 2.x
--HG--
branch : trunk
2009-08-29 16:02:59 -05:00
Benjamin Peterson ad0c2edfd2 fix generators on python 3
--HG--
branch : trunk
2009-08-29 16:00:24 -05:00
Benjamin Peterson e63abd631f add py.builtin.callable
--HG--
branch : trunk
2009-08-29 15:46:50 -05:00
Benjamin Peterson 1781347999 use py.builtin.execfile()
--HG--
branch : trunk
2009-08-29 15:36:27 -05:00
Benjamin Peterson 01848ca821 add py.builtin.execfile to __init__.py
--HG--
branch : trunk
2009-08-29 15:36:14 -05:00
Benjamin Peterson 39eac1be28 add a py.builtin.execfile helper
--HG--
branch : trunk
2009-08-29 15:34:24 -05:00
Benjamin Peterson c95504e738 use py.builtin.builtins instead of import test
--HG--
branch : trunk
2009-08-29 15:18:21 -05:00
Benjamin Peterson 59892b8532 remove usage of the new module
--HG--
branch : trunk
2009-08-29 15:14:18 -05:00
Benjamin Peterson b3e8b2f6ab handle Queue renaming
--HG--
branch : trunk
2009-08-29 15:10:40 -05:00
Benjamin Peterson 7a4bd92e33 DeprecationWarning is in the builtin namespace
--HG--
branch : trunk
2009-08-29 15:08:34 -05:00
Benjamin Peterson 711552e84c use print function
--HG--
branch : trunk
2009-08-29 15:08:26 -05:00
Benjamin Peterson 9af223e6cb fix typos in converting test_oldmagic
--HG--
branch : trunk
2009-08-29 14:54:15 -05:00
Benjamin Peterson 8a6a3183ae guard against tests trying to import this
--HG--
branch : trunk
2009-08-29 14:50:44 -05:00
Benjamin Peterson 9018fe40e3 fix syntax for py3
--HG--
branch : trunk
2009-08-29 14:50:29 -05:00
Benjamin Peterson 4369c65790 fix some broken things from syntax conversion
--HG--
branch : trunk
2009-08-29 14:39:55 -05:00
Benjamin Peterson fb365e47dc make print write each argument individually
--HG--
branch : trunk
2009-08-29 14:39:37 -05:00
Benjamin Peterson 45a9aa536f fix need for py import
--HG--
branch : trunk
2009-08-29 14:16:54 -05:00
Benjamin Peterson ee1747fcb4 make all syntax compatible with 3.1 and 2.5
--HG--
branch : trunk
2009-08-29 13:04:48 -05:00
Benjamin Peterson 6f4c6d36a4 allow file to be compiled on 2.5
--HG--
branch : trunk
2009-08-29 11:36:08 -05:00
Benjamin Peterson 78d0d4656b add a test which checks the syntax of the pylib on various python versions
--HG--
branch : trunk
2009-08-29 11:31:42 -05:00
holger krekel b930565d56 * fix some syntax and 3k issues for py/path and py/process, tests only partially working
* have py.process.cmdexec return unicode/text (for now)
* rename py.builtin.basestring to _basestring

--HG--
branch : trunk
2009-08-29 16:40:03 +02:00
Benjamin Peterson 0f7a9e2da2 fix the rest of py/code tests on python 3
--HG--
branch : trunk
2009-08-29 09:37:56 -05:00
Benjamin Peterson 96ec12902d fix tests involving Queue
--HG--
branch : trunk
2009-08-29 09:02:20 -05:00
holger krekel 1dafcc6b37 fix py/io classes and tests to pass 3.1
introduce py.builtin._totext helper to make a 2k=unicode / 3k=str object, allow a string as data

--HG--
branch : trunk
2009-08-29 15:51:49 +02:00
holger krekel d75f7b2dd7 merge the benjamins and my changes, accidentally caused a new remote head
--HG--
branch : trunk
2009-08-29 14:10:06 +02:00
Benjamin Peterson c2d0c52086 replace iteritems() with items()
--HG--
branch : trunk
2009-08-29 07:03:19 -05:00
Benjamin Peterson 0014e65c1d fix interpreting is/is not/in/not in
--HG--
branch : trunk
2009-08-29 06:58:54 -05:00
holger krekel fc3178a394 fixing builtin tests and print_ builtin
--HG--
branch : trunk
2009-08-29 13:47:10 +02:00
Benjamin Peterson ac934bb2b6 only test View on 2.x
--HG--
branch : trunk
2009-08-28 20:28:09 -05:00
Benjamin Peterson 695c8038e0 new except syntax
--HG--
branch : trunk
2009-08-28 20:17:46 -05:00
Benjamin Peterson e596d9df13 move the old assertion reinterpreting implementation to _assertionold.py
Also, seperate out some common code from the two.

--HG--
branch : trunk
2009-08-28 20:13:49 -05:00
Benjamin Peterson e0e9953be2 implement assert debugging with builtin AST
--HG--
branch : trunk
2009-08-28 18:44:20 -05:00
Benjamin Peterson 3bdbb29c6f make the patched compile() work with AST
--HG--
branch : trunk
2009-08-28 18:39:51 -05:00
Benjamin Peterson c23cc3656c fix location of magic AssertionError
--HG--
branch : trunk
2009-08-28 18:07:28 -05:00
holger krekel 783e6aeb4d temporary checking towards 3.1 compatibility
introduced some helpers to py.builtin namespace which need some review
after things begin to work more nicely

--HG--
branch : trunk
2009-08-28 19:16:15 +02:00
holger krekel 5e95feaf90 * add print_, exec_ and _reraise helpers for 2-3 compatible code
* consolidate builtins implementation to be compatible with >=2.3

--HG--
branch : trunk
2009-08-28 16:25:29 +02:00
holger krekel 91f90d27ee simplify broken-repr test for python2.4
--HG--
branch : trunk
2009-08-28 13:00:36 +02:00
holger krekel d1932a30ed deprecate py.compat.doctest|subprocess|textwrap|...
(and for now pass through Python stdlib provided modules).

--HG--
branch : trunk
2009-08-27 21:12:55 +02:00
holger krekel 681d344eac deprecate py.magic.autopath() and finally remove py/magic directory.
--HG--
branch : trunk
2009-08-27 18:46:42 +02:00
holger krekel 13932b7f4b * deprecate py.magic.invoke/revoke in favour of
the new py.code.patch_builtins, py.code.unpatch_builtins

* deprecate py.magic.patch/revert

* deprecate py.magic.AssertionError in favour of py.code._AssertionError

* introduced pytest_assertion plugin.

--HG--
branch : trunk
2009-08-27 17:26:02 +02:00
holger krekel e391662cff merge 1.0.x branch to trunk, fix doc link
--HG--
branch : trunk
2009-08-27 12:10:42 +02:00
holger krekel 47d56e41ba fix tests to not fail if pyc-file-writing is disabled
--HG--
branch : 1.0.x
2009-08-27 12:05:12 +02:00
holger krekel c981ead40e switching release branch back to 1.0.x versioning
--HG--
branch : 1.0.x
2009-08-27 11:50:17 +02:00
holger krekel 81f7891539 merging 1.0.x branch
--HG--
branch : trunk
2009-08-26 22:57:06 +02:00
holger krekel 3be875bfd2 some fixes and small doc updates, aiming to finalize 1.0.2
--HG--
branch : 1.0.x
2009-08-26 19:09:52 +02:00
holger krekel c024dc6417 * using a MANIFEST.in file instead of our own generated MANIFEST file
* port the test_install refactoring from trunk, move to bin-for-dist

--HG--
branch : 1.0.x
2009-08-26 11:09:55 +02:00
holger krekel 8ee7bef638 consolidate py/code files into code.py, simplify SafeRepr code and docs.
--HG--
branch : trunk
2009-08-25 20:24:43 +02:00
holger krekel 94aef0b771 move and rename html rest helper to rest directory - finally remove py/misc completely
--HG--
branch : trunk
2009-08-25 16:15:17 +02:00
holger krekel e810e1774d simplify caching class
--HG--
branch : trunk
2009-08-25 16:14:20 +02:00
holger krekel d43d69e3db death to "misc" directories. moved most files out of py/misc, either to a
private attic or to other places in the lib.

--HG--
branch : trunk
2009-08-25 16:14:15 +02:00
holger krekel 739edc26b4 simplifying errno error class creation and introduce a py.error.checked_call helper
that creates a proper errno-specific exception instead of OSErrors.  use it from
py.path.local.

--HG--
branch : trunk
2009-08-25 09:38:19 +02:00
holger krekel 58a9e71e81 add delattr/delenv/delitem methods and tests, enhance terminalwriter tests
--HG--
branch : trunk
2009-08-22 12:45:58 +02:00
holger krekel 27c08ac235 consolidate py/log into fewer files, remove one old approach, sketch simplified API
--HG--
branch : trunk
2009-08-22 09:42:12 +02:00