forked from pool/python-pydantic-settings
- Update to 2.8.1:
* Fix for init source kwarg alias resolution * Revert usage of positional only argument in BaseSettings.__init__ * Revert use of object instead of Any * CLI support for optional and variadic positional args * Improve env_prefix config doc * Add env_nested_max_split setting * Avoid using Any in BaseSettings signature to avoid mypy errors * Asynchronous CLI methods in CliApp * Don't explode env vars if env_nested_delimiter is empty - Add patch use-typing_objects.patch: * Use typing_inspection.typing_objects rather than isinstance. - Refreshed patch fix-settings-dump.patch OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pydantic-settings?expand=0&rev=14
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
Index: pydantic_settings-2.7.1/docs/index.md
|
Index: pydantic_settings-2.8.1/docs/index.md
|
||||||
===================================================================
|
===================================================================
|
||||||
--- pydantic_settings-2.7.1.orig/docs/index.md
|
--- pydantic_settings-2.8.1.orig/docs/index.md
|
||||||
+++ pydantic_settings-2.7.1/docs/index.md
|
+++ pydantic_settings-2.8.1/docs/index.md
|
||||||
@@ -72,9 +72,9 @@ print(Settings().model_dump())
|
@@ -72,9 +72,9 @@ print(Settings().model_dump())
|
||||||
{
|
{
|
||||||
'auth_key': 'xxx',
|
'auth_key': 'xxx',
|
||||||
@@ -15,7 +15,7 @@ Index: pydantic_settings-2.7.1/docs/index.md
|
|||||||
'special_function': math.cos,
|
'special_function': math.cos,
|
||||||
'domains': set(),
|
'domains': set(),
|
||||||
'more_settings': {'foo': 'bar', 'apple': 1},
|
'more_settings': {'foo': 'bar', 'apple': 1},
|
||||||
@@ -1952,7 +1952,7 @@ class Settings(BaseSettings):
|
@@ -2075,7 +2075,7 @@ class Settings(BaseSettings):
|
||||||
|
|
||||||
|
|
||||||
print(Settings(database_dsn='postgres://postgres@localhost:5432/kwargs_db'))
|
print(Settings(database_dsn='postgres://postgres@localhost:5432/kwargs_db'))
|
||||||
|
@@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:10c9caad35e64bfb3c2fbf70a078c0e25cc92499782e5200747f942a065dec93
|
|
||||||
size 79920
|
|
BIN
pydantic_settings-2.8.1.tar.gz
(Stored with Git LFS)
Normal file
BIN
pydantic_settings-2.8.1.tar.gz
(Stored with Git LFS)
Normal file
Binary file not shown.
@@ -1,3 +1,20 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Apr 4 04:53:17 UTC 2025 - Steve Kowalik <steven.kowalik@suse.com>
|
||||||
|
|
||||||
|
- Update to 2.8.1:
|
||||||
|
* Fix for init source kwarg alias resolution
|
||||||
|
* Revert usage of positional only argument in BaseSettings.__init__
|
||||||
|
* Revert use of object instead of Any
|
||||||
|
* CLI support for optional and variadic positional args
|
||||||
|
* Improve env_prefix config doc
|
||||||
|
* Add env_nested_max_split setting
|
||||||
|
* Avoid using Any in BaseSettings signature to avoid mypy errors
|
||||||
|
* Asynchronous CLI methods in CliApp
|
||||||
|
* Don't explode env vars if env_nested_delimiter is empty
|
||||||
|
- Add patch use-typing_objects.patch:
|
||||||
|
* Use typing_inspection.typing_objects rather than isinstance.
|
||||||
|
- Refreshed patch fix-settings-dump.patch
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Tue Jan 28 02:23:01 UTC 2025 - Steve Kowalik <steven.kowalik@suse.com>
|
Tue Jan 28 02:23:01 UTC 2025 - Steve Kowalik <steven.kowalik@suse.com>
|
||||||
|
|
||||||
|
@@ -26,7 +26,7 @@
|
|||||||
%endif
|
%endif
|
||||||
%{?sle15_python_module_pythons}
|
%{?sle15_python_module_pythons}
|
||||||
Name: python-pydantic-settings%{psuffix}
|
Name: python-pydantic-settings%{psuffix}
|
||||||
Version: 2.7.1
|
Version: 2.8.1
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: Settings management using Pydantic
|
Summary: Settings management using Pydantic
|
||||||
License: MIT
|
License: MIT
|
||||||
@@ -34,6 +34,8 @@ URL: https://github.com/pydantic/pydantic-settings
|
|||||||
Source: https://files.pythonhosted.org/packages/source/p/pydantic-settings/pydantic_settings-%{version}.tar.gz
|
Source: https://files.pythonhosted.org/packages/source/p/pydantic-settings/pydantic_settings-%{version}.tar.gz
|
||||||
# PATCH-FIX-OPENSUSE Support Pydantic 2.10 changes.
|
# PATCH-FIX-OPENSUSE Support Pydantic 2.10 changes.
|
||||||
Patch0: fix-settings-dump.patch
|
Patch0: fix-settings-dump.patch
|
||||||
|
# PATCH-FIX-OPENSUSE Use typing_inspection.typing_objects (adapted from upstream)
|
||||||
|
Patch1: use-typing_objects.patch
|
||||||
BuildRequires: %{python_module hatchling}
|
BuildRequires: %{python_module hatchling}
|
||||||
BuildRequires: %{python_module pip}
|
BuildRequires: %{python_module pip}
|
||||||
BuildRequires: python-rpm-macros
|
BuildRequires: python-rpm-macros
|
||||||
@@ -48,6 +50,7 @@ BuildRequires: %{python_module pytest}
|
|||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
Requires: python-pydantic >= 2.3.0
|
Requires: python-pydantic >= 2.3.0
|
||||||
Requires: python-python-dotenv >= 0.21.0
|
Requires: python-python-dotenv >= 0.21.0
|
||||||
|
Requires: python-typing-inspection >= 0.4.0
|
||||||
Suggests: python-pyyaml >= 6.0.1
|
Suggests: python-pyyaml >= 6.0.1
|
||||||
Suggests: python-tomli >= 2.0.1
|
Suggests: python-tomli >= 2.0.1
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
@@ -71,7 +74,7 @@ Settings management using Pydantic, this is the new official home of Pydantic's
|
|||||||
%check
|
%check
|
||||||
%if %{with test}
|
%if %{with test}
|
||||||
# This test requires azure
|
# This test requires azure
|
||||||
skiptest="test_docs_examples[docs/index.md:1680-1724]"
|
skiptest="test_docs_examples[docs/index.md:1803-1847]"
|
||||||
%pytest -k "not ($skiptest)"
|
%pytest -k "not ($skiptest)"
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
33
use-typing_objects.patch
Normal file
33
use-typing_objects.patch
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
Index: pydantic_settings-2.8.1/pydantic_settings/sources.py
|
||||||
|
===================================================================
|
||||||
|
--- pydantic_settings-2.8.1.orig/pydantic_settings/sources.py
|
||||||
|
+++ pydantic_settings-2.8.1/pydantic_settings/sources.py
|
||||||
|
@@ -45,6 +45,7 @@ from pydantic.dataclasses import is_pyda
|
||||||
|
from pydantic.fields import FieldInfo
|
||||||
|
from pydantic_core import PydanticUndefined
|
||||||
|
from typing_extensions import Annotated, _AnnotatedAlias, get_args, get_origin
|
||||||
|
+from typing_inspection import typing_objects
|
||||||
|
|
||||||
|
from pydantic_settings.utils import path_type_label
|
||||||
|
|
||||||
|
@@ -1996,7 +1997,7 @@ class CliSettingsSource(EnvSettingsSourc
|
||||||
|
return '...'
|
||||||
|
elif isinstance(obj, Representation):
|
||||||
|
return repr(obj)
|
||||||
|
- elif isinstance(obj, typing_extensions.TypeAliasType):
|
||||||
|
+ elif typing_objects.is_typealiastype(obj):
|
||||||
|
return str(obj)
|
||||||
|
|
||||||
|
if not isinstance(obj, (typing_base, WithArgsTypes, type)):
|
||||||
|
Index: pydantic_settings-2.8.1/pyproject.toml
|
||||||
|
===================================================================
|
||||||
|
--- pydantic_settings-2.8.1.orig/pyproject.toml
|
||||||
|
+++ pydantic_settings-2.8.1/pyproject.toml
|
||||||
|
@@ -43,6 +43,7 @@ requires-python = '>=3.8'
|
||||||
|
dependencies = [
|
||||||
|
'pydantic>=2.7.0',
|
||||||
|
'python-dotenv>=0.21.0',
|
||||||
|
+ 'typing-inspection>=0.4.0',
|
||||||
|
]
|
||||||
|
dynamic = ['version']
|
||||||
|
|
Reference in New Issue
Block a user