Live data from Hacker News

Show HN: Asynchronous HTTP/2 client for Python 2.7

github.com

51–60 of 62 posts

Re: Show HN: Asynchronous HTTP/2 client for Python 2.7

#51
post #18

I’m of the opinion that one should only maintain python2 projects not actively develop and expand them. If your project needed http2 then it should be ported to python3. Edit: would using python3 in a container make sense where the distribution only ships legacy python?

What if a company has a large codebase that's in Python 2 and wants http2? Will those suggesting porting help them bear the costs and manhours it takes? (Google, for one, still uses 2. As does Dropbox. And both companies had Guido Van Rossum working for them at some point).

All aforementioned large companies have a diverse tech stack rather than a single stack, let alone programming language versions. Having Python BDFL working for them doesn't necessarily mean they will follow Python community consensus. Neither was Guido tasked to help them upgrade their python stack to 3.x AFAIK.

Python core team will eventually cease support 2.x support at some point[1], so the ones who uses 2.x will be on their own. Will the cost of self-patching python 2.x lower than rewrite the software application you developed on 2.x? Well, that's on them to decide. After 2.x being officially deprecated, what's the point of having a Async HTTP/2 client working (mostly back-porting features that's already on 3k) on 2.x?

[1]: https://pythonclock.org/

Re: Show HN: Asynchronous HTTP/2 client for Python 2.7

#52
post #31

I’m of the opinion that one should only maintain python2 projects not actively develop and expand them. If your project needed http2 then it should be ported to python3. Edit: would using python3 in a container make sense where the distribution only ships legacy python?

The current version of Redhat - RHEL 7 - which most banks, large enterprises etc. are using comes with a system python version of 2.7.5 and you need to jump through hoops to install Python 3.x ( e.g. https://stackoverflow.com/questions/8087184/problems-install... ), which may not even be possible if you're in an environment where security is tightly controlled. There is the possibility of Python 3.x being default in…

Developers relying on OS scripting runtimes for their applications are misusing the OS; and environments that only allow the use of OS scripting runtimes are fundamentally misunderstanding their job.

OS scripting runtimes are there for the OS to use, in its system software and services. Such runtimes are not there for anyone else to use. They’re implementation details of the OS.

This is the reason that certain platform-bytecode libraries get packaged into OS packages, while most don’t. Those packages are also there strictly for the OS itself to use, with versioning allowing other OS packages to rely on them. If you’re not writing OS software (e.g. something that runs under init(8), speaks D-Bus, is part of minimal installs, etc.) then you shouldn’t be relying on those packages.

Consider the fact that a lot of “application software” OS packages—packages shipped by the distro!—actually vendor their own runtime and libraries. They do this because they have separate needs from the super-stable-but-minimal runtime provided by the OS.

If not even the distros themselves think it’s worthwhile to rely on the OS runtime for everything, you shouldn’t either.

Unless your software’s relationship with a daemon or library is “I expect that it was already here when I got here, because that exact ABI version of it is part of the definition of the platform we target”—just vendor the dang deps.

Yes, they become your responsibility to audit. The distro was never going to do that job for any software not required to run itself anyway.

Re: Show HN: Asynchronous HTTP/2 client for Python 2.7

#53
post #51
post #18

Earlier quoted context omitted.

What if a company has a large codebase that's in Python 2 and wants http2? Will those suggesting porting help them bear the costs and manhours it takes? (Google, for one, still uses 2. As does Dropbox. And both companies had Guido Van Rossum working for them at some point).

All aforementioned large companies have a diverse tech stack rather than a single stack, let alone programming language versions. Having Python BDFL working for them doesn't necessarily mean they will follow Python community consensus. Neither was Guido tasked to help them upgrade their python stack to 3.x AFAIK. Python core team will eventually cease support 2.x support at some point[1], so the ones who uses 2.x wil…

> After 2.x being officially deprecated, what's the point of having a Async HTTP/2 client working (mostly back-porting features that's already on 3k) on 2.x?

Once again, the point is that software will continue working beyond that deprecation event.

As you said, the cost/benefit analysis of a rewrite isn't always in favor of a rewrite at that point in time. So what must follow is that there will be Python 2 software out in the wild for some time regardless of support. What other possibility is there?

Re: Show HN: Asynchronous HTTP/2 client for Python 2.7

#54

Earlier quoted context omitted.

How does that compare to aiohttp? What are the benefits?

aio isn't available for py2. The benefit is that this is available for py2.

There is https://github.com/vstinner/trollius for vanilla Python2.

Re: Show HN: Asynchronous HTTP/2 client for Python 2.7

#55

Earlier quoted context omitted.

you mean bringing code which has not been cleared as secure & authorized by corporation's legal experts? BigCorp makes all those easy things hard (usually after lessons learnt).

Even if you run official builds by the python foundation from the library on docker hub? That seems like a business opportunity: certify software for RHEL by all the government bodies and pay RH for sign off and then be the only vendor to be sanctioned to run “third party but vetted” python3.

If a group has a security policy that makes it hard for them to install Python 3, of course there's no way in hell they're installing Docker.

Re: Show HN: Asynchronous HTTP/2 client for Python 2.7

#56

Earlier quoted context omitted.

It's been ten years, so it's gone beyond "idealistically".

Still not distributed by default on Mac or Ubuntu long term release, unlike 2.

The current Ubuntu long-term support release is Xenial, which comes with only Python 3 installed. If you're talking about Trusty, its support is ending fairly soon.

On Xenial, you have to separately install an optional package for Python 2. When you try to run /usr/bin/python on a fresh Xenial install, it'll tell you that you need to install a package such as python-minimal==2.7.11, whereas /usr/bin/python3 is already there.

Re: Show HN: Asynchronous HTTP/2 client for Python 2.7

#58
post #57
post #54

Earlier quoted context omitted.

There is https://github.com/vstinner/trollius for vanilla Python2.

trollius is no longer maintained

It's still a reasonable starting place for anyone wanting asyncio on vanilla Python2. Outside of vanilla Python2, Tauthon also has some tracking issues for the language extensions and libraries needed for a backport of asyncio to Tauthon.[0]

[0]: https://github.com/naftaliharris/tauthon/issues/10

Re: Show HN: Asynchronous HTTP/2 client for Python 2.7

#59
post #55

Earlier quoted context omitted.

Even if you run official builds by the python foundation from the library on docker hub? That seems like a business opportunity: certify software for RHEL by all the government bodies and pay RH for sign off and then be the only vendor to be sanctioned to run “third party but vetted” python3.

If a group has a security policy that makes it hard for them to install Python 3, of course there's no way in hell they're installing Docker .

fair enough i didn't know these things; learned something new today.

Re: Show HN: Asynchronous HTTP/2 client for Python 2.7

#60
post #51

Earlier quoted context omitted.

All aforementioned large companies have a diverse tech stack rather than a single stack, let alone programming language versions. Having Python BDFL working for them doesn't necessarily mean they will follow Python community consensus. Neither was Guido tasked to help them upgrade their python stack to 3.x AFAIK. Python core team will eventually cease support 2.x support at some point[1], so the ones who uses 2.x wil…

> After 2.x being officially deprecated, what's the point of having a Async HTTP/2 client working (mostly back-porting features that's already on 3k) on 2.x? Once again, the point is that software will continue working beyond that deprecation event. As you said, the cost/benefit analysis of a rewrite isn't always in favor of a rewrite at that point in time. So what must follow is that there will be Python 2 software…

> Once again, the point is that software will continue working beyond that deprecation event.

Yes, python 2.x code will work - but in the event major CVEs for a piece of software stack that's deprecated, you are left to no choice but to fix on your own. Those sometime are by no means no small feat! And mind you this is an ongoing battle to patch up security holes.

Post reply on HN