anki/pylib
Damien Elmes a8939e7938 serialize black invocations
On a Linux machine here, the tests consistently fail when two copies
of black are run at once:

% bazel test //qt:format_check //pylib:format_check --cache_test_results=no
==================== Test output for //qt:format_check:
Process SyncManager-1:
Traceback (most recent call last):
  File "/home/dae/.cache/bazel/_bazel_dae/fc22e40cbbf8b7d16ac57a00991b1ef1/external/python/lib/python3.9/multiprocessing/process.py", line 315, in _bootstrap
    self.run()
  File "/home/dae/.cache/bazel/_bazel_dae/fc22e40cbbf8b7d16ac57a00991b1ef1/external/python/lib/python3.9/multiprocessing/process.py", line 108, in run
    self._target(*self._args, **self._kwargs)
  File "/home/dae/.cache/bazel/_bazel_dae/fc22e40cbbf8b7d16ac57a00991b1ef1/external/python/lib/python3.9/multiprocessing/managers.py", line 583, in _run_server
    server = cls._Server(registry, address, authkey, serializer)
  File "/home/dae/.cache/bazel/_bazel_dae/fc22e40cbbf8b7d16ac57a00991b1ef1/external/python/lib/python3.9/multiprocessing/managers.py", line 156, in __init__
    self.listener = Listener(address=address, backlog=16)
  File "/home/dae/.cache/bazel/_bazel_dae/fc22e40cbbf8b7d16ac57a00991b1ef1/external/python/lib/python3.9/multiprocessing/connection.py", line 453, in __init__
    self._listener = SocketListener(address, family, backlog)
  File "/home/dae/.cache/bazel/_bazel_dae/fc22e40cbbf8b7d16ac57a00991b1ef1/external/python/lib/python3.9/multiprocessing/connection.py", line 596, in __init__
    self._socket.bind(address)
OSError: [Errno 98] Address already in use

I dug briefly into Black's code, but suspect this is actually an issue
with the multiprocessing library. Didn't have time to investigate it
further; this workaround will do for now.

(One day I'll get around to merging those separate scripts into a single
one. One day. :-))
2022-02-11 14:47:05 +10:00
..
anki Keep cwd and pass dir to player subprocess instead (#1656) 2022-02-11 10:35:48 +10:00
rsbridge V3 parent limits (#1638) 2022-02-10 09:55:43 +10:00
tests serialize black invocations 2022-02-11 14:47:05 +10:00
tools The importer list have a Hook (#1543) 2021-12-09 11:20:29 +10:00
.gitignore symlink generated .py/.pyi into tree to fix Python code completion 2020-12-16 11:36:42 +10:00
.isort.cfg start work on more clearly defining backend/protobuf boundaries 2021-01-31 18:55:45 +10:00
.pylintrc Backend Custom Study (#1600) 2022-01-20 14:25:22 +10:00
BUILD.bazel run buildifier/buildozer to tidy up BUILD files 2021-12-14 09:18:24 +10:00
mypy.ini PEP8 for rest of pylib (#1451) 2021-10-25 14:50:13 +10:00
orjson.bzl Make orjson optional again 2021-01-07 09:44:40 +10:00
protobuf.bzl refactor protobuf handling for split/import 2021-07-10 19:17:05 +10:00
README.md minor doc updates 2020-12-11 22:37:12 +10:00

Anki's Python library code is in anki/.

The Rust/Python extension module is in rsbridge/; it references the library defined in ../rslib.