Skip to content

Conversation

@james-garner-canonical
Copy link
Contributor

@james-garner-canonical james-garner-canonical commented Jul 2, 2025

This PR updates the fiveg_f1/v0 schema to import conlist from pydantic instead of trying to import it from typing (where it is not available).

I noticed this error when running interface_tester discover.


The discover interfaces job in CI runs Pydantic 1, and the schema uses the Pydantic 2 argument for conlist (2 uses min_length, 1 uses min_items), so this fix causes the CI job to fail.

It seems like a regression to port this to Pydantic 1 (though very easy), but running Pydantic 2 in CI doesn't seem to be an option right now as that would cause other schemas to error.

I guess it passed before because interface_tester logs import errors and exits with success, but exits with failure on type errors, but I haven't looked into it.

@james-garner-canonical james-garner-canonical force-pushed the 25-07/fix/import-conlist-from-pydantic-not-typing branch from ad0c442 to d762dea Compare July 2, 2025 00:14
@dimaqq
Copy link
Contributor

dimaqq commented Aug 7, 2025

TypeError: conlist() got an unexpected keyword argument 'min_length'

@james-garner-canonical
Copy link
Contributor Author

Yeah, noted in PR description. I don't think we should merge this as is. May convert this to an issue instead.

@james-garner-canonical james-garner-canonical marked this pull request as draft August 29, 2025 08:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants