5 ms·
>But the Flask-Login team is not actively developing the extension anymore. So they should tie the development to an extension that isn't in further developmen
by croes 3y ago
>But the Flask-Login team is not actively developing the extension anymore.
So they should tie the development to an extension that isn't in further development?
- fiddlerwoaroof 3y agoBreaking changes shouldn’t happen with the same name: if you want to break your users, pick a new name too
- usrbinbash 3y agoThe version number, and especially the major version, IS part of the name, so they did exactly that.
- fiddlerwoaroof 3y agoThen require people to `import flask3` so you can install both major versions together.
- usrbinbash 3y agoNo. That would break every single module that is compliant with flask 3.x and imports it with `import flask`. This simply isn't justified by the "benefit" of some old packages not having to change a single line of code. Yes, maybe in hindsight it would have been beneficial to put the major version of some packages (flask is far from the only one) directly into the package name, as a workaround for pythons inability to deal with multiple versions of the same module under the same name in one environment. But python works as it does, `import flask` is how god-knows how many projects use it, so that's how the show runs, period. If some package requires a certain version, it can pin that version in its `setup.py`. If a project requires a certain version it can pin that version in it's `requirements.txt`. If an environment requires a certain version, the admin can create a virtualenv.
- fiddlerwoaroof 3y agoAs Rich Hickey argues in the talk I referenced, semver and version pinning is a problem not a solution. I’ve written lots of code using only stable dependencies that are stable over the span of decades, and it’s just a much nicer ecosystem to be able to rely on.
- usrbinbash 3y ago> semver and version pinning is a problem not a solution Almost every practice in software development is a compromise that wouldn't be necessary if some decision in the past were different. I think I agreed with you somewhere in this thread, that version-names (flask1, flask2, ...) are a better solution than major versions. However, `flask` as an import name isn't going to go away. That is simply a reality and we have to work with it, because alot of projects rely on this. The same is true for tens of thousands of important software packages all over the OSS landscape. So we can argue all day and then some over "what if"s...it won't change the status quo that exists, and in that state, semver is a good compromise that solves way more problems than it introduces.
- pdonis 3y agoThe issue with Flask-Login isn't even a functionality change. Flask just decided to stop making a particular function available in their namespace and now wants you to import it from the Python standard library instead. A better solution for a case like this would be to import the function from the Python standard library into the Flask namespace, so old code would still work. Then it wouldn't matter that Flask-Login is no longer actively maintained. Also, as the article notes, Flask-Login is by no means the only Flask-using Python package that was broken by this change. Are all of those other packages no longer actively maintained? I doubt it.
- paulddraper 3y ago> A better solution for a case like this would be to import the function from the Python standard library into the Flask namespace, so old code would still work. Forever?
- pdonis 3y agoFor as long as the functionality does not change. Which it didn't when the function was removed; the Python standard library function had the same functionality as the former Flask function that was removed.
- ilyt 3y agoAdding code into your framework to support abandonware plugins is the exact opposite of better solution
- pdonis 3y agoThey wouldn't have needed to add any code. They could have just changed their implementation of the function to an import of it from the Python standard library. That would be a net reduction in code size.
- ilyt 3y agoOr remove it altogether, warn people for years about deprecation, then remove all of them. Which they did. More net lines removed too. But hey, it annoyed Man That Is Bad At Dependency Management and Wrote A Book About It so it must be bad!
- davidhariri 3y agoThis is what I'm scratching my head at too. Why would it be a good thing for any OSS maintainer to slow themselves down for packages that don't want to fix deprecation warnings?
- mixmastamyk 3y ago- Because that's what you signed up for as maintainer of a project used by millions. - It's a significant piece of functionality. - The change is trivial, not worth the cost of losing login. In some instances Python deprecates something for six years, Flask six months.