Skip to content

PyPi release 1.7.3

Latest
Compare
Choose a tag to compare
@mikedarcy mikedarcy released this 14 May 19:26
· 1 commit to master since this release

Release Notes

Minor feature addition and bugfix

  • Fix erroneous encoding of % char in URL field of fetch.txt which could break already properly encoded URLs.
    This was due to a misinterpretation of the spec which states that % (along with CR and LF) should only be URL
    encoded for the filename field and that whitespace ( and \t) should only be encoded in the URL field.
    • NOTE: As a best practice, applications should always pre-encode URLs that are added to fetch.txt and not rely on bdbag to do so, since only whitespace will be encoded.
  • Added a new option strict to the make_bag API function, along with a corresponding CLI argument. If strict is enabled, make_bag will automatically validate a newly created or updated bag for structural validity and fail if the resultant bag is invalid. This can be used to ensure that a bag is not persisted without payload file manifests. Additionally, if a created output bag is not structurally valid, the bag will subsequently be reverted back to a normal directory. An updated bag will not be reverted. In either case, a BagValidationError exception will be thrown.