python / asyncio

asyncio historical repository
https://docs.python.org/3/library/asyncio.html
1.03k stars 178 forks source link

Fix for #404 #460

Open asvetlov opened 7 years ago

asvetlov commented 7 years ago

Don't pass ssl certivicate error to loop.call_exception_handler() Handle ssl.CertificateError only because ssl.SSLError may be raised not only on connection establishment.

@1st1 please take a look

asvetlov commented 7 years ago

Fixes #404

asvetlov commented 7 years ago

_FATAL_ERROR_IGNORE is a tuple of exceptions which doesn't generate noisy loop.call_exception_handler() if connection cannot be established (see https://github.com/python/asyncio/blob/master/asyncio/selector_events.py#L633) for usage example. ssl.CertificateError goes to this category -- it could be raised only at connecting stage. The exception still is thrown to outer code but not logged unless debug mode is disabled.

1st1 commented 7 years ago

Makes sense. Would you be able to write a unittest for this?

1st1 commented 7 years ago

@asvetlov If you want this in 3.6.1 you need to add a unittest and resubmit this PR to python/cpython today.

AraHaan commented 7 years ago

@1st1 ok, so 3.6.1 is going out after today? btw would it also include the latest version of zlib as well because it has updated a to version above 1.2.8 this year to fix bugs and stuff.

1st1 commented 7 years ago

@1st1 ok, so 3.6.1 is going out after today? btw would it also include the latest version of zlib as well because it has updated a to version above 1.2.8 this year to fix bugs and stuff.

Yes. Re zlib - not sure, please check on GH or bugs.python.org or python-dev mailing list.

AraHaan commented 7 years ago

hmm, from the looks on http://svn.python.org/projects/external/ I only see it having zlib v1.2.3 But I could have sworn python 3.6.0 was using 1.2.8. Will look at bugs.python.org or the python-dev irc channel.

AraHaan commented 6 years ago

@1st1 It looks like this repo was not marked as Read Only in it's settings to disable (I think it disables) the new issue / Pull Request buttons. Might want to do it explicitly in case someone does not read the readme in the redirect branch.

decaz commented 6 years ago

@asvetlov are you going to resubmit this PR to python/cpython ? I hope it's not abandoned.