Skip to content

Commit

Permalink
catch up to testserver (#1074)
Browse files Browse the repository at this point in the history
  • Loading branch information
iscai-msft authored Nov 2, 2021
1 parent 0041786 commit 2ad0ce7
Show file tree
Hide file tree
Showing 267 changed files with 1,642 additions and 830 deletions.
14 changes: 14 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
# Change Log

### 2021-11-01 - 5.10.0

| Library | Min Version
| --------------- | -------
|`@autorest/core` | `3.6.2`
|`@autorest/modelerfour` | `4.19.1`
|`azure-core` dep of generated code | `1.19.1`
|`msrest` dep of generated code | `0.6.21`
|`azure-mgmt-core` dep of generated code (If generating mgmt plane code) | `1.3.0`

**New Features**

- Allow users to override constant swagger params with kwarg input #1060

### 2021-10-15 - 5.9.3

| Library | Min Version
Expand Down
2 changes: 1 addition & 1 deletion autorest/codegen/templates/setup.py.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ VERSION = "{{ code_model.options.get('package_version', '0.0.0') }}"
# prerequisite: setuptools
# http://pypi.python.org/pypi/setuptools

REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.19.0"{{ azure_mgmt_core_import }}]
REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.19.1"{{ azure_mgmt_core_import }}]

setup(
name=NAME,
Expand Down
2 changes: 1 addition & 1 deletion docs/client/initializing.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ The following are core libraries your generated code depend on, and the minimum

| Library | Description | Min Version |
| -------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ----------- |
| [`azure-core`][azure_core_library] | The most important library to have installed. It provides shared exceptions and modules for all the Python SDK client libraries. | 1.19.0 |
| [`azure-core`][azure_core_library] | The most important library to have installed. It provides shared exceptions and modules for all the Python SDK client libraries. | 1.19.1 |
| [`msrest`][msrest_library] | Library mainly used for serializing and deserializing objects | 0.6.21 |
| [`azure-mgmt-core`][azure_mgmt_core_library] | Required if you're generating mgmt plane code (see `--azure-arm` flag in our [flag index][flag_index]. Provides mgmt plane specific shared exceptions and modules. | 1.2.1 |

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
# prerequisite: setuptools
# http://pypi.python.org/pypi/setuptools

REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.19.0"]
REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.19.1"]

setup(
name=NAME,
Expand Down
2 changes: 1 addition & 1 deletion docs/samples/specification/basic/generated/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
# prerequisite: setuptools
# http://pypi.python.org/pypi/setuptools

REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.19.0"]
REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.19.1"]

setup(
name=NAME,
Expand Down
2 changes: 1 addition & 1 deletion docs/samples/specification/directives/generated/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
# prerequisite: setuptools
# http://pypi.python.org/pypi/setuptools

REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.19.0"]
REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.19.1"]

setup(
name=NAME,
Expand Down
2 changes: 1 addition & 1 deletion docs/samples/specification/management/generated/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
# prerequisite: setuptools
# http://pypi.python.org/pypi/setuptools

REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.19.0", "azure-mgmt-core<2.0.0,>=1.2.1"]
REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.19.1", "azure-mgmt-core<2.0.0,>=1.2.1"]

setup(
name=NAME,
Expand Down
7 changes: 3 additions & 4 deletions eng/pipelines/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ jobs:
git diff --staged -w
displayName: 'Diff regeneration'
- task: UsePythonVersion@0
displayName: 'Use Python $(PythonVersion)'
inputs:
Expand Down Expand Up @@ -151,14 +152,12 @@ jobs:

- script: |
cd $(TestFolder)/llc/low-level
tox -e initial-ci
tox -e update-ci
tox -e ci
displayName: 'Execute low level update "llc" Tests - Python $(PythonVersion)'
- script: |
cd $(TestFolder)/llc/version-tolerant
tox -e initial-ci
tox -e update-ci
tox -e ci
displayName: 'Execute version-tolerant update "llc" Tests - Python $(PythonVersion)'
- script: |
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@autorest/python",
"version": "5.9.3",
"version": "5.10.0",
"description": "The Python extension for generators in AutoRest.",
"scripts": {
"prepare": "node run-python3.js prepare.py",
Expand All @@ -27,7 +27,7 @@
"@azure-tools/extension": "~3.2.1"
},
"devDependencies": {
"@microsoft.azure/autorest.testserver": "^3.0.41"
"@microsoft.azure/autorest.testserver": "^3.1.5"
},
"files": [
"autorest/**/*.py",
Expand Down
14 changes: 10 additions & 4 deletions tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ class _SwaggerGroup(Enum):
}

_LLC_SWAGGER_MAPPINGS = {
'LLCInitial': 'llc_initial.json',
'LLCUpdateOne': 'llc_update1.json'
'LLCServiceDrivenInitial': 'llc_initial.json',
'LLCServiceDrivenUpdateOne': 'llc_update1.json'
}

_AZURE_SWAGGER_MAPPINGS = {
Expand Down Expand Up @@ -117,8 +117,11 @@ class _SwaggerGroup(Enum):
'AzureSpecials': 'azurespecialproperties',
'StorageManagementClient': 'storage',
'CustomUrlPaging': 'custombaseurlpaging',
'LLCInitial': 'llcpackage',
'LLCUpdateOne': 'llcpackage'
}

_OVERRIDE_PACKAGE_NAME = {
"LLCServiceDrivenInitial": "llcservicedriveninitial",
"LLCServiceDrivenUpdateOne": "llcservicedrivenupdateone",
}

_PACKAGES_WITH_CLIENT_SIDE_VALIDATION = [
Expand Down Expand Up @@ -198,6 +201,9 @@ def _build_command_line(
override_flags: Optional[Dict[str, Any]] = None,
**kwargs,
) -> str:
if _OVERRIDE_PACKAGE_NAME.get(package_name):
override_flags = override_flags or {}
override_flags.update({"package-name": _OVERRIDE_PACKAGE_NAME[package_name]})
flags = _build_flags(package_name, swagger_name, debug, swagger_group, override_flags, **kwargs)
flag_strings = [
f"--{flag}={value}" for flag, value in flags.items()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
# prerequisite: setuptools
# http://pypi.python.org/pypi/setuptools

REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.19.0"]
REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.19.1"]

setup(
name=NAME,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
# prerequisite: setuptools
# http://pypi.python.org/pypi/setuptools

REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.19.0"]
REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.19.1"]

setup(
name=NAME,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
# prerequisite: setuptools
# http://pypi.python.org/pypi/setuptools

REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.19.0"]
REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.19.1"]

setup(
name=NAME,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
# prerequisite: setuptools
# http://pypi.python.org/pypi/setuptools

REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.19.0", "azure-mgmt-core<2.0.0,>=1.2.1"]
REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.19.1", "azure-mgmt-core<2.0.0,>=1.2.1"]

setup(
name=NAME,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
# prerequisite: setuptools
# http://pypi.python.org/pypi/setuptools

REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.19.0"]
REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.19.1"]

setup(
name=NAME,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
# prerequisite: setuptools
# http://pypi.python.org/pypi/setuptools

REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.19.0", "azure-mgmt-core<2.0.0,>=1.2.1"]
REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.19.1", "azure-mgmt-core<2.0.0,>=1.2.1"]

setup(
name=NAME,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
# prerequisite: setuptools
# http://pypi.python.org/pypi/setuptools

REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.19.0"]
REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.19.1"]

setup(
name=NAME,
Expand Down
2 changes: 1 addition & 1 deletion test/azure/legacy/Expected/AcceptanceTests/Head/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
# prerequisite: setuptools
# http://pypi.python.org/pypi/setuptools

REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.19.0", "azure-mgmt-core<2.0.0,>=1.2.1"]
REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.19.1", "azure-mgmt-core<2.0.0,>=1.2.1"]

setup(
name=NAME,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
# prerequisite: setuptools
# http://pypi.python.org/pypi/setuptools

REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.19.0", "azure-mgmt-core<2.0.0,>=1.2.1"]
REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.19.1", "azure-mgmt-core<2.0.0,>=1.2.1"]

setup(
name=NAME,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
# prerequisite: setuptools
# http://pypi.python.org/pypi/setuptools

REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.19.0", "azure-mgmt-core<2.0.0,>=1.2.1"]
REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.19.1", "azure-mgmt-core<2.0.0,>=1.2.1"]

setup(
name=NAME,
Expand Down
2 changes: 1 addition & 1 deletion test/azure/legacy/Expected/AcceptanceTests/Lro/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
# prerequisite: setuptools
# http://pypi.python.org/pypi/setuptools

REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.19.0", "azure-mgmt-core<2.0.0,>=1.2.1"]
REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.19.1", "azure-mgmt-core<2.0.0,>=1.2.1"]

setup(
name=NAME,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
# prerequisite: setuptools
# http://pypi.python.org/pypi/setuptools

REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.19.0"]
REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.19.1"]

setup(
name=NAME,
Expand Down
2 changes: 1 addition & 1 deletion test/azure/legacy/Expected/AcceptanceTests/Paging/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
# prerequisite: setuptools
# http://pypi.python.org/pypi/setuptools

REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.19.0"]
REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.19.1"]

setup(
name=NAME,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
# prerequisite: setuptools
# http://pypi.python.org/pypi/setuptools

REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.19.0", "azure-mgmt-core<2.0.0,>=1.2.1"]
REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.19.1", "azure-mgmt-core<2.0.0,>=1.2.1"]

setup(
name=NAME,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
# prerequisite: setuptools
# http://pypi.python.org/pypi/setuptools

REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.19.0", "azure-mgmt-core<2.0.0,>=1.2.1"]
REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.19.1", "azure-mgmt-core<2.0.0,>=1.2.1"]

setup(
name=NAME,
Expand Down
2 changes: 1 addition & 1 deletion test/azure/legacy/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ pytest
pytest-cov
pytest-asyncio==0.14.0;python_full_version>="3.5.2"
async_generator;python_full_version>="3.5.2"
azure-core==1.19.0
azure-core==1.19.1
azure-mgmt-core==1.3.0
msrest==0.6.21
-e ./Expected/AcceptanceTests/AzureBodyDuration
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
# prerequisite: setuptools
# http://pypi.python.org/pypi/setuptools

REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.19.0"]
REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.19.1"]

setup(
name=NAME,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
# prerequisite: setuptools
# http://pypi.python.org/pypi/setuptools

REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.19.0"]
REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.19.1"]

setup(
name=NAME,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
# prerequisite: setuptools
# http://pypi.python.org/pypi/setuptools

REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.19.0"]
REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.19.1"]

setup(
name=NAME,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
# prerequisite: setuptools
# http://pypi.python.org/pypi/setuptools

REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.19.0", "azure-mgmt-core<2.0.0,>=1.2.1"]
REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.19.1", "azure-mgmt-core<2.0.0,>=1.2.1"]

setup(
name=NAME,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
# prerequisite: setuptools
# http://pypi.python.org/pypi/setuptools

REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.19.0"]
REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.19.1"]

setup(
name=NAME,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
# prerequisite: setuptools
# http://pypi.python.org/pypi/setuptools

REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.19.0"]
REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.19.1"]

setup(
name=NAME,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
# prerequisite: setuptools
# http://pypi.python.org/pypi/setuptools

REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.19.0", "azure-mgmt-core<2.0.0,>=1.2.1"]
REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.19.1", "azure-mgmt-core<2.0.0,>=1.2.1"]

setup(
name=NAME,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
# prerequisite: setuptools
# http://pypi.python.org/pypi/setuptools

REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.19.0", "azure-mgmt-core<2.0.0,>=1.2.1"]
REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.19.1", "azure-mgmt-core<2.0.0,>=1.2.1"]

setup(
name=NAME,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
# prerequisite: setuptools
# http://pypi.python.org/pypi/setuptools

REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.19.0", "azure-mgmt-core<2.0.0,>=1.2.1"]
REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.19.1", "azure-mgmt-core<2.0.0,>=1.2.1"]

setup(
name=NAME,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
# prerequisite: setuptools
# http://pypi.python.org/pypi/setuptools

REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.19.0"]
REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.19.1"]

setup(
name=NAME,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
# prerequisite: setuptools
# http://pypi.python.org/pypi/setuptools

REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.19.0"]
REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.19.1"]

setup(
name=NAME,
Expand Down
Loading

0 comments on commit 2ad0ce7

Please sign in to comment.