-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
With --jobs 2
, the open()
call is executed for each opened file
#7774
Comments
--jobs 2
, the open()
call is executed for each opened file. E.g. for HomeAssistant I got over 16.000 warnings just for 3 old config values. That should be fixed before we release 2.16
.--jobs 2
, the open()
call is executed for each opened file
I don't think we will be able to refactor the parallelism to avoid calling open() before 2.16, that's a huge task for 3.0. To fix the blocker, maybe we can add a warnings filter "once" around our own warning ... is that feasible? |
This comment was marked as off-topic.
This comment was marked as off-topic.
I did some research this is indeed more complicated than I though, as no simple filter work work on process pool executor. Here's a simple reproducer: import warnings
from concurrent.futures import ProcessPoolExecutor
def a_warning():
warnings.warn("Hello filter my old friend.")
with ProcessPoolExecutor(max_workers=10, initializer=a_warning) as executor:
warnings.simplefilter("once")
executor.submit(a_warning) I'm going to remove the blocker, this is something that is going to happen once and spam you for the number of job you defined, we can probably live with it. |
I have this bug even with python v3.10.9 for pylint v2.16.0. This bug is gone with pylint 2.16.1 though. |
https://github.com/cdce8p/ha-core/actions/runs/3470026809/jobs/5797737991#step:8:25
Originally posted by @cdce8p in #7497 (comment)
The text was updated successfully, but these errors were encountered: