From execnet-commit at codespeak.net Mon Oct 25 03:28:06 2010 From: execnet-commit at codespeak.net (execnet-commit at codespeak.net) Date: Mon, 25 Oct 2010 03:28:06 +0200 (CEST) Subject: execnet-commit@codespeak.net VIAGRA ® Official Site ID6979071 Message-ID: <20101025012806.8F3B5282BFF@codespeak.net> An HTML attachment was scrubbed... URL: http://codespeak.net/pipermail/execnet-commit/attachments/20101025/cf11c4b3/attachment.htm From commits-noreply at bitbucket.org Wed Nov 17 14:48:20 2010 From: commits-noreply at bitbucket.org (commits-noreply at bitbucket.org) Date: Wed, 17 Nov 2010 07:48:20 -0600 (CST) Subject: [execnet-commit] execnet commit 2af991418160: fix tox.ini configuration Message-ID: <20101117134820.8AC741E12D9@bitbucket02.managed.contegix.com> # HG changeset patch -- Bitbucket.org # Project execnet # URL http://bitbucket.org/hpk42/execnet/overview # User holger krekel # Date 1290001679 -3600 # Node ID 2af991418160803434b90b3c4e316f20f5a25eba # Parent 5eb7cf4803050fcad1f6c24e62644a35fada9b49 fix tox.ini configuration --- a/tox.ini +++ b/tox.ini @@ -1,16 +1,20 @@ [tox] envlist=py24,py31,py25,py26,py27,docs distshare={homedir}/.tox/distshare -indexserver=default http://pypi.testrun.org +indexserver= + default=http://pypi.testrun.org + pypi=http://pypi.python.org/simple [tox:hudson] distshare={toxworkdir}/distshare sdistsrc={distshare}/execnet-* -indexserver=default http://pypi.testrun.org +indexserver= + default=http://pypi.testrun.org + pypi=http://pypi.python.org/simple [testenv] changedir=testing -deps= pytest +deps=pytest commands=py.test -rsfxX --junitxml={envlogdir}/junit-{envname}.xml [] [testenv:py26-py134] @@ -25,7 +29,7 @@ basepython=jython [testenv:docs] basepython=python changedir=doc -deps=sphinx +deps=:pypi:sphinx py commands= py.test \ From commits-noreply at bitbucket.org Mon Nov 22 14:59:31 2010 From: commits-noreply at bitbucket.org (commits-noreply at bitbucket.org) Date: Mon, 22 Nov 2010 07:59:31 -0600 (CST) Subject: [execnet-commit] execnet commit 454dba29b4ec: small release/test streamline Message-ID: <20101122135931.3A6CD6C1085@bitbucket03.managed.contegix.com> # HG changeset patch -- Bitbucket.org # Project execnet # URL http://bitbucket.org/hpk42/execnet/overview # User holger krekel # Date 1290076902 -3600 # Node ID 454dba29b4ec19dab99dabb85d657719518043c2 # Parent 2af991418160803434b90b3c4e316f20f5a25eba small release/test streamline --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist=py24,py31,py25,py26,py27,docs +envlist=py24,py31,py32,py25,py26,py27,docs distshare={homedir}/.tox/distshare indexserver= default=http://pypi.testrun.org --- a/CHANGELOG +++ b/CHANGELOG @@ -5,13 +5,14 @@ 1.0.9.dev0 currently it supports the boolean flags py2str_as_py3str and py3str_as_py2str to configure string deserialization - channel.makefile() objects now have a isatty() returning False -- refactor message types into received handler functions -- refactor b(chr(opcode)) to bchr(opcode) -- reorder Message ctor args, rename msgtype to msgcode -- refactor gateway.send to take message's init args instead of a message -- inline and remove Message.writeto/readfrom -- refactor collection loading to avoid the indirection over tuple -- remove the unused NamedThreadPool +- internal refactorings and cleanups (thanks Ronny Pfannschmidt): + - refactor message types into received handler functions + - refactor b(chr(opcode)) to bchr(opcode) + - reorder Message ctor args, rename msgtype to msgcode + - refactor gateway.send to take message's init args instead of a message + - inline and remove Message.writeto/readfrom + - refactor collection loading to avoid the indirection over tuple + - remove the unused NamedThreadPool 1.0.8 From commits-noreply at bitbucket.org Mon Nov 22 14:59:31 2010 From: commits-noreply at bitbucket.org (commits-noreply at bitbucket.org) Date: Mon, 22 Nov 2010 07:59:31 -0600 (CST) Subject: [execnet-commit] execnet commit b1adc60a096f: publish group.allocate_id(spec) helper method Message-ID: <20101122135931.4CED46C1311@bitbucket03.managed.contegix.com> # HG changeset patch -- Bitbucket.org # Project execnet # URL http://bitbucket.org/hpk42/execnet/overview # User holger krekel # Date 1290434360 -3600 # Node ID b1adc60a096f4dc68b12615d82f93405c4012c57 # Parent 454dba29b4ec19dab99dabb85d657719518043c2 publish group.allocate_id(spec) helper method --- a/execnet/multi.py +++ b/execnet/multi.py @@ -73,12 +73,12 @@ class Group: spec = self.defaultspec if not isinstance(spec, XSpec): spec = XSpec(spec) - id = self._allocate_id(spec.id) + self.allocate_id(spec) if spec.popen: - gw = gateway.PopenGateway(python=spec.python, id=id) + gw = gateway.PopenGateway(python=spec.python, id=spec.id) elif spec.ssh: gw = gateway.SshGateway(spec.ssh, remotepython=spec.python, - ssh_config=spec.ssh_config, id=id) + ssh_config=spec.ssh_config, id=spec.id) elif spec.socket: assert not spec.python, ( "socket: specifying python executables not yet supported") @@ -86,10 +86,10 @@ class Group: gateway_id = spec.installvia if gateway_id: viagw = self[gateway_id] - gw = SocketGateway.new_remote(viagw, id=id) + gw = SocketGateway.new_remote(viagw, id=spec.id) else: host, port = spec.socket.split(":") - gw = SocketGateway(host, port, id=id) + gw = SocketGateway(host, port, id=spec.id) else: raise ValueError("no gateway type found for %r" % (spec._spec,)) gw.spec = spec @@ -113,13 +113,14 @@ class Group: channel.waitclose() return gw - def _allocate_id(self, id=None): - if id is None: + def allocate_id(self, spec): + """ allocate id for the given xspec object. """ + if spec.id is None: id = "gw" + str(self._autoidcounter) self._autoidcounter += 1 - if id in self: - raise ValueError("already have member gateway with id %r" %(id,)) - return id + if id in self: + raise ValueError("already have gateway with id %r" %(id,)) + spec.id = id def _register(self, gateway): assert not hasattr(gateway, '_group') --- a/testing/test_multi.py +++ b/testing/test_multi.py @@ -5,6 +5,7 @@ import execnet import py from execnet.gateway_base import Channel +from execnet import XSpec class TestMultiChannelAndGateway: def test_multichannel_container_basics(self): @@ -127,6 +128,18 @@ class TestGroup: assert not group assert repr(group) == "" + def test_group_id_allocation(self): + group = Group() + specs = [XSpec("popen"), XSpec("popen//id=hello")] + group.allocate_id(specs[0]) + group.allocate_id(specs[1]) + gw = group.makegateway(specs[1]) + assert gw.id == "hello" + gw = group.makegateway(specs[0]) + assert gw.id == "gw0" + #py.test.raises(ValueError, group.allocate_id, XSpec("popen//id=hello")) + group.terminate() + def test_gateway_and_id(self): group = Group() gw = group.makegateway("popen//id=hello") --- a/doc/example/test_group.txt +++ b/doc/example/test_group.txt @@ -39,6 +39,19 @@ Pass an ``id=MYNAME`` part to ``group.ma >>> group['sub1'] +Getting (auto) IDs before instantiation +------------------------------------------------------ + +Sometimes it's useful to know the gateway ID ahead +of instantiating it:: + + >>> import execnet + >>> group = execnet.Group() + >>> spec = execnet.XSpec("popen") + >>> group.allocate_id(spec) + >>> allocated_id = spec.id + >>> gw = group.makegateway(spec) + >>> assert gw.id == allocated_id execnet.makegateway uses execnet.default_group ------------------------------------------------------ --- a/CHANGELOG +++ b/CHANGELOG @@ -1,10 +1,13 @@ 1.0.9.dev0 -------------------------------- -- add gw.reconfigure to configure per gateways - currently it supports the boolean flags +- add gw.reconfigure() to configure per gateway options. Currently supported: py2str_as_py3str and py3str_as_py2str to configure string deserialization + - channel.makefile() objects now have a isatty() returning False + +- group.allocate_id(spec) allows to early-determine an (automatic) id + - internal refactorings and cleanups (thanks Ronny Pfannschmidt): - refactor message types into received handler functions - refactor b(chr(opcode)) to bchr(opcode) From commits-noreply at bitbucket.org Mon Nov 22 17:17:23 2010 From: commits-noreply at bitbucket.org (commits-noreply at bitbucket.org) Date: Mon, 22 Nov 2010 10:17:23 -0600 (CST) Subject: [execnet-commit] execnet commit bb4168eba393: bump version Message-ID: <20101122161723.87C56241262@bitbucket01.managed.contegix.com> # HG changeset patch -- Bitbucket.org # Project execnet # URL http://bitbucket.org/hpk42/execnet/overview # User holger krekel # Date 1290442559 -3600 # Node ID bb4168eba393f3f3178d08c56308ead2670967e8 # Parent b1adc60a096f4dc68b12615d82f93405c4012c57 bump version --- a/setup.py +++ b/setup.py @@ -35,14 +35,12 @@ try: except ImportError: from distutils.core import setup, Command -from execnet import __version__ - def main(): setup( name='execnet', description='execnet: rapid multi-Python deployment', long_description = __doc__, - version= __version__, + version='1.0.9.dev3', url='http://codespeak.net/execnet', license='GPL V2 or later', platforms=['unix', 'linux', 'osx', 'cygwin', 'win32'], --- a/execnet/__init__.py +++ b/execnet/__init__.py @@ -3,7 +3,7 @@ execnet: pure python lib for connecting (c) 2010, Holger Krekel and others """ -__version__ = "1.0.9.dev0" +__version__ = '1.0.9.dev3' import execnet.apipkg From commits-noreply at bitbucket.org Thu Nov 25 16:52:16 2010 From: commits-noreply at bitbucket.org (commits-noreply at bitbucket.org) Date: Thu, 25 Nov 2010 09:52:16 -0600 (CST) Subject: [execnet-commit] execnet commit 32c120a6f74f: prep rel Message-ID: <20101125155216.7DF6F1E128C@bitbucket02.managed.contegix.com> # HG changeset patch -- Bitbucket.org # Project execnet # URL http://bitbucket.org/hpk42/execnet/overview # User holger krekel # Date 1290700325 -3600 # Node ID 32c120a6f74ffb1bd51800f358bc4ca4fb3484aa # Parent bb4168eba393f3f3178d08c56308ead2670967e8 prep rel --- a/setup.py +++ b/setup.py @@ -40,7 +40,7 @@ def main(): name='execnet', description='execnet: rapid multi-Python deployment', long_description = __doc__, - version='1.0.9.dev3', + version='1.0.9.dev5', url='http://codespeak.net/execnet', license='GPL V2 or later', platforms=['unix', 'linux', 'osx', 'cygwin', 'win32'], --- a/execnet/__init__.py +++ b/execnet/__init__.py @@ -3,7 +3,7 @@ execnet: pure python lib for connecting (c) 2010, Holger Krekel and others """ -__version__ = '1.0.9.dev3' +__version__ = '1.0.9.dev5' import execnet.apipkg --- a/CHANGELOG +++ b/CHANGELOG @@ -1,4 +1,4 @@ -1.0.9.dev0 +1.0.9 -------------------------------- - add gw.reconfigure() to configure per gateway options. Currently supported: From commits-noreply at bitbucket.org Thu Nov 25 17:14:11 2010 From: commits-noreply at bitbucket.org (commits-noreply at bitbucket.org) Date: Thu, 25 Nov 2010 10:14:11 -0600 (CST) Subject: [execnet-commit] execnet commit 7517a7e2f13b: refine nice-test which fails on hosts having a different nice default than 0 Message-ID: <20101125161411.858956C1064@bitbucket03.managed.contegix.com> # HG changeset patch -- Bitbucket.org # Project execnet # URL http://bitbucket.org/hpk42/execnet/overview # User holger krekel # Date 1290701640 -3600 # Node ID 7517a7e2f13be99e3025628cc4feda262fec435c # Parent 32c120a6f74ffb1bd51800f358bc4ca4fb3484aa refine nice-test which fails on hosts having a different nice default than 0 --- a/testing/test_xspec.py +++ b/testing/test_xspec.py @@ -1,4 +1,4 @@ -import py +import pytest, py import execnet XSpec = execnet.XSpec @@ -73,17 +73,21 @@ class TestMakegateway: assert rinfo.cwd == py.std.os.getcwd() assert rinfo.version_info == py.std.sys.version_info + @pytest.mark.skipif("not hasattr(os, 'nice')") def test_popen_nice(self): - gw = execnet.makegateway("popen//nice=5") - remotenice = gw.remote_exec(""" + gw = execnet.makegateway("popen") + def getnice(channel): import os if hasattr(os, 'nice'): channel.send(os.nice(0)) else: channel.send(None) - """).receive() + remotenice = gw.remote_exec(getnice).receive() + gw.exit() if remotenice is not None: - assert remotenice == 5 + gw = execnet.makegateway("popen//nice=5") + remotenice2 = gw.remote_exec(getnice).receive() + assert remotenice2 == remotenice + 5 def test_popen_env(self): gw = execnet.makegateway("popen//env:NAME123=123") --- a/setup.py +++ b/setup.py @@ -40,7 +40,7 @@ def main(): name='execnet', description='execnet: rapid multi-Python deployment', long_description = __doc__, - version='1.0.9.dev5', + version='1.0.9', url='http://codespeak.net/execnet', license='GPL V2 or later', platforms=['unix', 'linux', 'osx', 'cygwin', 'win32'], --- a/execnet/__init__.py +++ b/execnet/__init__.py @@ -3,7 +3,7 @@ execnet: pure python lib for connecting (c) 2010, Holger Krekel and others """ -__version__ = '1.0.9.dev5' +__version__ = '1.0.9' import execnet.apipkg From commits-noreply at bitbucket.org Thu Nov 25 17:57:43 2010 From: commits-noreply at bitbucket.org (commits-noreply at bitbucket.org) Date: Thu, 25 Nov 2010 10:57:43 -0600 (CST) Subject: [execnet-commit] execnet commit 05ec733bbf3e: fix jython invocation Message-ID: <20101125165743.CB7FD6C1070@bitbucket03.managed.contegix.com> # HG changeset patch -- Bitbucket.org # Project execnet # URL http://bitbucket.org/hpk42/execnet/overview # User holger krekel # Date 1290704251 -3600 # Node ID 05ec733bbf3edda20bb3578aaeb4a048210b64dc # Parent 7517a7e2f13be99e3025628cc4feda262fec435c fix jython invocation --- a/tox.ini +++ b/tox.ini @@ -24,7 +24,7 @@ deps= py==1.3.1 #[testenv:pypy] #basepython=pypy-c [testenv:jython] -basepython=jython +commands=jython -m pytest -rsfxX --junitxml={envlogdir}/junit-{envname}.xml [] [testenv:docs] basepython=python From commits-noreply at bitbucket.org Thu Nov 25 18:00:37 2010 From: commits-noreply at bitbucket.org (commits-noreply at bitbucket.org) Date: Thu, 25 Nov 2010 11:00:37 -0600 (CST) Subject: [execnet-commit] execnet commit 7b4bc4b1ee14: bump version Message-ID: <20101125170037.178071E126B@bitbucket02.managed.contegix.com> # HG changeset patch -- Bitbucket.org # Project execnet # URL http://bitbucket.org/hpk42/execnet/overview # User holger krekel # Date 1290704416 -3600 # Node ID 7b4bc4b1ee1426b0953fd5420109b5900dabee9b # Parent 05ec733bbf3edda20bb3578aaeb4a048210b64dc bump version --- a/doc/conf.py +++ b/doc/conf.py @@ -46,7 +46,7 @@ copyright = '2009, holger krekel and oth # # The short X.Y version. import execnet -version = "1.0.8" +version = "1.0.9" # The full version, including alpha/beta/rc tags. release = version From commits-noreply at bitbucket.org Thu Nov 25 18:00:37 2010 From: commits-noreply at bitbucket.org (commits-noreply at bitbucket.org) Date: Thu, 25 Nov 2010 11:00:37 -0600 (CST) Subject: [execnet-commit] execnet commit 528dcc2fd0ca: Added tag 1.0.9 for changeset 7b4bc4b1ee14 Message-ID: <20101125170037.20AB91E12AF@bitbucket02.managed.contegix.com> # HG changeset patch -- Bitbucket.org # Project execnet # URL http://bitbucket.org/hpk42/execnet/overview # User holger krekel # Date 1290704419 -3600 # Node ID 528dcc2fd0cae8f535684f33a7c450f9c602780d # Parent 7b4bc4b1ee1426b0953fd5420109b5900dabee9b Added tag 1.0.9 for changeset 7b4bc4b1ee14 --- a/.hgtags +++ b/.hgtags @@ -12,3 +12,4 @@ 61ae5d8a32582d48871672ba894b2761fcaeec43 f4f785cd543ec95455907841840ba2b965f1400b 1.0.6 e25a7d3c706f61911ae34d7828e07ad8ff316365 1.0.7 235d6213891ea595ea069ae171675a7f39d118f9 1.0.8 +7b4bc4b1ee1426b0953fd5420109b5900dabee9b 1.0.9 From commits-noreply at bitbucket.org Thu Nov 25 18:05:27 2010 From: commits-noreply at bitbucket.org (commits-noreply at bitbucket.org) Date: Thu, 25 Nov 2010 11:05:27 -0600 (CST) Subject: [execnet-commit] execnet commit acdea5c50273: don't prune files anymore, they are anyway not copied by the new (unreleased) "upload" utility Message-ID: <20101125170527.B1E742410BD@bitbucket01.managed.contegix.com> # HG changeset patch -- Bitbucket.org # Project execnet # URL http://bitbucket.org/hpk42/execnet/overview # User holger krekel # Date 1290704710 -3600 # Node ID acdea5c502736e3e8659e91f1c302f8e62c0f4c8 # Parent 528dcc2fd0cae8f535684f33a7c450f9c602780d don't prune files anymore, they are anyway not copied by the new (unreleased) "upload" utility --- a/MANIFEST.in +++ b/MANIFEST.in @@ -5,10 +5,3 @@ include setup.py include LICENSE graft doc graft testing -prune doc/_build -exclude *.orig -exclude *.rej -recursive-exclude execnet *.pyc *$py.class -recursive-exclude testing *.pyc *$py.class -prune .svn -prune .hg From commits-noreply at bitbucket.org Sun Nov 28 19:39:30 2010 From: commits-noreply at bitbucket.org (commits-noreply at bitbucket.org) Date: Sun, 28 Nov 2010 12:39:30 -0600 (CST) Subject: [execnet-commit] execnet commit 195815823f70: not sure what the issue is with this termination test and python2.5 and python2.4 but not sure i care much. Message-ID: <20101128183930.59E8C1E0908@bitbucket02.managed.contegix.com> # HG changeset patch -- Bitbucket.org # Project execnet # URL http://bitbucket.org/hpk42/execnet/overview # User holger krekel # Date 1290969558 -3600 # Node ID 195815823f700e70e6526b7729a18b335a768886 # Parent acdea5c502736e3e8659e91f1c302f8e62c0f4c8 not sure what the issue is with this termination test and python2.5 and python2.4 but not sure i care much. --- a/testing/test_termination.py +++ b/testing/test_termination.py @@ -58,8 +58,10 @@ def test_termination_on_remote_channel_r assert str(pid) not in out, out def test_close_initiating_remote_no_error(testdir, anypython): - if '2.4' in str(anypython): - py.test.xfail("race/wait/interrupt_main/thread-loop issue with python2.4") + x = str(anypython).replace(".", "") + if '24' in x or '25' in x: + py.test.xfail("race/wait/interrupt_main/thread-loop issue " + "with Python <= 2.6") p = testdir.makepyfile(""" import sys sys.path.insert(0, %r) @@ -79,6 +81,7 @@ def test_close_initiating_remote_no_erro err = err.decode('utf8') lines = [x for x in err.splitlines() if '*sys-package' not in x] + print (lines) assert not lines def test_terminate_implicit_does_trykill(testdir, anypython, capfd):