Skip to content

Conversation

@skshetry
Copy link
Contributor

@skshetry skshetry commented Oct 8, 2025

Closes #483.

Comment on lines +41 to +44
types: Optional[List[str]] = None
stages: Optional[List[str]] = None
enrichments: List[EnrichmentConfig] = Field(default_factory=list)
autoload_enrichments: bool = True
Copy link
Contributor Author

@skshetry skshetry Oct 8, 2025

Choose a reason for hiding this comment

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

In pydantic v1, these fields were case-insensitive and converted to lowercase fields.

That is no longer possible (except for environment variables).

return index.exists() and index.is_file()


def _set_location_init_source(init_source: InitSettingsSource):
Copy link
Contributor Author

@skshetry skshetry Oct 8, 2025

Choose a reason for hiding this comment

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

All of the changes here and below is to support passing custom config file, which is no longer possible in pydantic-settings>=2.

Before, we were accessing CONFIG_FILE_NAME from settings instance which can no longer be accessed from the callbacks, so now we use a closure to get access to the filename.

@skshetry skshetry force-pushed the pydantic-v2 branch 2 times, most recently from 793470e to 4a92497 Compare October 8, 2025 13:31
@codecov-commenter
Copy link

codecov-commenter commented Oct 8, 2025

Codecov Report

❌ Patch coverage is 93.75000% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 85.39%. Comparing base (4a1a360) to head (692a963).

Files with missing lines Patch % Lines
gto/config.py 97.05% 1 Missing ⚠️
gto/ext.py 50.00% 1 Missing ⚠️
gto/index.py 90.90% 1 Missing ⚠️
gto/utils.py 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #485      +/-   ##
==========================================
+ Coverage   85.38%   85.39%   +0.01%     
==========================================
  Files          19       18       -1     
  Lines        2121     2102      -19     
==========================================
- Hits         1811     1795      -16     
+ Misses        310      307       -3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@skshetry
Copy link
Contributor Author

skshetry commented Oct 8, 2025

cc @shcheklein for review.

@shcheklein
Copy link
Member

@skshetry thanks!

are there any API breaking changes here? (besides your comments - I will take a look)

@skshetry
Copy link
Contributor Author

skshetry commented Oct 8, 2025

are there any API breaking changes here? (besides your comments - I will take a look)

I don't think so (besides one small change where Config().enrichments was renamed to Config().enrichments_ which I am not sure if it's part of a public API).

There may be some APIs from pydantic that may have changed (eg: dict() to model_dump()), so their usages may have to be changed wherever they are being consumed.

You could try running this in Studio and see if it passes. Other than that, it's hard to tell, I'm depending on the tests for this. I have also run tests from DVC and it passes.

@shcheklein
Copy link
Member

Okay, let's go forward release and check on the Studio side on the next update. Thanks @skshetry !

@shcheklein shcheklein merged commit 53121d6 into iterative:main Oct 8, 2025
16 checks passed
@skshetry skshetry deleted the pydantic-v2 branch October 8, 2025 17:12
@skshetry skshetry added this to DVC Oct 12, 2025
@skshetry skshetry moved this to Review In Progress in DVC Oct 12, 2025
@skshetry skshetry moved this from Review In Progress to Done in DVC Oct 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

gto does not work in 3.14

3 participants