You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@jibsen Thanks for checking this. I have few questions.
print needs parenthesis for Python 3 compatibility
I don't think it does. I have Python 2.7 and it works. Can you elaborate why do you think otherwise?
scripts/tokenize.py shadows a system module that make_version.py includes
I don't understand. I don't see any connection between the two scripts.
@gmaurel Can you reopen this issue ? Also pretty please don't close issues that don't have any resolution (like this one) as they can get lost. If you really want to do it you can add a comment with a reason why.
In Python 3, print is a function, so it requires parenthesis. In order for the script to work with both Python 2 and 3, we need to add parenthesis.
For better or worse, Python files in the local folder may shadow Python modules. make_version.py imports subprocess, which somewhere down the line inside the Python 3 libraries imports tokenize. Python 2 does not import this, but you can get the same effect if for instance you create a file threading.py in the scripts folder containing only the word raise. Basically, since this isn't a package with its own namespace, I think we'll need to steer clear of any filenames that might shadow Python libraries.
Activity
mihaipopescu commentedon Nov 20, 2016
I don't think this is fixed. We should reopen this one and take a look.
mihaipopescu commentedon Nov 22, 2016
@jibsen Thanks for checking this. I have few questions.
I don't think it does. I have Python 2.7 and it works. Can you elaborate why do you think otherwise?
I don't understand. I don't see any connection between the two scripts.
@gmaurel Can you reopen this issue ? Also pretty please don't close issues that don't have any resolution (like this one) as they can get lost. If you really want to do it you can add a comment with a reason why.
jibsen commentedon Nov 24, 2016
In Python 3, print is a function, so it requires parenthesis. In order for the script to work with both Python 2 and 3, we need to add parenthesis.
For better or worse, Python files in the local folder may shadow Python modules.
make_version.pyimports subprocess, which somewhere down the line inside the Python 3 libraries imports tokenize. Python 2 does not import this, but you can get the same effect if for instance you create a filethreading.pyin the scripts folder containing only the word raise. Basically, since this isn't a package with its own namespace, I think we'll need to steer clear of any filenames that might shadow Python libraries.