diff --git a/sdk/storage/azure-storage-blob/azure/storage/blob/models.py b/sdk/storage/azure-storage-blob/azure/storage/blob/models.py index 14bd020adc17..763d5a83b2bd 100644 --- a/sdk/storage/azure-storage-blob/azure/storage/blob/models.py +++ b/sdk/storage/azure-storage-blob/azure/storage/blob/models.py @@ -244,6 +244,10 @@ def __init__(self, allowed_origins, allowed_methods, **kwargs): class ContainerProperties(DictMixin): """Blob container's properties class. + Returned ``ContainerProperties`` instances expose these values through a + dictionary interface, for example: ``container_props["last_modified"]``. + Additionally, the container name is available as ``container_props["name"]``. + :param datetime last_modified: A datetime object representing the last time the container was modified. :param str etag: @@ -259,10 +263,6 @@ class ContainerProperties(DictMixin): Represents whether the container has a legal hold. :param dict metadata: A dict with name-value pairs to associate with the container as metadata. - - Returned ``ContainerProperties`` instances expose these values through a - dictionary interface, for example: ``container_props["last_modified"]``. - Additionally, the container name is available as ``container_props["name"]``. """ def __init__(self, **kwargs): diff --git a/sdk/storage/azure-storage-file/azure/storage/file/_shared/uploads.py b/sdk/storage/azure-storage-file/azure/storage/file/_shared/uploads.py index 474d61afa619..10eedb1b0309 100644 --- a/sdk/storage/azure-storage-file/azure/storage/file/_shared/uploads.py +++ b/sdk/storage/azure-storage-file/azure/storage/file/_shared/uploads.py @@ -49,7 +49,7 @@ def upload_data_chunks( uploader_class=None, total_size=None, chunk_size=None, - max_connections=None, + max_concurrency=None, stream=None, validate_content=None, encryption_options=None, @@ -63,7 +63,7 @@ def upload_data_chunks( kwargs['encryptor'] = encryptor kwargs['padder'] = padder - parallel = max_connections > 1 + parallel = max_concurrency > 1 if parallel and 'modified_access_conditions' in kwargs: # Access conditions do not work with parallelism kwargs['modified_access_conditions'] = None @@ -77,11 +77,11 @@ def upload_data_chunks( validate_content=validate_content, **kwargs) if parallel: - executor = futures.ThreadPoolExecutor(max_connections) + executor = futures.ThreadPoolExecutor(max_concurrency) upload_tasks = uploader.get_chunk_streams() running_futures = [ executor.submit(with_current_context(uploader.process_chunk), u) - for u in islice(upload_tasks, 0, max_connections) + for u in islice(upload_tasks, 0, max_concurrency) ] range_ids = _parallel_uploads(executor, uploader.process_chunk, upload_tasks, running_futures) else: @@ -96,10 +96,10 @@ def upload_substream_blocks( uploader_class=None, total_size=None, chunk_size=None, - max_connections=None, + max_concurrency=None, stream=None, **kwargs): - parallel = max_connections > 1 + parallel = max_concurrency > 1 if parallel and 'modified_access_conditions' in kwargs: # Access conditions do not work with parallelism kwargs['modified_access_conditions'] = None @@ -112,11 +112,11 @@ def upload_substream_blocks( **kwargs) if parallel: - executor = futures.ThreadPoolExecutor(max_connections) + executor = futures.ThreadPoolExecutor(max_concurrency) upload_tasks = uploader.get_substream_blocks() running_futures = [ executor.submit(with_current_context(uploader.process_substream_block), u) - for u in islice(upload_tasks, 0, max_connections) + for u in islice(upload_tasks, 0, max_concurrency) ] range_ids = _parallel_uploads(executor, uploader.process_substream_block, upload_tasks, running_futures) else: @@ -420,7 +420,7 @@ def read(self, n): # or read in just enough data for the current block/sub stream current_max_buffer_size = min(self._max_buffer_size, self._length - self._position) - # lock is only defined if max_connections > 1 (parallel uploads) + # lock is only defined if max_concurrency > 1 (parallel uploads) if self._lock: with self._lock: # reposition the underlying stream to match the start of the data to read diff --git a/sdk/storage/azure-storage-file/azure/storage/file/_shared/uploads_async.py b/sdk/storage/azure-storage-file/azure/storage/file/_shared/uploads_async.py index 8aeafa39ef28..92fcab5ef5f0 100644 --- a/sdk/storage/azure-storage-file/azure/storage/file/_shared/uploads_async.py +++ b/sdk/storage/azure-storage-file/azure/storage/file/_shared/uploads_async.py @@ -50,7 +50,7 @@ async def upload_data_chunks( uploader_class=None, total_size=None, chunk_size=None, - max_connections=None, + max_concurrency=None, stream=None, encryption_options=None, **kwargs): @@ -63,7 +63,7 @@ async def upload_data_chunks( kwargs['encryptor'] = encryptor kwargs['padder'] = padder - parallel = max_connections > 1 + parallel = max_concurrency > 1 if parallel and 'modified_access_conditions' in kwargs: # Access conditions do not work with parallelism kwargs['modified_access_conditions'] = None @@ -80,7 +80,7 @@ async def upload_data_chunks( upload_tasks = uploader.get_chunk_streams() running_futures = [ asyncio.ensure_future(uploader.process_chunk(u)) - for u in islice(upload_tasks, 0, max_connections) + for u in islice(upload_tasks, 0, max_concurrency) ] range_ids = await _parallel_uploads(uploader.process_chunk, upload_tasks, running_futures) else: @@ -98,10 +98,10 @@ async def upload_substream_blocks( uploader_class=None, total_size=None, chunk_size=None, - max_connections=None, + max_concurrency=None, stream=None, **kwargs): - parallel = max_connections > 1 + parallel = max_concurrency > 1 if parallel and 'modified_access_conditions' in kwargs: # Access conditions do not work with parallelism kwargs['modified_access_conditions'] = None @@ -117,7 +117,7 @@ async def upload_substream_blocks( upload_tasks = uploader.get_substream_blocks() running_futures = [ asyncio.ensure_future(uploader.process_substream_block(u)) - for u in islice(upload_tasks, 0, max_connections) + for u in islice(upload_tasks, 0, max_concurrency) ] range_ids = await _parallel_uploads(uploader.process_substream_block, upload_tasks, running_futures) else: diff --git a/sdk/storage/azure-storage-file/azure/storage/file/aio/directory_client_async.py b/sdk/storage/azure-storage-file/azure/storage/file/aio/directory_client_async.py index d4cf4760ba9b..8c66e3b2a241 100644 --- a/sdk/storage/azure-storage-file/azure/storage/file/aio/directory_client_async.py +++ b/sdk/storage/azure-storage-file/azure/storage/file/aio/directory_client_async.py @@ -477,7 +477,7 @@ async def upload_file( metadata=None, # type: Optional[Dict[str, str]] content_settings=None, # type: Optional[ContentSettings] validate_content=False, # type: bool - max_connections=1, # type: Optional[int] + max_concurrency=1, # type: Optional[int] timeout=None, # type: Optional[int] encoding='UTF-8', # type: str **kwargs # type: Any @@ -504,7 +504,7 @@ async def upload_file( the wire if using http instead of https as https (the default) will already validate. Note that this MD5 hash is not stored with the file. - :param int max_connections: + :param int max_concurrency: Maximum number of parallel connections to use. :param int timeout: The timeout parameter is expressed in seconds. @@ -529,7 +529,7 @@ async def upload_file( metadata=metadata, content_settings=content_settings, validate_content=validate_content, - max_connections=max_connections, + max_concurrency=max_concurrency, timeout=timeout, encoding=encoding, **kwargs) diff --git a/sdk/storage/azure-storage-file/azure/storage/file/aio/file_client_async.py b/sdk/storage/azure-storage-file/azure/storage/file/aio/file_client_async.py index 062737ef1f36..4f5a5e1d6345 100644 --- a/sdk/storage/azure-storage-file/azure/storage/file/aio/file_client_async.py +++ b/sdk/storage/azure-storage-file/azure/storage/file/aio/file_client_async.py @@ -45,7 +45,7 @@ async def _upload_file_helper( content_settings, validate_content, timeout, - max_connections, + max_concurrency, file_settings, file_attributes="none", file_creation_time="now", @@ -76,7 +76,7 @@ async def _upload_file_helper( total_size=size, chunk_size=file_settings.max_range_size, stream=stream, - max_connections=max_connections, + max_concurrency=max_concurrency, validate_content=validate_content, timeout=timeout, **kwargs @@ -245,7 +245,7 @@ async def upload_file( metadata=None, # type: Optional[Dict[str, str]] content_settings=None, # type: Optional[ContentSettings] validate_content=False, # type: bool - max_connections=1, # type: Optional[int] + max_concurrency=1, # type: Optional[int] file_attributes="none", # type: Union[str, NTFSAttributes] file_creation_time="now", # type: Union[str, datetime] file_last_write_time="now", # type: Union[str, datetime] @@ -274,7 +274,7 @@ async def upload_file( the wire if using http instead of https as https (the default) will already validate. Note that this MD5 hash is not stored with the file. - :param int max_connections: + :param int max_concurrency: Maximum number of parallel connections to use. :param int timeout: The timeout parameter is expressed in seconds. @@ -342,7 +342,7 @@ async def upload_file( content_settings, validate_content, timeout, - max_connections, + max_concurrency, self._config, file_attributes=file_attributes, file_creation_time=file_creation_time, diff --git a/sdk/storage/azure-storage-file/azure/storage/file/directory_client.py b/sdk/storage/azure-storage-file/azure/storage/file/directory_client.py index 36bbd50c1729..75aa2227bab0 100644 --- a/sdk/storage/azure-storage-file/azure/storage/file/directory_client.py +++ b/sdk/storage/azure-storage-file/azure/storage/file/directory_client.py @@ -550,7 +550,7 @@ def upload_file( metadata=None, # type: Optional[Dict[str, str]] content_settings=None, # type: Optional[ContentSettings] validate_content=False, # type: bool - max_connections=1, # type: Optional[int] + max_concurrency=1, # type: Optional[int] timeout=None, # type: Optional[int] encoding='UTF-8', # type: str **kwargs # type: Any @@ -577,7 +577,7 @@ def upload_file( the wire if using http instead of https as https (the default) will already validate. Note that this MD5 hash is not stored with the file. - :param int max_connections: + :param int max_concurrency: Maximum number of parallel connections to use. :param int timeout: The timeout parameter is expressed in seconds. @@ -602,7 +602,7 @@ def upload_file( metadata=metadata, content_settings=content_settings, validate_content=validate_content, - max_connections=max_connections, + max_concurrency=max_concurrency, timeout=timeout, encoding=encoding, **kwargs) diff --git a/sdk/storage/azure-storage-file/azure/storage/file/file_client.py b/sdk/storage/azure-storage-file/azure/storage/file/file_client.py index e43fd06c5b2f..dcf021c25cd9 100644 --- a/sdk/storage/azure-storage-file/azure/storage/file/file_client.py +++ b/sdk/storage/azure-storage-file/azure/storage/file/file_client.py @@ -51,7 +51,7 @@ def _upload_file_helper( content_settings, validate_content, timeout, - max_connections, + max_concurrency, file_settings, file_attributes="none", file_creation_time="now", @@ -83,7 +83,7 @@ def _upload_file_helper( total_size=size, chunk_size=file_settings.max_range_size, stream=stream, - max_connections=max_connections, + max_concurrency=max_concurrency, validate_content=validate_content, timeout=timeout, **kwargs @@ -433,7 +433,7 @@ def upload_file( metadata=None, # type: Optional[Dict[str, str]] content_settings=None, # type: Optional[ContentSettings] validate_content=False, # type: bool - max_connections=1, # type: Optional[int] + max_concurrency=1, # type: Optional[int] file_attributes="none", # type: Union[str, NTFSAttributes] file_creation_time="now", # type: Union[str, datetime] file_last_write_time="now", # type: Union[str, datetime] @@ -462,7 +462,7 @@ def upload_file( the wire if using http instead of https as https (the default) will already validate. Note that this MD5 hash is not stored with the file. - :param int max_connections: + :param int max_concurrency: Maximum number of parallel connections to use. :param int timeout: The timeout parameter is expressed in seconds. @@ -529,7 +529,7 @@ def upload_file( content_settings, validate_content, timeout, - max_connections, + max_concurrency, self._config, file_attributes=file_attributes, file_creation_time=file_creation_time, diff --git a/sdk/storage/azure-storage-file/tests/test_file.py b/sdk/storage/azure-storage-file/tests/test_file.py index 19df33ad690d..97d677dbd3d3 100644 --- a/sdk/storage/azure-storage-file/tests/test_file.py +++ b/sdk/storage/azure-storage-file/tests/test_file.py @@ -1020,7 +1020,7 @@ def callback(response): if current is not None: progress.append((current, total)) - response = file_client.upload_file(data, max_connections=2, raw_response_hook=callback) + response = file_client.upload_file(data, max_concurrency=2, raw_response_hook=callback) assert isinstance(response, dict) assert 'last_modified' in response assert 'etag' in response @@ -1045,7 +1045,7 @@ def test_create_file_from_bytes_with_index(self): max_range_size=4 * 1024) # Act - response = file_client.upload_file(data[index:], max_connections=2) + response = file_client.upload_file(data[index:], max_concurrency=2) assert isinstance(response, dict) assert 'last_modified' in response assert 'etag' in response @@ -1071,7 +1071,7 @@ def test_create_file_from_bytes_with_index_and_count(self): max_range_size=4 * 1024) # Act - response = file_client.upload_file(data[index:], length=count, max_connections=2) + response = file_client.upload_file(data[index:], length=count, max_concurrency=2) assert isinstance(response, dict) assert 'last_modified' in response assert 'etag' in response @@ -1098,7 +1098,7 @@ def test_create_file_from_path(self): # Act with open(INPUT_FILE_PATH, 'rb') as stream: - response = file_client.upload_file(stream, max_connections=2) + response = file_client.upload_file(stream, max_concurrency=2) assert isinstance(response, dict) assert 'last_modified' in response assert 'etag' in response @@ -1132,7 +1132,7 @@ def callback(response): progress.append((current, total)) with open(INPUT_FILE_PATH, 'rb') as stream: - response = file_client.upload_file(stream, max_connections=2, raw_response_hook=callback) + response = file_client.upload_file(stream, max_concurrency=2, raw_response_hook=callback) assert isinstance(response, dict) assert 'last_modified' in response assert 'etag' in response @@ -1164,7 +1164,7 @@ def test_create_file_from_stream(self): # Act file_size = len(data) with open(INPUT_FILE_PATH, 'rb') as stream: - response = file_client.upload_file(stream, max_connections=2) + response = file_client.upload_file(stream, max_concurrency=2) assert isinstance(response, dict) assert 'last_modified' in response assert 'etag' in response @@ -1193,7 +1193,7 @@ def test_create_file_from_stream_non_seekable(self): file_size = len(data) with open(INPUT_FILE_PATH, 'rb') as stream: non_seekable_file = StorageFileTest.NonSeekableFile(stream) - file_client.upload_file(non_seekable_file, length=file_size, max_connections=1) + file_client.upload_file(non_seekable_file, length=file_size, max_concurrency=1) # Assert self.assertFileEqual(file_client, data[:file_size]) @@ -1225,7 +1225,7 @@ def callback(response): file_size = len(data) with open(INPUT_FILE_PATH, 'rb') as stream: - file_client.upload_file(stream, max_connections=2, raw_response_hook=callback) + file_client.upload_file(stream, max_concurrency=2, raw_response_hook=callback) # Assert self.assertFileEqual(file_client, data[:file_size]) @@ -1254,7 +1254,7 @@ def test_create_file_from_stream_truncated(self): # Act file_size = len(data) - 512 with open(INPUT_FILE_PATH, 'rb') as stream: - file_client.upload_file(stream, length=file_size, max_connections=2) + file_client.upload_file(stream, length=file_size, max_concurrency=2) # Assert self.assertFileEqual(file_client, data[:file_size]) @@ -1286,7 +1286,7 @@ def callback(response): file_size = len(data) - 5 with open(INPUT_FILE_PATH, 'rb') as stream: - file_client.upload_file(stream, length=file_size, max_connections=2, raw_response_hook=callback) + file_client.upload_file(stream, length=file_size, max_concurrency=2, raw_response_hook=callback) # Assert @@ -1389,7 +1389,7 @@ def test_create_file_with_md5_large(self): max_range_size=4 * 1024) # Act - file_client.upload_file(data, validate_content=True, max_connections=2) + file_client.upload_file(data, validate_content=True, max_concurrency=2) # Assert diff --git a/sdk/storage/azure-storage-file/tests/test_file_async.py b/sdk/storage/azure-storage-file/tests/test_file_async.py index 98f60a899c84..68a29bd49f03 100644 --- a/sdk/storage/azure-storage-file/tests/test_file_async.py +++ b/sdk/storage/azure-storage-file/tests/test_file_async.py @@ -1269,7 +1269,7 @@ def callback(response): if current is not None: progress.append((current, total)) - await file_client.upload_file(data, max_connections=2, raw_response_hook=callback) + await file_client.upload_file(data, max_concurrency=2, raw_response_hook=callback) # Assert await self.assertFileEqual(file_client, data) @@ -1297,7 +1297,7 @@ async def _test_create_file_from_bytes_with_index_async(self): max_range_size=4 * 1024) # Act - response = await file_client.upload_file(data[index:], max_connections=2) + response = await file_client.upload_file(data[index:], max_concurrency=2) assert isinstance(response, dict) assert 'last_modified' in response assert 'etag' in response @@ -1329,7 +1329,7 @@ async def _test_create_file_from_bytes_with_index_and_count_async(self): max_range_size=4 * 1024) # Act - response = await file_client.upload_file(data[index:], length=count, max_connections=2) + response = await file_client.upload_file(data[index:], length=count, max_concurrency=2) assert isinstance(response, dict) assert 'last_modified' in response assert 'etag' in response @@ -1362,7 +1362,7 @@ async def _test_create_file_from_path_async(self): # Act with open(INPUT_FILE_PATH, 'rb') as stream: - response = await file_client.upload_file(stream, max_connections=2) + response = await file_client.upload_file(stream, max_concurrency=2) assert isinstance(response, dict) assert 'last_modified' in response assert 'etag' in response @@ -1402,7 +1402,7 @@ def callback(response): progress.append((current, total)) with open(INPUT_FILE_PATH, 'rb') as stream: - response = await file_client.upload_file(stream, max_connections=2, raw_response_hook=callback) + response = await file_client.upload_file(stream, max_concurrency=2, raw_response_hook=callback) assert isinstance(response, dict) assert 'last_modified' in response assert 'etag' in response @@ -1440,7 +1440,7 @@ async def _test_create_file_from_stream_async(self): # Act file_size = len(data) with open(INPUT_FILE_PATH, 'rb') as stream: - response = await file_client.upload_file(stream, max_connections=2) + response = await file_client.upload_file(stream, max_concurrency=2) assert isinstance(response, dict) assert 'last_modified' in response assert 'etag' in response @@ -1475,7 +1475,7 @@ async def _test_create_file_from_stream_non_seekable_async(self): file_size = len(data) with open(INPUT_FILE_PATH, 'rb') as stream: non_seekable_file = StorageFileAsyncTest.NonSeekableFile(stream) - await file_client.upload_file(non_seekable_file, length=file_size, max_connections=1) + await file_client.upload_file(non_seekable_file, length=file_size, max_concurrency=1) # Assert await self.assertFileEqual(file_client, data[:file_size]) @@ -1513,7 +1513,7 @@ def callback(response): file_size = len(data) with open(INPUT_FILE_PATH, 'rb') as stream: - await file_client.upload_file(stream, max_connections=2, raw_response_hook=callback) + await file_client.upload_file(stream, max_concurrency=2, raw_response_hook=callback) # Assert await self.assertFileEqual(file_client, data[:file_size]) @@ -1548,7 +1548,7 @@ async def _test_create_file_from_stream_truncated_async(self): # Act file_size = len(data) - 512 with open(INPUT_FILE_PATH, 'rb') as stream: - await file_client.upload_file(stream, length=file_size, max_connections=4) + await file_client.upload_file(stream, length=file_size, max_concurrency=4) # Assert await self.assertFileEqual(file_client, data[:file_size]) @@ -1586,7 +1586,7 @@ def callback(response): file_size = len(data) - 5 with open(INPUT_FILE_PATH, 'rb') as stream: - await file_client.upload_file(stream, length=file_size, max_connections=2, raw_response_hook=callback) + await file_client.upload_file(stream, length=file_size, max_concurrency=2, raw_response_hook=callback) # Assert @@ -1716,7 +1716,7 @@ async def _test_create_file_with_md5_large_async(self): max_range_size=4 * 1024) # Act - await file_client.upload_file(data, validate_content=True, max_connections=2) + await file_client.upload_file(data, validate_content=True, max_concurrency=2) # Assert diff --git a/sdk/storage/azure-storage-queue/azure/storage/queue/_shared/uploads.py b/sdk/storage/azure-storage-queue/azure/storage/queue/_shared/uploads.py index 474d61afa619..10eedb1b0309 100644 --- a/sdk/storage/azure-storage-queue/azure/storage/queue/_shared/uploads.py +++ b/sdk/storage/azure-storage-queue/azure/storage/queue/_shared/uploads.py @@ -49,7 +49,7 @@ def upload_data_chunks( uploader_class=None, total_size=None, chunk_size=None, - max_connections=None, + max_concurrency=None, stream=None, validate_content=None, encryption_options=None, @@ -63,7 +63,7 @@ def upload_data_chunks( kwargs['encryptor'] = encryptor kwargs['padder'] = padder - parallel = max_connections > 1 + parallel = max_concurrency > 1 if parallel and 'modified_access_conditions' in kwargs: # Access conditions do not work with parallelism kwargs['modified_access_conditions'] = None @@ -77,11 +77,11 @@ def upload_data_chunks( validate_content=validate_content, **kwargs) if parallel: - executor = futures.ThreadPoolExecutor(max_connections) + executor = futures.ThreadPoolExecutor(max_concurrency) upload_tasks = uploader.get_chunk_streams() running_futures = [ executor.submit(with_current_context(uploader.process_chunk), u) - for u in islice(upload_tasks, 0, max_connections) + for u in islice(upload_tasks, 0, max_concurrency) ] range_ids = _parallel_uploads(executor, uploader.process_chunk, upload_tasks, running_futures) else: @@ -96,10 +96,10 @@ def upload_substream_blocks( uploader_class=None, total_size=None, chunk_size=None, - max_connections=None, + max_concurrency=None, stream=None, **kwargs): - parallel = max_connections > 1 + parallel = max_concurrency > 1 if parallel and 'modified_access_conditions' in kwargs: # Access conditions do not work with parallelism kwargs['modified_access_conditions'] = None @@ -112,11 +112,11 @@ def upload_substream_blocks( **kwargs) if parallel: - executor = futures.ThreadPoolExecutor(max_connections) + executor = futures.ThreadPoolExecutor(max_concurrency) upload_tasks = uploader.get_substream_blocks() running_futures = [ executor.submit(with_current_context(uploader.process_substream_block), u) - for u in islice(upload_tasks, 0, max_connections) + for u in islice(upload_tasks, 0, max_concurrency) ] range_ids = _parallel_uploads(executor, uploader.process_substream_block, upload_tasks, running_futures) else: @@ -420,7 +420,7 @@ def read(self, n): # or read in just enough data for the current block/sub stream current_max_buffer_size = min(self._max_buffer_size, self._length - self._position) - # lock is only defined if max_connections > 1 (parallel uploads) + # lock is only defined if max_concurrency > 1 (parallel uploads) if self._lock: with self._lock: # reposition the underlying stream to match the start of the data to read diff --git a/sdk/storage/azure-storage-queue/azure/storage/queue/_shared/uploads_async.py b/sdk/storage/azure-storage-queue/azure/storage/queue/_shared/uploads_async.py index 8aeafa39ef28..92fcab5ef5f0 100644 --- a/sdk/storage/azure-storage-queue/azure/storage/queue/_shared/uploads_async.py +++ b/sdk/storage/azure-storage-queue/azure/storage/queue/_shared/uploads_async.py @@ -50,7 +50,7 @@ async def upload_data_chunks( uploader_class=None, total_size=None, chunk_size=None, - max_connections=None, + max_concurrency=None, stream=None, encryption_options=None, **kwargs): @@ -63,7 +63,7 @@ async def upload_data_chunks( kwargs['encryptor'] = encryptor kwargs['padder'] = padder - parallel = max_connections > 1 + parallel = max_concurrency > 1 if parallel and 'modified_access_conditions' in kwargs: # Access conditions do not work with parallelism kwargs['modified_access_conditions'] = None @@ -80,7 +80,7 @@ async def upload_data_chunks( upload_tasks = uploader.get_chunk_streams() running_futures = [ asyncio.ensure_future(uploader.process_chunk(u)) - for u in islice(upload_tasks, 0, max_connections) + for u in islice(upload_tasks, 0, max_concurrency) ] range_ids = await _parallel_uploads(uploader.process_chunk, upload_tasks, running_futures) else: @@ -98,10 +98,10 @@ async def upload_substream_blocks( uploader_class=None, total_size=None, chunk_size=None, - max_connections=None, + max_concurrency=None, stream=None, **kwargs): - parallel = max_connections > 1 + parallel = max_concurrency > 1 if parallel and 'modified_access_conditions' in kwargs: # Access conditions do not work with parallelism kwargs['modified_access_conditions'] = None @@ -117,7 +117,7 @@ async def upload_substream_blocks( upload_tasks = uploader.get_substream_blocks() running_futures = [ asyncio.ensure_future(uploader.process_substream_block(u)) - for u in islice(upload_tasks, 0, max_connections) + for u in islice(upload_tasks, 0, max_concurrency) ] range_ids = await _parallel_uploads(uploader.process_substream_block, upload_tasks, running_futures) else: