PSLmodels / OG-Core

An overlapping generations model framework for evaluating fiscal policies.
https://pslmodels.github.io/OG-Core/
Creative Commons Zero v1.0 Universal
65 stars 111 forks source link

Update Python version to be <3.12 in setup.py #901

Closed rickecon closed 6 months ago

rickecon commented 6 months ago

This PR updates the Python version requirements in setup.py to be python_requires=">=3.7.7, <3.12". The new addition is the <3.12 piece. This requirement is in environment.yml. However, when OG-Core is pip installed, it uses setup.py and will sometimes install Python 3.12. The PR makes the Python version always be < 3.12.

cc: @jdebacker

codecov-commenter commented 6 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (0866c09) 80.52% compared to head (72ee2bd) 80.52%.

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/PSLmodels/OG-Core/pull/901/graphs/tree.svg?width=650&height=150&src=pr&token=98mQCVhspd&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=PSLmodels)](https://app.codecov.io/gh/PSLmodels/OG-Core/pull/901?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=PSLmodels) ```diff @@ Coverage Diff @@ ## master #901 +/- ## ======================================= Coverage 80.52% 80.52% ======================================= Files 19 19 Lines 4452 4452 ======================================= Hits 3585 3585 Misses 867 867 ``` | [Flag](https://app.codecov.io/gh/PSLmodels/OG-Core/pull/901/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=PSLmodels) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/PSLmodels/OG-Core/pull/901/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=PSLmodels) | `80.52% <100.00%> (ø)` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=PSLmodels#carryforward-flags-in-the-pull-request-comment) to find out more. | [Files](https://app.codecov.io/gh/PSLmodels/OG-Core/pull/901?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=PSLmodels) | Coverage Δ | | |---|---|---| | [ogcore/\_\_init\_\_.py](https://app.codecov.io/gh/PSLmodels/OG-Core/pull/901?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=PSLmodels#diff-b2djb3JlL19faW5pdF9fLnB5) | `100.00% <100.00%> (ø)` | |
rickecon commented 6 months ago

@jdebacker. This PR is ready for review. It is a small change.

jdebacker commented 6 months ago

Thanks for looking at this @rickecon.

This seems like it relates to Issue #889.

Because it maybe helpful going forward (i.e., making sure OG-Core is compatible with 3.12+), can you document in this PR or that issue what were the problems you noticed with the ogcore package in Python 3.12?

rickecon commented 6 months ago

@jdebacker. I never verified that the errors I was getting in OG-USA were coming from Python 3.12. But the principle is that if we are restricting it in the environment.yml file, we need to also restrict it in the setup.py file.

I think we should lift that restriction or move it to <3.13 as soon as possible. But we should only do that with testing.