Live data from Hacker News

How we rolled out one of the largest Python 3 migrations

blogs.dropbox.com

61–70 of 141 posts

Re: How we rolled out one of the largest Python 3 migrations

#61
post #59

Earlier quoted context omitted.

Especially when you could build such a system yourself quite trivially by getting an FTP account, mounting it locally with curlftpfs, and then using SVN or CVS on the mounted filesystem!

Sarcasm doesn't translate well on the internet, so I'm really not sure if suggesting using CVS (of all things) over a mounted FTP share as a replacement for Dropbox is a joke!

https://news.ycombinator.com/item?id=9224 is the reference

Re: How we rolled out one of the largest Python 3 migrations

#62
It’s funny, after Mojave was released recently I thought it might finally have a python3 installed, even if it’s not the default. Nope, still Python 2.7.

This is good for me since I deployed a Python-dependent app under the assumption that the system Python would be stable and reliable. It allows relatively complex things to be achieved with a tiny download package.

I’ve been prepared to adopt Python 3 for awhile but it just isn’t necessary when using system defaults.

Re: How we rolled out one of the largest Python 3 migrations

#63
post #32

I would have thought that Go would be perfect for this sort of system-level-like programming ?

Go isn't good at the system level. I.e. calls to C APIs are expensive, etc.

Wait, I thought Go was designed as a system language.

Re: How we rolled out one of the largest Python 3 migrations

#64
post #58
post #55

Earlier quoted context omitted.

This is possible and actually pretty trivial. You install all 3rd party dependencies into some directory. The command line entry point is then a simple BASH script which sets the PYTHONPATH to the appropriate installation location and then does the appropriate exec call. You then have a functionally portable python installation.

Isn't this just a hacky virtualenv? 'python3 -mvenv dir && ./dir/bin/pip install requirements'?

There are a lot of minor differences, but the biggest difference is that you're able to be completely independent of the system python install. You bundle a complete python interpreter, all libraries needed, etc.

The user doesn't need to have python installed at all, and if they have 2.x instead of 3.x or 3.3 when you're expecting features that are only present in >= 3.5, it's no issue.

This may sound trivial, but it's a _huge_ deal, particularly when you need to deploy something that runs on multiple different OSes and versions of OSes.

Other than that, the "directory full of libs, binaries, and code" approach is a lot easier to package into something that will work well with the native package manager (e.g. an .msi for windows, etc).

Re: How we rolled out one of the largest Python 3 migrations

#66
post #32

Earlier quoted context omitted.

Go isn't good at the system level. I.e. calls to C APIs are expensive, etc.

Wait, I thought Go was designed as a system language.

Go was designed for concurrency (and the docs take care to distinguish that from parallelism), fast compilation, and easy deployment.

Re: How we rolled out one of the largest Python 3 migrations

#67
post #55
post #48

> However, rather than use the native toolchains directly, such as Xcode for macOS, we delegated the creation of platform-compliant binaries to py2exe for Windows, py2app for macOS, and bbfreeze for Linux. I wish the authors of more Python tools would deploy standalone applications. I do not like having to maintain various sets of Python installers/package managers (because every Python tool seems to use a different…

This is possible and actually pretty trivial. You install all 3rd party dependencies into some directory. The command line entry point is then a simple BASH script which sets the PYTHONPATH to the appropriate installation location and then does the appropriate exec call. You then have a functionally portable python installation.

Pretty trivial?

Really?

I think as soon as you start writing all caps trivial has gone right out the window.

Trivial would be application dependencies managed by the system package manager.

I'm at the point where I won't touch a python app or library that can't be installed via Pacman. It's just not worth my time.

And... python is still the only thing on arch that gives me the shits everytime it upgrades.

Re: How we rolled out one of the largest Python 3 migrations

#68
post #24

Earlier quoted context omitted.

Go code is about ~30% more verbose than equivalent python.

How much faster is Go? Memory usage? It has to be less demanding on your laptop battery, for example.

Performance depends very much on what you are doing. Native Python code is much slower than Go, but Python code execution is not the bottleneck in many Python programs. NumPy may be faster than Go and disk IO is the same speed in each.

Re: How we rolled out one of the largest Python 3 migrations

#69
post #59

Earlier quoted context omitted.

Especially when you could build such a system yourself quite trivially by getting an FTP account, mounting it locally with curlftpfs, and then using SVN or CVS on the mounted filesystem!

Sarcasm doesn't translate well on the internet, so I'm really not sure if suggesting using CVS (of all things) over a mounted FTP share as a replacement for Dropbox is a joke!

> Sarcasm doesn't translate well on the internet

Given what you're replying to, I'd say irony sure does.

Post reply on HN