17
0

15 Commits

Author SHA256 Message Date
83e8be96ef 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
89e73e9fb7 Accepting request 1289436 from home:nkrapp:branches:devel:languages:python
- Update to 2.10.1
  * Fix UnboundLocalError error in _replace_field_names_case_insensitively
  * Remove unknown file reference in documentation
  * Prepare release 2.10.1
- Update to 2.10.0
  * Fix running tests when azure-keyvault-secrets is not installed
  * Fix running tests when google-cloud-secret-manager is not installed
  * Support loading a specific nested key from YAML in YamlConfigSettingsSource
  * Fix CLI suppression for model group help
  * Fix missing DEFAULT_PATH import
  * Fix case-insensitive handling of nested aliases in EnvironmentSettingsSource
  * Azure Key Vault case insensitive support and dash-underscore translation
  * fix: Respect 'cli_parse_args' from model_config with settings_customise_sources
  * Bump astral-sh/setup-uv
  * Update packages by
  * Update README.md
  * Fix CI badge
  * Update dependencies
  * Fix coverage report
  * Fix _consume_object_or_array on unbalanced brackets in JSON strings
  * add region as a parameter to aws secret manager
  * Expose GCP Secret Manager case sensitive option
  * Update deps
  * feat: Add cli_shortcuts to CLI settings
  * Expose AWS Secrets Manager case sensitive option
  * Prepare release 2.10.0
- remove otional test dependencies

OBS-URL: https://build.opensuse.org/request/show/1289436
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pydantic-settings?expand=0&rev=18
2025-07-01 09:01:11 +00:00
94c483a69a 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
d4ac3d8e5c - 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
c05dbb191c 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
33cf6e0bdc - 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
641130a7fd 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
9f0835e209 - 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
36cd42b06d 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
f9a1f490c3 - 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
82608e3368 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
3fad378a68 - 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
13dffcfaaa - 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
1c836e1802 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
06500e7f53 - 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
6 changed files with 217 additions and 46 deletions

3
_multibuild Normal file
View File

@@ -0,0 +1,3 @@
<multibuild>
<package>test</package>
</multibuild>

View File

@@ -1,32 +0,0 @@
Index: pydantic_settings-2.2.1/tests/test_settings.py
===================================================================
--- pydantic_settings-2.2.1.orig/tests/test_settings.py
+++ pydantic_settings-2.2.1/tests/test_settings.py
@@ -6,6 +6,7 @@ import uuid
from datetime import datetime, timezone
from pathlib import Path
from typing import Any, Callable, Dict, Generic, List, Optional, Set, Tuple, Type, TypeVar, Union
+from unittest import mock
import pytest
from annotated_types import MinLen
@@ -1050,7 +1051,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
@@ -1069,7 +1071,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

BIN
pydantic_settings-2.10.1.tar.gz (Stored with Git LFS) Normal file

Binary file not shown.

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:00b9f6a5e95553590434c0fa01ead0b216c3e10bc54ae02e37f359948643c5ed
size 35495

View File

