Uploaded image for project: 'Picard'
  1. Picard
  2. PICARD-1820

PLUGIN_VERSION no longer displayed correctly in plugins dialog

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • 2.4.0b1
    • None
    • None
    • None

      Hi,

      Most of my plugins use simple version strings, e.g.,

      PLUGIN_VERSION = "2"
      

      With the latest Picard, this no longer displays correctly in the preferences dialog, which now just shows all versions as being "0.0" in the version column. This is a regression from Picard 2.1.3 which displays the version numbers as expected.

      If I change PLUGIN_VERSION to, for example, "2.0" it appears to display OK.

      I guess newer Picard is expecting a particular format for this string. However that expectation does not appear to be documented at https://picard.musicbrainz.org/docs/plugin-api/

          [PICARD-1820] PLUGIN_VERSION no longer displayed correctly in plugins dialog

          GitHub Bot added a comment -

          See code changes in pull request #1554 submitted by phw.

          GitHub Bot added a comment - See code changes in pull request #1554 submitted by phw .

          Oh, sorry. Now I got it, totally misunderstood the issue. That's of course broken, I'll fix it.

          Philipp Wolfer added a comment - Oh, sorry. Now I got it, totally misunderstood the issue. That's of course broken, I'll fix it.

          draconx added a comment -

          2 == 2.0 == 2.0.0. No plans really to change the display, as the same formatting is also used for displaying Picard's version at various parts and we always use the x.0 display if the patch version is 0. If you are bothered that what you wrote looks slightly different than what is displayed then write "2.0".

          I think there is a misunderstanding here. Picard is not displaying 2.0 when I set PLUGIN_VERSION="2". That would be totally fine.

          The problem is that the UI is displaying 0.0 when I set PLUGIN_VERSION="2".

          draconx added a comment - 2 == 2.0 == 2.0.0. No plans really to change the display, as the same formatting is also used for displaying Picard's version at various parts and we always use the x.0 display if the patch version is 0. If you are bothered that what you wrote looks slightly different than what is displayed then write "2.0". I think there is a misunderstanding here. Picard is not displaying 2.0 when I set PLUGIN_VERSION="2". That would be totally fine. The problem is that the UI is displaying 0.0 when I set PLUGIN_VERSION="2".

          Philipp Wolfer added a comment - - edited

          > But the UI is busted, so doesn't that mean there is still a regression here that should be fixed?

          2 == 2.0 == 2.0.0. No plans really to change the display, as the same formatting is also used for displaying Picard's version at various parts and we always use the x.0 display if the patch version is 0. If you are bothered that what you wrote looks slightly different than what is displayed then write "2.0".

          > The example version of 1.0 is clearly not in x.y.z format...

          I felt like copying the entire complexity of https://www.python.org/dev/peps/pep-0440/#version-scheme here is a bit overkill and that with an example this should be understandable. Is "x[.y[.z]]" clearer? Or maybe just say "x.y.z, with y and z being optional"?

          Philipp Wolfer added a comment - - edited > But the UI is busted, so doesn't that mean there is still a regression here that should be fixed? 2 == 2.0 == 2.0.0. No plans really to change the display, as the same formatting is also used for displaying Picard's version at various parts and we always use the x.0 display if the patch version is 0. If you are bothered that what you wrote looks slightly different than what is displayed then write "2.0". > The example version of 1.0 is clearly not in x.y.z format... I felt like copying the entire complexity of https://www.python.org/dev/peps/pep-0440/#version-scheme here is a bit overkill and that with an example this should be understandable. Is "x[.y [.z] ]" clearer? Or maybe just say "x.y.z, with y and z being optional"?

          draconx added a comment -

          Version 2 and 2.0 are equivalent. Just writing "2" is a valid version number, you can continue doing this. It's just a matter of display.

          You say "2" is a valid version number and I don't need to change my plugins. But the UI is busted, so doesn't that mean there is still a regression here that should be fixed?

          I think the linked documentation update is still missing important details... it says:

          Plugin versions should be in the format <code>x.y.z</code>, e.g. "1.0" or "2.12.4"

          The example version of 1.0 is clearly not in x.y.z format...

          draconx added a comment - Version 2 and 2.0 are equivalent. Just writing "2" is a valid version number, you can continue doing this. It's just a matter of display. You say "2" is a valid version number and I don't need to change my plugins. But the UI is busted, so doesn't that mean there is still a regression here that should be fixed? I think the linked documentation update is still missing important details... it says: Plugin versions should be in the format <code>x.y.z</code>, e.g. "1.0" or "2.12.4" The example version of 1.0 is clearly not in x.y.z format...

          Philipp Wolfer added a comment - - edited

          Versions should be written as major.minor.patch. Actually Picard supports a subset of the versioning as specified at https://www.python.org/dev/peps/pep-0440/#version-scheme , including some pre-release specifiers (e.g. alpha, beta, rc or dev).

          Version 2 and 2.0 are equivalent. Just writing "2" is a valid version number, you can continue doing this. It's just a matter of display. The change was that Picard now parses the version and outputs the parsed version in a standardized way. Having versions in this format was expected before.

          For the website I submitted an update to clarify this: https://github.com/metabrainz/picard-website/pull/195

          Philipp Wolfer added a comment - - edited Versions should be written as major.minor.patch. Actually Picard supports a subset of the versioning as specified at https://www.python.org/dev/peps/pep-0440/#version-scheme , including some pre-release specifiers (e.g. alpha, beta, rc or dev). Version 2 and 2.0 are equivalent. Just writing "2" is a valid version number, you can continue doing this. It's just a matter of display. The change was that Picard now parses the version and outputs the parsed version in a standardized way. Having versions in this format was expected before. For the website I submitted an update to clarify this: https://github.com/metabrainz/picard-website/pull/195

            outsidecontext Philipp Wolfer
            draconx draconx
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:

                Version Package
                2.4.0b1