Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-pydantic for openSUSE:Factory 
checked in at 2023-07-06 18:28:06
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-pydantic (Old)
 and      /work/SRC/openSUSE:Factory/.python-pydantic.new.23466 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-pydantic"

Thu Jul  6 18:28:06 2023 rev:19 rq:1096962 version:1.10.9

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-pydantic/python-pydantic.changes  
2023-05-26 20:15:03.504114218 +0200
+++ 
/work/SRC/openSUSE:Factory/.python-pydantic.new.23466/python-pydantic.changes   
    2023-07-06 18:28:10.130960081 +0200
@@ -1,0 +2,9 @@
+Wed Jul  5 13:07:17 UTC 2023 - Dirk Müller <dmuel...@suse.com>
+
+- update to 1.10.9:
+  * Fix trailing zeros not ignored in Decimal validation
+  * Fix mypy plugin for v1.4.0
+  * Add future and past date hypothesis strategies
+  * Discourage usage of Cython 3 with Pydantic 1.x
+
+-------------------------------------------------------------------

Old:
----
  pydantic-1.10.8.tar.gz

New:
----
  pydantic-1.10.9.tar.gz

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

Other differences:
------------------
++++++ python-pydantic.spec ++++++
--- /var/tmp/diff_new_pack.IPcB7Z/_old  2023-07-06 18:28:10.842964452 +0200
+++ /var/tmp/diff_new_pack.IPcB7Z/_new  2023-07-06 18:28:10.850964501 +0200
@@ -18,9 +18,8 @@
 
 
 %{?sle15_python_module_pythons}
-%define skip_python2 1
 Name:           python-pydantic
-Version:        1.10.8
+Version:        1.10.9
 Release:        0
 Summary:        Data validation and settings management using python type 
hinting
 License:        MIT

++++++ pydantic-1.10.8.tar.gz -> pydantic-1.10.9.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pydantic-1.10.8/.github/workflows/ci.yml 
new/pydantic-1.10.9/.github/workflows/ci.yml
--- old/pydantic-1.10.8/.github/workflows/ci.yml        2023-05-23 
19:13:55.000000000 +0200
+++ new/pydantic-1.10.9/.github/workflows/ci.yml        2023-06-07 
17:51:36.000000000 +0200
@@ -380,7 +380,7 @@
         CIBW_BUILD: 'cp3${{ matrix.python-version }}-*'
         CIBW_SKIP: '*-win32'
         CIBW_PLATFORM: '${{ matrix.platform || matrix.os }}'
-        CIBW_BEFORE_BUILD: 'pip install -U cython'
+        CIBW_BEFORE_BUILD: 'pip install -U "cython<3"'
         CIBW_TEST_REQUIRES: 'pytest==6.2.5 pytest-mock==3.6.1'
         CIBW_TEST_COMMAND: 'pytest {project}/tests'
         CIBW_MANYLINUX_X86_64_IMAGE: 'manylinux2014'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pydantic-1.10.8/HISTORY.md 
new/pydantic-1.10.9/HISTORY.md
--- old/pydantic-1.10.8/HISTORY.md      2023-05-23 19:13:55.000000000 +0200
+++ new/pydantic-1.10.9/HISTORY.md      2023-06-07 17:51:36.000000000 +0200
@@ -1,9 +1,32 @@
-## v1.10.8 (2023-05-23)
+## v2.0b2 (2023-06-03)
 
