-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add python_requires with 2.7.9 and 3.3 as minimum versions.
- Loading branch information
Showing
1 changed file
with
14 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
86517b9
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mikedarcy Can you please give some detail about the
>=2.7.9
Python requirement? We use bdbag in Galaxy and one of our major deployment platforms (CentOS 7) still uses python 2.7.5. Thanks!We are probably going to pin
bdbag
to 1.4.1 in the mean time.86517b9
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately, this requirement stems from this single line change in the released code of
bagit-1.7.0
that the current release ofbdbag
is pinned to: LibraryOfCongress/bagit-python@54dee23#diff-70e40b055f80c9089d8e81b75e7fb9c1L118In this commit,
bagit-python
dropped support for Python 2.6, but introduced (inadvertently?) a dependency on Python 2.7.9 as the minimum Python 2.7 version due to the inclusion of the direct use ofhashlib.algorithms_guaranteed
.Because
bdbag
"monkeypatches" and overrides certain functions frombagit-python
, we do a strict pin on the currently supported version in case a release ofbagit-python
changes code that we are overriding. We are currently pinned tobagit-1.7.0
, because we want to support the latest stable version ofbagit-python
inbdbag
.Ideally, my preferred solution for this change would be to have it reverted in
bagit-python
so that older versions of Python 2.7 are supported, but I'm not too sure how realistic that is. Alternatively, it is possible to just install the latest version ofbdbag
from source, usebagit-1.6.4
as the installed bagit version, and remove the strict pin statement inbdbag
'ssetup.py
. This is of course not the ideal solution, but am fairly confident it will work.I will investigate some other ways to get around this, but at the moment it is a bit of a conundrum. Its a shame that in the current state of things an entire OS distro cannot be used (without significant modification) with the latest
bdbag
/bagit
because of one line of code.86517b9
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mikedarcy Thanks a lot for your reply and clarification, I've left a comment on https://github.com/LibraryOfCongress/bagit-python/pull/110/files#r238885995 , hopefully this can be resolved in bagit upstream.
86517b9
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've opened LibraryOfCongress/bagit-python#123
86517b9
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for driving this @nsoranzo. If
bagit-python
generates a point release including this fix, I will generate a newbdbag
release pinned to it and remove the2.7.9
condition frompython_requires
.86517b9
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nsoranzo I've pushed some changes to master for the 1.5.2 point release that includes a "monkeypatch" for
hashlib.algorithms_guaranteed
when it is not found. The patch basically does the same thing as what you proposed here but patcheshashlib.algorithms_guaranteed
directly and before anybagit
code is imported so that the attribute exists by the time thebagit
code tries to dereference it. I tested it out on a quick AWS spin-up of a Ubuntu 14.04 LTS and it works fine. This approach won't makebagit-1.7.0
work standalone on such systems but will allowbdbag
to function properly.Would you mind testing this change out (just pull master) and letting me know what you think about this fix? If this is good enough for you, I will include it in the 1.5.2 point release and remove the strict pin on Python=>2.7.9.
86517b9
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for working on this @mikedarcy !
I tested on Ubuntu 12.04 and all seems fine except for a small issue:
The latest issue is fixed by #30 .
86517b9
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Merged #30. @nsoranzo So is this approach "good enough" for the time being? It should at least give us some functional cushion while we wait for
bagit
to fix the underlying issue and/or the official end-of-life for the distros in question.86517b9
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mikedarcy Thanks, that looks good enough for me too!