Bug 1964672 - Update vendored mozilla-version to 4.1.0 r=releng-reviewers,mach-reviewers,jcristau,ahochheiden

Differential Revision: https://phabricator.services.mozilla.com/D247911
This commit is contained in:
Bastien Orivel
2025-05-07 08:55:40 +00:00
committed by borivel@mozilla.com
parent 2631373890
commit 7e88861c31
12 changed files with 154 additions and 39 deletions

View File

@@ -1,25 +0,0 @@
mozilla_version/__init__.py,sha256=oITKXEftlJ9dVeCJgvhk39LIP3vnXuXoobkJj4mNAxU,391
mozilla_version/balrog.py,sha256=WgnQEtMa16JvKisD4JTFnP2gd5e6_K9QcHxkOqQ9mJk,5072
mozilla_version/errors.py,sha256=C8mutZqgu68eCLuD7sr4dggBym4QzsMsI1iKMNPOGQI,2401
mozilla_version/fenix.py,sha256=10Z7jbST3xVgmLiCuJZH8GqffwChPIfJdBu1hig3jP8,200
mozilla_version/gecko.py,sha256=8ifd1acKkanGOUn4Q0A841kr_68zAm6icrmouDZW6S8,31141
mozilla_version/maven.py,sha256=H5bZ-9QitMdT89o4mRXkTaeb7iQc8yVTJnmauyxSImU,1971
mozilla_version/mobile.py,sha256=09aPz1f1YyEnb4bGNeWF-rvPfnEIp4iK1DL5XK0EYU0,10146
mozilla_version/parser.py,sha256=kwaw3UeAbWgUFtCmCheY9grKwabmq9tc64JyTlPrHS8,1335
mozilla_version/version.py,sha256=wmB66af-0OkjPxZ-NRHraayY1ujAccIZ3q_8GAkTS-U,10212
mozilla_version/test/__init__.py,sha256=ui4glNH_cCoz4Ex7hcZhHTcstOPJb2wcojFiNvvIALI,88
mozilla_version/test/test_balrog.py,sha256=PY1b_q5Vhr6fhyrSB-sMwQC86CQQhLtAD2cIisbu51U,9431
mozilla_version/test/test_default_imports.py,sha256=gj9fuHANTOQq6isXmVIoE1sXDKO46xmM_H3jxgDE7W0,303
mozilla_version/test/test_errors.py,sha256=KLe6NiicS7aer7NURynsOWTZGZwKp8OQauX_nGJ_HdQ,1037
mozilla_version/test/test_fenix.py,sha256=qs8sD39N_cM9rNEZxyCaLuxx53hIIeHZIrJe_EBpYoQ,193
mozilla_version/test/test_gecko.py,sha256=vPwn1vo9iar8PD_2Mw-wi2tZaSVVzL5l3BYGOanUjqY,49787
mozilla_version/test/test_maven.py,sha256=JnBLgIngC83roeKM4U_PL2_op_VZD9_MQT0KIhAWtxw,3904
mozilla_version/test/test_mobile.py,sha256=2koHZxIf5hQpHcvWiuwiua7CmmBq0ADUPYhqJzpw1xM,12792
mozilla_version/test/test_version.py,sha256=7mkWoAViZ8pto9UU6_BSLSa8anKB29cNF7lcgurMyPk,8308
mozilla_version/test/integration/__init__.py,sha256=WbyyzEaWz3-1bSc9IOrFjBqzYJdVpLPcPy4PpJchpA8,345
mozilla_version/test/integration/test_product_details.py,sha256=oUdCi3dbkMx_8zJLo_pjy86LCcZLUPDnVq3TVPIkarw,1369
mozilla_version-3.1.0.dist-info/LICENSE,sha256=rxdbnZbuk8IaA2FS4bkFsLlTBNSujCySHHYJEAuo334,15921
mozilla_version-3.1.0.dist-info/METADATA,sha256=zjWD9Nide8MuhW010gJ0VJ-snESn3wdZGk7TvwtTZTs,480
mozilla_version-3.1.0.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
mozilla_version-3.1.0.dist-info/top_level.txt,sha256=K1r8SXa4ny0i7OTfimG0Ct33oHkXtLjuU1E5_aHBe94,16
mozilla_version-3.1.0.dist-info/RECORD,,

View File

@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: mozilla-version
Version: 3.1.0
Version: 4.1.0
Summary: Process Firefox versions numbers. Tells whether they are valid or not, whether they are nightlies or regular releases, whether this version precedes that other.
Home-page: https://github.com/mozilla-releng/mozilla-version
Author: Mozilla Release Engineering
@@ -8,5 +8,5 @@ Author-email: release+python@mozilla.com
License: MPL2
Classifier: Programming Language :: Python :: 3
License-File: LICENSE
Requires-Dist: attrs >=19.2
Requires-Dist: attrs>=19.2

View File

@@ -0,0 +1,49 @@
mozilla_version/__init__.py,sha256=oITKXEftlJ9dVeCJgvhk39LIP3vnXuXoobkJj4mNAxU,391
mozilla_version/balrog.py,sha256=WgnQEtMa16JvKisD4JTFnP2gd5e6_K9QcHxkOqQ9mJk,5072
mozilla_version/errors.py,sha256=C8mutZqgu68eCLuD7sr4dggBym4QzsMsI1iKMNPOGQI,2401
mozilla_version/fenix.py,sha256=10Z7jbST3xVgmLiCuJZH8GqffwChPIfJdBu1hig3jP8,200
mozilla_version/gecko.py,sha256=vc2lmoDGaw9v3ytWSuvWAPbIWypK0MUHuQNaLCMrErM,31142
mozilla_version/ios.py,sha256=Uoms65QtYtUshSBowKQojKtPVAy4L10hdQ-sY0dgGuM,2613
mozilla_version/maven.py,sha256=H5bZ-9QitMdT89o4mRXkTaeb7iQc8yVTJnmauyxSImU,1971
mozilla_version/mobile.py,sha256=09aPz1f1YyEnb4bGNeWF-rvPfnEIp4iK1DL5XK0EYU0,10146
mozilla_version/parser.py,sha256=kwaw3UeAbWgUFtCmCheY9grKwabmq9tc64JyTlPrHS8,1335
mozilla_version/version.py,sha256=wmB66af-0OkjPxZ-NRHraayY1ujAccIZ3q_8GAkTS-U,10212
mozilla_version/__pycache__/__init__.cpython-313.pyc,sha256=-_hkMrk4YukjvgWrXMIL83zBBQsLYB-pwmHNtP7cG10,540
mozilla_version/__pycache__/balrog.cpython-313.pyc,sha256=I_s43qkbZ-jjdR2F-zPvHDDRkHclWNwJ4ouzkepUJVM,6668
mozilla_version/__pycache__/errors.cpython-313.pyc,sha256=m0VWTQneLHKJhM5UoxPHVXwsnvYyiPjHS0YohxL_LGU,3530
mozilla_version/__pycache__/fenix.cpython-313.pyc,sha256=Yw6Ou__1WmBIVAKeYeIQoLWwCdE-WpOxRnCMWbsK-fA,310
mozilla_version/__pycache__/gecko.cpython-313.pyc,sha256=CFK3DnOOzAzMyQbLEqr0hZThnfV67cR2d1hbwNn6RQ8,29038
mozilla_version/__pycache__/ios.cpython-313.pyc,sha256=xHZidba4n6ZqpLJjBjtPAzGkLaKswQFpdOEpbKtvNJA,3713
mozilla_version/__pycache__/maven.cpython-313.pyc,sha256=I1zBOdY-5piP80nPJ5ZA-5-txmSqf-Yz1Vyv_tL5dTg,3194
mozilla_version/__pycache__/mobile.cpython-313.pyc,sha256=dK7CKJk11WHoWgxIvo1gzHdb7isewu9TfQ7KSJzWDSE,10601
mozilla_version/__pycache__/parser.cpython-313.pyc,sha256=A6C5eqZOtKejwaqjfPrxAZRMGZeB3A5klNmusx68ts4,2023
mozilla_version/__pycache__/version.cpython-313.pyc,sha256=O7XDwptX2M59DW6QPTB_v3N3ZHvoo-OWPBUqms59OLo,12213
mozilla_version/test/__init__.py,sha256=ui4glNH_cCoz4Ex7hcZhHTcstOPJb2wcojFiNvvIALI,88
mozilla_version/test/test_balrog.py,sha256=PY1b_q5Vhr6fhyrSB-sMwQC86CQQhLtAD2cIisbu51U,9431
mozilla_version/test/test_default_imports.py,sha256=gj9fuHANTOQq6isXmVIoE1sXDKO46xmM_H3jxgDE7W0,303
mozilla_version/test/test_errors.py,sha256=KLe6NiicS7aer7NURynsOWTZGZwKp8OQauX_nGJ_HdQ,1037
mozilla_version/test/test_fenix.py,sha256=qs8sD39N_cM9rNEZxyCaLuxx53hIIeHZIrJe_EBpYoQ,193
mozilla_version/test/test_gecko.py,sha256=6PirgVPXkfbOEpiQLB_DF1Jeoaf_PMaVGu1H4VQTvf0,49941
mozilla_version/test/test_ios.py,sha256=Xad8MUADaD1YMokNmwEnI6ZRaQzfebQUZCpXJi0LAsE,1808
mozilla_version/test/test_maven.py,sha256=JnBLgIngC83roeKM4U_PL2_op_VZD9_MQT0KIhAWtxw,3904
mozilla_version/test/test_mobile.py,sha256=2koHZxIf5hQpHcvWiuwiua7CmmBq0ADUPYhqJzpw1xM,12792
mozilla_version/test/test_version.py,sha256=7mkWoAViZ8pto9UU6_BSLSa8anKB29cNF7lcgurMyPk,8308
mozilla_version/test/__pycache__/__init__.cpython-313.pyc,sha256=J_fGeX2d1IJOQmRyF40r7xILrRDUwTVOTRdtmc_ZDVI,383
mozilla_version/test/__pycache__/test_balrog.cpython-313-pytest-8.3.5.pyc,sha256=rJ_NR_IPIDdvMtA6oPNH7d-X7iaU9zHHdzmFM47c_p0,28962
mozilla_version/test/__pycache__/test_default_imports.cpython-313-pytest-8.3.5.pyc,sha256=Lfm7o-AEXwPHFF8wsN5gXuPwmA9-9HDQkn8Fv_p1WNs,726
mozilla_version/test/__pycache__/test_errors.cpython-313-pytest-8.3.5.pyc,sha256=kHvwSkjDrZVYm6XeWbutYVcMZsPNyljK-dshZ7cjnUg,3276
mozilla_version/test/__pycache__/test_fenix.cpython-313-pytest-8.3.5.pyc,sha256=hbVJbhNPb1gN9kwSdDzdYemfAYUUDSKXQ_BWsY3W1yY,1421
mozilla_version/test/__pycache__/test_gecko.cpython-313-pytest-8.3.5.pyc,sha256=LGnGS984hN9Y884ZlM1ky14S0cSU5vDDUDUHV34jrLs,91089
mozilla_version/test/__pycache__/test_ios.cpython-313-pytest-8.3.5.pyc,sha256=B077BfsYkjKLgBNIXvs2McWSatuQp2ZqzaIrec6-Tz4,5657
mozilla_version/test/__pycache__/test_maven.cpython-313-pytest-8.3.5.pyc,sha256=fwJm28nzz9hjFaaAalpbKu9rghSSNvusdF4IrNQgaGQ,22316
mozilla_version/test/__pycache__/test_mobile.cpython-313-pytest-8.3.5.pyc,sha256=lxECTxvQ-pMaPTHH79fWPnhuiwcbxCD8x95_d_2v7d0,43297
mozilla_version/test/__pycache__/test_version.cpython-313-pytest-8.3.5.pyc,sha256=SxcaHafoGIKwL3AsKMBTwbLEA9XJP08nSpsuCfRGAuE,45621
mozilla_version/test/integration/__init__.py,sha256=WbyyzEaWz3-1bSc9IOrFjBqzYJdVpLPcPy4PpJchpA8,345
mozilla_version/test/integration/test_product_details.py,sha256=oUdCi3dbkMx_8zJLo_pjy86LCcZLUPDnVq3TVPIkarw,1369
mozilla_version/test/integration/__pycache__/__init__.cpython-313.pyc,sha256=DcoSAm474HLabrrxC9puOkqJNlQoL-M2gNxaD3-F-eQ,787
mozilla_version/test/integration/__pycache__/test_product_details.cpython-313-pytest-8.3.5.pyc,sha256=D-LGLxeUK8oRjz95sTBXY3Oz6yqs_RqBKd6VgJlsA9c,2555
mozilla_version-4.1.0.dist-info/LICENSE,sha256=rxdbnZbuk8IaA2FS4bkFsLlTBNSujCySHHYJEAuo334,15921
mozilla_version-4.1.0.dist-info/METADATA,sha256=AiCH1bI6bbv5NgPRVDJK8bdGJo82wUYcJTN4xn5oKRs,479
mozilla_version-4.1.0.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
mozilla_version-4.1.0.dist-info/top_level.txt,sha256=K1r8SXa4ny0i7OTfimG0Ct33oHkXtLjuU1E5_aHBe94,16
mozilla_version-4.1.0.dist-info/RECORD,,

View File

@@ -1,5 +1,5 @@
Wheel-Version: 1.0
Generator: bdist_wheel (0.43.0)
Generator: setuptools (75.1.0)
Root-Is-Purelib: true
Tag: py3-none-any

View File

@@ -157,6 +157,7 @@ class GeckoVersion(ShipItVersion):
102,
115,
128,
140,
)
_BOOLEANS_NOT_INFERRED_BY_NUMBERS = (
@@ -582,8 +583,7 @@ class GeckoVersion(ShipItVersion):
elif (
self.is_nightly
and self.major_number > self._LAST_AURORA_DEVEDITION_AS_VERSION_TYPE
or self.is_aurora_or_devedition
):
) or self.is_aurora_or_devedition:
bump_version_type_kwargs["beta_number"] = 1
elif self.is_beta and not self.is_rapid_release_scheme:
bump_version_type_kwargs["release_candidate_number"] = 1

View File

@@ -0,0 +1,91 @@
"""Defines the characteristics of an iOS version number."""
import re
import attr
from mozilla_version.parser import positive_int_or_none
from .version import ShipItVersion
@attr.s(frozen=True, eq=False, hash=True)
class MobileIosVersion(ShipItVersion):
"""
Class representing an iOS version number.
iOS version numbers are a bit different in that they don't have a patch number
but they have a beta one.
"""
beta_number = attr.ib(type=int, converter=positive_int_or_none, default=None)
_VALID_ENOUGH_VERSION_PATTERN = re.compile(
r"""
^(?P<major_number>\d+)
\.(?P<minor_number>\d+)
(b(?P<beta_number>\d+))?$""",
re.VERBOSE,
)
_OPTIONAL_NUMBERS = ("beta_number",)
_ALL_NUMBERS = ShipItVersion._MANDATORY_NUMBERS + _OPTIONAL_NUMBERS
def __str__(self):
"""
Format the version as a string.
Because iOS is different, the format is "major.minor(.beta)".
"""
version = f"{self.major_number}.{self.minor_number}"
if self.beta_number is not None:
version += f"b{self.beta_number}"
return version
def _create_bump_kwargs(self, field):
"""
Create a version bump for the required field.
Version bumping is a bit different for iOS as we don't have a patch number
despite shipit expecting one. So when asked to bump the patch version, we bump
the minor instead.
"""
if field == "patch_number":
field = "minor_number"
kwargs = super()._create_bump_kwargs(field)
# If we get a bump request for anything but the beta number, remove it
if field != "beta_number":
del kwargs["beta_number"]
return kwargs
@property
def is_beta(self):
"""Returns true if the version is considered a beta one."""
return self.beta_number is not None
@property
def is_release_candidate(self):
"""
Returns true if the version is a release candidate.
For iOS versions, this is always false.
"""
return False
def _compare(self, other):
"""Compare this release with another."""
if isinstance(other, str):
other = MobileIosVersion.parse(other)
if not isinstance(other, MobileIosVersion):
raise ValueError(f'Cannot compare "{other}", type not supported!')
difference = super()._compare(other)
if difference != 0:
return difference
return self._substract_other_number_from_this_number(other, "beta_number")

View File

@@ -34,7 +34,7 @@ dependencies = [
"markupsafe==2.0.1",
"moz-l10n~=0.5.7",
"mozilla-repo-urls==0.1.1",
"mozilla-version==3.1.0",
"mozilla-version==4.1.0",
"packaging==23.1",
"pathspec==0.9.0",
"pip-tools==7.4.1",

View File

@@ -450,9 +450,9 @@ moz-l10n==0.5.7 \
mozilla-repo-urls==0.1.1 \
--hash=sha256:7364da790751db2a060eb45adbf1d7db89a145ed279ba235f3425db9dd255915 \
--hash=sha256:30510d3519479aa70211145d0ac9cf6e2fadcb8d30fa3b196bb957bd773502ba
mozilla-version==3.1.0 \
--hash=sha256:3a9463ebcf2249dc8bcf504e246b6b5977c902dfa819de31602e10bce032ed93 \
--hash=sha256:f798e716da9063608a0b49ca1ec0a51b73ac810c3cc8a4bcc2c461df902b147c
mozilla-version==4.1.0 \
--hash=sha256:f32f6f5607c345bb4db0aba0077511b196cba80af70c83cfe606a913a478f7e8 \
--hash=sha256:816b0cd03456105f49ad8661e47934e66118f84ddae38c4193082f297396a7ed
multidict==6.1.0 \
--hash=sha256:22ae2ebf9b0c69d206c003e2f6a914ea33f0a932d4aa16f236afc049d9958f4a \
--hash=sha256:3380252550e372e8511d49481bd836264c009adb826b23fefcc5dd3c69692f60 \

8
third_party/python/uv.lock generated vendored
View File

@@ -936,7 +936,7 @@ requires-dist = [
{ name = "markupsafe", specifier = "==2.0.1" },
{ name = "moz-l10n", specifier = "~=0.5.7" },
{ name = "mozilla-repo-urls", specifier = "==0.1.1" },
{ name = "mozilla-version", specifier = "==3.1.0" },
{ name = "mozilla-version", specifier = "==4.1.0" },
{ name = "packaging", specifier = "==23.1" },
{ name = "pathspec", specifier = "==0.9.0" },
{ name = "pip", specifier = "==24.0" },
@@ -971,14 +971,14 @@ requires-dist = [
[[package]]
name = "mozilla-version"
version = "3.1.0"
version = "4.1.0"
source = { registry = "https://pypi.org/simple" }
dependencies = [
{ name = "attrs" },
]
sdist = { url = "https://files.pythonhosted.org/packages/3b/59/02c98815c8ba8d49c571344c2012594d9ad255175387f517c24e06840388/mozilla-version-3.1.0.tar.gz", hash = "sha256:3a9463ebcf2249dc8bcf504e246b6b5977c902dfa819de31602e10bce032ed93", size = 61440 }
sdist = { url = "https://files.pythonhosted.org/packages/c2/91/a67deea35ec3a0c80bfa0142e72fc779d96544814067e99f39d78d90b754/mozilla_version-4.1.0.tar.gz", hash = "sha256:f32f6f5607c345bb4db0aba0077511b196cba80af70c83cfe606a913a478f7e8", size = 62685 }
wheels = [
{ url = "https://files.pythonhosted.org/packages/44/27/d6c1c598feec8ff0cd5c9060bbb94b848a1151c41c2edc08773cac513ed6/mozilla_version-3.1.0-py3-none-any.whl", hash = "sha256:f798e716da9063608a0b49ca1ec0a51b73ac810c3cc8a4bcc2c461df902b147c", size = 39558 },
{ url = "https://files.pythonhosted.org/packages/83/d9/671361f42a55d8369d29bbb07ada1e884cc079c1e265ab5a826e2091cadb/mozilla_version-4.1.0-py3-none-any.whl", hash = "sha256:816b0cd03456105f49ad8661e47934e66118f84ddae38c4193082f297396a7ed", size = 132224 },
]
[[package]]

View File

@@ -1 +1 @@
51a9b19e9b73da421c71d145b511eee6a074bae6485b937cb1118d073cf4e520
16321f1629bad184675de91f91562120f47e6156c1dd090b0317c9d8cc0b572c