Poetry

Posted on February 7, 2023

Poetry

One of things I dread about in software development is package management and versioning. And by this I don’t mean maintaining my own but rather the packages/sotfware I depend on. Today at the work I had to downgrade Poetry1. It so happened that the poetry.lock was generated using an older version which wasn’t compatible with the newer version of poetry.

This is the part that is most frustrating, trying to downgrade the package/software. A pip install didn’t quite cut it for me here. And even after installing and setting the path it was still using the new version of poetry. And in the mac world somehow everything is kind of complicated. brew install go into /opt/ and pip installs go into /.local/ and poetry install went into a different path that was specified on the official site. I didn’t spend time trying to find how the order of the path was being resolved. After little bit of searching on the interweb I learned that poetry has this nice command that lets you upgrade/downgrade. The command

poetry self update <version>

let’s you updgrade/downgrade to any released version of poetry. This pretty much made my day! I don’t know why none of the package manager’s have ever thought of this. It makes so much sense because as much everyone likes to be on the latest and greatest it is not always that simple to update to the latest and greatest.

This small feature has pretty much convinced me to poetry for my python projects going forward.

This is one of the features that improves QOL2 to a great degree. Huge kudos to the developers of poetry for this one feature alone. I really hope going forward all the package managers have this feature.


  1. Poetry is a package manager for python akin to pip.↩︎

  2. Quality Of Life↩︎