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

Switch to python 3.11 #472

Merged
merged 22 commits into from
Oct 28, 2024
Merged

Switch to python 3.11 #472

merged 22 commits into from
Oct 28, 2024

Conversation

rajeee
Copy link
Contributor

@rajeee rajeee commented Oct 17, 2024

Pull Request Description

Black stopped supporting python 3.8: psf/black#4452. We can do the same as well, and make BSB use python 3.11 with support for 3.12. This allows us to use features introduced in later python version such as the union operator on dict and fine-grained error location.

Checklist

Not all may apply

  • Code changes (must work)
  • Tests exercising your feature/bug fix (check coverage report on Checks -> BuildStockBatch Tests -> Artifacts)
  • Coverage has increased or at least not decreased. Update minimum_coverage in .github/workflows/coverage.yml as necessary.
  • All other unit and integration tests passing
  • Update validation for project config yaml file changes
  • Update existing documentation
  • Run a small batch run on Kestrel/Eagle to make sure it all works if you made changes that will affect Kestrel/Eagle
  • Add to the changelog_dev.rst file and propose migration text in the pull request

@rajeee rajeee requested a review from nmerket October 18, 2024 00:40
Copy link
Member

@nmerket nmerket left a comment

Choose a reason for hiding this comment

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

Alternatively we could drop support for python 3.8 altogether and add support for 3.12. I'm able to run on 3.12, but it gives some warnings.

@rajeee
Copy link
Contributor Author

rajeee commented Oct 21, 2024

Alternatively we could drop support for python 3.8 altogether and add support for 3.12. I'm able to run on 3.12, but it gives some warnings.

I considered doing that but remembered your reservation about dropping 3.8 because some part of BSB AWS needing to run inside the openstudio container.

@rajeee rajeee requested a review from nmerket October 21, 2024 17:06
Copy link
Member

@nmerket nmerket left a comment

Choose a reason for hiding this comment

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

Any reason why we're dropping support for 3.9 and 3.10? It's officially supported until October 2025 and 2026, respectively.

Should also have a changelog entry.

@rajeee rajeee changed the title Black stopped supporting python3.8 Switch to python 3.11 Oct 24, 2024
Dockerfile Outdated Show resolved Hide resolved
Dockerfile Show resolved Hide resolved
docs/changelog/changelog_dev.rst Outdated Show resolved Hide resolved
setup.py Outdated
python_requires=">=3.8",
python_requires=">=3.11",
Copy link
Member

Choose a reason for hiding this comment

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

Does it work with Python 3.13 yet? Should we make that explicit here?

Copy link
Contributor Author

@rajeee rajeee Oct 28, 2024

Choose a reason for hiding this comment

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

It doesn't. I added that check.

setup.py Outdated Show resolved Hide resolved
Co-authored-by: Noel Merket <noel.merket@nrel.gov>
Dockerfile Outdated Show resolved Hide resolved
Will not work in NREL network/computer.
@rajeee rajeee merged commit 24d6523 into develop Oct 28, 2024
4 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.

2 participants