Skip to content

Conversation

@sneakers-the-rat
Copy link
Contributor

Hello! First of all thanks for this, i love it.

Updated to pydantic 2.11 and started seeing some warnings for how accessing model_fields and model_computed_fields from the model instance is deprecated, and one should instead access it from the class. This has been supported in all cases where one can access it from the instance, i believe, so it should be backwards compatible.

Anyway, really appreciate this package, here's me trying to help out with the chores.

@volfpeter volfpeter self-requested a review April 10, 2025 07:36
Copy link
Owner

@volfpeter volfpeter left a comment

Choose a reason for hiding this comment

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

Hi,

It's really nice to get positive feedback :) Thanks! And it's just as nice to get a contribution.

The model_computed_fields check was added in the last version. I should have noticed this warning. Accessing class attributes like this is not good practice anyway, I'm just too used to it and it's very convenient.

Thanks for updating the test as well. It should check that 0 warnings were raised, but I'll fix that in a separate PR, where I'll also prepare the next release.

Thanks again!

@volfpeter volfpeter merged commit 0f1e26c into volfpeter:main Apr 10, 2025
2 checks passed
@volfpeter
Copy link
Owner

Hi again,

I already released this update in version 2.3.2 (https://github.com/volfpeter/fasthx/releases/tag/v2.3.2).

Thanks for your contribution!

@sneakers-the-rat
Copy link
Contributor Author

my pleasure! and my compliments on both the design and execution of this package. fasthx and fastapi-pagination has got to be one of my favorite package synergies i've ever used. makes doing htmx with fastapi very very nice.

@volfpeter
Copy link
Owner

volfpeter commented Apr 10, 2025

Thanks :) I've always rolled my own pagination implementation, but I'll have a look.

(Quick ad for htmy from my end then 😉)

@sneakers-the-rat
Copy link
Contributor Author

sneakers-the-rat commented Apr 10, 2025

Innnnnnnteresting, I will take a look :):)

Oh I love this. I'll give it a try

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