-
Notifications
You must be signed in to change notification settings - Fork 333
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
[ISSUE-705] update default value of async validation #706
base: master
Are you sure you want to change the base?
Conversation
@astrand @mdwcrft @proelke @jainmohit2001 any input from your side regarding this PR ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense for me to have this feature deactivated by default. I'm curious what the maintainers will say!
OK with me. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense to me
Hi @wafa-yah, the request seems to be reasonable. I want to understand why the override is not working. Can you provide a simple repro? |
Changing the value in a threaded environment works for me, what's the issue? |
@wafa-yah, can you please share more insights into the use case and a repro so that we can find the underlying issue. |
Hi @jainmohit2001 sorry for the late reply. In the last few days I'm having issues with our github pipeline's reliability, it's failing randomly and not necessarily because of the tests involving the override. So for now I cannot confirm anymore that the override does not work, it can be that the issue is on our end. However, I still think that the default value of wdt ? |
I agree the use of the flag needs more prominence in the documentation, however not on changing its default value as this library is an async library which should not block the event loop when doing I/O operations. Unfortunately due to python limitations (see discussion on the original PR and a workaround for threading) both threading and asyncio do not play nicely together... eg in websockets https://websockets.readthedocs.io/en/stable/ there are two separate implementations. |
But the fact that this is an async python lib is the main argument to not introduce threading by default (async vs multithreding), reasons I see:
|
@drc38 @jainmohit2001 any opinions from your side about the change reasons given above ? |
I am open to the thought of reverting the default behavior to be blocking and setting the default value of To introduce this change, we would have to create another major version. |
Thanks @jainmohit2001 for your answer :) |
I should have been clearer above, mixing threading and asyncio is fine and expected in Python https://docs.python.org/3/library/asyncio-dev.html. It is os.fork() that is the issue with threading and hence asyncio programming. Here's the link from the original discussion by the Python devs on why os.fork() needs to be deprecated for spawn by developers where there is the possibility of multithreading: |
Changes included in this PR
After upgrade to v2.0.0 we started having issues in our project (mostly race condition issues), looking into the changelog, it was because of the threading issue raised in #676 by @astrand .
Overriding the
ASYNC_VALIDATION
added in #678 to False does not help.Pointing our requirements to the current PR where we changed the default value, brought back the stability to our tests.
Shouldn't the ASYNC_VALIDATION be False by default ? since the case of True is the one known for causing problems with multithreding ?
Current behavior
ISSUE-705
New behavior
ASYNC_VALIDATION
False
by default.Impact
ASYNC_VALIDATION
to beTrue
need to explicitly override it in there project.Checklist