Skip to content

Bump pydantic-settings from 2.1.0 to 2.2.0#2927

Closed
dependabot[bot] wants to merge 2 commits into
mainfrom
dependabot/pip/pydantic-settings-2.2.0
Closed

Bump pydantic-settings from 2.1.0 to 2.2.0#2927
dependabot[bot] wants to merge 2 commits into
mainfrom
dependabot/pip/pydantic-settings-2.2.0

Conversation

@dependabot
Copy link
Copy Markdown
Contributor

@dependabot dependabot Bot commented on behalf of github Feb 19, 2024

Bumps pydantic-settings from 2.1.0 to 2.2.0.

Release notes

Sourced from pydantic-settings's releases.

v2.2.0

What's Changed

New Contributors

Full Changelog: pydantic/pydantic-settings@v2.1.0...v2.2.0

Commits
  • 965d1b4 Prepare release 2.2.0 (#232)
  • cde78d8 Update requirements (#233)
  • 15b66df Fix dotenv source extra values parsing provided in dotenv file (#221)
  • 8b92f61 feat: adding json, yaml and toml sources (#211)
  • 0a00678 Improve docs (#225)
  • 40230ab Fix for JSON on optional nested types. (#217)
  • a6f6fa4 Ensure extra='forbid' is enforced in DotEnvSettingsSource when env_prefix is ...
  • cc6dc25 Add support for parsing environment "None" strings to None. (#206)
  • 9c26c1e Fix typo in explode_env_vars() docstring (#207)
  • 2784a70 Allow nested env var source to override nested init source. (#204)
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

@dependabot dependabot Bot added a: dependencies Related to package dependencies and management python Pull requests that update Python code labels Feb 19, 2024
@dependabot dependabot Bot force-pushed the dependabot/pip/pydantic-settings-2.2.0 branch 3 times, most recently from 6338087 to 3828f69 Compare February 19, 2024 12:38
Bumps [pydantic-settings](https://github.com/pydantic/pydantic-settings) from 2.1.0 to 2.2.0.
- [Release notes](https://github.com/pydantic/pydantic-settings/releases)
- [Commits](pydantic/pydantic-settings@v2.1.0...v2.2.0)

---
updated-dependencies:
- dependency-name: pydantic-settings
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot Bot force-pushed the dependabot/pip/pydantic-settings-2.2.0 branch from 3828f69 to 64e0893 Compare February 19, 2024 12:40
@python-discord-policy-bot python-discord-policy-bot Bot requested a review from a team February 19, 2024 13:04
@shtlrs shtlrs force-pushed the dependabot/pip/pydantic-settings-2.2.0 branch from 634c414 to 1c06ffe Compare February 19, 2024 13:08
@shtlrs
Copy link
Copy Markdown
Contributor

shtlrs commented Feb 19, 2024

I've updated the config tests to make sure we can rely on the unit test upon bumping pydantic PRs

@shtlrs shtlrs force-pushed the dependabot/pip/pydantic-settings-2.2.0 branch from 1c06ffe to 68c4219 Compare February 19, 2024 13:11
@dependabot @github
Copy link
Copy Markdown
Contributor Author

dependabot Bot commented on behalf of github Feb 20, 2024

A newer version of pydantic-settings exists, but since this PR has been edited by someone other than Dependabot I haven't updated it. You'll get a PR for the updated version as normal once this PR is merged.

Copy link
Copy Markdown
Contributor

@wookie184 wookie184 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't really understand the purpose of the added changes. What was wrong with the existing test? Why is the change in this PR? Why does whether it's running in CI need to be relevant to the test here?

@shtlrs
Copy link
Copy Markdown
Contributor

shtlrs commented Feb 23, 2024

I don't really understand the purpose of the added changes. What was wrong with the existing test?

The existing test dates back to when where we loaded the config from the yaml file, it's not relevant anymore

sections = (
            cls
            for (name, cls) in inspect.getmembers(constants)
            if hasattr(cls, "section") and isinstance(cls, type)
        )

This evaluates to nothing, so the test isn't doing anything.

Why is the change in this PR?

I figured i'd contextualize testing pydantic settings along with this PR since it bumps that package, and I didn't want to test manually each time so I added it here. It doesn't really matter whether it's here or in a separate PR.

Why does whether it's running in CI need to be relevant to the test here?

Because I wanted to test that pydantic loads variables correctly from the environment, not the env file. And I can't guarantee the value of an env variable on contribs machine if they ever run tests, which will cause a failure when such a variable doesn't exist :)

@wookie184
Copy link
Copy Markdown
Contributor

The existing test dates back to when where we loaded the config from the yaml file, it's not relevant anymore

Makes sense, thanks 👍

Because I wanted to test that pydantic loads variables correctly from the environment, not the env file. And I can't guarantee the value of an env variable on contribs machine if they ever run tests, which will cause a failure when such a variable doesn't exist :)

It's not ideal for a test to behave differently in CI versus locally. Can we use os.environ to set an environment variable in the test? Potentially also patching os.environ could work: https://adamj.eu/tech/2020/10/13/how-to-mock-environment-variables-with-pythons-unittest/.

I figured i'd contextualize testing pydantic settings along with this PR since it bumps that package, and I didn't want to test manually each time so I added it here. It doesn't really matter whether it's here or in a separate PR.

I think in general keeping PRs as atomic as possible is best since it makes them easier to review, keeps discussion in the PR focussed on one thing, and prevents blocking one thing on another. It's fine to leave it here though.

@shtlrs
Copy link
Copy Markdown
Contributor

shtlrs commented Feb 24, 2024

@dependabot recreate

@dependabot @github
Copy link
Copy Markdown
Contributor Author

dependabot Bot commented on behalf of github Feb 24, 2024

Superseded by #2934.

@dependabot dependabot Bot closed this Feb 24, 2024
@dependabot dependabot Bot deleted the dependabot/pip/pydantic-settings-2.2.0 branch February 24, 2024 20:45
@shtlrs
Copy link
Copy Markdown
Contributor

shtlrs commented Feb 24, 2024

@wookie184 I've closed this and Merged a new PR bump.
I'll update the tests in a separate PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

a: dependencies Related to package dependencies and management python Pull requests that update Python code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants