Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Aug 25 2021 03:11
    sethmlarson closed #215
  • Jul 13 2021 17:34
    haolian9 closed #235
  • Jul 13 2021 17:34
    haolian9 commented #235
  • May 28 2021 20:05
    graingert commented #154
  • Apr 23 2021 01:20
    haolian9 commented #235
  • Apr 22 2021 13:16
    pquentin commented #235
  • Apr 22 2021 05:41
    haolian9 edited #235
  • Apr 22 2021 05:37
    haolian9 opened #235
  • Nov 16 2020 06:58
    pquentin commented #223
  • Nov 16 2020 06:58
    pquentin closed #223
  • Nov 07 2020 12:16
    RatanShreshtha commented #223
  • Nov 06 2020 14:08
    sethmlarson closed #234
  • Nov 06 2020 13:40
    codecov[bot] commented #223
  • Nov 06 2020 13:39
    codecov[bot] commented #223
  • Nov 06 2020 13:39
    codecov[bot] commented #223
  • Nov 06 2020 13:39
    codecov[bot] commented #223
  • Nov 06 2020 13:39
    codecov[bot] commented #223
  • Nov 06 2020 13:39
    codecov[bot] commented #223
  • Nov 06 2020 13:38
    codecov[bot] commented #223
  • Nov 06 2020 13:38
    codecov[bot] commented #223
Alex Grönholm
@agronholm
the documentation gives zero clues about that
Quentin Pradet
@pquentin
@agronholm urllib3/urllib3#1323 gives more details
we should probably write things up somewhere
Alex Grönholm
@agronholm
that's a lot of text to read (the whole discussion that is)
Quentin Pradet
@pquentin
the "what sorcery is this" part of the first post is enough to understand the general idea
even if the links are now dead
Nathaniel J. Smith
@njsmith
It doesn't use trio's API from a sync context
In sync mode, it uses synchronous socket calls
Alex Grönholm
@agronholm
I see
that's a different approach from what I'm taking
Quentin Pradet
@pquentin
@agronholm what is your approach?
Alex Grönholm
@agronholm
@pquentin blocking portals – running the event loop in a thread
the reasoning is that I don't have to write a whole different version of the code using synchronous calls, I can just defer to the async event loop and use its API
Umut Kahriman
@iKlotho
I was planning to use verify=False future but it is not implemented yet. And came across this issue: python-trio/hip#142. What is the latest decision on this? People generally want to just ignore SSL stuff and get content from webservers.
Seth Michael Larson
@sethmlarson
The workflow I'm imagining is you'd set your checksum to something bogus, like all zeroes, attempt a connection and then the error message would dump you back the actual digest which you can substitute if you trust the cert being presented.
Chris Shucksmith
@shuckc
I find it doubtful that users would dig up a certificate digest like that. What you are suggesting (showing the digest) reminds me of ssh' ~/.ssh/known_hosts where you could trust a root for a given hostname by dropping the digest in a file or config argument. But is this more work than getting a copy of the ca and specifying that directly?
Quentin Pradet
@pquentin
Digging up the CA is fine too, but it's possibly more difficult to do -- I think the point is that we'd like to avoid adding verify=False
Chris Shucksmith
@shuckc
Had a quick search through my own code for instances of verify=False with requests, aiohttp or websockets, the times I have used it it's always been to development servers having SSL certificates, but not appearing at the correct hostname/SNI that matches the certificate. e.g. one server running experimental release out of its usual load balancer or similar. I'm not sure this would be typical though. So storing the digest might not help? I really am asking to turn off verification in these cases.
in short, verify=False has usage beyond self-signed CA
Alex Grönholm
@agronholm
our dev servers also have proper certificates – not sure what the difficulty is with that
Quentin Pradet
@pquentin
@agronholm I've tried to convert more test cases to support all async backends, following your existing work on HTTPDummyServerTestCase
I tried doing that with SocketDummyServerTestCase which does not rely on an existing I/O loop by just using test_all_backends, but failed: I get a deadlock I wasn't able to debug yet
Do you think you could take a look?
Your help has been invaluable so far
Alex Grönholm
@agronholm
I can take a look but later today
Quentin Pradet
@pquentin
it's nothing urgent, really! it could be later this week too
(trying to convey that I don't want to put pressure on you)
Alex Grönholm
@agronholm
:thumbsup:
Seth Michael Larson
@sethmlarson
50 stargazers :star2: :tada:
Quentin Pradet
@pquentin
nice
Ratan Kulshreshtha
@RatanShreshtha
:thumbsup:
Alex Grönholm
@agronholm
@pquentin I take it that the code is in the asynctest branch?
Quentin Pradet
@pquentin
@agronholm no, you can start from the master branch, asynctest was merged
Alex Grönholm
@agronholm
ah okay
I can probably take a stab at this tomorrow or Sunday
Quentin Pradet
@pquentin
cool!
Alex Grönholm
@agronholm
I suppose now's a good time as any to take a look at hip's tests
Alex Grönholm
@agronholm
@pquentin so how do I reproduce this deadlock?
Quentin Pradet
@pquentin
here's an example that does not deadlock: pquentin/hip@81023b2
@agronholm and here's an example that deadlocks: pquentin/hip@6394b89
Alex Grönholm
@agronholm
that synchronous test there?
Quentin Pradet
@pquentin
no wait that commit is missing a file
this deadlocks: pquentin/hip@45fb35a (the added test)
Quentin Pradet
@pquentin
to reproduce, pip install nox unasync and run nox -rs test-3.8 -- -k test_timeout_float -s
Alex Grönholm
@agronholm
thanks
Quentin Pradet
@pquentin
(though to be honest, I thought it was a SocketDummyServerTestCase issue but the socketlevel tests proves that it's not, it's tied to the use of threading.Event in test_timeout_float, so there's no reason why you should be investigating this)
Alex Grönholm
@agronholm
oh, ok – no action required from me then?
Quentin Pradet
@pquentin
unless you want to help porting tests, no, sorry, false alert
Alex Grönholm
@agronholm
what needs to be done in that regard?
and porting to what?
Quentin Pradet
@pquentin
porting all tests from sync to async, using the conftest.test_all_backends you made
Alex Grönholm
@agronholm
oh