00:46
<MikeSmith>
TabAtkins: ah yeah if it could be handled like that other dependencies then that’d work great
00:47
<MikeSmith>
I don’t have a strong opinion on urllib vs requests, but if requests comes with SSL root-cert management out of the box, that’s a pretty nice plus
00:48
<MikeSmith>
as far as urllib, one real-world problem I ran into with it is that it doesn’t send and User-Agent header; if you want a UA header, you have to manually add it in your code
00:50
<MikeSmith>
the specific problem that caused me is, tools.ietf.org apparently persisently blocks IP addresses from which clients that don’t send a User-Agent header in requests
00:50
<MikeSmith>
...and it keeps the blocking for that IP address in place for a week
00:52
<MikeSmith>
so I got blocked after running a script I wrote that checks fragment IDs in documents
00:53
<MikeSmith>
given urllib is intentionally low-level, I guess it makes sense that it doesn’t send a default User-Agent header; but it’s kind of a surprising gotcha
01:08
<gsnedders>
post PEP 476 (Py2.7, 3.4, 3.5) urllib.request should do cert validation out of the box by default?
01:08
<gsnedders>
but in general the recommendation is to use requests in general
01:09
<MikeSmith>
gsnedders: but urllib needs to have the root certs installed on the system somewhere right?
01:10
<MikeSmith>
in the case of the XCode-installed Python3, it does not install any certs on the system anywhere
01:10
<gsnedders>
MikeSmith: yes; do many systems /not/ have certs installed at this point? how many Linux distros don't include ca-certs in their base install?
01:10
<gsnedders>
MikeSmith: it should just use the system level roots
01:10
<MikeSmith>
sure, it should
01:10
<MikeSmith>
but it doesn’t
01:11
<MikeSmith>
I mean, specifically the XCode-installed Python3 doesn’t
01:13
<MikeSmith>
gsnedders: see my summary at https://lists.w3.org/Archives/Public/spec-prod/2020JanMar/0008.html
01:13
<gsnedders>
https://stackoverflow.com/questions/42098126/mac-osx-python-ssl-sslerror-ssl-certificate-verify-failed-certificate-verify
01:13
<MikeSmith>
https://openradar.appspot.com/7111585 and https://stackoverflow.com/a/60334957/441757 amd https://github.com/HandBrake/HandBrake/issues/2216#issuecomment-527114519
01:14
<MikeSmith>
gsnedders: yeah that is if you install Python yourself from the upstream release distro
01:15
<gsnedders>
they don't even ship the script to add the certs anywhere? bleh.
01:15
<MikeSmith>
right
01:15
<MikeSmith>
they are really going out of their way to eff it up
02:03
<devsnek>
when there are multiple overrides of a method in webidl
02:04
<devsnek>
like request(name, options, callback) and request(name, callback)
02:04
<devsnek>
and a step says "if options was not passed"
02:04
<devsnek>
what logic is being used to decide if options was passed
02:04
<devsnek>
the types of the arguments? number of arguments? a combination?
02:17
<gsnedders>
devsnek: https://heycam.github.io/webidl/#es-overloads
02:17
<devsnek>
oh my
02:17
<gsnedders>
probably see the note below the algorithm?
02:18
<gsnedders>
but in a case like this, it's done based on the number of args
02:18
<gsnedders>
things get more complicated when you have multiple overloads with the same number of args
02:19
<devsnek>
yeah as long as the types are different