Skip to content

Conversation

@amas0
Copy link
Collaborator

@amas0 amas0 commented Nov 3, 2025

Submission Checklist

  • Run unit tests
  • Declare copyright holder and open-source license: see below

Summary

Drops support for Python 3.9, which transitioned to end-of-life 1 Nov 2025.

@WardBrian, I have a style question for this.

3.10 introduces | syntax for Union so we could make the following changes in the library Union[A, B] -> A | B and Optional[A] -> A | None.

I prefer the newer style, I find it cleaner and you need fewer typing imports. If you're amenable to it, I'd like to go through the library and update our use of Union and Optional to the new syntax. Let me know what you think.

Copyright and Licensing

Please list the copyright holder for the work you are submitting (this will be you or your assignee, such as a university or company): myself

By submitting this pull request, the copyright holder is agreeing to license the submitted work under the following licenses:

@WardBrian
Copy link
Member

I prefer the newer style, I find it cleaner and you need fewer typing imports. If you're amenable to it, I'd like to go through the library and update our use of Union and Optional to the new syntax.

I'm also in favor.

I think 3.10 as a minimum means we could also use match statements now.

My only concern is that I think 3.9 was the default version for a lot of OSes etc once they finally moved off 2.7/3.6. Hopefully people are using environments, but who knows. On the other hand, we did just have a release that still did support 3.9, so probably by the time we release 2.0 it will all shake out alright

@ahartikainen
Copy link
Contributor

I would recommend dropping the support. The current version will work long enough if there are 3.9 users still left.

@amas0
Copy link
Collaborator Author

amas0 commented Nov 4, 2025

Yeah, I think my position is "if your system is using formally end-of-life software, than our responsibility does not go beyond pointing out that there are older versions of this package that did support those older versions".

I'll go ahead and propagate the new syntax throughout before marking this ready.

@WardBrian
Copy link
Member

Looks like this needs a rebase

3.10+ also lets us solve #788 (comment) more nicely

@amas0 amas0 marked this pull request as ready for review November 5, 2025 16:20
@amas0 amas0 requested a review from WardBrian November 5, 2025 16:21
Copy link
Member

@WardBrian WardBrian left a comment

Choose a reason for hiding this comment

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

Thanks!

@WardBrian WardBrian merged commit 58ce09e into stan-dev:develop Nov 5, 2025
16 checks passed
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.

3 participants