forked from pool/python-pydantic-settings
- Update to 2.9.1:
* Drop support for Python 3.8 * Switch to typing-inspection * Refactor sources.py into a subpackage * Add support for AWS Secrets Manager * Fix minor typo: conotations => connotations * Azure Key Vault: Don't load disabled secret * Add support for GCP Secret Manager * CLI JSON Optional Default * Fix for env nested enum * CLI submodel suppress * Cli retrieve unknown args * Update pydantic - Drop patches: * fix-settings-dump.patch * use-typing_objects.patch OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pydantic-settings?expand=0&rev=16
This commit is contained in:
@@ -1,26 +0,0 @@
|
|||||||
Index: pydantic_settings-2.8.1/docs/index.md
|
|
||||||
===================================================================
|
|
||||||
--- pydantic_settings-2.8.1.orig/docs/index.md
|
|
||||||
+++ pydantic_settings-2.8.1/docs/index.md
|
|
||||||
@@ -72,9 +72,9 @@ print(Settings().model_dump())
|
|
||||||
{
|
|
||||||
'auth_key': 'xxx',
|
|
||||||
'api_key': 'xxx',
|
|
||||||
- 'redis_dsn': Url('redis://user:pass@localhost:6379/1'),
|
|
||||||
- 'pg_dsn': MultiHostUrl('postgres://user:pass@localhost:5432/foobar'),
|
|
||||||
- 'amqp_dsn': Url('amqp://user:pass@localhost:5672/'),
|
|
||||||
+ 'redis_dsn': RedisDsn('redis://user:pass@localhost:6379/1'),
|
|
||||||
+ 'pg_dsn': PostgresDsn('postgres://user:pass@localhost:5432/foobar'),
|
|
||||||
+ 'amqp_dsn': AmqpDsn('amqp://user:pass@localhost:5672/'),
|
|
||||||
'special_function': math.cos,
|
|
||||||
'domains': set(),
|
|
||||||
'more_settings': {'foo': 'bar', 'apple': 1},
|
|
||||||
@@ -2075,7 +2075,7 @@ class Settings(BaseSettings):
|
|
||||||
|
|
||||||
|
|
||||||
print(Settings(database_dsn='postgres://postgres@localhost:5432/kwargs_db'))
|
|
||||||
-#> database_dsn=MultiHostUrl('postgres://postgres@localhost:5432/kwargs_db')
|
|
||||||
+#> database_dsn=PostgresDsn('postgres://postgres@localhost:5432/kwargs_db')
|
|
||||||
```
|
|
||||||
|
|
||||||
By flipping `env_settings` and `init_settings`, environment variables now have precedence over `__init__` kwargs.
|
|
BIN
pydantic_settings-2.8.1.tar.gz
(Stored with Git LFS)
BIN
pydantic_settings-2.8.1.tar.gz
(Stored with Git LFS)
Binary file not shown.
BIN
pydantic_settings-2.9.1.tar.gz
(Stored with Git LFS)
Normal file
BIN
pydantic_settings-2.9.1.tar.gz
(Stored with Git LFS)
Normal file
Binary file not shown.
@@ -1,3 +1,23 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Apr 24 05:53:47 UTC 2025 - Steve Kowalik <steven.kowalik@suse.com>
|
||||||
|
|
||||||
|
- Update to 2.9.1:
|
||||||
|
* Drop support for Python 3.8
|
||||||
|
* Switch to typing-inspection
|
||||||
|
* Refactor sources.py into a subpackage
|
||||||
|
* Add support for AWS Secrets Manager
|
||||||
|
* Fix minor typo: conotations => connotations
|
||||||
|
* Azure Key Vault: Don't load disabled secret
|
||||||
|
* Add support for GCP Secret Manager
|
||||||
|
* CLI JSON Optional Default
|
||||||
|
* Fix for env nested enum
|
||||||
|
* CLI submodel suppress
|
||||||
|
* Cli retrieve unknown args
|
||||||
|
* Update pydantic
|
||||||
|
- Drop patches:
|
||||||
|
* fix-settings-dump.patch
|
||||||
|
* use-typing_objects.patch
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Fri Apr 4 04:53:17 UTC 2025 - Steve Kowalik <steven.kowalik@suse.com>
|
Fri Apr 4 04:53:17 UTC 2025 - Steve Kowalik <steven.kowalik@suse.com>
|
||||||
|
|
||||||
|
@@ -26,21 +26,21 @@
|
|||||||
%endif
|
%endif
|
||||||
%{?sle15_python_module_pythons}
|
%{?sle15_python_module_pythons}
|
||||||
Name: python-pydantic-settings%{psuffix}
|
Name: python-pydantic-settings%{psuffix}
|
||||||
Version: 2.8.1
|
Version: 2.9.1
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: Settings management using Pydantic
|
Summary: Settings management using Pydantic
|
||||||
License: MIT
|
License: MIT
|
||||||
URL: https://github.com/pydantic/pydantic-settings
|
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.
|
BuildRequires: %{python_module base >= 3.9}
|
||||||
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
|
||||||
# SECTION test requirements
|
# SECTION test requirements
|
||||||
%if %{with test}
|
%if %{with test}
|
||||||
|
BuildRequires: %{python_module azure-keyvault-secrets >= 4.8}
|
||||||
|
BuildRequires: %{python_module google-auth}
|
||||||
|
BuildRequires: %{python_module google-cloud-secret-manager >= 2.23.1}
|
||||||
BuildRequires: %{python_module pydantic-settings = %{version}}
|
BuildRequires: %{python_module pydantic-settings = %{version}}
|
||||||
BuildRequires: %{python_module pytest-examples}
|
BuildRequires: %{python_module pytest-examples}
|
||||||
BuildRequires: %{python_module pytest-mock}
|
BuildRequires: %{python_module pytest-mock}
|
||||||
@@ -48,11 +48,13 @@ BuildRequires: %{python_module pytest}
|
|||||||
%endif
|
%endif
|
||||||
# /SECTION
|
# /SECTION
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
Requires: python-pydantic >= 2.3.0
|
Requires: python-pydantic >= 2.7.0
|
||||||
Requires: python-python-dotenv >= 0.21.0
|
Requires: python-python-dotenv >= 0.21.0
|
||||||
Requires: python-typing-inspection >= 0.4.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
|
||||||
|
Suggests: python-google-cloud-secret-manager >= 2.23.1
|
||||||
|
Suggests: python-azure-keyvault-secrets >= 4.8
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
%python_subpackages
|
%python_subpackages
|
||||||
|
|
||||||
@@ -74,7 +76,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:1803-1847]"
|
skiptest="test_docs_examples[docs/index.md:1847-1890]"
|
||||||
%pytest -k "not ($skiptest)"
|
%pytest -k "not ($skiptest)"
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
@@ -1,33 +0,0 @@
|
|||||||
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