sqlmodel icon indicating copy to clipboard operation
sqlmodel copied to clipboard

✨ Add support for PEP695 `type` alias syntax

Open stickm4n opened this issue 2 months ago • 5 comments

As a language feature for Python 3.12+ was introduced new type-alias definitions. Reference here

They are not working in sqlmodel hence this PR to support them.

stickm4n avatar Oct 28 '25 23:10 stickm4n

@YuriiMotov could you review this and label it?

stickm4n avatar Oct 28 '25 23:10 stickm4n

I converted it to Draft. Please, mark as ready for review when it's ready :)

YuriiMotov avatar Oct 29 '25 11:10 YuriiMotov

Could you please comment on the implementation of the algorithm? Also, looks like the title and description of PR don't match the changes. We should either split changes into several PRs (probably preferrable) or update title\description

YuriiMotov avatar Oct 30 '25 14:10 YuriiMotov

Could you please comment on the implementation of the algorithm?

Also, looks like the title and description of PR don't match the changes.

We should either split changes into several PRs (probably preferrable) or update title\description

Ok, it's a good idea. I will document the changes referencing all PEPs that are supported with this. When I was implementing it I noticed there were more type definitions that were not covered. I thinks it's all type definitions, which are different from alias by variable assignment.

stickm4n avatar Oct 30 '25 18:10 stickm4n

@svlandeg could you please take a look at this?

stickm4n avatar Oct 30 '25 21:10 stickm4n