Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-mashumaro for 
openSUSE:Factory checked in at 2026-02-03 21:30:51
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-mashumaro (Old)
 and      /work/SRC/openSUSE:Factory/.python-mashumaro.new.1995 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-mashumaro"

Tue Feb  3 21:30:51 2026 rev:6 rq:1330521 version:3.18

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-mashumaro/python-mashumaro.changes        
2025-10-07 18:29:53.257309271 +0200
+++ 
/work/SRC/openSUSE:Factory/.python-mashumaro.new.1995/python-mashumaro.changes  
    2026-02-03 21:32:04.906123437 +0100
@@ -1,0 +2,11 @@
+Mon Feb  2 07:38:32 UTC 2026 - Johannes Kastl 
<[email protected]>
+
+- update to 3.18:
+  * Changes
+    - Fixed support for PEP 695 types created with type keyword in
+      JSON Schema (#301)
+    - Fixed serialization problem when collections with passing
+      through items were used with no_copy_collections in unions
+      (#302)
+
+-------------------------------------------------------------------

Old:
----
  mashumaro-3.17.tar.gz

New:
----
  mashumaro-3.18.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-mashumaro.spec ++++++
--- /var/tmp/diff_new_pack.dCxaZ4/_old  2026-02-03 21:32:06.414186768 +0100
+++ /var/tmp/diff_new_pack.dCxaZ4/_new  2026-02-03 21:32:06.414186768 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package python-mashumaro
 #
-# Copyright (c) 2025 SUSE LLC and contributors
+# Copyright (c) 2026 SUSE LLC and contributors
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -18,7 +18,7 @@
 
 %{?sle15_python_module_pythons}
 Name:           python-mashumaro
-Version:        3.17
+Version:        3.18
 Release:        0
 Summary:        Fast and well tested serialization library
 License:        Apache-2.0

++++++ mashumaro-3.17.tar.gz -> mashumaro-3.18.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mashumaro-3.17/.github/workflows/main.yml 
new/mashumaro-3.18/.github/workflows/main.yml
--- old/mashumaro-3.17/.github/workflows/main.yml       2025-10-03 
23:05:12.000000000 +0200
+++ new/mashumaro-3.18/.github/workflows/main.yml       2026-01-30 
19:30:35.000000000 +0100
@@ -90,8 +90,7 @@
     strategy:
       fail-fast: false
       matrix:
-        # TODO add 3.14 once msgpack support Python 3.14
-        python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
+        python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
     steps:
     - uses: actions/checkout@v4
     - name: Set up Python ${{ matrix.python-version }}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mashumaro-3.17/README.md new/mashumaro-3.18/README.md
--- old/mashumaro-3.17/README.md        2025-10-03 23:05:12.000000000 +0200
+++ new/mashumaro-3.18/README.md        2026-01-30 19:30:35.000000000 +0100
@@ -144,7 +144,7 @@
 $ pip install mashumaro
 ```
 
-The current version of `mashumaro` supports Python versions 3.9 — 3.13.
+The current version of `mashumaro` supports Python versions 3.9 — 3.14.
 
 
 It's not recommended to use any version of Python that has reached its
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mashumaro-3.17/mashumaro/core/meta/types/pack.py 
new/mashumaro-3.18/mashumaro/core/meta/types/pack.py
--- old/mashumaro-3.17/mashumaro/core/meta/types/pack.py        2025-10-03 
23:05:12.000000000 +0200
+++ new/mashumaro-3.18/mashumaro/core/meta/types/pack.py        2026-01-30 
19:30:35.000000000 +0100
@@ -329,7 +329,9 @@
             spec.copy(type=type_arg, expression="value", owner=spec.type)
         )
         if packer not in packers:
-            if packer == "value":
+            if packer == "value" and not issubclass(
+                get_type_origin(type_arg), Collection
+            ):
                 packers.insert(0, packer)
             else:
                 packers.append(packer)
@@ -356,7 +358,9 @@
                 )
             else:
                 packer_arg_type_check = f"is {packer_arg_type_names[0]}"
-            if packer == "value":
+            if packer == "value" and not issubclass(
+                packer_arg_type, Collection
+            ):
                 with lines.indent(
                     f"if value.__class__ {packer_arg_type_check}:"
                 ):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mashumaro-3.17/mashumaro/jsonschema/builder.py 
new/mashumaro-3.18/mashumaro/jsonschema/builder.py
--- old/mashumaro-3.17/mashumaro/jsonschema/builder.py  2025-10-03 
23:05:12.000000000 +0200
+++ new/mashumaro-3.18/mashumaro/jsonschema/builder.py  2026-01-30 
19:30:35.000000000 +0100
@@ -1,6 +1,6 @@
 from collections.abc import Sequence
 from dataclasses import dataclass
-from typing import Any, Optional, Type
+from typing import Any, Optional, Type, Union
 
 from mashumaro.jsonschema.dialects import DRAFT_2020_12, JSONSchemaDialect
 from mashumaro.jsonschema.models import Context, JSONSchema
@@ -16,7 +16,7 @@
 
 
 def build_json_schema(
-    instance_type: Type,
+    instance_type: Union[Type, Any],
     context: Optional[Context] = None,
     with_definitions: bool = True,
     all_refs: Optional[bool] = None,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mashumaro-3.17/mashumaro/jsonschema/schema.py 
new/mashumaro-3.18/mashumaro/jsonschema/schema.py
--- old/mashumaro-3.17/mashumaro/jsonschema/schema.py   2025-10-03 
23:05:12.000000000 +0200
+++ new/mashumaro-3.18/mashumaro/jsonschema/schema.py   2026-01-30 
19:30:35.000000000 +0100
@@ -42,6 +42,7 @@
     is_readonly,
     is_required,
     is_special_typing_primitive,
+    is_type_alias_type,
     is_type_var,
     is_type_var_any,
     is_type_var_tuple,
@@ -472,6 +473,8 @@
         evaluated = evaluate_forward_ref(instance.type)
         if evaluated is not None:
             return get_schema(instance.derive(type=evaluated), ctx)
+    elif is_type_alias_type(instance.type):
+        return get_schema(instance.derive(type=instance.type.__value__), ctx)
 
 
 @register
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mashumaro-3.17/pyproject.toml 
new/mashumaro-3.18/pyproject.toml
--- old/mashumaro-3.17/pyproject.toml   2025-10-03 23:05:12.000000000 +0200
+++ new/mashumaro-3.18/pyproject.toml   2026-01-30 19:30:35.000000000 +0100
@@ -4,7 +4,7 @@
 
 [project]
 name = "mashumaro"
-version = "3.17"
+version = "3.18"
 license = "Apache-2.0"
 description = "Fast and well tested serialization library"
 readme = "README.md"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mashumaro-3.17/requirements-dev.txt 
new/mashumaro-3.18/requirements-dev.txt
--- old/mashumaro-3.17/requirements-dev.txt     2025-10-03 23:05:12.000000000 
+0200
+++ new/mashumaro-3.18/requirements-dev.txt     2026-01-30 19:30:35.000000000 
+0100
@@ -1,5 +1,5 @@
 # extra
-msgpack>=0.5.6;sys_platform != 'win32' or (sys_platform == 'win32' and 
python_version<'3.14')
+msgpack>=0.5.6
 pyyaml>=3.13
 tomli-w>=1.0
 tomli>=1.1.0;python_version<'3.11'
@@ -26,7 +26,7 @@
 termtables>=0.2.3
 pytablewriter[html]>=0.58.0
 cattrs==24.1.2
-pydantic==2.9.2;python_version<'3.14'  # see 
https://github.com/pydantic/pydantic/issues/11613
+pydantic==2.12.0
 dacite==1.7.0  # see 
https://github.com/konradhalas/dacite/issues/236#issuecomment-1613987368
 marshmallow>=3.19.0
 dataclasses-json==0.6.7
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mashumaro-3.17/tests/conftest.py 
new/mashumaro-3.18/tests/conftest.py
--- old/mashumaro-3.17/tests/conftest.py        2025-10-03 23:05:12.000000000 
+0200
+++ new/mashumaro-3.18/tests/conftest.py        2026-01-30 19:30:35.000000000 
+0100
@@ -7,6 +7,7 @@
         "test_generics_pep_695.py",
         "test_pep_695.py",
         "test_recursive_union.py",
+        "test_jsonschema/test_jsonschema_pep_695.py",
     ]
 
 add_unpack_method = patch(
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/mashumaro-3.17/tests/test_jsonschema/test_jsonschema_pep_695.py 
new/mashumaro-3.18/tests/test_jsonschema/test_jsonschema_pep_695.py
--- old/mashumaro-3.17/tests/test_jsonschema/test_jsonschema_pep_695.py 
1970-01-01 01:00:00.000000000 +0100
+++ new/mashumaro-3.18/tests/test_jsonschema/test_jsonschema_pep_695.py 
2026-01-30 19:30:35.000000000 +0100
@@ -0,0 +1,9 @@
+type MyTypeAliasType = int | str
+from mashumaro.jsonschema import build_json_schema
+
+
+def test_type_alias_type_with_jsonschema():
+    schema = build_json_schema(MyTypeAliasType)
+    assert schema.to_dict() == {
+        "anyOf": [{"type": "integer"}, {"type": "string"}]
+    }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mashumaro-3.17/tests/test_union.py 
new/mashumaro-3.18/tests/test_union.py
--- old/mashumaro-3.17/tests/test_union.py      2025-10-03 23:05:12.000000000 
+0200
+++ new/mashumaro-3.18/tests/test_union.py      2026-01-30 19:30:35.000000000 
+0100
@@ -5,8 +5,10 @@
 
 import pytest
 
-from mashumaro import DataClassDictMixin
+from mashumaro import DataClassDictMixin, pass_through
 from mashumaro.codecs.basic import encode
+from mashumaro.config import BaseConfig
+from mashumaro.dialect import Dialect
 from tests.utils import same_types
 
 
@@ -139,3 +141,27 @@
             encoded = encode(value, Union[variants])
             assert value == encoded
             assert same_types(value, encoded)
+
+
+def test_union_no_copy_list_with_dataclass_items_or_passed_through_items():
+    class NoCopyListDialect(Dialect):
+        no_copy_collections = (list,)
+
+    @dataclass
+    class Item(DataClassDictMixin):
+        value: int
+
+    @dataclass
+    class Container(DataClassDictMixin):
+        items: Union[list[Item], list[str]]
+
+        class Config(BaseConfig):
+            dialect = NoCopyListDialect
+            serialization_strategy = {str: {"serialize": lambda x: str(x)}}
+
+    item1 = Item(1)
+    item2 = Item(2)
+    items = [item1, item2]
+    container = Container(items=items)
+    data = container.to_dict()
+    assert data == {"items": [{"value": 1}, {"value": 2}]}

Reply via email to