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

feat: add support for python 3.11 #771

Merged
merged 8 commits into from Aug 2, 2023
Merged

feat: add support for python 3.11 #771

merged 8 commits into from Aug 2, 2023

Conversation

Nischay-Pro
Copy link
Contributor

@Nischay-Pro Nischay-Pro commented Jul 25, 2023

Description

This PR updates the Makefile to add support for Python 3.11. Currently, pip-tools < 7.0 is not supported on Python 3.11+.

Configuring a minimum requirement to install pip-tools >= 7.0 provides allows the setup to support 3.11.

Related Items

Partially related to #748


  • I agree to contribute to the project under Apache 2 License.
  • To the best of my knowledge, the proposed patch is not based on code under GPL or other license that is incompatible with FlexMeasures

Signed-off-by: Nischay Ram Mamidi <NischayPro@gmail.com>
@Nischay-Pro Nischay-Pro changed the title add support for python 3.11 feat: add support for python 3.11 Jul 25, 2023
Copy link
Contributor

@nhoening nhoening left a comment

Choose a reason for hiding this comment

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

A change in app.in can be accompanied by an update in app.txt, probably.
Of course, we're unsure if 3.8 can use numpy 1.26 ...

requirements/app.in Outdated Show resolved Hide resolved
@Nischay-Pro
Copy link
Contributor Author

A change in app.in can be accompanied by an update in app.txt, probably. Of course, we're unsure if 3.8 can use numpy 1.26 ...

Yeah. I think we can push to 1.24.0 instead of 1.25. Since, 1.25 is not supported for Python 3.8

@nhoening nhoening marked this pull request as ready for review July 31, 2023 11:51
Copy link
Contributor

@nhoening nhoening left a comment

Choose a reason for hiding this comment

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

Please also officially document the 3.11 support in setup.py (that's largely a copy/paste action)

requirements/app.in Outdated Show resolved Hide resolved
Signed-off-by: Nischay Ram Mamidi <NischayPro@gmail.com>
Signed-off-by: Nischay Ram Mamidi <NischayPro@gmail.com>
requirements/app.in Outdated Show resolved Hide resolved
Signed-off-by: Nischay Ram Mamidi <NischayPro@gmail.com>
@Nischay-Pro
Copy link
Contributor Author

Ran pytest manually with all tests passing on Python 3.11

Results (119.74s (0:01:59)):
     441 passed
       1 skipped

@nhoening
Copy link
Contributor

nhoening commented Aug 1, 2023

A change in app.in can be accompanied by an update in app.txt, probably. Of course, we're unsure if 3.8 can use numpy 1.26 ...

Yeah. I think we can push to 1.24.0 instead of 1.25. Since, 1.25 is not supported for Python 3.8

I guess we could defer dealing with the .txt cases in #776 as much as possible.

But can you tell me the steps you did in the Docker container to install requirements under 3.11?
Because as far as I understood, the higher numpy version is needed in 3.11 right? Then we need to reflect that in requirements/app.txt

Let's say we include the app.txt update (for numpy using 1.24) in this PR.
I would then like to know if 3.8 will still run.

@Nischay-Pro
Copy link
Contributor Author

For the docker container, I just checked if the Python version being installed was Python 3.11. From there I just ran pytests in the container using make test and it installed the dependencies and ran pytest.

The make file as modified would ensure that 3.11 dependencies are installed. Currently, the numpy version did not require a bump as the dependencies are working as expected. If we bump numpy to a version > 1.24 we will lose support for Python 3.8 I just raised the maximum supported numpy version to be under 1.25 since 1.24 is the last supported numpy version supporting Python 3.8

@nhoening
Copy link
Contributor

nhoening commented Aug 1, 2023

Okay so if we don't need a bump in numpy then all dependencies in .txt are okay right now for 3.11. Thanks.

Signed-off-by: Nicolas Höning <nicolas@seita.nl>
@nhoening nhoening merged commit 383e7fd into main Aug 2, 2023
3 of 4 checks passed
@nhoening nhoening deleted the 763-requirements branch August 2, 2023 08:59
@Flix6x Flix6x added this to the 0.15.0 milestone Aug 3, 2023
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.

None yet

3 participants