summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHarshil <37377066+harshil21@users.noreply.github.com>2021-11-03 12:49:53 +0400
committerGitHub <noreply@github.com>2021-11-03 09:49:53 +0100
commitbe9e34722f521608a24a0d00e6991913bbad835a (patch)
tree194e870675b99cfec9b9d03dd4445fdba826ab31
parent6a7209b9b8b9bbd0fdf08ce22daf325c9d0d28ec (diff)
downloadpylint-git-be9e34722f521608a24a0d00e6991913bbad835a.tar.gz
Use single worker if importing `multiprocessing.synchronize` fails (#5238)
* add test import for multiprocessing.synchronize Co-authored-by: Jacob Walls <jacobtylerwalls@gmail.com>
-rw-r--r--CONTRIBUTORS.txt2
-rw-r--r--ChangeLog5
-rw-r--r--doc/whatsnew/2.12.rst5
-rw-r--r--pylint/lint/run.py1
4 files changed, 13 insertions, 0 deletions
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