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

Ansible configuration for web APIs services uses a Python version behind OpenFisca reference version #125

Open
sandcha opened this issue Sep 20, 2023 · 1 comment
Assignees

Comments

@sandcha
Copy link
Contributor

sandcha commented Sep 20, 2023

The ansible configuration installs Python 3.7 for the web API services (demo and France) while openfisca-core now needs Python 3.9+.

Should we update to Python 3.9 or a newer revision?
openfisca-core library is compatible with Python 3.9, 3.10 and 3.11. So we have multiple options:
1️⃣ Use Python 3.9 on our server to check if the web API is still working as expected for users with older systems.
2️⃣ Use Python 3.10.6 as it's the current Python version used to test the library in the CI (the CI can use multiple versions so, we can choose to set our server default Python revision to the latest Python used in the CI).
3️⃣ Use Python 3.11 on our server to check that the web API works as expected in production with the latest Python version supported by openfisca-core.

Can we keep Python 3.7 for some time on our server?
No. openfisca-core now needs numpy >=1.24.2, <1.25 and numpy 1.24 documentation says: "This release supports Python versions 3.8-3.11.". So, using the web API with Python 3.7 might raise some issues with the /calculate endpoint.

So, we move to Python 3.9/3.10 or 3.11 in ansible configuration and that's it?
We detected performance issues when we updated the Python version to 3.9+. Some fixes have been merged like openfisca/openfisca-core#1188 and openfisca/openfisca-core#1189 but we might need to check the response time of the demo/fr web API on the server.

@sandcha sandcha self-assigned this Sep 20, 2023
@MattiSG
Copy link
Member

MattiSG commented Sep 26, 2023

Thanks @sandcha for this clear recap!

I am clearly in favour of 3️⃣ and upgrading to the latest supported version of Python, in order to minimise maintenance on the infrastructure for later upgrades.

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

No branches or pull requests

2 participants