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

Replace pytz with zoneinfo #208

Open
hackdna opened this issue Oct 18, 2023 · 5 comments
Open

Replace pytz with zoneinfo #208

hackdna opened this issue Oct 18, 2023 · 5 comments
Labels
technical debt Cruft and maintenance issues

Comments

@hackdna
Copy link
Member

hackdna commented Oct 18, 2023

The zoneinfo module provides a concrete time zone implementation to support the IANA time zone database as originally specified in PEP 615.

Note that this requires upgrading Python to 3.9+ or using backports.zoneinfo: https://pypi.org/project/backports.zoneinfo/

Additional info:

@hackdna hackdna added the technical debt Cruft and maintenance issues label Oct 18, 2023
@biblicabeebli
Copy link
Member

I use dateutil over in beiwe-backend, dropped pytz due to bugs and haven't had an issue with it at all.

@hackdna
Copy link
Member Author

hackdna commented Nov 1, 2023

One benefit of zoneinfo is that it's part of the standard library.

@biblicabeebli
Copy link
Member

Actually you need to stay on 3.8 for now. Python version compatability needs to be the same as the beiwe backend.

3.8 is about a year out from end of life so I will be upgrading, probably to 3.11, for the beiwe backend's server stacks in the next year.

I need to update the Celery backend and server platforms substantially for the task queue/dispatch, and will take a look at divorcing the python version for forest so you don't have this constraint anymore and so users have more control when dispatching forest tasks from the beiwe website. Current environment is Ubuntu 18.04 running Python 3.8.x installed via Pyenv.

@hackdna
Copy link
Member Author

hackdna commented Nov 1, 2023

Yes, I am aware we have to stick with 3.8. It would be great to use a more recent version of Python to be able to take advantage of the new features and performance improvements.

Is Celery a blocker for Python upgrade? Also, any particular reason to still use Ubuntu 18.04? If we could use a recent version of Python for both Beiwe and Forest then no need to install two separate versions.

@biblicabeebli
Copy link
Member

Celery's not the blocker, its just out of date and the upgrade to celery 5 is more than drop-in.

"The blocker" is that I have to ... update the AWS platform, document/directions for anyone running 3.8 to upgrade in-place to 3.11 on elastic beanstalk, upgrade the spinup from zero script, rev 18.04 -> 22.04 (unless 24.04 is out and an LTS by then?) along with concurrently swapping RabbitMQ (causes headaches and configuration management changed substantially after 18.04) to Redis and upgrade Celery because everything listed is related to it.

🫠

Technical debt.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
technical debt Cruft and maintenance issues
Projects
None yet
Development

No branches or pull requests

2 participants