@@ -1,3 +1,181 @@
-------------------------------------------------------------------
Tue Jul 1 08:46:12 UTC 2025 - Nico Krapp <nico.krapp@suse.com>
- Update to 2.10.1
* Fix UnboundLocalError error in _replace_field_names_case_insensitively
* Remove unknown file reference in documentation
* Prepare release 2.10.1
- Update to 2.10.0
* Fix running tests when azure-keyvault-secrets is not installed
* Fix running tests when google-cloud-secret-manager is not installed
* Support loading a specific nested key from YAML in YamlConfigSettingsSource
* Fix CLI suppression for model group help
* Fix missing DEFAULT_PATH import
* Fix case-insensitive handling of nested aliases in EnvironmentSettingsSource
* Azure Key Vault case insensitive support and dash-underscore translation
* fix: Respect 'cli_parse_args' from model_config with settings_customise_sources
* Bump astral-sh/setup-uv
* Update packages by
* Update README.md
* Fix CI badge
* Update dependencies
* Fix coverage report
* Fix _consume_object_or_array on unbalanced brackets in JSON strings
* add region as a parameter to aws secret manager
* Expose GCP Secret Manager case sensitive option
* Update deps
* feat: Add cli_shortcuts to CLI settings
* Expose AWS Secrets Manager case sensitive option
* Prepare release 2.10.0
- remove otional test dependencies
-------------------------------------------------------------------
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>
- 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>
- 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
* Fix a regression in dotenv optional nested field
* Put tests for non-default sources in separate files
* Update nested model partial update docs example.
* Add support for suppressing fields from CLI help.
* Fix bug in dotenv source when there is env with and without prefix
* Fix a bug in nested vanila dataclass
* CLI Improve Docstring Help Text
* Cli fix default or none object help text
* Determine RootModel complexity from root type
* Add CLI bool flags
* CLI arg list whitespaces fix.
* Add nested_model_default_partial_update flag and DefaultSettingsSource
* Parse enum fixes.
* Fixes CLI help text for function types
* Add get_subcommand function.
* Cli prefix validation alias fix
* CLI ignore external parser list fix
* Enable multiple secrets dirs
* Add CLI subcommand union and alias support
* Fix dotenv settings source problem in handling extra variables with
same prefix in name
- Drop patch clear-environment.patch, fixed by upstream in a different way.
- Add patch fix-settings-dump.patch:
* Support changes introduced by Pydantic 2.10.
-------------------------------------------------------------------
Mon Oct 28 09:52:17 UTC 2024 - Daniel Garcia <daniel.garcia@suse.com>
- Remove azure BuildRequires
-------------------------------------------------------------------
Thu Sep 12 05:57:59 UTC 2024 - Steve Kowalik <steven.kowalik@suse.com>
- 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.
-------------------------------------------------------------------
Mon Jul 1 17:55:58 UTC 2024 - Dirk Müller <dmueller@suse.com>
- 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
-------------------------------------------------------------------
Wed Mar 27 15:37:56 UTC 2024 - ecsos <ecsos@opensuse.org>
@@ -6,4 +184,4 @@ Wed Mar 27 15:37:56 UTC 2024 - ecsos <ecsos@opensuse.org>
-------------------------------------------------------------------
Mon Mar 11 03:19:14 UTC 2024 - Steve Kowalik <steven.kowalik@suse.com>
- Initial release of 2.2.1
- Initial release of 2.2.1

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-pydantic-settings
#
# Copyright (c) 2024 SUSE LLC
# Copyright (c) 2025 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -16,31 +16,45 @@
#
%global flavor @BUILD_FLAVOR@%{nil}
%if "%{flavor}" == "test"
%define psuffix -test
%bcond_without test
%else
%define psuffix %{nil}
%bcond_with test
%endif
%{?sle15_python_module_pythons}
Name: python-pydantic-settings
Version: 2.2.1
Name: python-pydantic-settings%{psuffix}
Version: 2.10.1
Release: 0
Summary: Settings management using Pydantic
License: MIT
URL: https://github.com/pydantic/pydantic-settings
Source: https://files.pythonhosted.org/packages/source/p/pydantic-settings/pydantic_settings-%{version}.tar.gz
# PATCH-FIX-OPENSUSE Clear the environment before two test cases
Patch0: clear-environment.patch
BuildRequires: %{python_module base >= 3.9}
BuildRequires: %{python_module hatchling}
BuildRequires: %{python_module pip}
BuildRequires: python-rpm-macros
# SECTION test requirements
BuildRequires: %{python_module pydantic >= 2.3.0}
%if %{with test}
BuildRequires: %{python_module azure-identity}
BuildRequires: %{python_module google-auth}
BuildRequires: %{python_module pydantic-settings = %{version}}
BuildRequires: %{python_module pytest-examples}
BuildRequires: %{python_module pytest-mock}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module python-dotenv >= 0.21.0}
%endif
# /SECTION
BuildRequires: fdupes
Requires: python-pydantic >= 2.3.0
Requires: python-pydantic >= 2.7.0
Requires: python-python-dotenv >= 0.21.0
Suggests: python-pyyaml >= 6.0.1
Requires: python-typing-inspection >= 0.4.0
Suggests: python-PyYAML >= 6.0.1
Suggests: python-tomli >= 2.0.1
Suggests: python-google-cloud-secret-manager >= 2.23.1
Suggests: python-azure-keyvault-secrets >= 4.8
Suggests: python-azure-identity
BuildArch: noarch
%python_subpackages
@@ -54,16 +68,24 @@ Settings management using Pydantic, this is the new official home of Pydantic's
%pyproject_wheel
%install
%if !%{with test}
%pyproject_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%endif
%check
%pytest
%if %{with test}
# This test requires azure
skiptest="test_docs_examples[docs/index.md:1847-1890]"
%pytest -k "not ($skiptest)"
%endif
%if !%{with test}
%files %{python_files}
%license LICENSE
%doc README.md
%{python_sitelib}/pydantic_settings
%{python_sitelib}/pydantic_settings-%{version}.dist-info
%endif
%changelog