Skip to content

Commit 6fd212e

Browse files
aKlimaumdellweg
authored andcommitted
Bump up pulpcore lowerbounds to 3.105 to avoid exception errors.
Assisted-by: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 52a4c05 commit 6fd212e

4 files changed

Lines changed: 11 additions & 15 deletions

File tree

CHANGES/+fix_exception_init.bugfix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Bump up pulpcore lowerbounds to 3.105 to avoid exception errors.

pulp_gem/app/exceptions.py

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,6 @@
33
from pulpcore.plugin.exceptions import PulpException
44

55

6-
class RemoteURLRequiredError(PulpException):
7-
"""
8-
Raised when a sync is attempted without a URL on the remote.
9-
"""
10-
11-
error_code = "GEM0001"
12-
13-
def __str__(self):
14-
return f"[{self.error_code}] " + _("A remote must have a url specified to synchronize.")
15-
16-
176
class RemoteConnectionError(PulpException):
187
"""
198
Raised when a connection to the remote host fails.
@@ -22,6 +11,7 @@ class RemoteConnectionError(PulpException):
2211
error_code = "GEM0002"
2312

2413
def __init__(self, host):
14+
super().__init__()
2515
self.host = host
2616

2717
def __str__(self):
@@ -38,6 +28,7 @@ class InvalidGemNameError(PulpException):
3828
error_code = "GEM0003"
3929

4030
def __init__(self, name):
31+
super().__init__()
4132
self.name = name
4233

4334
def __str__(self):
@@ -52,6 +43,7 @@ class InvalidRequirementError(PulpException):
5243
error_code = "GEM0004"
5344

5445
def __init__(self, stmt):
46+
super().__init__()
5547
self.stmt = stmt
5648

5749
def __str__(self):
@@ -66,6 +58,7 @@ class InvalidVersionStringError(PulpException):
6658
error_code = "GEM0005"
6759

6860
def __init__(self, version):
61+
super().__init__()
6962
self.version = version
7063

7164
def __str__(self):
@@ -82,6 +75,7 @@ class UnknownRubyClassError(PulpException):
8275
error_code = "GEM0006"
8376

8477
def __init__(self, suffix):
78+
super().__init__()
8579
self.suffix = suffix
8680

8781
def __str__(self):

pulp_gem/app/tasks/synchronizing.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
from aiohttp import ClientConnectionError
66
from django.conf import settings
77

8+
from pulpcore.plugin.exceptions import SyncError
89
from pulpcore.plugin.models import Artifact, ProgressReport, Remote, Repository
910
from pulpcore.plugin.stages import (
1011
DeclarativeArtifact,
@@ -13,7 +14,7 @@
1314
Stage,
1415
)
1516

16-
from pulp_gem.app.exceptions import RemoteConnectionError, RemoteURLRequiredError
17+
from pulp_gem.app.exceptions import RemoteConnectionError
1718
from pulp_gem.app.models import GemContent, GemRemote
1819
from pulp_gem.specs import (
1920
NAME_REGEX,
@@ -44,7 +45,7 @@ def synchronize(remote_pk, repository_pk, mirror=False):
4445
repository = Repository.objects.get(pk=repository_pk)
4546

4647
if not remote.url:
47-
raise RemoteURLRequiredError()
48+
raise SyncError(_("A remote must have a url specified to synchronize."))
4849

4950
first_stage = GemFirstStage(remote)
5051
dv = DeclarativeVersion(first_stage, repository, mirror=mirror)

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ classifiers=[
2323
]
2424
requires-python = ">=3.11"
2525
dependencies = [
26-
"pulpcore>=3.49.0,<3.115",
27-
"pulp_glue_gem>=0.3.0,<0.6",
26+
"pulpcore>=3.105.0,<3.115",
27+
"pulp_glue_gem>=0.6.0,<0.7",
2828
"rubymarshal>=1.2.7,<1.3",
2929
]
3030

0 commit comments

Comments
 (0)