Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port tools/*.py to python 3 #464

Closed
ry opened this issue Aug 7, 2018 · 6 comments
Closed

Port tools/*.py to python 3 #464

ry opened this issue Aug 7, 2018 · 6 comments

Comments

@ry
Copy link
Member

ry commented Aug 7, 2018

Must continue run on python 2.7

@mreinstein
Copy link
Contributor

would it be better to wait until v8's build process uses py 3? This just seems like a minefield.

@ry ry added this to the v0.2 milestone Aug 7, 2018
@hayd
Copy link
Contributor

hayd commented Aug 7, 2018

For now an alternative, see #475, is to have python 3 error out immediately and explicitly (rather than implicitly with a SyntaxError, either in deno or later).

Going forward, would the idea be to fork/port the third_party scripts? That's a lot of code so this may be non-trivial, but we can give it a try (e.g. see how close futurize is from "just work"ing).

Note: In my first run in python 2 Luci errored because it was unable to parse the version of my default python (anaconda). So that may also have to be addressed/fixed. See also issue/below it. Probably ought to be separate issue.

@mreinstein
Copy link
Contributor

2.7 is a hard requirement for building v8. It just seems like a headache to have to maintain 2 versions of python just so we can say we are on 3.

would the idea be to fork/port the third_party scripts?

That would be super painful to have to do. :(

Has anyone gauged interest within the chrome team in updating v8's build tooling py 2.7 -> 3? Assuming they are open to this that would be much nicer in that everyone shares the benefit and we don't have to maintain our own build tooling with deno's very limited resources.

@ry
Copy link
Member Author

ry commented Aug 9, 2018

I agree with @mreinstein - forking/porting the third_party scripts is well beyond our capacity.
py3 will not be supported. When I created this issue, I mistakenly thought that the python used by the build system was included as a binary in third_party, and that we could get away with just porting our frontend scripts.

I think @hayd's solution is good - but it actually introduces some complexity for a friendly error message. If people don't understand py2 vs py3 error messages, they shouldn't be building deno in the first place. Therefore we will leave it as is.

Thanks @haoxli @hayd for the effort.

@ry ry closed this as completed Aug 9, 2018
@ry ry removed this from the v0.2 milestone Aug 9, 2018
@hayd
Copy link
Contributor

hayd commented Jan 5, 2019

xlink: nodejs/node#24512

Will be interesting to see if efforts to port chromium/v8 scripts to python 3 gain any traction now EOL is < 1 year away...

piscisaureus pushed a commit to piscisaureus/deno that referenced this issue Oct 7, 2019
@ccouzens
Copy link
Contributor

It will become difficult to have the default python be 2.7 in the future.

I worked around this by creating a file bin/python.

#!/usr/bin/env bash

exec python2.7 "$@"

Making it executable chmod +x bin/python.

And sticking it in the path when running the tests: PATH="$(pwd)/bin:$PATH" cargo test.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants