From be9e34722f521608a24a0d00e6991913bbad835a Mon Sep 17 00:00:00 2001 From: Harshil <37377066+harshil21@users.noreply.github.com> Date: Wed, 3 Nov 2021 12:49:53 +0400 Subject: Use single worker if importing `multiprocessing.synchronize` fails (#5238) * add test import for multiprocessing.synchronize Co-authored-by: Jacob Walls --- CONTRIBUTORS.txt | 2 ++ ChangeLog | 5 +++++ doc/whatsnew/2.12.rst | 5 +++++ pylint/lint/run.py | 1 + 4 files changed, 13 insertions(+) diff --git a/CONTRIBUTORS.txt b/CONTRIBUTORS.txt index fa78fc987..773c1b70a 100644 --- a/CONTRIBUTORS.txt +++ b/CONTRIBUTORS.txt @@ -574,3 +574,5 @@ contributors: * Ikraduya Edian: contributor * Antonio Quarta (sgheppy): contributor + +* Harshil (harshil21): contributor diff --git a/ChangeLog b/ChangeLog index 7beac30fa..c0ab85265 100644 --- a/ChangeLog +++ b/ChangeLog @@ -135,6 +135,11 @@ Release date: TBA Closes #3370 +* The ``--jobs`` parameter now fallbacks to 1 if the host operating system does not + have functioning shared semaphore implementation. + + Closes #5216 + What's New in Pylint 2.11.2? ============================ diff --git a/doc/whatsnew/2.12.rst b/doc/whatsnew/2.12.rst index 95bdac0db..7fbb4ab71 100644 --- a/doc/whatsnew/2.12.rst +++ b/doc/whatsnew/2.12.rst @@ -134,3 +134,8 @@ Other Changes explicit typing Closes #5222 + +* The ``--jobs`` parameter now falls back to 1 if the host operating system does not + have functioning shared semaphore implementation. + + Closes #5216 diff --git a/pylint/lint/run.py b/pylint/lint/run.py index 22c3dd14f..46710dc2b 100644 --- a/pylint/lint/run.py +++ b/pylint/lint/run.py @@ -13,6 +13,7 @@ from pylint.utils import print_full_documentation, utils try: import multiprocessing + from multiprocessing import synchronize # noqa pylint: disable=unused-import except ImportError: multiprocessing = None # type: ignore -- cgit v1.2.1