EnterpriseDB / barman

Barman - Backup and Recovery Manager for PostgreSQL
https://www.pgbarman.org/
GNU General Public License v3.0
2.07k stars 191 forks source link

Require cramjam lib to be >= 2.7.0 #958

Closed gcalacoci closed 2 months ago

gcalacoci commented 3 months ago

The library python-snappy internally uses the library cramjam from versions > 0.6.1. This doesn't work well with versions of cramjam < 2.7.0 as the structure of the code is different than the one used by python-snappy.

References: bar-156

gcalacoci commented 3 months ago

Changes look good.

I would extend a bit the commit message with a note explaining that cramjan >= 2.7.0 is not available for Python 3.6, so we need to pin python-snappy to an older version (0.6.1) in that case, to avoid the broken relationship of newer snappy with older cramjan

I'll rework the commit message. re-reading it doesn't seem clear as it was during the writing

gcalacoci commented 2 months ago

Changes look good. I would extend a bit the commit message with a note explaining that cramjan >= 2.7.0 is not available for Python 3.6, so we need to pin python-snappy to an older version (0.6.1) in that case, to avoid the broken relationship of newer snappy with older cramjan

I'll rework the commit message. re-reading it doesn't seem clear as it was during the writing

re-reading my commit message:

Also for python < 3.7 new `cramjam` libs are not available.

So we pinned `python-snappy` to 0.6.1 for python < 3.7, and set use
the new `python-snappy` and `cramjam` versions for python >= 3.7 .

@barthisrael you think is not understandable enough?

maybe

Also for python < 3.7 new `cramjam` libs ( >= 2.7.0) are not available.

So we pinned `python-snappy` to 0.6.1 for python < 3.7, as this old version 
is compatible with the `cramjam` library with versions < 2.7.0
and set to use the newer versions of the `python-snappy` and `cramjam` libs  for python >= 3.7 .
barthisrael commented 2 months ago

@gcalacoci I think the second looks good.