-
Notifications
You must be signed in to change notification settings - Fork 699
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add "reinstall()" method to make it easier in spawn multiprocessing #1069
base: master
Are you sure you want to change the base?
Conversation
It seems |
Thanks for the PR @monchin! However, I'm going to wait a little before merging it, because there are quite a few special cases I'd like to think about and a lot of unit tests that need to be implemented. I'll probably make some commits after yours to complete the development, if you're OK with that.
Indeed, docstrings are not automatically formatted by |
I'm not familiar with |
Thanks for the update.
Similarly to You can try to install the pre-commit hooks to automatically fix your files before $ pre-commit install --install-hooks Or you can manually fix the file with: $ ruff tests/test_reinstall.py --fix |
@Delgan What is the status of this? this would be a really nice addition to have. |
Add multiprocessing functionality. However, this conflicts with wriring text to stdout other than a progressbar. Ideally, loguru could be used to manage logs in a multi-process safe way, but this requires a somewhat hacky solution of passing an attribute of the parent logger object into each spawned process and manually setting the logger imported in the spawned process to use the attribute passed as a paremeter. There is a [PR](Delgan/loguru#1069) to create a new function called reinstall() that would address this, but it has yet to be merged. Until the PR is merged, using multithreading instead of multiprocessing seems like the better solution.
Make it easier when using
loguru
in spawn multiprocessing environment