Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for python 3.12 #1390

Merged
merged 1 commit into from
Dec 3, 2023
Merged

Add support for python 3.12 #1390

merged 1 commit into from
Dec 3, 2023

Conversation

branchvincent
Copy link
Contributor

@branchvincent branchvincent commented Nov 26, 2023

Adds explicit support for Python 3.12. These are the minimal changes I needed for pytest to pass on 3.12 and macOS:

depends on #1393

@iainelder
Copy link
Contributor

Hi, @branchvincent . The contribution is timely because we are in the middle of dropping support for Python 3.7 (#1381). I would wait for that work to complete before merging this.

Dropping Python 3.7 requires changes in 4 different repos. I think the same will be true to add Python 3.12.

Your changes make a good start. I think to complete the work we also need to address these repos:

@iainelder
Copy link
Contributor

@branchvincent I read Homebrew/homebrew-core#155493. I'm unfamiliar with Homebrew. Why does it need Sceptre to support 3.12?

@zaro0508
Copy link
Contributor

zaro0508 commented Nov 28, 2023

thanks @branchvincent. This depends on PR #1393

@branchvincent
Copy link
Contributor Author

@iainelder glad it's good timing :)

Your changes make a good start. I think to complete the work we also need to address these repos:

I tested both https://github.com/Sceptre/sceptre-resolver-cmd and https://github.com/Sceptre/sceptre-file-resolver on 3.12 and had no issues (beyond outdated requirements.txt files, but those don't impact the published package). Btw, I noticed this repo switch to using poetry, would you be interested in PRs switching those repos as well?

Why does it need Sceptre to support 3.12?

We're a rolling-release package manager, so we do our best to always stay on the latest stable version of packages (including python, go, rust, etc)

Copy link

dpulls bot commented Nov 29, 2023

🎉 All dependencies have been resolved !

@iainelder
Copy link
Contributor

I noticed this repo switch to using poetry, would you be interested in PRs switching those repos as well?

Makes sense to me. @zaro0508 , is there a reason not to use Poetry for those resolvers?

@zaro0508
Copy link
Contributor

zaro0508 commented Dec 1, 2023

is there a reason not to use Poetry for those resolvers?

No @iainelder, we would love to see that happen. Someone just needs to do it 😄

Copy link

dpulls bot commented Dec 1, 2023

🎉 All dependencies have been resolved !

@branchvincent
Copy link
Contributor Author

we would love to see that happen

Created Sceptre/sceptre-file-resolver#12 and Sceptre/sceptre-resolver-cmd#13. Left as draft because it needs this PR for python 3.12 support

Also, note I reworked the CircleCI config to not depend on the custom docker image (wasn't sure if that had a specific purpose) and instead use the official cimg/python image and their official python orb (which provides poetry caching out of the box). The tests now run in parallel on each supported python version

Copy link

dpulls bot commented Dec 2, 2023

🎉 All dependencies have been resolved !

@zaro0508
Copy link
Contributor

zaro0508 commented Dec 3, 2023

@branchvincent would you mind resolving the conflicts on this PR?

@branchvincent
Copy link
Contributor Author

@zaro0508 done

@zaro0508
Copy link
Contributor

zaro0508 commented Dec 3, 2023

thanks @branchvincent

@zaro0508 zaro0508 merged commit 4361e7d into Sceptre:master Dec 3, 2023
9 checks passed
@branchvincent branchvincent deleted the py312 branch December 3, 2023 01:32
@iainelder
Copy link
Contributor

Also, note I reworked the CircleCI config to not depend on the custom docker image (wasn't sure if that had a specific purpose)

@zaro0508 and I have been flip-flopping on whether we need the custom image or not. (Yes: #1393; No: #1394). I noticed that the img/python:3.12 contains versions python3.10 and python3.12 but not the rest. So the reason for the custom image would be to install the missing versions (see Sceptre/sceptre-circleci#19 to update the Dockerfile for Python 3.12)

and instead use the official cimg/python image and their official python orb (which provides poetry caching out of the box). The tests now run in parallel on each supported python version

@branchvincent , I don't see that in the changes files of this PR. Can you show me where you made these changes?

To drop the custom image, this orb thing sounds like the part we need, and a more idiomatic use of CircleCI.

Is it fair to say that a CircleCI orb is like a GitHub Actions action? (I use GitHub Actions a lot, and this project is my first exposure to CircleCI.)

@iainelder
Copy link
Contributor

I reworked the CircleCI config to not depend on the custom docker image

I don't see that in the changes files of this PR

I see you mean you changed the CircleCI config in the resolver repos:

That's great! If it works then it would be good to copy the changes to this repo's CircleCI config too.

@branchvincent
Copy link
Contributor Author

Is it fair to say that a CircleCI orb is like a GitHub Actions action?

Yes exactly that's my understanding!

I just created #1395 to copy those CI changes here

@iainelder iainelder mentioned this pull request Dec 12, 2023
4 tasks
zaro0508 added a commit to zaro0508/sceptre that referenced this pull request Jan 12, 2024
Prep for a release to support python 3.12

Updates to our plugins[1] depend on a Sceptre core release with
support for python 3.12 [2]

[1] Sceptre/sceptre-file-resolver#12 (comment)
[2] Sceptre#1390
zaro0508 added a commit that referenced this pull request Jan 12, 2024
Prep for a release to support python 3.12

Updates to our plugins[1] depend on a Sceptre core release with
support for python 3.12 [2]

[1] Sceptre/sceptre-file-resolver#12 (comment)
[2] #1390
zaro0508 pushed a commit to Sceptre/sceptre-resolver-cmd that referenced this pull request Jan 18, 2024
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