Hacker News new | ask | show | jobs
by ilyt 978 days ago
Adding code into your framework to support abandonware plugins is the exact opposite of better solution
1 comments

They 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.
Or 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!

> Or remove it altogether

Which, as the GP of my original post in this subthread argued, and I agree, is not respectful to your users. Importing the function from the Python standard library is a one-liner, hardly an arduous burden.

Right, then commit that one line fix to the plugin
Yes, for each of the umpteen number of packages that depends on Flask. Instead of Flask just doing it one time and avoiding that breaking change altogether.

Open source is supposed to be a community. Forcing a breaking change like this on all their dependencies that they could have avoided with a one-line import statement is, IMO, not very good behavior as a community member.

> Forcing a breaking change

No one is forcing a breaking change on anyone.

    a) PIP usually retains past versions
    b) A python package can specify it's dependencies, including their version, as hard requirements
    c) virtualenvs exist
If a packages maintainer doesn't want to change his code to support some changes in some_dependency-v4.2, he can specify that the package requires some_dependency-v2.1 or whatever other existing version he is happy with.

If he doesn't do that, and instead specifies only `some_dependency`, that signals to the package management software that the package works with the `@latest` version of that dependency. The onus to make sure that is, and continues to be, the case in code, is on the maintainer of the package, not the maintainer of the dependency, period.

And no, this is not "disrespectful". This doesn't go against any sense of community in FOSS. This is established practice in software development and package maintenance.