★ wanayoo — archive 1999 https://github.com/nodejs/node/pull/25878Nouvelle recherche | Portail wanayoo
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

build: find Python 3 or Python 2 in configure #25878

Closed
wants to merge 1 commit into from

Conversation

cclauss
Copy link
Contributor

@cclauss cclauss commented Feb 1, 2019

Blocked by #28537, nodejs/build#1399, and/or nodejs/build#1674

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines

@cclauss cclauss force-pushed the find-python3-in-configure branch 2 times, most recently from 996d6df to 613bacd Compare Feb 1, 2019
configure Outdated Show resolved Hide resolved
configure Outdated Show resolved Hide resolved
configure Show resolved Hide resolved
configure Outdated Show resolved Hide resolved
@addaleax addaleax added the python label Feb 6, 2019
lpinca
lpinca approved these changes Feb 9, 2019
@lpinca lpinca added the blocked label Feb 9, 2019
@lpinca
Copy link
Member

@lpinca lpinca commented Feb 9, 2019

Added blocked label as per original description.

Copy link
Contributor

@thefourtheye thefourtheye left a comment

Apart from the reasons mentioned in the original description, all the dependencies should be Python 3 compatible for this to work. Blocking this PR by requesting changes (I am okay with the changes proposed actually) till we get there.

@BridgeAR
Copy link
Member

@BridgeAR BridgeAR commented Mar 10, 2019

Ping @cclauss

@cclauss
Copy link
Contributor Author

@cclauss cclauss commented Mar 10, 2019

@BridgeAR What do you want me to do?

@BridgeAR
Copy link
Member

@BridgeAR BridgeAR commented Mar 10, 2019

I should have read the reasons why there was a -1. Sorry for the ping.

cclauss added a commit to cclauss/node that referenced this issue Apr 24, 2019
@cclauss cclauss force-pushed the find-python3-in-configure branch from c0e2c18 to d4d7354 Compare Jul 4, 2019
@cclauss cclauss force-pushed the find-python3-in-configure branch 2 times, most recently from 871393b to c380b43 Compare Jul 5, 2019
@cclauss
Copy link
Contributor Author

@cclauss cclauss commented Jul 5, 2019

Some experimentation here says that we will face an issue with Python 3.7 because async is a reserved word in Python >= 3.7 #29326 so using that word in the wrong context is a Python syntax error. So for initial experimentation, I plan to start with Python 3.6.7.

@sam-github
Copy link
Contributor

@sam-github sam-github commented Jul 5, 2019

I don't think this is blocked by #25878, its blocked by using a python version that won't actually work for configure, isn't it?

The steps to python3 are
1a - node can be built, tested, etc using python2 if available, and python3 if it isn't or if python3 is deliberately requested. This can likely be done in a single PR, maybe #28537 is better for that? This step is backwards compatible, and allow local development and testing with python3.
1b - python3 needs to exist on all build infrastructure

--- these can be done in parallel, they don't block each other

2 - convert configure to use python3 when available, falling back on python2 if not. This is probably backwards compatible, and will cause the python3 installed in 1b to start to get used, so we can see how well it works across all our platforms.

3 - remove python2 support (after a while, possibly in the next major release post-python2.7 EOL)

@cclauss cclauss force-pushed the find-python3-in-configure branch from 6af005d to ac457a9 Compare Aug 29, 2019
@nodejs-github-bot
Copy link
Contributor

@nodejs-github-bot nodejs-github-bot commented Aug 29, 2019

@cclauss
Copy link
Contributor Author

@cclauss cclauss commented Aug 29, 2019

Removing the blocked label based on #25878 (comment) and the lack of a response to #25878 (comment)

@cclauss cclauss removed the blocked label Aug 29, 2019
@cclauss cclauss force-pushed the find-python3-in-configure branch from ac457a9 to 7326086 Compare Sep 2, 2019
@ryzokuken
Copy link
Member

@ryzokuken ryzokuken commented Sep 3, 2019

./configure --ninja still won't work on python3. Trying to make a patch soon.

@cclauss
Copy link
Contributor Author

@cclauss cclauss commented Sep 3, 2019

#29414 allow legacy Python to continue to use cStringIO.StringIO

Copy link
Contributor

@sam-github sam-github left a comment

I'd like the comment about Travis to be clear to people who read it in the future, but other than that, I think this is ready to land.

