
On Thu, 13 Aug 2020 at 22:22, Stefano Borini <stefano.borini@gmail.com> wrote:
On Mon, 6 Apr 2020 at 09:40, Steve Barnes <GadgetSteve@live.co.uk> wrote:
As an aside I have a perfect example to back up what Paul is saying below. I work for a large corporation where developers are permitted to install python modules on their development machines, (subject to some licence restrictions), but the proxy settings required to get to PyPi vary from user to user, site to site, day to day (sometimes hour to hour) and connection type to connection type, e.g. If you are connected via WiFi you need to use a different proxy to that needed if you are on a wired connection and on a VPN (we have more than one in use) different again.
FYI there's an issue open on pip to allow for multiple proxies. I have this exact situation as well.
Even though this conversation references the situation I described initially, I'm against adding more complexity to how tools like pip deal with the network. That simply isn't scalable - every tool ends up having to implement the same set of options, configuration, etc. My point was challenging the statement that "if the stdlib were designed from scratch today rather than over the past 30 years, I think it would have less than it does, not more". It may be true, but IMO it would be a mistake, and would have definitely damaged Python's popularity - the "batteries included" philosophy is a *huge* selling point in many environments, that aren't immediately obvious to people who have the luxury of easy and permanent access to the internet. I'm not against pushing people to publish libraries on PyPI (I've done that myself many times) but that doesn't mean I support omitting important functionality from the stdlib "because you can get it from PyPI". The tricky bit is deciding what's important :-) (Off topic, but IMO the scalable solution to the whole proxy/network access issue, is to have core Python integrate directly with platform networking, so that if your browser can see a webpage, then so can Python. Then tools don't need *any* proxy configuration, you just set up your system and you're done. Unfortunately, that's a really hard problem due to Python's reliance on openssl, which doesn't integrate and has an API that isn't easily emulatable with platform libraries - at least, as I understand it from the people who are looking at these sorts of things, I'm a long way from an expert in networking). Paul