Donald Stufft added the comment:

On it's own I think this switch is a bad idea because it's too big of a hammer. 
Someone shouldn't accidentally disable TLS verification in pip for instance 
because they wanted to disable TLS verification for some random tool that only 
hit internal TLS but which didn't have it's own off switch written into it. A 
lot of tools are written in Python and it's hard for a user to really know what 
the full extent of toggling this switch on their system will be, especially 
given that they may have no idea which other tools are incidentally written in 
python (pip is not a good example of this, but there are lots of tools that are 
written in Python but which the fact they are written in Python isn't important 
or maybe even obvious).

I think keyed by site is wrong too, again because the scope is wrong. Opting 
out of security at the Python level filters down into tons of random 
applications that the end user may or may not be aware is even written in 
Python.

Part of the benefit of the current "opt out" mechanism is that it feels a 
little dirty to opt in in that fashion, and it should because globally opting 
out is breaking the security expectations that any application has now with the 
latest versions of Python, and adding a "cleaner" way of doing this is 
essentially giving people a nicer footgun (in the long term).

Now, I recognize that there is legacy systems at play here that are going to be 
around for a long time and that who this proposal is really being aimed to 
helping. My question would be, why can't those downstreams simply carry this 
patch? The attached patch is relatively tiny so it shouldn't be a very large 
burden, the largest being documenting and making people aware that such a thing 
exists on that platform. If there's enough downstreams who would reasonably 
have a reason to apply said patch maybe an addendum (or a new PEP) can be added 
suggesting that downstreams should apply said patch.

The tl;dr of my opinion is that if it weren't for legacy systems, I don't think 
anyone would propose this feature, and given the security sensitive nature of 
it I think it's best to treat this feature as a quirk of those legacy systems 
rather than a fully supported API of Python.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue23857>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to