commit python-flake8 for openSUSE:Factory
Hello community, here is the log from the commit of package python-flake8 for openSUSE:Factory checked in at 2019-12-02 11:32:53 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-flake8 (Old) and /work/SRC/openSUSE:Factory/.python-flake8.new.4691 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "python-flake8" Mon Dec 2 11:32:53 2019 rev:26 rq:751377 version:3.7.9 Changes: -------- --- /work/SRC/openSUSE:Factory/python-flake8/python-flake8.changes 2019-07-30 13:03:05.830418025 +0200 +++ /work/SRC/openSUSE:Factory/.python-flake8.new.4691/python-flake8.changes 2019-12-02 11:37:52.482454789 +0100 @@ -1,0 +2,7 @@ +Wed Nov 20 14:56:16 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com> + +- Update to 3.7.9: + * Disable multiprocessing when the multiprocessing method is spawn + (such as on macos in python3.8) (See also GitLab!367, GitLab#587) + +------------------------------------------------------------------- Old: ---- flake8-3.7.8.tar.gz New: ---- flake8-3.7.9.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-flake8.spec ++++++ --- /var/tmp/diff_new_pack.HgQGi4/_old 2019-12-02 11:37:53.026454904 +0100 +++ /var/tmp/diff_new_pack.HgQGi4/_new 2019-12-02 11:37:53.026454904 +0100 @@ -1,7 +1,7 @@ # # spec file for package python-flake8 # -# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2019 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -19,7 +19,7 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} %bcond_without python2 Name: python-flake8 -Version: 3.7.8 +Version: 3.7.9 Release: 0 Summary: Modular source code checker: pep8, pyflakes and co License: MIT ++++++ flake8-3.7.8.tar.gz -> flake8-3.7.9.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/flake8-3.7.8/PKG-INFO new/flake8-3.7.9/PKG-INFO --- old/flake8-3.7.8/PKG-INFO 2019-07-08 20:24:09.000000000 +0200 +++ new/flake8-3.7.9/PKG-INFO 2019-10-28 18:36:48.000000000 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 1.2 Name: flake8 -Version: 3.7.8 +Version: 3.7.9 Summary: the modular source code checker: pep8, pyflakes and co Home-page: https://gitlab.com/pycqa/flake8 Author: Tarek Ziade diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/flake8-3.7.8/docs/source/internal/utils.rst new/flake8-3.7.9/docs/source/internal/utils.rst --- old/flake8-3.7.8/docs/source/internal/utils.rst 2019-07-08 20:05:23.000000000 +0200 +++ new/flake8-3.7.9/docs/source/internal/utils.rst 2019-10-28 18:30:33.000000000 +0100 @@ -64,12 +64,6 @@ This provides a convenient and explicitly named function that checks if we are currently running on a Windows (or ``nt``) operating system. -.. autofunction:: flake8.utils.can_run_multiprocessing_on_windows - -This provides a separate and distinct check from -:func:`~flake8.utils.is_windows` that allows us to check if the version of -Python we're using can actually use multiprocessing on Windows. - .. autofunction:: flake8.utils.is_using_stdin Another helpful function that is named only to be explicit given it is a very diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/flake8-3.7.8/docs/source/release-notes/3.7.9.rst new/flake8-3.7.9/docs/source/release-notes/3.7.9.rst --- old/flake8-3.7.8/docs/source/release-notes/3.7.9.rst 1970-01-01 01:00:00.000000000 +0100 +++ new/flake8-3.7.9/docs/source/release-notes/3.7.9.rst 2019-10-28 18:33:34.000000000 +0100 @@ -0,0 +1,23 @@ +3.7.9 -- 2019-10-28 +------------------- + +You can view the `3.7.9 milestone`_ on GitLab for more details. + +Bugs Fixed +~~~~~~~~~~ + +- Disable multiprocessing when the multiprocessing method is ``spawn`` (such + as on macos in python3.8) (See also `GitLab!367`_, `GitLab#587`_) + + +.. all links +.. _3.7.9 milestone: + https://gitlab.com/pycqa/flake8/milestones/33 + +.. issue links +.. _GitLab#587: + https://gitlab.com/pycqa/flake8/issues/587 + +.. merge request links +.. _GitLab!367: + https://gitlab.com/pycqa/flake8/merge_requests/367 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/flake8-3.7.8/docs/source/release-notes/index.rst new/flake8-3.7.9/docs/source/release-notes/index.rst --- old/flake8-3.7.8/docs/source/release-notes/index.rst 2019-07-08 20:20:27.000000000 +0200 +++ new/flake8-3.7.9/docs/source/release-notes/index.rst 2019-10-28 18:33:58.000000000 +0100 @@ -9,6 +9,7 @@ ================== .. toctree:: + 3.7.9 3.7.8 3.7.7 3.7.6 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/flake8-3.7.8/src/flake8/__init__.py new/flake8-3.7.9/src/flake8/__init__.py --- old/flake8-3.7.8/src/flake8/__init__.py 2019-07-08 20:20:41.000000000 +0200 +++ new/flake8-3.7.9/src/flake8/__init__.py 2019-10-28 18:34:29.000000000 +0100 @@ -18,7 +18,7 @@ LOG = logging.getLogger(__name__) LOG.addHandler(logging.NullHandler()) -__version__ = "3.7.8" +__version__ = "3.7.9" __version_info__ = tuple( int(i) for i in __version__.split(".") if i.isdigit() ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/flake8-3.7.8/src/flake8/checker.py new/flake8-3.7.9/src/flake8/checker.py --- old/flake8-3.7.8/src/flake8/checker.py 2019-07-08 20:05:23.000000000 +0200 +++ new/flake8-3.7.9/src/flake8/checker.py 2019-10-28 18:30:33.000000000 +0100 @@ -3,6 +3,7 @@ import errno import logging import signal +import sys import tokenize from typing import Dict, List, Optional, Tuple @@ -34,6 +35,18 @@ } +def _multiprocessing_is_fork(): # type () -> bool + """Class state is only preserved when using the `fork` strategy.""" + if sys.version_info >= (3, 4): + return ( + multiprocessing + # https://github.com/python/typeshed/pull/3415 + and multiprocessing.get_start_method() == "fork" # type: ignore + ) + else: + return multiprocessing and not utils.is_windows() + + class Manager(object): """Manage the parallelism and checker instances for each plugin and file. @@ -97,26 +110,13 @@ # - we're processing a diff, which again does not work well with # multiprocessing and which really shouldn't require multiprocessing # - the user provided some awful input - if not multiprocessing: + if not _multiprocessing_is_fork(): LOG.warning( "The multiprocessing module is not available. " "Ignoring --jobs arguments." ) return 0 - if ( - utils.is_windows() - and not utils.can_run_multiprocessing_on_windows() - ): - LOG.warning( - "The --jobs option is not available on Windows due to" - " a bug (https://bugs.python.org/issue27649) in " - "Python 2.7.11+ and 3.3+. We have detected that you " - "are running an unsupported version of Python on " - "Windows. Ignoring --jobs arguments." - ) - return 0 - if utils.is_using_stdin(self.arguments): LOG.warning( "The --jobs option is not compatible with supplying " diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/flake8-3.7.8/src/flake8/utils.py new/flake8-3.7.9/src/flake8/utils.py --- old/flake8-3.7.8/src/flake8/utils.py 2019-07-08 20:05:23.000000000 +0200 +++ new/flake8-3.7.9/src/flake8/utils.py 2019-10-28 18:30:33.000000000 +0100 @@ -302,30 +302,6 @@ return os.name == "nt" -# NOTE(sigmavirus24): If and when https://bugs.python.org/issue27649 is fixed, -# re-enable multiprocessing support on Windows. -def can_run_multiprocessing_on_windows(): - # type: () -> bool - """Determine if we can use multiprocessing on Windows. - - This presently will **always** return False due to a `bug`_ in the - :mod:`multiprocessing` module on Windows. Once fixed, we will check - to ensure that the version of Python contains that fix (via version - inspection) and *conditionally* re-enable support on Windows. - - .. _bug: - https://bugs.python.org/issue27649 - - :returns: - True if the version of Python is modern enough, otherwise False - :rtype: - bool - """ - is_new_enough_python27 = (2, 7, 11) <= sys.version_info < (3, 0) - is_new_enough_python3 = sys.version_info > (3, 2) - return False and (is_new_enough_python27 or is_new_enough_python3) - - def is_using_stdin(paths): # type: (List[str]) -> bool """Determine if we're going to read from stdin. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/flake8-3.7.8/src/flake8.egg-info/PKG-INFO new/flake8-3.7.9/src/flake8.egg-info/PKG-INFO --- old/flake8-3.7.8/src/flake8.egg-info/PKG-INFO 2019-07-08 20:24:09.000000000 +0200 +++ new/flake8-3.7.9/src/flake8.egg-info/PKG-INFO 2019-10-28 18:36:48.000000000 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 1.2 Name: flake8 -Version: 3.7.8 +Version: 3.7.9 Summary: the modular source code checker: pep8, pyflakes and co Home-page: https://gitlab.com/pycqa/flake8 Author: Tarek Ziade diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/flake8-3.7.8/src/flake8.egg-info/SOURCES.txt new/flake8-3.7.9/src/flake8.egg-info/SOURCES.txt --- old/flake8-3.7.8/src/flake8.egg-info/SOURCES.txt 2019-07-08 20:24:09.000000000 +0200 +++ new/flake8-3.7.9/src/flake8.egg-info/SOURCES.txt 2019-10-28 18:36:48.000000000 +0100 @@ -87,6 +87,7 @@ docs/source/release-notes/3.7.6.rst docs/source/release-notes/3.7.7.rst docs/source/release-notes/3.7.8.rst +docs/source/release-notes/3.7.9.rst docs/source/release-notes/index.rst docs/source/user/configuration.rst docs/source/user/error-codes.rst diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/flake8-3.7.8/tests/unit/test_checker_manager.py new/flake8-3.7.9/tests/unit/test_checker_manager.py --- old/flake8-3.7.8/tests/unit/test_checker_manager.py 2019-07-08 20:05:23.000000000 +0200 +++ new/flake8-3.7.9/tests/unit/test_checker_manager.py 2019-10-28 18:30:33.000000000 +0100 @@ -35,7 +35,7 @@ assert serial.call_count == 1 -@mock.patch('flake8.utils.is_windows', return_value=False) +@mock.patch('flake8.checker._multiprocessing_is_fork', return_value=True) def test_oserrors_are_reraised(is_windows): """Verify that unexpected OSErrors will cause the Manager to reraise.""" err = OSError(errno.EAGAIN, 'Ominous message')
participants (1)
-
root