Skip to content

Commit 864d52d

Browse files
committedFeb 21, 2025
Merge branch 'release/25.0.0'
2 parents 4cf77b2 + 7fdf63c commit 864d52d

File tree

6 files changed

+15
-5
lines changed

6 files changed

+15
-5
lines changed
 

‎.github/workflows/test-build.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
python-version: ${{ matrix.python-version }}
2222
- name: Cache Build Requirements
2323
id: pip-cache-step
24-
uses: actions/cache@v2
24+
uses: actions/cache@v4
2525
with:
2626
path: ${{ env.pythonLocation }}
2727
key: ${{ env.GHA_DISTRO }}-${{ env.pythonLocation }}-${{ hashFiles('requirements.txt', 'dev-requirements.txt') }}
@@ -44,7 +44,7 @@ jobs:
4444
with:
4545
python-version: 3.6
4646
- name: Cache pip
47-
uses: actions/cache@v2
47+
uses: actions/cache@v4
4848
with:
4949
path: ${{ env.pythonLocation }}
5050
key: ${{ env.GHA_DISTRO }}-${{ env.pythonLocation }}-${{ hashFiles('requirements.txt', 'dev-requirements.txt') }}

‎CHANGELOG

+7
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22
ChangeLog
33
*********
44

5+
25.0.0 (2025-02-21)
6+
===================
7+
8+
- Fix: Sometimes OneDrive gets mad if we include the `Authorization` header along with a signed
9+
request. Not every onedrive host server complains, but some do. Ergo, we stop doing it globally.
10+
- Feature: Support OSF's gravyvalet service by allowing gv to define provider in settings.
11+
512
23.0.0 (2023-08-17)
613
===================
714

‎tests/providers/onedrive/test_provider.py

-1
Original file line numberDiff line numberDiff line change
@@ -516,7 +516,6 @@ async def test_download_standard_file_range(self, provider, download_fixtures):
516516
assert content == b'te'
517517
assert aiohttpretty.has_call(method='GET', uri=download_url,
518518
headers={'Range': 'bytes=0-1',
519-
'Authorization': 'bearer wrote harry potter',
520519
'accept-encoding': ''})
521520

522521
@pytest.mark.asyncio

‎waterbutler/core/utils.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,9 @@ def make_provider(name: str, auth: dict, credentials: dict, settings: dict, **kw
3737
try:
3838
manager = driver.DriverManager(
3939
namespace='waterbutler.providers',
40-
name=name,
40+
# with gravyvalet active, "name" is opaque id for a specific addon
41+
# instance and osf puts the provider name in settings['service']
42+
name=settings.pop('service', name),
4143
invoke_on_load=True,
4244
invoke_args=(auth, credentials, settings),
4345
invoke_kwds=kwargs,

‎waterbutler/providers/onedrive/provider.py

+2
Original file line numberDiff line numberDiff line change
@@ -310,6 +310,7 @@ async def download(self, # type: ignore
310310
'GET',
311311
download_url,
312312
range=range,
313+
no_auth_header=True, # if download_url is signed, OD will sometimes 401 if auth header is included
313314
expects=(HTTPStatus.OK, HTTPStatus.PARTIAL_CONTENT),
314315
headers={'accept-encoding': ''},
315316
throws=exceptions.DownloadError,
@@ -766,6 +767,7 @@ async def _chunked_upload_stream_by_range(self, upload_url, data, start_range=0,
766767
start_range + len(data) - 1,
767768
total_size)
768769
},
770+
no_auth_header=True, # this endpoint will sometimes 401 if the Auth header included
769771
expects=(HTTPStatus.ACCEPTED, HTTPStatus.CREATED),
770772
throws=exceptions.UploadError
771773
)

‎waterbutler/version.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = '23.0.0'
1+
__version__ = '25.0.0'

0 commit comments

Comments
 (0)