Rust: concerning Python version for src/etc/char_private.py

Created on 27 Oct 2017  ·  1Comment  ·  Source: rust-lang/rust

src/etc/char_private.py is used to generate src/libcore/char_private.rs (which is checked in to the repository, so the script is to be run by a developer making a change to it, not the build system).

char_private.py requires Python 3.5+—it uses FileNotFoundError (introduced in Python 3) and subprocess.run (introduced in Python 3.5)—which is slightly surprising, given that the build dependencies section in the repository's README lists "python 2.7 (but not 3.x)".

It almost pains me to report this, because if at all possible, I'd rather _not_ edit the script: there is _enough_ Python 2 code in the world; if we are ever to free ourselves from the dead hand of the past, it is intendant on technical pioneers like us to _listen_ when told that the month of July 2010 called while we were out and _they want their programming language back_. Still, it is valuable to (first and foremost) document and (secondarily) be consistent about what we require.

C-enhancement

Most helpful comment

If it's just a maintenance script, not normally needed for building the compiler, then I think it's fine to have its own requirements.

>All comments

If it's just a maintenance script, not normally needed for building the compiler, then I think it's fine to have its own requirements.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

SharplEr picture SharplEr  ·  3Comments

pedrohjordao picture pedrohjordao  ·  3Comments

drewcrawford picture drewcrawford  ·  3Comments

jmegaffin picture jmegaffin  ·  3Comments

modsec picture modsec  ·  3Comments