Skip to content

Commit 7d35523

Browse files
authored
Merge pull request #1 from Azure/master
syncing
2 parents 5b87ef6 + ec18d0b commit 7d35523

File tree

3,260 files changed

+267923
-28119
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

3,260 files changed

+267923
-28119
lines changed

.gitignore

+6-2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
__pycache__/
33
*.pyc
44
.pytest_cache
5+
.mypy_cache
6+
.cache
57

68
# Virtual environment
79
env*/
@@ -26,7 +28,7 @@ build/
2628
# Test results
2729
TestResults/
2830

29-
# Credentials
31+
# Credentials
3032
credentials_real.json
3133
testsettings_local.json
3234
testsettings_local.cfg
@@ -66,4 +68,6 @@ src/build
6668
*.pubxml
6769

6870
# [begoldsm] ignore virtual env if it exists.
69-
adlEnv/
71+
adlEnv/
72+
73+
code_reports

azure-applicationinsights/MANIFEST.in

-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
11
include *.rst
2-
include azure_bdist_wheel.py

azure-applicationinsights/README.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ This is the Microsoft Azure Application Insights Client Library.
66
Azure Resource Manager (ARM) is the next generation of management APIs that
77
replace the old Azure Service Management (ASM).
88

9-
This package has been tested with Python 2.7, 3.4, 3.5 and 3.6.
9+
This package has been tested with Python 2.7, 3.4, 3.5, 3.6 and 3.7.
1010

1111
For the older Azure Service Management (ASM) libraries, see
1212
`azure-servicemanagement-legacy <https://pypi.python.org/pypi/azure-servicemanagement-legacy>`__ library.
+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__import__('pkg_resources').declare_namespace(__name__)
1+
__path__ = __import__('pkgutil').extend_path(__path__, __name__)

azure-applicationinsights/azure_bdist_wheel.py

-54
This file was deleted.

azure-applicationinsights/setup.cfg

-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
[bdist_wheel]
22
universal=1
3-
azure-namespace-package=azure-nspkg

azure-applicationinsights/setup.py

+9-9
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,6 @@
1010
import os.path
1111
from io import open
1212
from setuptools import find_packages, setup
13-
try:
14-
from azure_bdist_wheel import cmdclass
15-
except ImportError:
16-
from distutils import log as logger
17-
logger.warn("Wheel is not available, disabling bdist_wheel hook")
18-
cmdclass = {}
1913

2014
# Change the PACKAGE_NAME only to change folder and different name
2115
PACKAGE_NAME = "azure-applicationinsights"
@@ -76,10 +70,16 @@
7670
'License :: OSI Approved :: MIT License',
7771
],
7872
zip_safe=False,
79-
packages=find_packages(exclude=["tests"]),
73+
packages=find_packages(exclude=[
74+
'tests',
75+
# Exclude packages that will be covered by PEP420 or nspkg
76+
'azure',
77+
]),
8078
install_requires=[
81-
'msrest>=0.5.4,<2.0.0',
79+
'msrest>=0.5.0',
8280
'azure-common~=1.1',
8381
],
84-
cmdclass=cmdclass
82+
extras_require={
83+
":python_version<'3.0'": ['azure-nspkg'],
84+
}
8585
)

azure-batch/HISTORY.rst

+26-6
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,26 @@
33
Release History
44
===============
55

6+
5.1.1 (2018-10-16)
7+
++++++++++++++++++
8+
9+
**Bugfixes**
10+
11+
- Fix authentication class to allow HTTP session to be re-used
12+
13+
**Note**
14+
15+
- azure-nspkg is not installed anymore on Python 3 (PEP420-based namespace package)
16+
17+
5.1.0 (2018-08-28)
18+
++++++++++++++++++
19+
20+
- Update operation TaskOperations.add_collection with the following added functionality:
21+
- Retry server side errors.
22+
- Automatically chunk lists of more than 100 tasks to multiple requests.
23+
- If tasks are too large to be submitted in chunks of 100, reduces number of tasks per request.
24+
- Add a parameter to specify number of threads to use when submitting tasks.
25+
626
5.0.0 (2018-08-24)
727
++++++++++++++++++
828

@@ -19,7 +39,7 @@ Release History
1939
- Operation ComputeNodeOperations.disable_scheduling
2040
- Operation ComputeNodeOperations.reboot
2141
- Operation JobOperations.terminate
22-
- Enum types now use the "str" mixin (class AzureEnum(str, Enum)) to improve the behavior when unrecognized enum values are encountered.
42+
- Enum types now use the "str" mixin (class AzureEnum(str, Enum)) to improve the behavior when unrecognized enum values are encountered.
2343