-* Fix a bug in `Literal` usage with `typing-extension==4.6.0`, #5826 by 
@hramezani
-* This solves the (closed) issue #3849 where aliased fields that use 
discriminated union fail to validate when the data contains the non-aliased 
field name, #5736 by @benwah
-* Update email-validator dependency to >=2.0.0post2, #5627 by @adriangb
-* update `AnyClassMethod` for changes in 
[python/typeshed#9771](https://github.com/python/typeshed/issues/9771), #5505 
by @ITProKyle
+Add `from_attributes` runtime flag to `TypeAdapter.validate_python` and 
`BaseModel.model_validate`.
+
+See the full changelog 
[here](https://github.com/pydantic/pydantic/releases/tag/v2.0b2)
+
+## v2.0b1 (2023-06-01)
+
+First beta pre-release of Pydantic V2
+
+See the full changelog 
[here](https://github.com/pydantic/pydantic/releases/tag/v2.0b1)
+
+## v2.0a4 (2023-05-05)
+
+Fourth pre-release of Pydantic V2
+
+See the full changelog 
[here](https://github.com/pydantic/pydantic/releases/tag/v2.0a4)
+
+## v2.0a3 (2023-04-20)
+
+Third pre-release of Pydantic V2
+
+See the full changelog 
[here](https://github.com/pydantic/pydantic/releases/tag/v2.0a3)
+
+## v2.0a2 (2023-04-12)
+
+Second pre-release of Pydantic V2
+
+See the full changelog 
[here](https://github.com/pydantic/pydantic/releases/tag/v2.0a2)
 
 ## v2.0a1 (2023-04-03)
 
@@ -11,6 +34,20 @@
 
 See [this post](https://docs.pydantic.dev/blog/pydantic-v2-alpha/) for more 
details.
 
+## v1.10.9 (2023-06-07)
+
+* Fix trailing zeros not ignored in Decimal validation, #5968 by @hramezani
+* Fix mypy plugin for v1.4.0, #5928 by @cdce8p
+* Add future and past date hypothesis strategies, #5850 by @bschoenmaeckers
+* Discourage usage of Cython 3 with Pydantic 1.x, #5845 by @lig
+
+## v1.10.8 (2023-05-23)
+
+* Fix a bug in `Literal` usage with `typing-extension==4.6.0`, #5826 by 
@hramezani
+* This solves the (closed) issue #3849 where aliased fields that use 
discriminated union fail to validate when the data contains the non-aliased 
field name, #5736 by @benwah
+* Update email-validator dependency to >=2.0.0post2, #5627 by @adriangb
+* update `AnyClassMethod` for changes in 
[python/typeshed#9771](https://github.com/python/typeshed/issues/9771), #5505 
by @ITProKyle
+
 ## v1.10.7 (2023-03-22)
 
 * Fix creating schema from model using `ConstrainedStr` with `regex` as dict 
key, #5223 by @matejetz
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pydantic-1.10.8/docs/install.md 
new/pydantic-1.10.9/docs/install.md
--- old/pydantic-1.10.8/docs/install.md 2023-05-23 19:13:55.000000000 +0200
+++ new/pydantic-1.10.9/docs/install.md 2023-06-07 17:51:36.000000000 +0200
@@ -22,7 +22,7 @@
 By default `pip install` provides optimized binaries via 
[PyPI](https://pypi.org/project/pydantic/#files) for Linux, MacOS and 64bit 
Windows.
 
 
-If you're installing manually, install `cython` before installing *pydantic* 
and compilation should happen automatically.
+If you're installing manually, install `cython<3` (Pydantic 1.x is 
incompatible with Cython v3 and above) before installing *pydantic* and 
compilation should happen automatically.
 
 To test if *pydantic* is compiled run:
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pydantic-1.10.8/pydantic/_hypothesis_plugin.py 
new/pydantic-1.10.9/pydantic/_hypothesis_plugin.py
--- old/pydantic-1.10.8/pydantic/_hypothesis_plugin.py  2023-05-23 
19:13:55.000000000 +0200
+++ new/pydantic-1.10.9/pydantic/_hypothesis_plugin.py  2023-06-07 
17:51:36.000000000 +0200
@@ -46,7 +46,7 @@
 #
 # conlist() and conset() are unsupported for now, because the workarounds for
 # Cython and Hypothesis to handle parametrized generic types are incompatible.
-# Once Cython can support 'normal' generics we'll revisit this.
+# We are rethinking Hypothesis compatibility in Pydantic v2.
 
 # Emails
 try:
@@ -168,6 +168,11 @@
 st.register_type_strategy(pydantic.StrictStr, st.text())
 
 
+# FutureDate, PastDate
+st.register_type_strategy(pydantic.FutureDate, 
st.dates(min_value=datetime.date.today() + datetime.timedelta(days=1)))
+st.register_type_strategy(pydantic.PastDate, 
st.dates(max_value=datetime.date.today() - datetime.timedelta(days=1)))
+
+
 # Constrained-type resolver functions
 #
 # For these ones, we actually want to inspect the type in order to work out a
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pydantic-1.10.8/pydantic/config.py 
new/pydantic-1.10.9/pydantic/config.py
--- old/pydantic-1.10.8/pydantic/config.py      2023-05-23 19:13:55.000000000 
+0200
+++ new/pydantic-1.10.9/pydantic/config.py      2023-06-07 17:51:36.000000000 
+0200
@@ -38,7 +38,8 @@
 
 
 # https://github.com/cython/cython/issues/4003
-# Will be fixed with Cython 3 but still in alpha right now
+# Fixed in Cython 3 and Pydantic v1 won't support Cython 3.
+# Pydantic v2 doesn't depend on Cython at all.
 if not compiled:
     from typing_extensions import TypedDict
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pydantic-1.10.8/pydantic/mypy.py 
new/pydantic-1.10.9/pydantic/mypy.py
--- old/pydantic-1.10.8/pydantic/mypy.py        2023-05-23 19:13:55.000000000 
+0200
+++ new/pydantic-1.10.9/pydantic/mypy.py        2023-06-07 17:51:36.000000000 
+0200
@@ -493,15 +493,32 @@
         obj_type = ctx.api.named_type(f'{BUILTINS_NAME}.object')
         self_tvar_name = '_PydanticBaseModel'  # Make sure it does not 
conflict with other names in the class
         tvar_fullname = ctx.cls.fullname + '.' + self_tvar_name
-        tvd = TypeVarDef(self_tvar_name, tvar_fullname, -1, [], obj_type)
-        self_tvar_expr = TypeVarExpr(self_tvar_name, tvar_fullname, [], 
obj_type)
+        if MYPY_VERSION_TUPLE >= (1, 4):
+            tvd = TypeVarType(
+                self_tvar_name,
+                tvar_fullname,
+                -1,
+                [],
+                obj_type,
+                AnyType(TypeOfAny.from_omitted_generics),  # type: 
ignore[arg-type]
+            )
+            self_tvar_expr = TypeVarExpr(
+                self_tvar_name,
+                tvar_fullname,
+                [],
+                obj_type,
+                AnyType(TypeOfAny.from_omitted_generics),  # type: 
ignore[arg-type]
+            )
+        else:
+            tvd = TypeVarDef(self_tvar_name, tvar_fullname, -1, [], obj_type)
+            self_tvar_expr = TypeVarExpr(self_tvar_name, tvar_fullname, [], 
obj_type)
         ctx.cls.info.names[self_tvar_name] = SymbolTableNode(MDEF, 
self_tvar_expr)
 
         # Backward-compatible with TypeVarDef from Mypy 0.910.
         if isinstance(tvd, TypeVarType):
             self_type = tvd
         else:
-            self_type = TypeVarType(tvd)  # type: ignore[call-arg]
+            self_type = TypeVarType(tvd)
 
         add_method(
             ctx,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pydantic-1.10.8/pydantic/types.py 
new/pydantic-1.10.9/pydantic/types.py
--- old/pydantic-1.10.8/pydantic/types.py       2023-05-23 19:13:55.000000000 
+0200
+++ new/pydantic-1.10.9/pydantic/types.py       2023-06-07 17:51:36.000000000 
+0200
@@ -3,7 +3,7 @@
 import re
 import warnings
 from datetime import date
-from decimal import Decimal
+from decimal import Decimal, InvalidOperation
 from enum import Enum
 from pathlib import Path
 from types import new_class
@@ -691,7 +691,11 @@
 
     @classmethod
     def validate(cls, value: Decimal) -> Decimal:
-        digit_tuple, exponent = value.as_tuple()[1:]
+        try:
+            normalized_value = value.normalize()
+        except InvalidOperation:
+            normalized_value = value
+        digit_tuple, exponent = normalized_value.as_tuple()[1:]
         if exponent in {'F', 'n', 'N'}:
             raise errors.DecimalIsNotFiniteError()
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pydantic-1.10.8/pydantic/typing.py 
new/pydantic-1.10.9/pydantic/typing.py
--- old/pydantic-1.10.8/pydantic/typing.py      2023-05-23 19:13:55.000000000 
+0200
+++ new/pydantic-1.10.9/pydantic/typing.py      2023-06-07 17:51:36.000000000 
+0200
@@ -252,15 +252,7 @@
     WithArgsTypes = (typing._GenericAlias, types.GenericAlias, types.UnionType)
 
 
-if sys.version_info < (3, 9):
-    StrPath = Union[str, PathLike]
-else:
-    StrPath = Union[str, PathLike]
-    # TODO: Once we switch to Cython 3 to handle generics properly
-    #  (https://github.com/cython/cython/issues/2753), use following lines 
instead
-    #  of the one above
-    # # os.PathLike only becomes subscriptable from Python 3.9 onwards
-    # StrPath = Union[str, PathLike[str]]
+StrPath = Union[str, PathLike]
 
 
 if TYPE_CHECKING:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pydantic-1.10.8/pydantic/version.py 
new/pydantic-1.10.9/pydantic/version.py
--- old/pydantic-1.10.8/pydantic/version.py     2023-05-23 19:13:55.000000000 
+0200
+++ new/pydantic-1.10.9/pydantic/version.py     2023-06-07 17:51:36.000000000 
+0200
@@ -1,6 +1,6 @@
 __all__ = 'compiled', 'VERSION', 'version_info'
 
-VERSION = '1.10.8'
+VERSION = '1.10.9'
 
 try:
     import cython  # type: ignore
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pydantic-1.10.8/setup.py new/pydantic-1.10.9/setup.py
--- old/pydantic-1.10.8/setup.py        2023-05-23 19:13:55.000000000 +0200
+++ new/pydantic-1.10.9/setup.py        2023-06-07 17:51:36.000000000 +0200
@@ -118,6 +118,7 @@
         'Environment :: Console',
         'Environment :: MacOS X',
         'Framework :: Hypothesis',
+        'Framework :: Pydantic',
         'Topic :: Software Development :: Libraries :: Python Modules',
         'Topic :: Internet',
     ],
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pydantic-1.10.8/tests/test_hypothesis_plugin.py 
new/pydantic-1.10.9/tests/test_hypothesis_plugin.py
--- old/pydantic-1.10.8/tests/test_hypothesis_plugin.py 2023-05-23 
19:13:55.000000000 +0200
+++ new/pydantic-1.10.9/tests/test_hypothesis_plugin.py 2023-06-07 
17:51:36.000000000 +0200
@@ -86,6 +86,8 @@
     class ConstrainedDateModel(pydantic.BaseModel):
         condatet: pydantic.condate(gt=date(1980, 1, 1), lt=date(2180, 12, 31))
         condatee: pydantic.condate(ge=date(1980, 1, 1), le=date(2180, 12, 31))
+        future: pydantic.FutureDate
+        past: pydantic.PastDate
 
     yield from (
         MiscModel,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pydantic-1.10.8/tests/test_types.py 
new/pydantic-1.10.9/tests/test_types.py
--- old/pydantic-1.10.8/tests/test_types.py     2023-05-23 19:13:55.000000000 
+0200
+++ new/pydantic-1.10.9/tests/test_types.py     2023-06-07 17:51:36.000000000 
+0200
@@ -2075,6 +2075,19 @@
         (dict(max_digits=4, decimal_places=1), Decimal('999'), Decimal('999')),
         (dict(max_digits=20, decimal_places=2), Decimal('742403889818000000'), 
Decimal('742403889818000000')),
         (dict(max_digits=20, decimal_places=2), Decimal('7.42403889818E+17'), 
Decimal('7.42403889818E+17')),
+        (dict(max_digits=6, decimal_places=2), 
Decimal('000000000001111.700000'), Decimal('000000000001111.700000')),
+        (
+            dict(max_digits=6, decimal_places=2),
+            Decimal('0000000000011111.700000'),
+            [
+                {
+                    'loc': ('foo',),
+                    'type': 'value_error.decimal.whole_digits',
+                    'msg': 'ensure that there are no more than 4 digits before 
the decimal point',
+                    'ctx': {'whole_digits': 4},
+                }
+            ],
+        ),
         (
             dict(max_digits=20, decimal_places=2),
             Decimal('7424742403889818000000'),
@@ -2102,14 +2115,14 @@
         ),
         (dict(max_digits=5, decimal_places=5), Decimal('70E-5'), 
Decimal('70E-5')),
         (
-            dict(max_digits=5, decimal_places=5),
+            dict(max_digits=4, decimal_places=4),
             Decimal('70E-6'),
             [
                 {
                     'loc': ('foo',),
-                    'msg': 'ensure that there are no more than 5 digits in 
total',
+                    'msg': 'ensure that there are no more than 4 digits in 
total',
                     'type': 'value_error.decimal.max_digits',
-                    'ctx': {'max_digits': 5},
+                    'ctx': {'max_digits': 4},
                 }
             ],
         ),

Reply via email to