Skip to content

Commit

Permalink
v0.1.0 release
Browse files Browse the repository at this point in the history
  • Loading branch information
dariobauer committed Oct 29, 2021
1 parent 8c7cf75 commit ca6dd11
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 11 deletions.
10 changes: 8 additions & 2 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
## Unreleased




## Released

### Version 0.1.0

Released 2021-10-29

* Improved file download to asynchronously download using multiple connections
* Added HTTPX and aiofiles packages as dependencies
* Replaced Requests package with HTTPX (Issue #11)
Expand All @@ -14,8 +22,6 @@
* Documentation updates
* Updates to authors.md to include significant contributor (Shub77)

## Released

### Version 0.0.1a10

Released 2021-10-21
Expand Down
8 changes: 1 addition & 7 deletions src/graph_onedrive/__init__.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
__version__ = "0.0.1a10"

# 1.2.0.dev1 # Development release
# 1.2.0a1 # Alpha Release
# 1.2.0b1 # Beta Release
# 1.2.0rc1 # Release Candidate
# 1.2.0 # Final Release
__version__ = "0.1.0"

from graph_onedrive._main import *
6 changes: 4 additions & 2 deletions src/graph_onedrive/_onedrive.py
Original file line number Diff line number Diff line change
Expand Up @@ -703,7 +703,8 @@ async def _download_async(
tasks = list()
file_part_names = list()
# This httpx.AsyncClient instance will be shared among the co-routines, passed as an argument
client = httpx.AsyncClient(timeout=httpx.Timeout(30.0))
timeout = httpx.Timeout(10.0, read=180.0)
client = httpx.AsyncClient(timeout=timeout)
# Creates a new temp directory via tempfile.TemporaryDirectory()
with tempfile.TemporaryDirectory() as tmp_dir:
# Min chunk size, used to calculate the number of concurrent connections based on file size
Expand Down Expand Up @@ -861,11 +862,12 @@ def upload_file(
# Make the Graph API request
if verbose:
print("Uploading file")
timeout = httpx.Timeout(10.0, write=180.0)
response = httpx.put(
request_url,
headers=self._headers,
content=content,
timeout=httpx.Timeout(30.0),
timeout=timeout,
)
# Close file
content.close()
Expand Down

0 comments on commit ca6dd11

Please sign in to comment.