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

Disposition of pytz package #2590

Closed
Hooverdan96 opened this issue Jun 8, 2023 · 4 comments
Closed

Disposition of pytz package #2590

Hooverdan96 opened this issue Jun 8, 2023 · 4 comments

Comments

@Hooverdan96
Copy link
Member

Hooverdan96 commented Jun 8, 2023

Current version: 2022.6 World timezone definitions, modern and historical
Due to ongoing changes of these definitions, this should be either bumped to 2023.3 in the poetry.toml file or, if possible not be required to be pinned anymore.

pytz = "==2022.6"

With Python 3.9 onwards it is recommended to utilize the built-in functionality instead of this package, which will then allow us to get rid of one more dependency definition.

I assume, since this is currently a django dependency, higher versions of django and python in later Rockstor milestones might resolve the need for this dependency, since, according to @phillxnet we are likely not using this anywhere else in our developments.

For reference:
https://pypi.org/project/pytz/2023.3/

@phillxnet
Copy link
Member

phillxnet commented Jun 8, 2023

@Hooverdan96 I might of gone with update - but lets keep the fancy "Disposition" Nice.
Thanks for creating this issue.
I'll see to it soon if it's not Assigned before hand.
Adding to agreed Milestone as per side-channel chat.

I favour it's removal form pyproject initially but will have to have a closer look as to if we actually use this directly.

@phillxnet
Copy link
Member

It is currently proposed that we remove our pytz specification all-together. It looks to be a secondary dependency of Django only currently:
(From a testing Leap 15.4 instance)

buildvm:/opt/rockstor # poetry show --tree
dbus-python 1.2.18 Python bindings for libdbus
distro 1.6.0 Distro - an OS platform information API
django 1.11.29 A high-level Python Web framework that encourages rapid development and clean, pragmatic design.
└── pytz *
django-braces 1.13.0 Reusable, generic mixins for Django
django-oauth-toolkit 1.1.2 OAuth2 Provider for Django
├── django >=1.11
│   └── pytz * 
├── oauthlib >=2.0.3
└── requests >=2.13.0
    ├── certifi >=2017.4.17 
    ├── charset-normalizer >=2.0.0,<2.1.0 
    ├── idna >=2.5,<4 
    └── urllib3 >=1.21.1,<1.27 
django-pipeline 1.6.9 Pipeline is an asset packaging library for Django.
djangorestframework 3.9.3 Web APIs for Django, made easy.
gevent 22.10.2 Coroutine-based network library
├── cffi >=1.12.2
│   └── pycparser * 
├── greenlet >=2.0.0
├── zope.event *
└── zope.interface *
gevent-websocket 0.10.1 Websocket handler for the gevent pywsgi server, a Python network library
└── gevent *
    ├── cffi >=1.12.2 
    │   └── pycparser * 
    ├── greenlet >=2.0.0 
    ├── zope.event * 
    └── zope.interface * 
gunicorn 19.10.0 WSGI HTTP Server for UNIX
huey 2.3.0 huey, a little task queue
oauthlib 3.1.0 A generic, spec-compliant, thorough implementation of the OAuth request-signing logic
psutil 5.9.4 Cross-platform lib for process and system monitoring in Python.
psycogreen 1.0 psycopg2 integration with coroutine libraries
psycopg2 2.8.6 psycopg2 - Python-PostgreSQL Database Adapter
python-engineio 2.3.2 Engine.IO server
└── six >=1.9.0
python-socketio 1.6.0 Socket.IO server
├── python-engineio >=1.0.0
│   └── six >=1.9.0 
└── six >=1.9.0
pytz 2022.6 World timezone definitions, modern and historical
pyzmq 19.0.2 Python bindings for 0MQ
requests 2.27.1 Python HTTP for Humans.
├── certifi >=2017.4.17
├── charset-normalizer >=2.0.0,<2.1.0
├── idna >=2.5,<4
└── urllib3 >=1.21.1,<1.27
six 1.16.0 Python 2 and 3 compatibility utilities
supervisor 4.2.4 A system for controlling process state under UNIX
urlobject 2.1.1 A utility class for manipulating URLs.

This is also in keeping with removing less sensitive (simpler) second order explicit dependency pinning. We have our poetry.lock mechanism still for tracking these changes.

@phillxnet
Copy link
Member

Removing our entry entirely for pytz from pyproject.toml we get the following resolution via poetry:

buildvm:/opt/rockstor # poetry update
Updating dependencies
Resolving dependencies... (6.7s)

Writing lock file

Package operations: 0 installs, 1 update, 0 removals

  • Updating pytz (2022.6 -> 2023.3)

@phillxnet phillxnet changed the title py3.6 Disposition of pytz package Disposition of pytz package Jul 10, 2023
phillxnet added a commit to phillxnet/rockstor-core that referenced this issue Jul 10, 2023
Remove explicit request/versioning for this secondary
Django dependency. Allowing for its update within the
constraints of our specified Django version.
phillxnet added a commit that referenced this issue Jul 10, 2023
@phillxnet
Copy link
Member

@FroggyFlox & @Hooverdan96
Popped the associated pr in as this is a fairly safe update given it's only timezone definitions.
Closing as:
Fixed by #2608

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