Hello community, here is the log from the commit of package python3-cov-core for openSUSE:Factory checked in at 2014-07-31 07:41:41 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python3-cov-core (Old) and /work/SRC/openSUSE:Factory/.python3-cov-core.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "python3-cov-core" Changes: -------- --- /work/SRC/openSUSE:Factory/python3-cov-core/python3-cov-core.changes 2014-02-12 07:07:32.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.python3-cov-core.new/python3-cov-core.changes 2014-07-31 07:41:52.000000000 +0200 @@ -1,0 +2,6 @@ +Wed Jul 30 07:27:46 UTC 2014 - toddrme2178@gmail.com + +- Update to 1.13.0 + * No upstream changelog + +------------------------------------------------------------------- Old: ---- cov-core-1.7.tar.gz New: ---- cov-core-1.13.0.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python3-cov-core.spec ++++++ --- /var/tmp/diff_new_pack.5XhqsH/_old 2014-07-31 07:41:53.000000000 +0200 +++ /var/tmp/diff_new_pack.5XhqsH/_new 2014-07-31 07:41:53.000000000 +0200 @@ -16,7 +16,7 @@ Name: python3-cov-core -Version: 1.7 +Version: 1.13.0 Release: 0 License: MIT Summary: Plugin core for use by pytest-cov, nose-cov and nose2-cov @@ -25,6 +25,7 @@ Source: https://pypi.python.org/packages/source/c/cov-core/cov-core-%{version}.tar.gz BuildRequires: python3-devel BuildRequires: python3-setuptools +BuildRequires: python3-coverage Requires: python3-coverage BuildArch: noarch @@ -43,7 +44,7 @@ %files %defattr(-,root,root,-) -%doc LICENSE.txt README.txt +%doc LICENSE.txt README.rst %{python3_sitelib}/* %changelog ++++++ cov-core-1.7.tar.gz -> cov-core-1.13.0.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cov-core-1.7/MANIFEST.in new/cov-core-1.13.0/MANIFEST.in --- old/cov-core-1.7/MANIFEST.in 2010-07-17 03:00:37.000000000 +0200 +++ new/cov-core-1.13.0/MANIFEST.in 2014-04-24 11:30:04.000000000 +0200 @@ -1,4 +1,4 @@ -include README.txt +include README.rst include LICENSE.txt include setup.py include cov_core.py diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cov-core-1.7/PKG-INFO new/cov-core-1.13.0/PKG-INFO --- old/cov-core-1.7/PKG-INFO 2012-09-01 08:12:56.000000000 +0200 +++ new/cov-core-1.13.0/PKG-INFO 2014-06-12 20:43:30.000000000 +0200 @@ -1,16 +1,16 @@ Metadata-Version: 1.1 Name: cov-core -Version: 1.7 +Version: 1.13.0 Summary: plugin core for use by pytest-cov, nose-cov and nose2-cov -Home-page: http://bitbucket.org/memedough/cov-core/overview -Author: Meme Dough -Author-email: memedough@gmail.com +Home-page: https://github.com/schlamar/cov-core +Author: Marc Schlaich +Author-email: marc.schlaich@gmail.com License: MIT License Description: cov-core ======== - This is a lib package for use by pytest-cov, nose-cov and nose2-cov. Unless your developing a - coverage plugin for a test framework then you probably want one of those. + This is a lib package for use by pytest-cov, nose-cov and nose2-cov. Unless you're developing a + coverage plugin for a test framework, you probably want one of those. Keywords: cover coverage Platform: UNKNOWN Classifier: Development Status :: 4 - Beta diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cov-core-1.7/README.rst new/cov-core-1.13.0/README.rst --- old/cov-core-1.7/README.rst 1970-01-01 01:00:00.000000000 +0100 +++ new/cov-core-1.13.0/README.rst 2014-04-24 11:09:25.000000000 +0200 @@ -0,0 +1,5 @@ +cov-core +======== + +This is a lib package for use by pytest-cov, nose-cov and nose2-cov. Unless you're developing a +coverage plugin for a test framework, you probably want one of those. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cov-core-1.7/README.txt new/cov-core-1.13.0/README.txt --- old/cov-core-1.7/README.txt 2012-03-11 08:18:51.000000000 +0100 +++ new/cov-core-1.13.0/README.txt 1970-01-01 01:00:00.000000000 +0100 @@ -1,5 +0,0 @@ -cov-core -======== - -This is a lib package for use by pytest-cov, nose-cov and nose2-cov. Unless your developing a -coverage plugin for a test framework then you probably want one of those. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cov-core-1.7/cov_core.egg-info/PKG-INFO new/cov-core-1.13.0/cov_core.egg-info/PKG-INFO --- old/cov-core-1.7/cov_core.egg-info/PKG-INFO 2012-09-01 08:12:56.000000000 +0200 +++ new/cov-core-1.13.0/cov_core.egg-info/PKG-INFO 2014-06-12 20:43:30.000000000 +0200 @@ -1,16 +1,16 @@ Metadata-Version: 1.1 Name: cov-core -Version: 1.7 +Version: 1.13.0 Summary: plugin core for use by pytest-cov, nose-cov and nose2-cov -Home-page: http://bitbucket.org/memedough/cov-core/overview -Author: Meme Dough -Author-email: memedough@gmail.com +Home-page: https://github.com/schlamar/cov-core +Author: Marc Schlaich +Author-email: marc.schlaich@gmail.com License: MIT License Description: cov-core ======== - This is a lib package for use by pytest-cov, nose-cov and nose2-cov. Unless your developing a - coverage plugin for a test framework then you probably want one of those. + This is a lib package for use by pytest-cov, nose-cov and nose2-cov. Unless you're developing a + coverage plugin for a test framework, you probably want one of those. Keywords: cover coverage Platform: UNKNOWN Classifier: Development Status :: 4 - Beta diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cov-core-1.7/cov_core.egg-info/SOURCES.txt new/cov-core-1.13.0/cov_core.egg-info/SOURCES.txt --- old/cov-core-1.7/cov_core.egg-info/SOURCES.txt 2012-09-01 08:12:56.000000000 +0200 +++ new/cov-core-1.13.0/cov_core.egg-info/SOURCES.txt 2014-06-12 20:43:30.000000000 +0200 @@ -1,6 +1,6 @@ LICENSE.txt MANIFEST.in -README.txt +README.rst cov_core.py cov_core_init.py setup.py diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cov-core-1.7/cov_core.egg-info/requires.txt new/cov-core-1.13.0/cov_core.egg-info/requires.txt --- old/cov-core-1.7/cov_core.egg-info/requires.txt 2012-09-01 08:12:56.000000000 +0200 +++ new/cov-core-1.13.0/cov_core.egg-info/requires.txt 2014-06-12 20:43:30.000000000 +0200 @@ -1 +1 @@ -coverage>=3.4 \ No newline at end of file +coverage>=3.6 \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cov-core-1.7/cov_core.py new/cov-core-1.13.0/cov_core.py --- old/cov-core-1.7/cov_core.py 2012-04-12 12:40:59.000000000 +0200 +++ new/cov-core-1.13.0/cov_core.py 2014-06-12 20:26:37.000000000 +0200 @@ -8,23 +8,11 @@ import os -def multiprocessing_hook(): - try: - import multiprocessing.util - multiprocessing.util.register_after_fork(multiprocessing_start, - multiprocessing_start) - except ImportError: - pass - - def multiprocessing_start(obj): cov = cov_core_init.init() - if cov: - import multiprocessing.util - multiprocessing.util.Finalize(None, - multiprocessing_finish, - args=(cov,), - exitpriority=1000) + import multiprocessing.util + multiprocessing.util.Finalize( + None, multiprocessing_finish, args=(cov,), exitpriority=1000) def multiprocessing_finish(cov): @@ -32,12 +20,40 @@ cov.save() +try: + import multiprocessing.util + multiprocessing.util.register_after_fork(multiprocessing_start, + multiprocessing_start) +except ImportError: + pass + + +_cov_data = dict() + + +def on_py_fork_starts(proc): + cov = cov_core_init.init() + _cov_data[proc] = cov + + +def on_py_fork_exits(proc): + cov = _cov_data.pop(proc) + multiprocessing_finish(cov) + + +try: + import py + py.process.ForkedFunc.register_on_start(on_py_fork_starts) + py.process.ForkedFunc.register_on_exit(on_py_fork_exits) +except (ImportError, AttributeError): + pass + + class CovController(object): """Base class for different plugin implementations.""" def __init__(self, cov_source, cov_report, cov_config, config=None, nodeid=None): """Get some common config used by multiple derived classes.""" - self.cov_source = cov_source self.cov_report = cov_report self.cov_config = cov_config @@ -56,15 +72,13 @@ os.environ['COV_CORE_SOURCE'] = UNIQUE_SEP.join(self.cov_source) os.environ['COV_CORE_DATA_FILE'] = self.cov_data_file os.environ['COV_CORE_CONFIG'] = self.cov_config - multiprocessing_hook() @staticmethod def unset_env(): """Remove coverage info from env.""" - - del os.environ['COV_CORE_SOURCE'] - del os.environ['COV_CORE_DATA_FILE'] - del os.environ['COV_CORE_CONFIG'] + os.environ.pop('COV_CORE_SOURCE', None) + os.environ.pop('COV_CORE_DATA_FILE', None) + os.environ.pop('COV_CORE_CONFIG', None) @staticmethod def get_node_desc(platform, version_info): @@ -161,6 +175,13 @@ if self.cov_config and os.path.exists(self.cov_config): self.config.option.rsyncdir.append(self.cov_config) + self.cov = coverage.coverage(source=self.cov_source, + data_file=self.cov_data_file, + config_file=self.cov_config) + self.cov.erase() + self.cov.start() + self.cov.config.paths['source'] = [self.topdir] + def configure_node(self, node): """Slaves need to know if they are collocated and what files have moved.""" @@ -189,6 +210,8 @@ cov.data.arcs = node.slaveoutput['cov_slave_arcs'] cov.stop() cov.save() + path = node.slaveoutput['cov_slave_path'] + self.cov.config.paths['source'].append(path) # Record the slave types that contribute to the data file. rinfo = node.gateway._rinfo() @@ -199,10 +222,7 @@ """Combines coverage data and sets the list of coverage objects to report on.""" # Combine all the suffix files into the data file. - self.cov = coverage.coverage(source=self.cov_source, - data_file=self.cov_data_file, - config_file=self.cov_config) - self.cov.erase() + self.cov.stop() self.cov.combine() self.cov.save() @@ -256,25 +276,15 @@ # data file to indicate that we have finished. self.config.slaveoutput['cov_slave_node_id'] = self.nodeid else: - # If we are not collocated then rewrite the filenames from - # the slave location to the master location. - slave_topdir = self.topdir - path_rewrites = [(os.path.join(slave_topdir, os.path.basename(rsync_root)), rsync_root) - for rsync_root in self.config.slaveinput['cov_master_rsync_roots']] - path_rewrites.append((slave_topdir, self.config.slaveinput['cov_master_topdir'])) - - def rewrite_path(filename): - for slave_path, master_path in path_rewrites: - filename = filename.replace(slave_path, master_path) - return filename - - lines = dict((rewrite_path(filename), data) for filename, data in self.cov.data.lines.items()) - arcs = dict((rewrite_path(filename), data) for filename, data in self.cov.data.arcs.items()) + # If we are not collocated then add the current path + # and coverage data to the output so we can combine + # it on the master node. # Send all the data to the master over the channel. + self.config.slaveoutput['cov_slave_path'] = self.topdir self.config.slaveoutput['cov_slave_node_id'] = self.nodeid - self.config.slaveoutput['cov_slave_lines'] = lines - self.config.slaveoutput['cov_slave_arcs'] = arcs + self.config.slaveoutput['cov_slave_lines'] = self.cov.data.lines + self.config.slaveoutput['cov_slave_arcs'] = self.cov.data.arcs def summary(self, stream): """Only the master reports so do nothing.""" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cov-core-1.7/cov_core_init.py new/cov-core-1.13.0/cov_core_init.py --- old/cov-core-1.7/cov_core_init.py 2012-03-11 06:02:29.000000000 +0100 +++ new/cov-core-1.13.0/cov_core_init.py 2014-06-12 20:26:37.000000000 +0200 @@ -14,8 +14,11 @@ info passed via env vars. """ + UNIQUE_SEP = '084031f3d2994d40a88c8b699b69e148' +import cov_core # noqa: register multiprocessing handler + def init(): @@ -54,7 +57,6 @@ auto_data=True) cov.erase() cov.start() - return cov except Exception: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cov-core-1.7/setup.py new/cov-core-1.13.0/setup.py --- old/cov-core-1.7/setup.py 2012-09-01 08:09:34.000000000 +0200 +++ new/cov-core-1.13.0/setup.py 2014-06-12 20:41:41.000000000 +0200 @@ -7,7 +7,8 @@ # imported. PTH_FILE_NAME = 'init_cov_core.pth' -# The line in the path file must begin with "import" so that site.py will exec it. +# The line in the path file must begin with "import" +# so that site.py will exec it. PTH_FILE = '''\ import os; os.environ.get('COV_CORE_SOURCE') and __import__('cov_core_init').init() ''' @@ -20,15 +21,16 @@ ''' % (PTH_FILE_NAME, PTH_FILE) setuptools.setup(name='cov-core', - version='1.7', - description='plugin core for use by pytest-cov, nose-cov and nose2-cov', - long_description=open('README.txt').read().strip(), - author='Meme Dough', - author_email='memedough@gmail.com', - url='http://bitbucket.org/memedough/cov-core/overview', + version='1.13.0', + description='plugin core for use by pytest-cov, ' + 'nose-cov and nose2-cov', + long_description=open('README.rst').read().strip(), + author='Marc Schlaich', + author_email='marc.schlaich@gmail.com', + url='https://github.com/schlamar/cov-core', py_modules=['cov_core', 'cov_core_init'], - install_requires=['coverage>=3.4'], + install_requires=['coverage>=3.6'], license='MIT License', zip_safe=False, keywords='cover coverage', @@ -47,18 +49,22 @@ if sys.argv[1] in ('install', 'develop'): for path in sys.path: - if (path.endswith('site-packages')) or (path.endswith('dist-packages') and 'local' in path): + if (path.endswith('site-packages')) or (path.endswith('dist-packages') + and 'local' in path): path = os.path.join(path, PTH_FILE_NAME) try: pth_file = open(path, 'w') pth_file.write(PTH_FILE) pth_file.close() - sys.stdout.write('\nWrote pth file for subprocess measurement to %s\n' % path) + sys.stdout.write('\nWrote pth file for subprocess ' + 'measurement to %s\n' % path) break except Exception: - sys.stdout.write('\nFailed to write pth file for subprocess measurement to %s\n' % path) + sys.stdout.write('\nFailed to write pth file for subprocess ' + 'measurement to %s\n' % path) sys.stdout.write(PTH_FILE_FAILURE) break else: - sys.stdout.write('\nFailed to find site-packages or dist-packages dir to put pth file in.\n') + sys.stdout.write('\nFailed to find site-packages or dist-packages ' + 'dir to put pth file in.\n') sys.stdout.write(PTH_FILE_FAILURE) -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org