2444
4.1.3 (2018-04-24)
2545
++++++++++++++++++
@@ -78,16 +98,16 @@ Release History
7898
- Added a new `allow_low_priority_node` property to `JobManagerTask`, which if `true` allows the `JobManagerTask` to run on a low-priority compute node.
7999
- `PoolResizeParameter` now takes two optional parameters, `target_dedicated_nodes` and `target_low_priority_nodes`, instead of one required parameter `target_dedicated`.
80100
At least one of these two parameters must be specified.
81-
- Added support for uploading task output files to persistent storage, via the `OutputFiles` property on `CloudTask` and `JobManagerTask`.
82-
- Added support for specifying actions to take based on a task's output file upload status, via the `file_upload_error` property on `ExitConditions`.
101+
- Added support for uploading task output files to persistent storage, via the `OutputFiles` property on `CloudTask` and `JobManagerTask`.
102+
- Added support for specifying actions to take based on a task's output file upload status, via the `file_upload_error` property on `ExitConditions`.
83103
- Added support for determining if a task was a success or a failure via the new `result` property on all task execution information objects.
84104
- Renamed `scheduling_error` on all task execution information objects to `failure_information`. `TaskFailureInformation` replaces `TaskSchedulingError` and is returned any
85-
time there is a task failure. This includes all previous scheduling error cases, as well as nonzero task exit codes, and file upload failures from the new output files feature.
105+
time there is a task failure. This includes all previous scheduling error cases, as well as nonzero task exit codes, and file upload failures from the new output files feature.
86106
- Renamed `SchedulingErrorCategory` enum to `ErrorCategory`.
87107
- Renamed `scheduling_error` on `ExitConditions` to `pre_processing_error` to more clearly clarify when the error took place in the task life-cycle.
88108
- Added support for provisioning application licenses to your pool, via a new `application_licenses` property on `PoolAddParameter`, `CloudPool` and `PoolSpecification`.
89109
Please note that this feature is in gated public preview, and you must request access to it via a support ticket.
90-
- The `ssh_private_key` attribute of a `UserAccount` object has been replaced with an expanded `LinuxUserConfiguration` object with additional settings for a user ID and group ID of the
110+
- The `ssh_private_key` attribute of a `UserAccount` object has been replaced with an expanded `LinuxUserConfiguration` object with additional settings for a user ID and group ID of the
91111
user account.
92112
- Removed `unmapped` enum state from `AddTaskStatus`, `CertificateFormat`, `CertificateVisibility`, `CertStoreLocation`, `ComputeNodeFillType`, `OSType`, and `PoolLifetimeOption` as they were not ever used.
93113
- Improved and clarified documentation.
@@ -124,7 +144,7 @@ Release History
124144

125145
- Added support for joining a CloudPool to a virtual network on using the network_configuration property.
126146
- Added support for application package references on CloudTask and JobManagerTask.
127-
- Added support for automatically terminating jobs when all tasks complete or when a task fails, via the on_all_tasks_complete property and
147+
- Added support for automatically terminating jobs when all tasks complete or when a task fails, via the on_all_tasks_complete property and
128148
the CloudTask exit_conditions property.
129149

130150
0.30.0rc5

azure-batch/MANIFEST.in

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
include *.rst
2-
include azure_bdist_wheel.py
2+
include azure/__init__.py
3+

azure-batch/README.rst

+4-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@ Microsoft Azure SDK for Python
33

44
This is the Microsoft Azure Batch Client Library.
55

6-
This package has been tested with Python 2.7, 3.4, 3.5 and 3.6.
6+
This package has been tested with Python 2.7, 3.4, 3.5, 3.6 and 3.7.
7+
8+
For a more complete set of Azure libraries, see the `azure <https://pypi.python.org/pypi/azure>`__ bundle package.
79

810

911
Compatibility
@@ -28,14 +30,13 @@ If you see azure==0.11.0 (or any version below 1.0), uninstall it first:
2830
Usage
2931
=====
3032

31-
For code examples, see `the Batch samples repo
33+
For code examples, see `the Batch samples repo
3234
<https://github.com/Azure/azure-batch-samples/tree/master/Python>`__
3335
on GitHub or see `Batch
3436
<https://docs.microsoft.com/python/api/overview/azure/batch>`__
3537
on docs.microsoft.com.
3638

3739

38-
3940
Provide Feedback
4041
================
4142

azure-batch/azure/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__import__('pkg_resources').declare_namespace(__name__)
1+
__path__ = __import__('pkgutil').extend_path(__path__, __name__)

azure-batch/azure/batch/batch_auth.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -116,10 +116,10 @@ def __init__(self, account_name, key):
116116
super(SharedKeyCredentials, self).__init__()
117117
self.auth = SharedKeyAuth(self.header, account_name, key)
118118

119-
def signed_session(self):
119+
def signed_session(self, session=None):
120120

121-
session = super(SharedKeyCredentials, self).signed_session()
121+
session = super(SharedKeyCredentials, self).signed_session(session=session)
122122
session.auth = self.auth
123123

124124
return session
125-
125+

azure-batch/azure/batch/batch_service_client.py

+4
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
from .operations.task_operations import TaskOperations
2424
from .operations.compute_node_operations import ComputeNodeOperations
2525
from . import models
26+
from .custom.patch import patch_client
2627

2728

2829
class BatchServiceClientConfiguration(AzureConfiguration):
@@ -112,3 +113,6 @@ def __init__(
112113
self._client, self.config, self._serialize, self._deserialize)
113114
self.compute_node = ComputeNodeOperations(
114115
self._client, self.config, self._serialize, self._deserialize)
116+
117+
118+
patch_client()

azure-batch/azure/batch/custom/__init__.py

Whitespace-only changes.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# --------------------------------------------------------------------------------------------
2+
# Copyright (c) Microsoft Corporation. All rights reserved.
3+
# Licensed under the MIT License. See License.txt in the project root for license information.
4+
# --------------------------------------------------------------------------------------------
5+
6+
7+
class CreateTasksErrorException(Exception):
8+
""" Aggregate Exception containing details for any failures from a task add operation.
9+
10+
:param str message: Error message describing exit reason
11+
:param [~TaskAddParameter] pending_task_list: List of tasks remaining to be submitted.
12+
:param [~TaskAddResult] failure_tasks: List of tasks which failed to add
13+
:param [~Exception] errors: List of unknown errors forcing early termination
14+
"""
15+
def __init__(self, message, pending_task_list=None, failure_tasks=None, errors=None):
16+
self.message = message
17+
self.pending_tasks = list(pending_task_list)
18+
self.failure_tasks = list(failure_tasks)
19+
self.errors = list(errors)

0 commit comments

Comments
 (0)