Coder Social home page Coder Social logo

Relax pytz requirement? about utt HOT 10 CLOSED

larose avatar larose commented on May 23, 2024
Relax pytz requirement?

from utt.

Comments (10)

larose avatar larose commented on May 23, 2024 1

poetry.lock needs to be updated for sure. I'll take a deeper look at it this weekend.

from utt.

larose avatar larose commented on May 23, 2024

Absolutely, do you want to create a PR?

from utt.

privong avatar privong commented on May 23, 2024

Sure, I can do that.

Was there a specific reason for tying pytz to the 2019.3 version or was that just the most recent version available when the project was migrated to Poetry? I'm wondering if it needs to be "2019.3 or a more recent version" or if any version of pytz is effectively acceptable. At quick glance I don't see anything in the code that obviously requires a specific version.

from utt.

larose avatar larose commented on May 23, 2024

There was no reason except it was the most recent version available at the time.

I think any versions of pytz would work. But I usually prefer to pin dependencies to a specific version, so what is tested in the CI is exactly what is used by the users, so there are no surprises.

However, I don't think python handles having multiple versions of the same package. So if another package installed on a utt user's machine requires a specific version for pytz that is different than the one required by utt, I think either utt or the other package won't be installable. So we want to specify a min version only on pytz (or any other dependencies), instead of a specific version.

How did you notice the issue on your machine? Did utt stop working, or worked but with a warning?

from utt.

privong avatar privong commented on May 23, 2024

utt continues to work fine, but I haven't been able to update utt past v1.22 (because I have pytz installed via an OS package and pytz was upgraded to 2020.1 in early May).

I can install utt in my home directory, and have been able to install the latest there (by having a home directory install of pytz) but I prefer to avoid having several sets of the same python packages installed, for my own sanity :)

I don't know how often other distros update their pytz packages. Arch tends to be pretty bleeding edge. So I could imagine pinning utt's dependency to 2020.1 might inadvertently cause headaches for other users whose distros may not have updated the package yet. So specifying a minimum version of 2019.3 may be the best way to go (since no one has otherwise opened an Issue about having an even older version of pytz).

I haven't personally done much with pytz, but my impression is that new releases are TZ database upgrades and don't have API changes. So specifying a minimum version might be low-risk.

from utt.

larose avatar larose commented on May 23, 2024

Perfect, thanks.

So specifying a minimum version of 2019.3 may be the best way to go

Sounds good 👍

from utt.

privong avatar privong commented on May 23, 2024

Testing now, aiming to do a PR later today

from utt.

privong avatar privong commented on May 23, 2024

The poetry dependency management seemingly complicates this a bit. Changing the pytz version spec in the pyproject.toml file means it's out of sync with the poetry.lock file. So I need to run poetry update, which seems to result in changes most of the dependencies (since the newest available versions are different from what was committed).

This is my first experience with poetry, so I'm not sure what's essential, best practice, etc.

I think I can commit just the pytz version change into pyproject.toml file and leave the poetry.lock file (since the latter is mainly used for coordinating deps among devs?). Is my line of thinking correct on that?

from utt.

larose avatar larose commented on May 23, 2024

This has been fixed in 1.27 (PR: #85).

I updated pyproject.toml and then ran poetry update pytz.

from utt.

privong avatar privong commented on May 23, 2024

Great. Thanks @larose!

from utt.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.