Pylava: A fork of the Pylama code audit tool for Python 3.7
github.com
github.com
One model I'm curious about is https://jazzband.co/, "a collaborative community to share the responsibility of maintaining Python-based projects." Not sure how well that works in practice, but it would be great for something like that to crack the maintainer-burnout problem.
But ASF does come with a lot of bureaucracy for creating a new project. GitHub makes creating new projects very simple but it also makes disapperance of ownership very likely. If there was a way to request GitHub to transfer ownership of a popular but unmaintained project to someone else, a lot of time and effort spent in creating new forks and new project resources could be avoided.
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.
In later versions you can invoke pip using python -m pip install ..., which makes it more clear which python is being used.
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?
$ python -m pip ... # Use Python 2
$ python2 -m pip ... # If you want to be sure is using Python 2
$ python3 -m pip ... # Use Python 3
$ python3 -m venv ... # Create a virtualenv with Python 3 as documented on https://docs.python.org/3/library/venv.html to "prevent any potential confusion as to which Python interpreter a virtual environment will be based on"
I know it's verbose and long to type but looks explicit to me and saved me to use the wrong version of Python several times.
Unfortunately in the Ubuntu and Mac world 'python' is still Python 2.7 and 'pip' refers to the Python 2 pip. Python 3 is available as 'python3' along with 'pip3'.
All because Python chooses to break existing code.
Can't the software designers of this century choose to provide feature flags (use strict, use VERSION, etc.) to enable new features that break existing code?
There was a nice and popular article/blog post from someone famous about never ever breaking existing code or functionality because users depend on it but I cannot remember the title of that post to search it.
This is a code analysis tool, quite different from your average library. It broke because Python introduce new reserved keywords (async/await). This is a non-breaking change for almost all libraries/software (and if it IS breaking for you, you probably just have to change variable names or something similar), but code analysis tools are different, they have to be totally up to date with new language features. Lots of languages introduce new reserved keywords decently often (in fact, lots have explicitly added async and await somewhat recently), it tends to break very little, except code analysis tools.
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 "<stdin>", 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?
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?
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…'
https://en.wikipedia.org/wiki/List_of_Java_keywords
For C++ ( New keywords: alignas, alignof, char16_t, char32_t, constexpr, decltype, noexcept, nullptr, static_assert, and thread_local ) : https://stackoverflow.com/questions/6399615/what-breaking-ch...
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...