Pylava: A fork of the Pylama code audit tool for Python 3.7
1–10 of 30 posts
Re: Pylava: A fork of the Pylama code audit tool for Python 3.7
#2I can imagine there must be lot of code bases with async as variable name. For example:
async = True
This is an error in Python 3.7. >>> async = 1
File "", line 1
async = 1
^
SyntaxError: invalid syntax
But this used to run just fine without any warning or issues until Python 3.5.So now any code that uses async as a variable name would break. So is Python 3.7 considered a breaking change that is not backward compatible?
Re: Pylava: A fork of the Pylama code audit tool for Python 3.7
#3> With the release of Python 3.6, it became clear that Pylama was in need of maintenance updates. Python 3.6 warned that async was about to become a reserved keyword in Python 3.7. I can imagine there must be lot of code bases with async as variable name. For example: async = True This is an error in Python 3.7. >>> async = 1 File " ", line 1 async = 1 ^ SyntaxError: invalid syntax But this used to run just fine with…
From the 3.7 release notes (https://docs.python.org/3/whatsnew/3.7.html):
Backwards incompatible syntax changes:
async and await are now reserved keywords.Re: Pylava: A fork of the Pylama code audit tool for Python 3.7
#4> With the release of Python 3.6, it became clear that Pylama was in need of maintenance updates. Python 3.6 warned that async was about to become a reserved keyword in Python 3.7. I can imagine there must be lot of code bases with async as variable name. For example: async = True This is an error in Python 3.7. >>> async = 1 File " ", line 1 async = 1 ^ SyntaxError: invalid syntax But this used to run just fine with…
https://www.google.com/search?q=site%3Agithub.com+filetype%3...
https://www.google.com/search?q=site%3Agithub.com+filetype%3...
https://www.google.com/search?q=site%3Agithub.com+filetype%3...
https://www.google.com/search?q=site%3Agithub.com+filetype%3...
Re: Pylava: A fork of the Pylama code audit tool for Python 3.7
#5Are there any distributions where the command pip just works with Python 3?
In every Python 3 installation I have used, I had to invoke it as pip3. So it seems to me that pip3 is the commonly used command and one may need to replace pip3 with pip only on some distributions.
Re: Pylava: A fork of the Pylama code audit tool for Python 3.7
#6> With the release of Python 3.6, it became clear that Pylama was in need of maintenance updates. Python 3.6 warned that async was about to become a reserved keyword in Python 3.7. I can imagine there must be lot of code bases with async as variable name. For example: async = True This is an error in Python 3.7. >>> async = 1 File " ", line 1 async = 1 ^ SyntaxError: invalid syntax But this used to run just fine with…
Yep, Python doesn't use semver and after 2-3 I doubt they're keen on major version changes any more. From the 3.7 release notes ( https://docs.python.org/3/whatsnew/3.7.html ): Backwards incompatible syntax changes: async and await are now reserved keywords.
I remember when C++ had to introduce a keyword for automatic type inference they reused the 'auto' keyword instead of introducing a new keyword at the risk of breaking a lot of existing code.
How do other mainstream languages handle a scenario like this where a new keyword is required?
Re: Pylava: A fork of the Pylama code audit tool for Python 3.7
#7> On some Python 3 distributions, you may need to replace pip with pip3 in the command above. Are there any distributions where the command pip just works with Python 3? In every Python 3 installation I have used, I had to invoke it as pip3. So it seems to me that pip3 is the commonly used command and one may need to replace pip3 with pip only on some distributions.
Re: Pylava: A fork of the Pylama code audit tool for Python 3.7
#8Earlier quoted context omitted.
Yep, Python doesn't use semver and after 2-3 I doubt they're keen on major version changes any more. From the 3.7 release notes ( https://docs.python.org/3/whatsnew/3.7.html ): Backwards incompatible syntax changes: async and await are now reserved keywords.
Has any other mainstream programming language like C or Java introduced such reserved keywords in a new release? I guess if C or Java were to do something like this it would cause a lot of hue and cry. I remember when C++ had to introduce a keyword for automatic type inference they reused the 'auto' keyword instead of introducing a new keyword at the risk of breaking a lot of existing code. How do other mainstream la…
Rust is now doing the same thing with editions.
Perl has 'use VERSION', but I'm not very familiar with it, not sure if e.g. new keywords only become available with that statement. The docs say 'use VERSION also lexically enables all features available in the requested version…'
Re: Pylava: A fork of the Pylama code audit tool for Python 3.7
#9> On some Python 3 distributions, you may need to replace pip with pip3 in the command above. Are there any distributions where the command pip just works with Python 3? In every Python 3 installation I have used, I had to invoke it as pip3. So it seems to me that pip3 is the commonly used command and one may need to replace pip3 with pip only on some distributions.
Arch Linux has been shipping Py3 as the default python for a long time…
My point was: Which command do you normally use to install packages in Python 3? pip3 or pip?
I thought it was pip3 but the article seems to imply that using the pip command to install packages in Python 3 is common too. If this is true, which distribution ships Python 3 with pip instead of pip3 for installing packages in Python 3? Does it not conflict with pip of Python 2?
Re: Pylava: A fork of the Pylama code audit tool for Python 3.7
#10Earlier quoted context omitted.
Arch Linux has been shipping Py3 as the default python for a long time…
I am aware of that. So has been many other distributions like Debian, Ubuntu, etc. My point was: Which command do you normally use to install packages in Python 3? pip3 or pip? I thought it was pip3 but the article seems to imply that using the pip command to install packages in Python 3 is common too. If this is true, which distribution ships Python 3 with pip instead of pip3 for installing packages in Python 3? Doe…