| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
|
IIRC this doesn't help much since gyp still won't run on python3...? |
Sorry, something went wrong.
There was a problem hiding this comment.
This does seem to work with Python 2 (and give the right message with Python 3).
This approach LGTM
Sorry, something went wrong.
There was a problem hiding this comment.
Maybe "Python 3 is not supported, please use Python 2.6 or 2.7"
Sorry, something went wrong.
There was a problem hiding this comment.
I'd skip "at this time" -- there's been no progress in supporting Python 3.x and I don't think we should hint that it might change.
Sorry, something went wrong.
There was a problem hiding this comment.
I'd also suggest the actual command to run, with a special case for macOS as it has no python2 symlink natively:
if sys.platform == 'darwin':
print('Python 3 is not supported. Please use: python2.7 configure')
else:
print('Python 3 is not supported. Please use: python2 configure')
Sorry, something went wrong.
There was a problem hiding this comment.
@silverwind do we really need to branch for darwin? If you install python 3 on MacOS I'd also assume you know what you're doing.
Sorry, something went wrong.
There was a problem hiding this comment.
@jbergstroem true, but I don't see a downside to not having. If we suggest the python2 command there's a chance it won't work, and we'd be better off not suggesting a command in that case.
Sorry, something went wrong.
There was a problem hiding this comment.
I like being as specific as possible on the resolution as opposed to making people go and figure it out on their own.
Sorry, something went wrong.
There was a problem hiding this comment.
@silverwind: I guess my sentiment was that that code path likely would be unreachable.
Sorry, something went wrong.
|
@Fishrock123 Error message used to look like: File "configure", line 491
except OSError, e:
^
SyntaxError: invalid syntaxand now it looks like: Python 3.x is not compatible at this time Seems like a decent improvement to me. |
Sorry, something went wrong.
|
OHHHH yes that would probably be a good change to make. |
Sorry, something went wrong.
There was a problem hiding this comment.
LGTM although I'd change the error message to e.g. "Please use Python 2.7".
The CI (logically) doesn't test python3 so this feature is likely to regress over time.
Sorry, something went wrong.
There was a problem hiding this comment.
Can you fix the long line while you're here?
Sorry, something went wrong.
There was a problem hiding this comment.
@silverwind: I guess my sentiment was that that code path likely would be unreachable.
Sorry, something went wrong.
|
I guess it might be worth noting that we support Python 2.6 as well. |
Sorry, something went wrong.
There was a problem hiding this comment.
how about if sys.version_info[0] == 2 and sys.version_info[1] in [6, 7] ?
Sorry, something went wrong.
There was a problem hiding this comment.
Nope, use except OSError as e
Sorry, something went wrong.
There was a problem hiding this comment.
That won't parse in Python 2.
Sorry, something went wrong.
There was a problem hiding this comment.
Ah, to be exact, the as keyword will parse in >= 2.6 which is the minimum we support, so it's fine I think.
Sorry, something went wrong.
There was a problem hiding this comment.
It's available in 2.6 as well, https://docs.python.org/2.6/reference/compound_stmts.html#except
Sorry, something went wrong.
There was a problem hiding this comment.
In addition to this, I would prefer from __future__ import print_function to be added as well.
Sorry, something went wrong.
There was a problem hiding this comment.
@thefourtheye is that really required for the above type of usage in 2.6, 2.7? I guess its safer.
Sorry, something went wrong.
There was a problem hiding this comment.
That would be helpful when we slowly start supporting python 3 as well. But that cannot happen anytime soon as other scripts also have to modified to support python 3. So for the time-being this is a take it or leave it suggestion.
Sorry, something went wrong.
There was a problem hiding this comment.
I think from __future__ import print_function should be added after python3 supporting schedule happens.
Sorry, something went wrong.
There was a problem hiding this comment.
@kalrover While I agree to not doing it now, the whole purpose of __future__ is to ease the migration process. Now that we are anyway changing all the print statements, I thought it would be better if we changed them to print function calls now itself.
Sorry, something went wrong.
There was a problem hiding this comment.
LGTM pending #9657 (comment).
Sorry, something went wrong.
There was a problem hiding this comment.
This has to be changed to
print('creating %s' % filename)
Sorry, something went wrong.
There was a problem hiding this comment.
Thank you so much for reviewing :)
Sorry, something went wrong.
There was a problem hiding this comment.
Remove redundant parenthesis
Sorry, something went wrong.
There was a problem hiding this comment.
Remove redundant parenthesis
Sorry, something went wrong.
There was a problem hiding this comment.
Same here
Sorry, something went wrong.
There was a problem hiding this comment.
And here
Sorry, something went wrong.
There was a problem hiding this comment.
LGTM. Thanks @kalrover :-)
Sorry, something went wrong.
There was a problem hiding this comment.
Now that we are doing it, I like the version you proposed here. Can we include that as well?
if sys.version_info[0] != 2 or sys.version_info[1] not in (6, 7):
sys.stdout.write("Please use either Python 2.6 or 2.7\n")
sys.exit(1)
Sorry, something went wrong.
There was a problem hiding this comment.
Seems reasonable, that way we also catch 2.5.x and older.
Sorry, something went wrong.
Display python3-compatible error message for some systems use python3 as default.
|
Thanks for persisting, landed in 330e63c! |
Sorry, something went wrong.
Display python3-compatible error message for some systems use python3 as default. PR-URL: #9657 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Johan Bergström <bugs@bergstroem.nu> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Display python3-compatible error message for some systems use python3 as default. PR-URL: #9657 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Johan Bergström <bugs@bergstroem.nu> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
|
This does not land cleanly in v4.x LTS. Added dont-land label. Please feel free to manually backport |
Sorry, something went wrong.
Display python3-compatible error message for some systems use python3 as default. PR-URL: #9657 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Johan Bergström <bugs@bergstroem.nu> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Display python3-compatible error message for some systems use python3 as default. PR-URL: nodejs#9657 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Johan Bergström <bugs@bergstroem.nu> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Display python3-compatible error message for some systems use python3 as default. PR-URL: #9657 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Johan Bergström <bugs@bergstroem.nu> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Display python3-compatible error message for some systems use python3 as default. PR-URL: #9657 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Johan Bergström <bugs@bergstroem.nu> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Display python3-compatible error message for some systems use python3 as default. PR-URL: #9657 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Johan Bergström <bugs@bergstroem.nu> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Display python3-compatible error message for some systems use python3 as default. PR-URL: #9657 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Johan Bergström <bugs@bergstroem.nu> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
| Back | FazBrowse Home | New Git URL |
Checklist
Affected core subsystem(s)
build
Description of change
Display python3-incompatible error message for some systems use python3 as
default.
Fix #9512