How to proceed with Python version-specific feature development

Hello guys!

Since Python 3.14, it supports partial cookie. Therefore, I am doing this PR: Fixed #34613 -- Added support for Partitioned cookies by KentaroJay · Pull Request #19603 · django/django · GitHub

However I don’t know whether I should drop support for <= 3.13, or support this new feature only for 3.14, while maintaining support for older versions.

I appreciate it if you could give me any advices! :folded_hands:

1 Like

If this lands in Django 6.0, it needs to support Python 3.12: Django 6.0 release notes - UNDER DEVELOPMENT | Django documentation | Django

As it stands, the PR monkey-patches in support for “partitioned” to SimpleCookie on Python <3.14. I don’t really feel great about Django monkey-patching the standard library, as it may affect other packages using SimpleCookie.

I would be fine with merging the feature to support Python 3.14+ only, though. We could add a system check that errors if the user enables any of the new settings on Python <3.14.

2 Likes

OK, I’ll make sure to keep support Python 3.12
Thanks for the comment!

I agree with you that monkey-patching the std lib is a great idea. However, as @timgraham told me there was similar patch in the past, I don’t think it would be a blocker if I did it.

I retract my comment about monkey patching, since Tim found precedence for another SimpleCookie attribute: Fixed #34613 -- Added support for Partitioned cookies by KentaroJay · Pull Request #19603 · django/django · GitHub

2 Likes