flake8/tests
Nekokatt e6a5f6a663 Support linting when missing sem_open syscall
Platforms such as Termux on Android, and other exotic devices
do not provide a sem_open implementation on the OS level. This
is problematic, as the error resulting from this occurs when
calling multiprocessing.Pool, throwing an unhandled ImportError.

The issue itself is outlined in https://bugs.python.org/issue3770.

This change allows devices missing this system call to respond
to the missing feature by falling back to synchronous execution,
which appears to be the default behaviour if the multiprocessing
module is not found.

This change also adds a potential fix for developers working
on platforms where multiprocessing itself cannot be imported.
The existing code would set the name referencing the import to
None, but there are no clear checks to ensure this does not
result in an AttributeError later when multiprocessing.Pool
has accession attempts.

Existing users should see no difference in functionality, as they
will assumably already be able to use flake8, so will not be
missing this sem_open call.

Users on devices without the sem_open call will now be able
to use flake8 where they would be unable to before due to
unhandled ImportErrors.
2020-08-27 15:41:25 -07:00
..
fixtures options: Remove parsing --verbose from the configuration file 2019-10-12 14:25:50 +01:00
integration Support linting when missing sem_open syscall 2020-08-27 15:41:25 -07:00
unit fix JobsArgument --help output 2020-06-05 14:25:57 +01:00
__init__.py mypy now passes 2019-05-19 17:31:04 -07:00
conftest.py Add a docstring to conftest 2016-01-10 13:15:25 -06:00