Compare commits

18 Commits

Author SHA256 Message Date
dc573251dd Accepting request 1289437 from devel:languages:python
OBS-URL: https://build.opensuse.org/request/show/1289437
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-pydantic-settings?expand=0&rev=9
2025-07-02 10:09:41 +00:00
082e820302 Accepting request 1272302 from devel:languages:python
- 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/request/show/1272302
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-pydantic-settings?expand=0&rev=8
2025-04-25 20:17:55 +00:00
8ca27fd8ae - 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
2025-04-24 05:54:41 +00:00
6400f49133 Accepting request 1267000 from devel:languages:python
- 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/request/show/1267000
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-pydantic-settings?expand=0&rev=7
2025-04-11 14:45:28 +00:00
b393ce4c0c - 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
2025-04-04 04:54:24 +00:00
5e05958622 Accepting request 1240690 from devel:languages:python
- Update to 2.7.1:
  * Move preferred alias resolution to private method
  * Fix test_protected_namespace_defaults with -Wdefault
  * Make tests more robust to the running environment
  * Fix rendering of annotations in code example
  * Fix alias resolution for default settings source.
  * Use the class name in the __repr__ implementations
  * Fix default help text for union of submodels.
  * Add support for CliMutuallyExclusiveGroup.
  * Disable abbreviations on internal parser.
  * Fix Secret field parsing
  * Fix alias resolution to use preferred key.
  * Strip annotated when getting submodels during CLI parsing.
  * Removing return type from the function in test
  * Relax default protected_namespaces
  * Add support for CLI kebab case flag.
  * Change reference of default values validation in documentation
  * Improve field value parsing by adding NoDecode and ForceDecode
    annotations
  * Fix attribute error on Python 3.9 with typing.Sequence
  * Add Python 3.13 support
  * Adding support for populate_by_name
  * Refactor path_type_label
  * Fix nested model field with alias parsing
  * Fix PathType typing in case of sequence
  * Add cli_ignore_unknown_args config option.
  * Fix AzureKeyVaultSettingsSource problem in case of field with underscore
  * Add cli_flag_prefix_char config option.
  * Fix nested model AliasChoices in validation alias
  * Add CLI App Support

OBS-URL: https://build.opensuse.org/request/show/1240690
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-pydantic-settings?expand=0&rev=6
2025-01-29 15:09:41 +00:00
e4a8a0d837 - Update to 2.7.1:
* Move preferred alias resolution to private method
  * Fix test_protected_namespace_defaults with -Wdefault
  * Make tests more robust to the running environment
  * Fix rendering of annotations in code example
  * Fix alias resolution for default settings source.
  * Use the class name in the __repr__ implementations
  * Fix default help text for union of submodels.
  * Add support for CliMutuallyExclusiveGroup.
  * Disable abbreviations on internal parser.
  * Fix Secret field parsing
  * Fix alias resolution to use preferred key.
  * Strip annotated when getting submodels during CLI parsing.
  * Removing return type from the function in test
  * Relax default protected_namespaces
  * Add support for CLI kebab case flag.
  * Change reference of default values validation in documentation
  * Improve field value parsing by adding NoDecode and ForceDecode
    annotations
  * Fix attribute error on Python 3.9 with typing.Sequence
  * Add Python 3.13 support
  * Adding support for populate_by_name
  * Refactor path_type_label
  * Fix nested model field with alias parsing
  * Fix PathType typing in case of sequence
  * Add cli_ignore_unknown_args config option.
  * Fix AzureKeyVaultSettingsSource problem in case of field with underscore
  * Add cli_flag_prefix_char config option.
  * Fix nested model AliasChoices in validation alias
  * Add CLI App Support

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pydantic-settings?expand=0&rev=12
2025-01-28 02:23:18 +00:00
492f548e7b Accepting request 1218762 from devel:languages:python
- Remove azure BuildRequires

OBS-URL: https://build.opensuse.org/request/show/1218762
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-pydantic-settings?expand=0&rev=5
2024-10-29 13:31:51 +00:00
5803852694 - Remove azure BuildRequires
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pydantic-settings?expand=0&rev=10
2024-10-28 09:52:41 +00:00
eb66cf607e Accepting request 1200237 from devel:languages:python
- Update to 2.4.0:
  * Fix regex flags accidentally passed as count
  * Deprecate read_env_file and move it to DotEnvSettingsSource
  * Fix a bug when loading empty yaml file
  * feat: Enable access to the current state in settings sources
  * Add support for short options
  * Add Azure Key Vault settings source
  * Add cli_exit_on_error config option
- Add in multibuild.

