Upgrading pydantic-settings 0.2 to 1
Unknown0.2.5 → 1.99
UnknownUpgrade verdict
DepDelta hasn't looked for this range's notes in its newest sources yet, so breaking changes can't be ruled out.
In plain terms
- DepDelta hasn't finished looking for the notes in this range, so it can't rule out breaking changes yet.
- DepDelta found no commit log for them either.
Must act Unknown for releases without notes
Releases without notes may still need changes. Check their commits before upgrading.
Python requirement changed in 1.99: >=3.6,<4.0 → >=3.7.
Adds python-dotenv >=0.21.0.
Drops attrs, class-doc, pyyaml, tomlkit, typing-extensions.
Installs 5 packages in all (was 7).
API changes
Generated by DepDelta from published Python source. Not mixed with prose notes.
- removed:
export BaseSettingsModel - removed:
export LoadingError - removed:
export LoadingParseError - removed:
export LoadingValidationError - removed:
export TextLocation - removed:
export load_settings - removed:
export with_attrs_docs - added:
export BaseSettings - added:
export DotEnvSettingsSource - added:
export EnvSettingsSource - added:
export InitSettingsSource - added:
export PydanticBaseSettingsSource - added:
export SecretsSettingsSource - added:
variable __version__
- removed:
function apply_attributes_docs(model: Type[AnyPydanticModel], *, override_existing: bool=…) - removed:
function with_attrs_docs(model_cls: Optional[AnyPydanticModel]=…, *, override_existed: bool=…)
- removed:
class BaseSettingsModel(BaseModel) - removed:
class BaseSettingsModel.Config - removed:
field BaseSettingsModel.Config.build_attr_docs: bool - removed:
field BaseSettingsModel.Config.complex_inline_values_decoder - removed:
field BaseSettingsModel.Config.env_case_sensitive: bool - removed:
field BaseSettingsModel.Config.env_prefix: str - removed:
field BaseSettingsModel.Config.override_exited_attrs_docs: bool - removed:
field BaseSettingsModel.shape_restorer: ClassVar[ModelShapeRestorer] - removed:
static method BaseSettingsModel.from_env(environ: Mapping[str, str], *, ignore_restore_errs: bool=…, **vals: Any) -> T - removed:
variable T
- removed:
class DecoderMeta - removed:
class DecoderMissingRequirementError(DecoderNotFoundError) - removed:
class DecoderNotFoundError(TypeError) - removed:
export ListExpectError - removed:
export LocationLookupError - removed:
export MappingExpectError - removed:
export ParsingError - removed:
export TextValues - removed:
field DecoderMeta.name: str - removed:
field DecoderMeta.values_loader: Callable[[Union[str, TextIO]], TextValues] - removed:
function get_decoder(decoder_type: str) -> DecoderMeta
- removed:
class ListExpectError(LocationLookupError) - removed:
class LocationLookupError(ValueError) - removed:
class MappingExpectError(LocationLookupError) - removed:
class ParsingError(ValueError) - removed:
class TextValues(Dict[str, Json]) - removed:
constructor ParsingError(cause: Exception, text_location: TextLocation=…) - removed:
constructor TextValues(finder: SourceLocProvider[TextLocation], **values: Json) - removed:
field LocationLookupError.key: ModelLoc - removed:
field LocationLookupError.part_pos: int - removed:
method TextValues.get_location(val_loc: ModelLoc) -> TextLocation
- removed:
class ASTDecoder(json.JSONDecoder) - removed:
class ASTItem - removed:
constructor ASTDecoder() - removed:
field ASTItem.location: TextLocation - removed:
field ASTItem.value: AstJsonLike - removed:
function decode_document(content: Union[str, TextIO]) -> TextValues - removed:
method ASTItem.get_json_value() -> Json - removed:
static method ASTItem.create(line: int, col: int, end_line: int, end_col: int, val: AstJsonLike, pos: int=…, end_pos: int=…) -> ASTItem - removed:
variable AstJsonLike - removed:
variable load - removed:
variable loads
- removed:
function decode_document(content: Union[str, TextIO], *, loader_cls=…) -> TextValues
- removed:
class ExtendedErrorWrapper(ErrorWrapper) - removed:
class LoadingError(ValueError) - removed:
class LoadingParseError(LoadingError) - removed:
class LoadingValidationError(LoadingError, ValidationError) - removed:
constructor ExtendedErrorWrapper(exc: Exception, loc: ModelLoc, source_loc: AnySourceLoc=…) - removed:
constructor LoadingError(file_path: Optional[Path], cause: Exception=…, msg: str=…) - removed:
constructor LoadingParseError(*args: Any, decoder: DecoderMeta=…, location: TextLocation=…, **kwargs) - removed:
constructor LoadingValidationError(raw_errors: Sequence[ErrorWrapper], model: Type[BaseModel], file_path: Optional[Path]) - removed:
field ExtendedErrorWrapper.source_loc: AnySourceLoc - removed:
field LoadingError.cause: Optional[Exception] - removed:
field LoadingError.file_path: Optional[Path] - removed:
field LoadingError.msg: Optional[str] - removed:
function render_validation_error(error: LoadingValidationError) -> str - removed:
function serialize_errors(err: ValidationError, config: Type[BaseConfig]) -> List[Json] - removed:
function with_errs_locations(model: Type[BaseModel], validation_err: ValidationError, values_source: AnySourceLocProvider) -> ValidationError - removed:
method LoadingError.render_error() -> str - removed:
method LoadingParseError.render_error() -> str - removed:
method LoadingValidationError.errors() -> List[Dict[str, Any]] - removed:
method LoadingValidationError.render_error() -> str
- removed:
function load_settings(cls: Type[SettingsM], any_content: Union[None, TextIO, str, Path]=…, *, type_hint: str=…, load_env: bool=…, env_prefix: str=…, environ: Mapping[str, str]=…, _content_reader: Callable[[Path], str]=…) -> SettingsM - removed:
variable SettingsM
- added:
class BaseSettings(BaseModel) - added:
class SettingsConfigDict(ConfigDict) - added:
constructor BaseSettings(_env_file: Optional[DotenvType]=…, _env_file_encoding: Optional[str]=…, _env_nested_delimiter: Optional[str]=…, _secrets_dir: Optional[Union[str, Path]]=…, **values: Any) -> None - added:
field BaseSettings.model_config - added:
field SettingsConfigDict.case_sensitive: bool - added:
field SettingsConfigDict.env_file: Optional[DotenvType] - added:
field SettingsConfigDict.env_file_encoding: Optional[str] - added:
field SettingsConfigDict.env_nested_delimiter: Optional[str] - added:
field SettingsConfigDict.env_prefix: str - added:
field SettingsConfigDict.secrets_dir: Optional[Union[str, Path]] - added:
static method BaseSettings.settings_customise_sources(settings_cls: Type[BaseSettings], init_settings: PydanticBaseSettingsSource, env_settings: PydanticBaseSettingsSource, dotenv_settings: PydanticBaseSettingsSource, file_secret_settings: PydanticBaseSettingsSource) -> Tuple[PydanticBaseSettingsSource, ...] - added:
variable env_file_sentinel: DotenvType
- removed:
class AssignBeyondSimpleValueError(InvalidAssignError) - removed:
class CannotParseValueError(InvalidAssignError) - removed:
class FlatMapValues(Dict[str, Json]) - removed:
class InvalidAssignError(ValueError) - removed:
class ModelShapeRestorer(object) - removed:
constructor FlatMapValues(restored_env_values: Dict[ModelLoc, str], restored_text_values: Dict[str, Union[TextValues, Dict]], **values: Json) - removed:
constructor InvalidAssignError(loc: Optional[Sequence[str]], key: str) - removed:
constructor ModelShapeRestorer(model: AnyModelType, prefix: str, case_sensitive: bool, dead_end_value_resolver: Callable[[str], TextValues]) - removed:
method FlatMapValues.get_location(val_loc: ModelLoc) -> FlatMapLoc - removed:
method ModelShapeRestorer.restore(flat_map: Mapping[str, str]) -> Tuple[FlatMapValues, Optional[Sequence[InvalidAssignError]]] - removed:
property ModelShapeRestorer.prefix -> str
- added:
class DotEnvSettingsSource(EnvSettingsSource) - added:
class EnvSettingsSource(PydanticBaseEnvSettingsSource) - added:
class InitSettingsSource(PydanticBaseSettingsSource) - added:
class PydanticBaseEnvSettingsSource(PydanticBaseSettingsSource) - added:
class PydanticBaseSettingsSource(ABC) - added:
class SecretsSettingsSource(PydanticBaseEnvSettingsSource) - added:
class SettingsError(ValueError) - added:
constructor DotEnvSettingsSource(settings_cls: Type[BaseSettings], env_file: Optional[DotenvType], env_file_encoding: Optional[str], env_nested_delimiter: Optional[str]=…, env_prefix_len: int=…) - added:
constructor EnvSettingsSource(settings_cls: Type[BaseSettings], env_nested_delimiter: Optional[str]=…, env_prefix_len: int=…) - added:
constructor InitSettingsSource(settings_cls: Type[BaseSettings], init_kwargs: Dict[str, Any]) - added:
constructor PydanticBaseSettingsSource(settings_cls: Type[BaseSettings]) - added:
constructor SecretsSettingsSource(settings_cls: Type[BaseSettings], secrets_dir: Optional[Union[str, Path]]) - added:
function find_case_path(dir_path: Path, file_name: str, case_sensitive: bool) -> Optional[Path] - added:
function read_env_file(file_path: Path, *, encoding: str=…, case_sensitive: bool=…) -> Dict[str, Optional[str]] - added:
method EnvSettingsSource.explode_env_vars(field_name: str, field: FieldInfo, env_vars: Mapping[str, Optional[str]]) -> Dict[str, Any] - added:
method EnvSettingsSource.get_field_value(field: FieldInfo, field_name: str) -> Tuple[Any, str, bool] - added:
method EnvSettingsSource.prepare_field_value(field_name: str, field: FieldInfo, value: Any, value_is_complex: bool) -> Any - added:
method InitSettingsSource.get_field_value(field: FieldInfo, field_name: str) -> Tuple[Any, str, bool] - added:
method PydanticBaseSettingsSource.field_is_complex(field: FieldInfo) -> bool - added:
method PydanticBaseSettingsSource.get_field_value(field: FieldInfo, field_name: str) -> Tuple[Any, str, bool] - added:
method PydanticBaseSettingsSource.prepare_field_value(field_name: str, field: FieldInfo, value: Any, value_is_complex: bool) -> Any - added:
method SecretsSettingsSource.get_field_value(field: FieldInfo, field_name: str) -> Tuple[Any, str, bool] - added:
static method SecretsSettingsSource.find_case_path(dir_path: Path, file_name: str, case_sensitive: bool) -> Optional[Path] - added:
variable DotenvType
- removed:
class AttrsProtocol(Protocol) - removed:
class DataclassProtocol(Protocol) - removed:
class PydanticDataclass(DataclassProtocol, Protocol) - removed:
class SourceLocProvider(Protocol[SourceLocT]) - removed:
class TextLocation - removed:
field TextLocation.col: int - removed:
field TextLocation.end_col: int - removed:
field TextLocation.end_line: int - removed:
field TextLocation.end_pos: int - removed:
field TextLocation.line: int - removed:
field TextLocation.pos: int - removed:
function is_pydantic_dataclass(cls: Type) -> bool - removed:
method SourceLocProvider.get_location(val_loc: ModelLoc) -> SourceLocT - removed:
variable AnyModelType - removed:
variable AnyPydanticModel - removed:
variable AnySourceLoc - removed:
variable AnySourceLocProvider - removed:
variable FlatMapLoc - removed:
variable Json - removed:
variable JsonDict - removed:
variable JsonList - removed:
variable ModelLoc - removed:
variable SourceLocT
- removed:
function deep_merge_mappings(first_map: Mapping[str, Json], second_map: Mapping[str, Json]) -> Dict[str, Json] - removed:
function get_generic_info(t: Type) -> Tuple[Type, Tuple[Type, ...]] - removed:
function get_union_subtypes(t: Type) -> Tuple[Type, ...] - added:
function path_type_label(p: Path) -> str - added:
variable path_type_labels
- added:
variable VERSION