~gotmax23/sourcehutx

sourcehut : Revert "don't copy() objects on pydantic model creation" v2 APPLIED

: 2
 rename services.base to services._base
 Revert "don't copy() objects on pydantic model creation"

 6 files changed, 6 insertions(+), 11 deletions(-)
sourcehut/patches: FAILED in 11m26s

[rename services.base to services._base][0] v2 from [Maxwell G][1]

[0]: https://lists.sr.ht/~gotmax23/sourcehut/patches/43543
[1]: mailto:maxwell@gtmx.me

✗ #1040488 FAILED  sourcehut/patches/mockbuild-epel9.yml.disabled https://builds.sr.ht/~gotmax23/job/1040488
✓ #1040487 SUCCESS sourcehut/patches/main.yml                     https://builds.sr.ht/~gotmax23/job/1040487
✓ #1040489 SUCCESS sourcehut/patches/mockbuild.yml                https://builds.sr.ht/~gotmax23/job/1040489
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.sr.ht/~gotmax23/sourcehutx/patches/44009/mbox | git am -3
Learn more about email & git

[PATCH sourcehut v2 1/2] rename services.base to services._base Export this patch

---
 src/sourcehut/services/{base.py => _base.py} | 2 +-
 src/sourcehut/services/builds.py             | 2 +-
 src/sourcehut/services/git.py                | 2 +-
 src/sourcehut/services/lists.py              | 2 +-
 src/sourcehut/services/todo.py               | 2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)
 rename src/sourcehut/services/{base.py => _base.py} (98%)

diff --git a/src/sourcehut/services/base.py b/src/sourcehut/services/_base.py
similarity index 98%
rename from src/sourcehut/services/base.py
rename to src/sourcehut/services/_base.py
index 89a0d3b..4455296 100644
--- a/src/sourcehut/services/base.py
+++ b/src/sourcehut/services/_base.py
@@ -81,7 +81,7 @@ class _Resource(
    Generic[_ServiceClientT],
    BaseModel,
    arbitrary_types_allowed=True,
    copy_on_model_validation='none',
    copy_on_model_validation="none",
):
    id: int
    client: Union[_ServiceClientT, None] = Field(None, exclude=True)
diff --git a/src/sourcehut/services/builds.py b/src/sourcehut/services/builds.py
index 6264741..b1e28c6 100644
--- a/src/sourcehut/services/builds.py
+++ b/src/sourcehut/services/builds.py
@@ -15,7 +15,7 @@ from typing import TYPE_CHECKING, List, Optional

from .._utils import get_locals
from ..client import SRHT_SERVICE, VISIBILITY
from .base import _Resource, _ServiceClient
from ._base import _Resource, _ServiceClient

if TYPE_CHECKING:
    pass
diff --git a/src/sourcehut/services/git.py b/src/sourcehut/services/git.py
index 31d7f2c..50b1bf7 100644
--- a/src/sourcehut/services/git.py
+++ b/src/sourcehut/services/git.py
@@ -17,7 +17,7 @@ from .._utils import filter_ellipsis
from .._utils import get_key as _g
from .._utils import get_locals, v_submitter
from ..client import SRHT_SERVICE, VISIBILITY
from .base import _Resource, _ServiceClient
from ._base import _Resource, _ServiceClient

if TYPE_CHECKING:
    from _typeshed import StrPath
diff --git a/src/sourcehut/services/lists.py b/src/sourcehut/services/lists.py
index b532888..0eb8eb4 100644
--- a/src/sourcehut/services/lists.py
+++ b/src/sourcehut/services/lists.py
@@ -14,7 +14,7 @@ from .._utils import filter_ellipsis
from .._utils import get_key as _g
from .._utils import get_locals, v_comma_separated_list, v_submitter
from ..client import SRHT_SERVICE, VISIBILITY
from .base import _Resource, _ServiceClient
from ._base import _Resource, _ServiceClient

_LIST_REF_MEMBERS = """
id
diff --git a/src/sourcehut/services/todo.py b/src/sourcehut/services/todo.py
index 44fc47e..48144a6 100644
--- a/src/sourcehut/services/todo.py
+++ b/src/sourcehut/services/todo.py
@@ -21,7 +21,7 @@ from .._utils import filter_ellipsis
from .._utils import get_key as _g
from .._utils import get_locals, v_client, v_submitter
from ..client import SRHT_SERVICE, VISIBILITY
from .base import _Resource, _ServiceClient
from ._base import _Resource, _ServiceClient

if TYPE_CHECKING:
    pass
-- 
2.41.0
Applied.

[PATCH sourcehut v2 2/2] Revert "don't copy() objects on pydantic model creation" Export this patch

This reverts commit fcea7232930ad5363b3542409e612d0a29b12680.
---
 src/sourcehut/services/_base.py | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/src/sourcehut/services/_base.py b/src/sourcehut/services/_base.py
index 4455296..e6bd582 100644
--- a/src/sourcehut/services/_base.py
+++ b/src/sourcehut/services/_base.py
@@ -77,12 +77,7 @@ class _ServiceClient(metaclass=ABCMeta):
                break


class _Resource(
    Generic[_ServiceClientT],
    BaseModel,
    arbitrary_types_allowed=True,
    copy_on_model_validation="none",
):
class _Resource(Generic[_ServiceClientT], BaseModel, arbitrary_types_allowed=True):
    id: int
    client: Union[_ServiceClientT, None] = Field(None, exclude=True)

-- 
2.41.0
sourcehut/patches: FAILED in 11m26s

[rename services.base to services._base][0] v2 from [Maxwell G][1]

[0]: https://lists.sr.ht/~gotmax23/sourcehut/patches/43543
[1]: mailto:maxwell@gtmx.me

✗ #1040488 FAILED  sourcehut/patches/mockbuild-epel9.yml.disabled https://builds.sr.ht/~gotmax23/job/1040488
✓ #1040487 SUCCESS sourcehut/patches/main.yml                     https://builds.sr.ht/~gotmax23/job/1040487
✓ #1040489 SUCCESS sourcehut/patches/mockbuild.yml                https://builds.sr.ht/~gotmax23/job/1040489