OBS-URL: https://build.opensuse.org/request/show/1200237
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-pydantic-settings?expand=0&rev=4
2024-09-13 12:26:07 +00:00
7571a3d0c9 - Add in multibuild.
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pydantic-settings?expand=0&rev=8
2024-09-12 05:58:25 +00:00
32b68a6f83 - Update to 2.4.0:
* Fix regex flags accidentally passed as count
  * Deprecate read_env_file and move it to DotEnvSettingsSource
  * Fix a bug when loading empty yaml file
  * feat: Enable access to the current state in settings sources
  * Add support for short options
  * Add Azure Key Vault settings source
  * Add cli_exit_on_error config option

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pydantic-settings?expand=0&rev=7
2024-09-10 04:58:20 +00:00
d804c84ea9 Accepting request 1186240 from devel:languages:python
Automatic submission by obs-autosubmit

OBS-URL: https://build.opensuse.org/request/show/1186240
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-pydantic-settings?expand=0&rev=3
2024-07-09 18:02:54 +00:00
ffb9010f83 - update to 2.3.4:
* add in-place reloading in docs
  * Nested pydantic dataclasses and doc fixes.
  * Remove leftover docstring causing warning on `pydantic` docs
    build
- update to 2.3.3:
  * Fix an intriduced bug in parsing json field with
    discriminated union
  * Add CliSettingsSource alias handling for AliasChoices and
    AliasPath.
- update to 2.3.2:
  * Initialize CLI source on demand.
  * Fix command line help from `argparse` formatting problem
  * Fix issue with nested model uppercase field name in case
    insensitive mode
- update to 2.3.1:
  * Fix a regression in parsing env value for nested dict
- update to 2.3.0:
  * Add environment parsing support for enums.
  * Improve `explode_env_vars` for better dict handling
  * add `PyprojectTomlConfigSettingsSource`
  * Fix broken link in AliasChoices class
  * Update Pydantic
  * fix: superfluous deep env conflicts with non-dict model leaf
  * fix: a second level of environment nesting expected a dict
  * Fix an issue when inner types of a discriminated union with a
    callable discriminator were not correctly identified as
    complex.
  * Fix a bug when we have case insentive field in nested model
  * Add CLI Settings Source

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pydantic-settings?expand=0&rev=5
2024-07-01 18:05:23 +00:00
f40c4004b6 Accepting request 1163261 from devel:languages:python
OBS-URL: https://build.opensuse.org/request/show/1163261
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-pydantic-settings?expand=0&rev=2
2024-03-29 12:09:11 +00:00
a28b60ca93 Accepting request 1162942 from home:ecsos:python
- Add %{?sle15_python_module_pythons}

OBS-URL: https://build.opensuse.org/request/show/1162942
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pydantic-settings?expand=0&rev=3
2024-03-28 08:08:51 +00:00
a5fbc080a9 Accepting request 1156812 from devel:languages:python
- Initial release of 2.2.1

OBS-URL: https://build.opensuse.org/request/show/1156812
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-pydantic-settings?expand=0&rev=1
2024-03-14 16:42:12 +00:00
16dba026f5 - Initial release of 2.2.1
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pydantic-settings?expand=0&rev=1
2024-03-11 03:19:31 +00:00
8 changed files with 0 additions and 106 deletions

View File

@@ -1,32 +0,0 @@
Index: pydantic_settings-2.3.4/tests/test_settings.py
===================================================================
--- pydantic_settings-2.3.4.orig/tests/test_settings.py
+++ pydantic_settings-2.3.4/tests/test_settings.py
@@ -10,6 +10,7 @@ from datetime import datetime, timezone
from enum import IntEnum
from pathlib import Path
from typing import Any, Callable, Dict, Generic, Hashable, List, Optional, Set, Tuple, Type, TypeVar, Union
+from unittest import mock
import pytest
import typing_extensions
@@ -1116,7 +1117,8 @@ def test_multiple_env_file(tmp_path):
model_config = SettingsConfigDict(env_file=[base_env, prod_env])
- s = Settings()
+ with mock.patch.dict('os.environ', {}, clear=True):
+ s = Settings()
assert s.debug_mode is False
assert s.host == 'https://example.com/services'
assert s.port == 8000
@@ -1135,7 +1137,8 @@ def test_model_env_file_override_model_c
model_config = SettingsConfigDict(env_file=prod_env)
- s = Settings(_env_file=base_env)
+ with mock.patch.dict('os.environ', {}, clear=True):
+ s = Settings(_env_file=base_env)
assert s.debug_mode is True
assert s.host == 'localhost'
assert s.port == 8000

View File

@@ -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.3.4.tar.gz (Stored with Git LFS)

Binary file not shown.

BIN
pydantic_settings-2.4.0.tar.gz (Stored with Git LFS)

Binary file not shown.

View File

@@ -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)

Binary file not shown.

BIN
pydantic_settings-2.9.1.tar.gz (Stored with Git LFS)

Binary file not shown.

View File

@@ -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']