Skip to content

Conversation

@Penwy
Copy link
Contributor

@Penwy Penwy commented Oct 18, 2025

Description

This replaces the usage of pkg_resources.parse_version with a version parser custom-made for OBS versioning.
It obeys to the semver 2.0.0 spec except for a stricter definition of pre-release versioning.

I also took the opportunity to cleanup messages relating to long-outdated versions of obs, and to add an "oudated beta" check that was suggested in comments.

The original includes a check for "caffeine" builds of OBS as an unofficial one. Having never seen one of those in years of support I would assume it isn't relevant anymore, but without clear knowledge on what those are, I preferred to leave it in. Clarifications on their current relevance is welcome.

Motivation and Context

pkg_resources.parse_version was only ever meant to be used for python packages and with setuptools >= 66.0 raises an error when called on a version that doesn't conform to python packages versioning rules. As an example, the simple inclusion of a -modified, quite frequent in obs versioning, is enough to break said rules, and as such, the analyzer.

While not currently breaking, as the analyzer is run on rather old python, the potential of breaking upon update is rather unwishable, and we should rely on a tool intended for the job, instead of using one in an unintended and unsupported way.

How Has This Been Tested?

Ran it with a bunch of logs plucked from the support server, observed no breaking, and proper reporting of version.

Types of changes

  • Code cleanup (non-breaking change which makes code smaller or more readable)

Checklist:

  • My code has been run through clang-format.
  • I have read the contributing document.
  • My code is not on the master branch.
  • The code has been tested.
  • All commit messages are properly formatted and commits squashed where appropriate.
  • I have included updates to all appropriate documentation.

@Fenrirthviti
Copy link
Member

I also took the opportunity to cleanup messages relating to long-outdated versions of obs, and to add an "oudated beta" check that was suggested in comments.

this should probably just be a separate PR as it's unrelated, but, at the least should be its own commit.

@Penwy
Copy link
Contributor Author

Penwy commented Oct 18, 2025

Do you mean the cleanup, or the new check?
And if both, both in separate commits?
(mb for the close, am tired)

@Penwy Penwy closed this Oct 18, 2025
@Penwy Penwy reopened this Oct 18, 2025
@prgmitchell
Copy link
Member

looks good to me, did some testing on my own as well with a collection of logs and saw no issues.

@RytoEX RytoEX requested a review from Fenrirthviti November 5, 2025 22:00
Comment on lines -311 to -318
# special case for OBS 24.0.3 and earlier, which report Windows 10/1909
# as being Windows 10/1903
versionString = getOBSVersionString(lines)
if parse_version(versionString) <= parse_version("24.0.3"):
if verinfo["version"] == "10.0" and verinfo["release"] == 1903:
return [LEVEL_INFO, "Windows 10 1903/1909",
"Due to a bug in OBS versions 24.0.3 and earlier, the exact release of Windows 10 you are using cannot be determined. You are using either release 1903, or release 1909. Fortunately, there were no major changes in behavior between Windows 10 release 1903 and Windows 10 release 1909, and instructions given here for release 1903 can also be used for release 1909, and vice versa."]

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Has this check been completely removed?

Copy link
Contributor Author

@Penwy Penwy Nov 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I assumed that obs 24 was far away enough that it wasn't needed, especially given that it concerns versions of windows that have been EOL for a bit and is quite moot to start with given the difference between windows 1903 and 1909 are quite minimal (it states so itself).

The last occurence of it appearing in an analyzer result on the official discord server was december 2020.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will leave that call up to @Fenrirthviti .

@Penwy Penwy force-pushed the bespoke-version-parse branch from 7599526 to eecfafb Compare November 6, 2025 01:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants