librariesio / libraries.io

:books: The Open Source Discovery Service
https://libraries.io
GNU Affero General Public License v3.0
1.1k stars 206 forks source link

Remove SUPPORTS_SINGLE_VERSION_UPDATE constant #3293

Closed johnbintz-tidelift closed 6 months ago

johnbintz-tidelift commented 6 months ago

In order for a package manager to support single version updates, in the current code you need to do two things:

It's not clear that you have to do both of these things, and the existence of the one_version method on the subclass can indicate the same thing as the constant. Removing the constant simplifies the interface for package managers.

In the rare case where a package manager that supports single version updates needs to be disabled, the class method that checks for the one_version method's existence can be overridden.

This also fixes a bug where the Google Maven package manager incorrectly indicated it supported single version updates but did not implement one_version.