Skip to content

Commit

Permalink
Fix bug in bdbag_api.validate() where underlying BagError excepti…
Browse files Browse the repository at this point in the history
…ons were not being propagated correctly.

Add an environment marker to `setup.py` for the `python-requests` dependency. This marker specifies that no greater
than `requests-2.25.1` be used with `Python3.5` environments, due to underlying incompatibilities with `requests` dependency
chain and `Python3.5` after `requests-2.26.0`.
Update CHANGELOG.md.
Update Pipfile.lock.
Bump version.
  • Loading branch information
mikedarcy committed Sep 27, 2021
1 parent e6035b2 commit c6731c9
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 48 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# CHANGE LOG

## 1.6.3
* Fix bug in `bdbag_api.validate()` where underlying `BagError` exceptions were not being propagated correctly.
* Add an environment marker to `setup.py` for the `python-requests` dependency. This marker specifies that no greater
than `requests-2.25.1` be used with `Python3.5` environments, due to underlying incompatibilities with `requests` dependency
chain and `Python3.5` after `requests-2.26.0`. Reported in issue [#47](https://github.com/fair-research/bdbag/issues/47).
Note that `bdbag` support for `Python3.5` is planned to be dropped in the `1.7.0` release.

## 1.6.2
* Set "User-Agent" header for HTTP fetch handler (via `python-requests`) to `"bdbag/{version} (requests/{version})"`.
* Added `sha1` support for `bdbag_utils` function `create-rfm-from-url-list`. See PR [#46](https://github.com/fair-research/bdbag/pull/46).
Expand Down
70 changes: 24 additions & 46 deletions Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion bdbag/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
from distutils.util import strtobool
from pkg_resources import parse_version, get_distribution, DistributionNotFound

__version__ = "1.6.2"
__version__ = "1.6.3"
__bagit_version__ = "1.8.1"
__bagit_profile_version__ = "1.3.1"

Expand Down
2 changes: 1 addition & 1 deletion bdbag/bdbag_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ def validate_bag(bag_path, fast=False, callback=None, config_file=None):
"remote file references from a fetch.txt file. In this case the bag is incomplete but not "
"necessarily invalid. Resolve remote file references (if any) and re-validate.")
raise e
except bdbagit.BaggingInterruptedError as e:
except (bdbagit.BagError, bdbagit.BaggingInterruptedError) as e:
logger.warning(get_typed_exception(e))
raise e
except Exception as e: # pragma: no cover
Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
install_requires=['pytz',
'tzlocal==2.1',
'certifi',
'requests>=2.7.0,<=2.25.1; python_version == "3.5"',
'requests>=2.7.0',
'setuptools_scm<6.0', # for bagit which does not properly include it in install_requires
'bagit==1.8.1',
Expand Down

0 comments on commit c6731c9

Please sign in to comment.