_=[ 'exec' '/bin/sh' '-c' '''
test ${TRAVIS} && exec python "$0" "$@" # workaround for pyenv on Travis CI
Copy link
Contributor

@sam-github sam-github Sep 4, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could this comment be more informative? I think it should be

# On Travis, pyenv arranges for the requested python version to be available as
# plain "python". In other environments, prefer the version specific executable names.

But I might misunderstand its purpose.

@sam-github
Copy link
Contributor

@sam-github sam-github commented Sep 4, 2019

@thefourtheye I think your requested change was done, can you please re-review?

@sam-github
Copy link
Contributor

@sam-github sam-github commented Sep 4, 2019

@thefourtheye Sorry, I found your requested change:

Apart from the reasons mentioned in the original description, all the dependencies should be Python 3 compatible for this to work.

I don't agree that this is a pre-req for this to land on master. Its blocked from 12.x, but on master it does no harm, it just changes a "no supported python 2.7 found" error to (possibly) an python3 incompatibility error. It causes no harm (or change) to a system that already would have built.

@sam-github sam-github force-pushed the find-python3-in-configure branch from 2142d55 to 1897e56 Compare Sep 5, 2019
Copy link
Contributor

@sam-github sam-github left a comment

I rebased, squashed, etc.

@sam-github
Copy link
Contributor

@sam-github sam-github commented Sep 6, 2019

@thefourtheye , please re-review

@cclauss
Copy link
Contributor Author

@cclauss cclauss commented Sep 9, 2019

Is something blocking us from landing this one?

@sam-github
Copy link
Contributor

@sam-github sam-github commented Sep 9, 2019

@thefourtheye has a blocking review, but doesn't seem to be resonding to request to relook. @nodejs/tsc, is 5 days with no response enough to dismiss a review, or should we wait more? What is the convention here?

@Trott
Copy link
Member

@Trott Trott commented Sep 10, 2019

@thefourtheye has a blocking review, but doesn't seem to be resonding to request to relook. @nodejs/tsc, is 5 days with no response enough to dismiss a review, or should we wait more? What is the convention here?

@sam-github There's no set rule, but 5 days of non-responsiveness strikes me as a reasonable amount of time to wait before dismissing the request-for-changes.

@Trott
Copy link
Member

@Trott Trott commented Sep 10, 2019

@thefourtheye has a blocking review, but doesn't seem to be resonding to request to relook. @nodejs/tsc, is 5 days with no response enough to dismiss a review, or should we wait more? What is the convention here?

@sam-github There's no set rule, but 5 days of non-responsiveness strikes me as a reasonable amount of time to wait before dismissing the request-for-changes.

Not necessary, but it may be a reasonable courtesy to also email the Collaborator who hasn't responded and then wait, say, 48 hours. Sometimes people just don't see stuff because of overwhelming GitHub notifications.

@Trott
Copy link
Member

@Trott Trott commented Sep 10, 2019

@thefourtheye has a blocking review, but doesn't seem to be resonding to request to relook. @nodejs/tsc, is 5 days with no response enough to dismiss a review, or should we wait more? What is the convention here?

@sam-github There's no set rule, but 5 days of non-responsiveness strikes me as a reasonable amount of time to wait before dismissing the request-for-changes.

Not necessary, but it may be a reasonable courtesy to also email the Collaborator who hasn't responded and then wait, say, 48 hours. Sometimes people just don't see stuff because of overwhelming GitHub notifications.

I just emailed @thefourtheye now.

@thefourtheye
Copy link
Contributor

@thefourtheye thefourtheye commented Sep 10, 2019

Sorry, this was blocked because of me. I just re-reviewd now and LGTM.

@nodejs-github-bot
Copy link
Contributor

@nodejs-github-bot nodejs-github-bot commented Sep 10, 2019

@nodejs-github-bot
Copy link
Contributor

@nodejs-github-bot nodejs-github-bot commented Sep 10, 2019

@Trott
Copy link
Member

@Trott Trott commented Sep 11, 2019

Landed in be926c7

@Trott Trott closed this Sep 11, 2019
Trott added a commit that referenced this issue Sep 11, 2019
PR-URL: #25878
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
richardlau added a commit to richardlau/node-1 that referenced this issue Aug 18, 2021
PR-URL: nodejs#25878
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet