Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
poetry-version: [1.1.0]
os: [ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
Expand All @@ -29,7 +29,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.11"]
python-version: ["3.14"]
poetry-version: [1.1.0]
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
Expand All @@ -48,7 +48,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
poetry-version: [1.1.0]
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
Expand Down
7 changes: 5 additions & 2 deletions components/utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@

from dateutil.parser import parse

RETRY_TIMES_OVERRIDE = None


class Struct:
def __init__(self, **entries):
Expand Down Expand Up @@ -152,15 +154,16 @@ def decorator(func):

@functools.wraps(func)
def wrapper(*args, **kwargs):
effective_times = RETRY_TIMES_OVERRIDE if RETRY_TIMES_OVERRIDE is not None else times
backoff = sleep_s
for attempt in range(1, times + 1):
for attempt in range(1, effective_times + 1):
try:
call_kwargs = dict(kwargs)
if accepts_attempt:
call_kwargs[attempt_kw] = attempt
return func(*args, **call_kwargs)
except exceptions:
if attempt == times:
if attempt == effective_times:
raise # preserves the original traceback
time.sleep(backoff)
backoff *= exp
Expand Down
1,091 changes: 696 additions & 395 deletions poetry.lock

Large diffs are not rendered by default.

26 changes: 13 additions & 13 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,22 @@ version = "1.0.0"
description = "Automation for updating third party libraries for Firefox"
authors = ["Tom Ritter <tom@mozilla.com>"]
license = "MPL-2.0"
package-mode = false
package-mode = false

[tool.poetry.dependencies]
python = "^3.7"
cryptography = "^38.0.1"
json-e = "^4.4.3"
requests = "^2.28.1"
PyMySQL = "^1.0.2"
python-dateutil = "^2.8.2"
PyYAML = "^6.0"
sentry-sdk = "^1.9.8"
python = "^3.10"
cryptography = "^46.0.5"
json-e = "^4.8.2"
requests = "^2.32.5"
PyMySQL = "^1.1.2"
python-dateutil = "^2.9.0.post0"
PyYAML = "^6.0.3"
sentry-sdk = "^2.54.0"

[tool.poetry.dev-dependencies]
autopep8 = "^1.7.0"
coverage = "^5.5"
flake8 = "^5.0.4"
[tool.poetry.group.dev.dependencies]
autopep8 = "^2.3.2"
coverage = "^7.13.4"
flake8 = "^7.3.0"

[build-system]
requires = ["poetry>=1.1.0"]
Expand Down
2 changes: 1 addition & 1 deletion tests/functionality_all_platforms.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
sys.path.append(".")
sys.path.append("..")
import components.utilities
components.utilities.RETRY_TIMES = 2
components.utilities.RETRY_TIMES_OVERRIDE = 3

from automation import Updatebot

Expand Down
2 changes: 1 addition & 1 deletion tests/functionality_commitalert.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
sys.path.append(".")
sys.path.append("..")
import components.utilities
components.utilities.RETRY_TIMES = 2
components.utilities.RETRY_TIMES_OVERRIDE = 3

from automation import Updatebot

Expand Down
2 changes: 1 addition & 1 deletion tests/functionality_two_platforms.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
sys.path.append(".")
sys.path.append("..")
import components.utilities
components.utilities.RETRY_TIMES = 2
components.utilities.RETRY_TIMES_OVERRIDE = 3

from automation import Updatebot

Expand Down
Loading