commit python3-py for openSUSE:Factory
Hello community, here is the log from the commit of package python3-py for openSUSE:Factory checked in at 2014-07-31 10:04:17 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python3-py (Old) and /work/SRC/openSUSE:Factory/.python3-py.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "python3-py" Changes: -------- --- /work/SRC/openSUSE:Factory/python3-py/python3-py.changes 2014-07-15 16:26:10.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.python3-py.new/python3-py.changes 2014-07-31 10:04:29.000000000 +0200 @@ -1,0 +2,22 @@ +Wed Jul 30 07:50:37 UTC 2014 - toddrme2178@gmail.com + +- Update to 1.4.22 + - refactor class-level registry on ForkedFunc child start/finish + event to become instance based (i.e. passed into the constructor) +- Update to 1.4.21 + - ForkedFunc now has class-level register_on_start/on_exit() + methods to allow adding information in the boxed process. + Thanks Marc Schlaich. + - ForkedFunc in the child opens in "auto-flush" mode for + stdout/stderr so that when a subprocess dies you can see + its output even if it didn't flush itself. + - refactor traceback generation in light of pytest issue 364 + (shortening tracebacks). you can now set a new traceback style + on a per-entry basis such that a caller can force entries to be + isplayed as short or long entries. + - win32: py.path.local.sysfind(name) will preferrably return files with + extensions so that if "X" and "X.bat" or "X.exe" is on the PATH, + one of the latter two will be returned. +- Enable unit tests + +------------------------------------------------------------------- Old: ---- py-1.4.21.tar.gz New: ---- py-1.4.22.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python3-py.spec ++++++ --- /var/tmp/diff_new_pack.WZZzwp/_old 2014-07-31 10:04:31.000000000 +0200 +++ /var/tmp/diff_new_pack.WZZzwp/_new 2014-07-31 10:04:31.000000000 +0200 @@ -17,7 +17,7 @@ Name: python3-py -Version: 1.4.21 +Version: 1.4.22 Release: 0 Summary: Library with cross-python path, ini-parsing, io, code, log facilities License: MIT @@ -27,8 +27,8 @@ BuildRequires: python3-Sphinx BuildRequires: python3 BuildRequires: python3-devel +BuildRequires: python3-pytest BuildRequires: python3-setuptools -BuildRequires: unzip BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildArch: noarch @@ -52,6 +52,12 @@ %install python3 setup.py install --prefix=%{_prefix} --root=%{buildroot} +%check +export PATH="%{buildroot}%{python3_sitelib}:$PATH" +export PYTHONPATH="%{buildroot}%{python3_sitelib}:$PYTHONPATH" +export PYTHON3PATH="%{buildroot}%{python3_sitelib}:$PYTHON3PATH" +py.test -k "not TestUnicodePy2Py3" + %files %defattr(-,root,root,-) %doc LICENSE README.txt doc/_build/html ++++++ py-1.4.21.tar.gz -> py-1.4.22.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/py-1.4.21/CHANGELOG new/py-1.4.22/CHANGELOG --- old/py-1.4.21/CHANGELOG 2014-07-14 22:00:47.000000000 +0200 +++ new/py-1.4.22/CHANGELOG 2014-07-17 10:51:42.000000000 +0200 @@ -1,3 +1,9 @@ +1.4.22 +================================================== + +- refactor class-level registry on ForkedFunc child start/finish + event to become instance based (i.e. passed into the constructor) + 1.4.21 ================================================== diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/py-1.4.21/PKG-INFO new/py-1.4.22/PKG-INFO --- old/py-1.4.21/PKG-INFO 2014-07-14 22:00:47.000000000 +0200 +++ new/py-1.4.22/PKG-INFO 2014-07-17 10:51:42.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: py -Version: 1.4.21 +Version: 1.4.22 Summary: library with cross-python path, ini-parsing, io, code, log facilities Home-page: http://pylib.readthedocs.org/ Author: holger krekel, Ronny Pfannschmidt, Benjamin Peterson and others @@ -21,7 +21,7 @@ Bugs and issues: http://bitbucket.org/hpk42/py/issues/ - Authors: Holger Krekel and others, 2004-2013 + Authors: Holger Krekel and others, 2004-2014 Platform: unix diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/py-1.4.21/README.txt new/py-1.4.22/README.txt --- old/py-1.4.21/README.txt 2014-07-14 22:00:47.000000000 +0200 +++ new/py-1.4.22/README.txt 2014-07-17 10:51:42.000000000 +0200 @@ -13,5 +13,5 @@ Bugs and issues: http://bitbucket.org/hpk42/py/issues/ -Authors: Holger Krekel and others, 2004-2013 +Authors: Holger Krekel and others, 2004-2014 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/py-1.4.21/py/__init__.py new/py-1.4.22/py/__init__.py --- old/py-1.4.21/py/__init__.py 2014-07-14 22:00:47.000000000 +0200 +++ new/py-1.4.22/py/__init__.py 2014-07-17 10:51:42.000000000 +0200 @@ -8,7 +8,7 @@ (c) Holger Krekel and others, 2004-2013 """ -__version__ = '1.4.21' +__version__ = '1.4.22' from py import _apipkg diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/py-1.4.21/py/_process/forkedfunc.py new/py-1.4.22/py/_process/forkedfunc.py --- old/py-1.4.21/py/_process/forkedfunc.py 2014-07-14 22:00:47.000000000 +0200 +++ new/py-1.4.22/py/_process/forkedfunc.py 2014-07-17 10:51:42.000000000 +0200 @@ -11,31 +11,6 @@ import marshal -class HookMixin(object): - _on_start = list() - _on_exit = list() - - @classmethod - def register_on_start(cls, callback): - cls._on_start.append(callback) - - @classmethod - def register_on_exit(self, callback): - self._on_exit.append(callback) - - def _run_on_start(self): - self._run_callbacks(self._on_start) - - def _run_on_exit(self): - self._run_callbacks(self._on_exit) - - def _run_callbacks(self, callbacks): - for callback in callbacks: - callback(self) - sys.stdout.flush() - sys.stderr.flush() - - def get_unbuffered_io(fd, filename): f = open(str(filename), "w") if fd != f.fileno(): @@ -49,11 +24,12 @@ return AutoFlush() -class ForkedFunc(HookMixin): +class ForkedFunc: EXITSTATUS_EXCEPTION = 3 - def __init__(self, fun, args=None, kwargs=None, nice_level=0): + def __init__(self, fun, args=None, kwargs=None, nice_level=0, + child_on_start=None, child_on_exit=None): if args is None: args = [] if kwargs is None: @@ -71,9 +47,9 @@ self.pid = pid else: # in child process self.pid = None - self._child(nice_level) + self._child(nice_level, child_on_start, child_on_exit) - def _child(self, nice_level): + def _child(self, nice_level, child_on_start, child_on_exit): # right now we need to call a function, but first we need to # map all IO that might happen sys.stdout = stdout = get_unbuffered_io(1, self.STDOUT) @@ -84,10 +60,12 @@ if nice_level: os.nice(nice_level) try: - self._run_on_start() + if child_on_start is not None: + child_on_start() retval = self.fun(*self.args, **self.kwargs) retvalf.write(marshal.dumps(retval)) - self._run_on_exit() + if child_on_exit is not None: + child_on_exit() except: excinfo = py.code.ExceptionInfo() stderr.write(str(excinfo._getreprcrash())) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/py-1.4.21/py.egg-info/PKG-INFO new/py-1.4.22/py.egg-info/PKG-INFO --- old/py-1.4.21/py.egg-info/PKG-INFO 2014-07-14 22:00:47.000000000 +0200 +++ new/py-1.4.22/py.egg-info/PKG-INFO 2014-07-17 10:51:42.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: py -Version: 1.4.21 +Version: 1.4.22 Summary: library with cross-python path, ini-parsing, io, code, log facilities Home-page: http://pylib.readthedocs.org/ Author: holger krekel, Ronny Pfannschmidt, Benjamin Peterson and others @@ -21,7 +21,7 @@ Bugs and issues: http://bitbucket.org/hpk42/py/issues/ - Authors: Holger Krekel and others, 2004-2013 + Authors: Holger Krekel and others, 2004-2014 Platform: unix diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/py-1.4.21/setup.py new/py-1.4.22/setup.py --- old/py-1.4.21/setup.py 2014-07-14 22:00:47.000000000 +0200 +++ new/py-1.4.22/setup.py 2014-07-17 10:51:42.000000000 +0200 @@ -7,7 +7,7 @@ name='py', description='library with cross-python path, ini-parsing, io, code, log facilities', long_description = open('README.txt').read(), - version='1.4.21', + version='1.4.22', url='http://pylib.readthedocs.org/', license='MIT license', platforms=['unix', 'linux', 'osx', 'cygwin', 'win32'], diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/py-1.4.21/testing/process/test_forkedfunc.py new/py-1.4.22/testing/process/test_forkedfunc.py --- old/py-1.4.21/testing/process/test_forkedfunc.py 2014-07-14 22:00:47.000000000 +0200 +++ new/py-1.4.22/testing/process/test_forkedfunc.py 2014-07-17 10:51:42.000000000 +0200 @@ -3,10 +3,6 @@ pytestmark = py.test.mark.skipif("not hasattr(os, 'fork')") -@pytest.fixture(autouse=True) -def clear_forkedfunc(monkeypatch): - monkeypatch.setattr(py.process.ForkedFunc, "_on_start", []) - monkeypatch.setattr(py.process.ForkedFunc, "_on_exit", []) def test_waitfinish_removes_tempdir(): ff = py.process.ForkedFunc(boxf1) @@ -126,20 +122,19 @@ def test_hooks(monkeypatch): - monkeypatch.setattr(py.process.ForkedFunc, "_on_exit", []) - monkeypatch.setattr(py.process.ForkedFunc, "_on_start", []) def _boxed(): return 1 - def _on_start(proc): + def _on_start(): sys.stdout.write("some out\n") + sys.stdout.flush() - def _on_exit(proc): + def _on_exit(): sys.stderr.write("some err\n") + sys.stderr.flush() - py.process.ForkedFunc.register_on_start(_on_start) - py.process.ForkedFunc.register_on_exit(_on_exit) - result = py.process.ForkedFunc(_boxed).waitfinish() + result = py.process.ForkedFunc(_boxed, child_on_start=_on_start, + child_on_exit=_on_exit).waitfinish() assert result.out == "some out\n" assert result.err == "some err\n" assert result.exitstatus == 0 -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org
participants (1)
-
root@hilbert.suse.de