From 42dbcea85c077c360b7366d6871d59aff452b11c6b9c293a286ac3caf0c33908 Mon Sep 17 00:00:00 2001 From: Todd R Date: Wed, 13 Jan 2016 09:39:35 +0000 Subject: [PATCH] Accepting request 353346 from home:TheBlackCat:branches:devel:languages:python Update to 2.5.1 OBS-URL: https://build.opensuse.org/request/show/353346 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-flake8?expand=0&rev=22 --- flake8-2.3.0.tar.gz | 3 --- flake8-2.5.1.tar.gz | 3 +++ flake8-fix-tests-using-new-mock.patch | 34 ----------------------- python-flake8.changes | 39 +++++++++++++++++++++++++++ python-flake8.spec | 29 +++++++++++++++----- 5 files changed, 65 insertions(+), 43 deletions(-) delete mode 100644 flake8-2.3.0.tar.gz create mode 100644 flake8-2.5.1.tar.gz delete mode 100644 flake8-fix-tests-using-new-mock.patch diff --git a/flake8-2.3.0.tar.gz b/flake8-2.3.0.tar.gz deleted file mode 100644 index 9c8f282..0000000 --- a/flake8-2.3.0.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:5ee1a43ccd0716d6061521eec6937c983efa027793013e572712c4da55c7c83e -size 32897 diff --git a/flake8-2.5.1.tar.gz b/flake8-2.5.1.tar.gz new file mode 100644 index 0000000..be94229 --- /dev/null +++ b/flake8-2.5.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:448aed48b0671fe6062f47b98c3081f3a4b36fbe99ddb8ac2a3be6e6cb135603 +size 83692 diff --git a/flake8-fix-tests-using-new-mock.patch b/flake8-fix-tests-using-new-mock.patch deleted file mode 100644 index 52f0660..0000000 --- a/flake8-fix-tests-using-new-mock.patch +++ /dev/null @@ -1,34 +0,0 @@ -From b0f30f97fbec04c1ab7cb8937f636822eab63885 Mon Sep 17 00:00:00 2001 -From: Ian Cordasco -Date: Fri, 10 Jul 2015 09:34:49 -0500 -Subject: [PATCH] Fix flake8 tests using mock to work with 1.1.x branch - ---- a/flake8/tests/test_engine.py -+++ b/flake8/tests/test_engine.py -@@ -51,7 +51,7 @@ class TestEngine(unittest.TestCase): - self.assertTrue(len(registered_exts[0]) > 0) - for i in registered_exts[1:]: - self.assertTrue(isinstance(i, list)) -- register_check.assert_called() -+ self.assertTrue(register_check.called) - - def test_get_parser(self): - # setup -@@ -66,13 +66,13 @@ class TestEngine(unittest.TestCase): - # actual call we're testing - parser, hooks = engine.get_parser() - # assertions -- re.assert_called() -- gpv.assert_called() -+ self.assertTrue(re.called) -+ self.assertTrue(gpv.called) - pgp.assert_called_once_with( - 'flake8', - '%s (pyflakes: 0.7, mccabe: 0.2) Python Version' % __version__) -- m.remove_option.assert_called() -- m.add_option.assert_called() -+ self.assertTrue(m.remove_option.called) -+ self.assertTrue(m.add_option.called) - self.assertEqual(parser, m) - self.assertEqual(hooks, []) - # clean-up diff --git a/python-flake8.changes b/python-flake8.changes index 3987eaf..ceb1987 100644 --- a/python-flake8.changes +++ b/python-flake8.changes @@ -1,3 +1,42 @@ +------------------------------------------------------------------- +Wed Jan 13 09:25:06 UTC 2016 - toddrme2178@gmail.com + +- Update to 2.5.1 + * Bug Properly look for .flake8 in current working directory + * Bug Monkey-patch pep8.stdin_get_value to cache the actual value + in stdin. This helps plugins relying on the function when run + with multiprocessing. +- Update to 2.5.0 + * Improvement Raise cap on PyFlakes for Python 3.5 support + * Improvement Avoid deprecation warnings when loading extensions + * Improvement Separate logic to enable “off-by-default” extensions + * Bug Properly parse options to setuptools Flake8 command + * Bug Fix exceptions when output on stdout is truncated before + Flake8 finishes writing the output + * Bug Fix error on OS X where Flake8 can no longer acquire or + create new semaphores +- Update to 2.4.1 + * Bug Do not raise a SystemError unless there were errors in the + setuptools command. + * Bug Do not verify dependencies of extensions loaded via + entry-points. + * Improvement Blacklist versions of pep8 we know are broken +- Update to 2.4.0 + * Bug Print filenames when using multiprocessing and -q option. + * Bug Put upper cap on dependencies. The caps for 2.4.0 are: + > pep8 < 1.6 (Related to GitLab#35) + > mccabe < 0.4 + > pyflakes < 0.9 + * See also GitLab#32 + * Bug Files excluded in a config file were not being excluded + when flake8 was run from a git hook. + * Improvement Print warnings for users who are providing + mutually exclusive options to flake8. + * Feature Allow git hook configuration to live in .git/config. + See the updated VCS hooks docs for more details. +- Remove upstream-included flake8-fix-tests-using-new-mock.patch +- Implement update-alternatives + ------------------------------------------------------------------- Mon Aug 10 08:45:26 UTC 2015 - mlin@suse.com diff --git a/python-flake8.spec b/python-flake8.spec index 8eadab5..4ffc9a5 100644 --- a/python-flake8.spec +++ b/python-flake8.spec @@ -1,7 +1,7 @@ # # spec file for package python-flake8 # -# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,15 +17,13 @@ Name: python-flake8 -Version: 2.3.0 +Version: 2.5.1 Release: 0 Summary: Modular source code checker: pep8, pyflakes and co License: MIT Group: Development/Languages/Python -Url: http://bitbucket.org/tarek/flake8 +Url: https://gitlab.com/pycqa/flake8 Source: http://pypi.python.org/packages/source/f/flake8/flake8-%{version}.tar.gz -# PATCH-FIX-UPSTREAM flake8-fix-tests-using-new-mock.patch -- mlin@suse.com -Patch1: flake8-fix-tests-using-new-mock.patch BuildRequires: python-devel BuildRequires: python-setuptools # Test requirements: @@ -37,6 +35,8 @@ BuildRequires: python-pyflakes >= 0.8.1 Requires: python-mccabe >= 0.2.1 Requires: python-pep8 >= 1.5.7 Requires: python-pyflakes >= 0.8.1 +Requires(post): update-alternatives +Requires(postun): update-alternatives BuildRoot: %{_tmppath}/%{name}-%{version}-build %if 0%{?suse_version} && 0%{?suse_version} <= 1110 %{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} @@ -55,7 +55,6 @@ Flake8 runs all the tools by launching the single ``flake8`` script. %prep %setup -q -n flake8-%{version} -%patch1 -p1 %build python setup.py build @@ -63,6 +62,22 @@ python setup.py build %install python setup.py install --prefix=%{_prefix} --root=%{buildroot} +# Prepare for update-alternatives usage +mkdir -p %{buildroot}%{_sysconfdir}/alternatives +mv %{buildroot}%{_bindir}/flake8 %{buildroot}%{_bindir}/flake8-%{py_ver} +ln -s -f %{_sysconfdir}/alternatives/flake8 %{buildroot}%{_bindir}/flake8 +# create a dummy target for /etc/alternatives/flake8 +touch %{buildroot}%{_sysconfdir}/alternatives/flake8 + +%post +"%_sbindir/update-alternatives" \ + --install %{_bindir}/flake8 flake8 %{_bindir}/flake8-%{py_ver} 30 + +%postun +if [ $1 -eq 0 ] ; then + "%_sbindir/update-alternatives" --remove flake8 %{_bindir}/flake8-%{py_ver} +fi + %check python setup.py test @@ -70,6 +85,8 @@ python setup.py test %defattr(-,root,root,-) %doc LICENSE README.rst %{_bindir}/flake8 +%{_bindir}/flake8-%{py_ver} +%ghost %{_sysconfdir}/alternatives/flake8 %{python_sitelib}/* %changelog