Hello community, here is the log from the commit of package python-Epsilon for openSUSE:Factory checked in at 2018-07-19 22:56:54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-Epsilon (Old) and /work/SRC/openSUSE:Factory/.python-Epsilon.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-Epsilon" Thu Jul 19 22:56:54 2018 rev:9 rq:624053 version:0.7.3 Changes: -------- --- /work/SRC/openSUSE:Factory/python-Epsilon/python-Epsilon.changes 2018-07-06 10:41:14.879308112 +0200 +++ /work/SRC/openSUSE:Factory/.python-Epsilon.new/python-Epsilon.changes 2018-07-19 23:01:57.480654643 +0200 @@ -1,0 +2,7 @@ +Thu Jul 19 09:21:21 UTC 2018 - mc...@suse.com + +- Upgrade to 0.7.3, which is just applying our patches + 01_df6d0f2bd0.patch and 02_5c11436751159.patch (which were of + course removed) + +------------------------------------------------------------------- Old: ---- 01_df6d0f2bd0.patch 02_5c11436751159.patch Epsilon-0.7.2.tar.gz New: ---- Epsilon-0.7.3.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-Epsilon.spec ++++++ --- /var/tmp/diff_new_pack.7YHMUG/_old 2018-07-19 23:01:57.960653142 +0200 +++ /var/tmp/diff_new_pack.7YHMUG/_new 2018-07-19 23:01:57.964653129 +0200 @@ -21,18 +21,16 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-Epsilon -Version: 0.7.2 +Version: 0.7.3 Release: 0 Summary: Divmod utility package License: MIT Group: Development/Languages/Python URL: https://github.com/twisted/epsilon Source0: https://files.pythonhosted.org/packages/source/E/Epsilon/Epsilon-%{version}.tar.gz -# PATCH-FIX-UPSTREAM https://github.com/twisted/epsilon/pull/31 -Patch0: 01_df6d0f2bd0.patch -Patch1: 02_5c11436751159.patch BuildRequires: %{python_module Twisted >= 13.2.0} BuildRequires: %{python_module devel} +BuildRequires: %{python_module hamcrest} BuildRequires: %{python_module pyOpenSSL >= 0.13} BuildRequires: %{python_module service_identity} BuildRequires: %{python_module setuptools} @@ -60,9 +58,6 @@ %prep %setup -q -n Epsilon-%{version} -# fix end-of-line -%patch0 -p1 -%patch1 -p1 sed -i 's/\r//' NAME.txt %build ++++++ Epsilon-0.7.2.tar.gz -> Epsilon-0.7.3.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Epsilon-0.7.2/Epsilon.egg-info/PKG-INFO new/Epsilon-0.7.3/Epsilon.egg-info/PKG-INFO --- old/Epsilon-0.7.2/Epsilon.egg-info/PKG-INFO 2018-06-24 08:15:20.000000000 +0200 +++ new/Epsilon-0.7.3/Epsilon.egg-info/PKG-INFO 2018-07-01 19:22:08.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: Epsilon -Version: 0.7.2 +Version: 0.7.3 Summary: A set of utility modules used by Divmod projects Home-page: https://github.com/twisted/epsilon Author: UNKNOWN diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Epsilon-0.7.2/NEWS.rst new/Epsilon-0.7.3/NEWS.rst --- old/Epsilon-0.7.2/NEWS.rst 2018-06-24 08:14:46.000000000 +0200 +++ new/Epsilon-0.7.3/NEWS.rst 2018-07-01 19:20:56.000000000 +0200 @@ -1,3 +1,8 @@ +0.7.3 (2018-06-24): + Minor: + + - Make ``epsilon.benchmark`` handle ``/proc/self/mounts`` more leniently. + 0.7.2 (2018-06-24): Minor: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Epsilon-0.7.2/PKG-INFO new/Epsilon-0.7.3/PKG-INFO --- old/Epsilon-0.7.2/PKG-INFO 2018-06-24 08:15:20.000000000 +0200 +++ new/Epsilon-0.7.3/PKG-INFO 2018-07-01 19:22:08.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: Epsilon -Version: 0.7.2 +Version: 0.7.3 Summary: A set of utility modules used by Divmod projects Home-page: https://github.com/twisted/epsilon Author: UNKNOWN diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Epsilon-0.7.2/epsilon/_version.py new/Epsilon-0.7.3/epsilon/_version.py --- old/Epsilon-0.7.2/epsilon/_version.py 2018-06-24 08:15:20.000000000 +0200 +++ new/Epsilon-0.7.3/epsilon/_version.py 2018-07-01 19:22:08.000000000 +0200 @@ -11,8 +11,8 @@ { "dirty": false, "error": null, - "full-revisionid": "1168ca87dc8e78c179934a35d86b7874938c6bcd", - "version": "0.7.2" + "full-revisionid": "e85fa985a41983ef06e1d3bb26639181e1f78b24", + "version": "0.7.3" } ''' # END VERSION_JSON diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Epsilon-0.7.2/epsilon/scripts/benchmark.py new/Epsilon-0.7.3/epsilon/scripts/benchmark.py --- old/Epsilon-0.7.2/epsilon/scripts/benchmark.py 2018-06-19 00:30:53.000000000 +0200 +++ new/Epsilon-0.7.3/epsilon/scripts/benchmark.py 2018-07-01 19:20:56.000000000 +0200 @@ -412,19 +412,23 @@ -def discoverCurrentWorkingDevice(): +def discoverCurrentWorkingDevice(procMounts='/proc/self/mounts'): """ Return a short string naming the device which backs the current working directory, ie C{/dev/hda1}. """ possibilities = [] cwd = os.getcwd() - for L in file('/proc/self/mounts'): - parts = L.split() - if cwd.startswith(parts[1]): - possibilities.append((len(parts[1]), parts[0])) + with file(procMounts, 'rb') as f: + for L in f: + parts = L.split() + if cwd.startswith(parts[1]): + possibilities.append((len(parts[1]), parts[0])) possibilities.sort() - return possibilities[-1][-1] + try: + return possibilities[-1][-1] + except IndexError: + return '<unknown>' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Epsilon-0.7.2/epsilon/test/test_benchmark.py new/Epsilon-0.7.3/epsilon/test/test_benchmark.py --- old/Epsilon-0.7.2/epsilon/test/test_benchmark.py 2015-10-10 13:53:21.000000000 +0200 +++ new/Epsilon-0.7.3/epsilon/test/test_benchmark.py 2018-07-01 19:20:56.000000000 +0200 @@ -445,3 +445,21 @@ p.stopTiming = lambda: stopped.append(None) self.mock.proto.childDataReceived(p.BACKCHANNEL_OUT, p.STOP) self.assertEquals(stopped, [None]) + + + +class DiscoverDeviceTests(unittest.TestCase): + """ + Tests for L{discoverCurrentWorkingDevice}. + """ + def test_emptyMounts(self): + """ + If the mounts file does not have the current path, the device is + detected as C{'unknown'}. + """ + p = filepath.FilePath(self.mktemp()) + p.makedirs() + m = p.child('mounts') + m.touch() + self.assertEquals( + benchmark.discoverCurrentWorkingDevice(m.path), '<unknown>')