@autorest/python 6.32.2 → 6.33.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/autorest/m2r.py +1 -2
- package/autorest/m4reformatter/__init__.py +1 -2
- package/autorest/multiapi/models/imports.py +7 -2
- package/autorest/multiapi/templates/multiapi_service_client.py.jinja2 +13 -2
- package/autorest/preprocess.py +1 -2
- package/generator/build/lib/pygen/codegen/__init__.py +0 -1
- package/generator/build/lib/pygen/codegen/_utils.py +1 -1
- package/generator/build/lib/pygen/codegen/models/client.py +39 -2
- package/generator/build/lib/pygen/codegen/models/enum_type.py +2 -2
- package/generator/build/lib/pygen/codegen/models/imports.py +2 -13
- package/generator/build/lib/pygen/codegen/models/model_type.py +1 -1
- package/generator/build/lib/pygen/codegen/serializers/builder_serializer.py +1 -3
- package/generator/build/lib/pygen/codegen/serializers/client_serializer.py +32 -6
- package/generator/build/lib/pygen/codegen/serializers/general_serializer.py +20 -1
- package/generator/build/lib/pygen/codegen/serializers/sample_serializer.py +2 -2
- package/generator/build/lib/pygen/codegen/templates/client.py.jinja2 +1 -1
- package/generator/build/lib/pygen/codegen/templates/config.py.jinja2 +2 -8
- package/generator/build/lib/pygen/codegen/templates/model_base.py.jinja2 +9 -13
- package/generator/build/lib/pygen/codegen/templates/packaging_templates/README.md.jinja2 +2 -2
- package/generator/build/lib/pygen/codegen/templates/packaging_templates/setup.py.jinja2 +12 -12
- package/generator/component-detection-pip-report.json +70 -71
- package/generator/dist/pygen-0.1.0-py3-none-any.whl +0 -0
- package/generator/pygen/codegen/__init__.py +0 -1
- package/generator/pygen/codegen/_utils.py +1 -1
- package/generator/pygen/codegen/models/client.py +39 -2
- package/generator/pygen/codegen/models/enum_type.py +2 -2
- package/generator/pygen/codegen/models/imports.py +2 -13
- package/generator/pygen/codegen/models/model_type.py +1 -1
- package/generator/pygen/codegen/serializers/builder_serializer.py +1 -3
- package/generator/pygen/codegen/serializers/client_serializer.py +32 -6
- package/generator/pygen/codegen/serializers/general_serializer.py +20 -1
- package/generator/pygen/codegen/serializers/sample_serializer.py +2 -2
- package/generator/pygen/codegen/templates/client.py.jinja2 +1 -1
- package/generator/pygen/codegen/templates/config.py.jinja2 +2 -8
- package/generator/pygen/codegen/templates/model_base.py.jinja2 +9 -13
- package/generator/pygen/codegen/templates/packaging_templates/README.md.jinja2 +2 -2
- package/generator/pygen/codegen/templates/packaging_templates/setup.py.jinja2 +12 -12
- package/generator/pygen.egg-info/PKG-INFO +0 -1
- package/generator/setup.py +0 -1
- package/package.json +2 -2
- package/scripts/__pycache__/venvtools.cpython-310.pyc +0 -0
- package/scripts/eng/mypy.ini +1 -1
- package/scripts/eng/pylintrc +1 -1
- package/scripts/eng/pyrightconfig.json +1 -1
- package/scripts/install.py +3 -3
- package/scripts/mypy.ini +1 -1
- package/scripts/prepare.py +2 -2
- package/scripts/run-python3.js +1 -1
- package/scripts/run-python3.ts +1 -1
- package/scripts/start.py +2 -2
- package/scripts/venvtools.py +0 -3
- package/setup.py +0 -1
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
# coding=utf-8
|
|
2
|
+
{% set min_version = MIN_PYTHON_VERSION.split('.')[1] | int %}
|
|
3
|
+
{% set max_version = MAX_PYTHON_VERSION.split('.')[1] | int %}
|
|
2
4
|
{% if code_model.license_header %}
|
|
3
5
|
{{ code_model.license_header }}
|
|
4
6
|
{% endif %}
|
|
@@ -67,11 +69,9 @@ setup(
|
|
|
67
69
|
"Programming Language :: Python",
|
|
68
70
|
"Programming Language :: Python :: 3 :: Only",
|
|
69
71
|
"Programming Language :: Python :: 3",
|
|
70
|
-
|
|
71
|
-
"Programming Language :: Python :: 3.
|
|
72
|
-
|
|
73
|
-
"Programming Language :: Python :: 3.11",
|
|
74
|
-
"Programming Language :: Python :: 3.12",
|
|
72
|
+
{% for version in range(min_version, max_version + 1) %}
|
|
73
|
+
"Programming Language :: Python :: 3.{{ version }}",
|
|
74
|
+
{% endfor %}
|
|
75
75
|
"License :: OSI Approved :: MIT License",
|
|
76
76
|
],
|
|
77
77
|
zip_safe=False,
|
|
@@ -96,21 +96,21 @@ setup(
|
|
|
96
96
|
{% endif %}
|
|
97
97
|
install_requires=[
|
|
98
98
|
{% if code_model.is_legacy %}
|
|
99
|
-
"msrest>=
|
|
99
|
+
"msrest>={{ VERSION_MAP["msrest"] }}",
|
|
100
100
|
{% else %}
|
|
101
|
-
"isodate>=
|
|
101
|
+
"isodate>={{ VERSION_MAP["isodate"] }}",
|
|
102
102
|
{% endif %}
|
|
103
103
|
{% if azure_arm %}
|
|
104
|
-
"azure-mgmt-core>=
|
|
104
|
+
"azure-mgmt-core>={{ VERSION_MAP["azure-mgmt-core"] }}",
|
|
105
105
|
{% elif code_model.is_azure_flavor %}
|
|
106
|
-
"azure-core>=
|
|
106
|
+
"azure-core>={{ VERSION_MAP["azure-core"] }}",
|
|
107
107
|
{% else %}
|
|
108
|
-
"corehttp[requests]",
|
|
108
|
+
"corehttp[requests]>={{ VERSION_MAP["corehttp"] }}",
|
|
109
109
|
{% endif %}
|
|
110
|
-
"typing-extensions>=
|
|
110
|
+
"typing-extensions>={{ VERSION_MAP['typing-extensions'] }}",
|
|
111
111
|
],
|
|
112
112
|
{% if package_mode %}
|
|
113
|
-
python_requires=">=
|
|
113
|
+
python_requires=">={{ MIN_PYTHON_VERSION }}",
|
|
114
114
|
{% else %}
|
|
115
115
|
long_description="""\
|
|
116
116
|
{{ code_model.description }}
|
|
@@ -9,7 +9,6 @@ License: MIT License
|
|
|
9
9
|
Classifier: Development Status :: 4 - Beta
|
|
10
10
|
Classifier: Programming Language :: Python
|
|
11
11
|
Classifier: Programming Language :: Python :: 3
|
|
12
|
-
Classifier: Programming Language :: Python :: 3.8
|
|
13
12
|
Classifier: Programming Language :: Python :: 3.9
|
|
14
13
|
Classifier: Programming Language :: Python :: 3.10
|
|
15
14
|
Classifier: Programming Language :: Python :: 3.11
|
package/generator/setup.py
CHANGED
|
@@ -35,7 +35,6 @@ setup(
|
|
|
35
35
|
"Development Status :: 4 - Beta",
|
|
36
36
|
"Programming Language :: Python",
|
|
37
37
|
"Programming Language :: Python :: 3",
|
|
38
|
-
"Programming Language :: Python :: 3.8",
|
|
39
38
|
"Programming Language :: Python :: 3.9",
|
|
40
39
|
"Programming Language :: Python :: 3.10",
|
|
41
40
|
"Programming Language :: Python :: 3.11",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@autorest/python",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.33.0",
|
|
4
4
|
"description": "The Python extension for generators in AutoRest.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"repository": {
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
},
|
|
20
20
|
"homepage": "https://github.com/Azure/autorest.python/blob/main/README.md",
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@typespec/http-client-python": "~0.
|
|
22
|
+
"@typespec/http-client-python": "~0.10.0",
|
|
23
23
|
"@autorest/system-requirements": "~1.0.2",
|
|
24
24
|
"fs-extra": "~11.2.0",
|
|
25
25
|
"tsx": "~4.19.1"
|
|
Binary file
|
package/scripts/eng/mypy.ini
CHANGED
package/scripts/eng/pylintrc
CHANGED
package/scripts/install.py
CHANGED
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
# --------------------------------------------------------------------------
|
|
8
8
|
import sys
|
|
9
9
|
|
|
10
|
-
if not sys.version_info >= (3,
|
|
11
|
-
raise Exception("Autorest for Python extension requires Python 3.
|
|
10
|
+
if not sys.version_info >= (3, 9, 0):
|
|
11
|
+
raise Exception("Autorest for Python extension requires Python 3.9 at least")
|
|
12
12
|
|
|
13
13
|
try:
|
|
14
14
|
import pip
|
|
@@ -21,7 +21,7 @@ except ImportError:
|
|
|
21
21
|
raise Exception("Your Python installation doesn't have venv available")
|
|
22
22
|
|
|
23
23
|
|
|
24
|
-
# Now we have pip and Py >= 3.
|
|
24
|
+
# Now we have pip and Py >= 3.9, go to work
|
|
25
25
|
|
|
26
26
|
from pathlib import Path
|
|
27
27
|
|
package/scripts/mypy.ini
CHANGED
package/scripts/prepare.py
CHANGED
|
@@ -9,8 +9,8 @@ import sys
|
|
|
9
9
|
import os
|
|
10
10
|
import argparse
|
|
11
11
|
|
|
12
|
-
if not sys.version_info >= (3,
|
|
13
|
-
raise Exception("Autorest for Python extension requires Python 3.
|
|
12
|
+
if not sys.version_info >= (3, 9, 0):
|
|
13
|
+
raise Exception("Autorest for Python extension requires Python 3.9 at least")
|
|
14
14
|
|
|
15
15
|
from pathlib import Path
|
|
16
16
|
import venv
|
package/scripts/run-python3.js
CHANGED
|
@@ -10,7 +10,7 @@ const cp = require("child_process");
|
|
|
10
10
|
const extension = require("@autorest/system-requirements");
|
|
11
11
|
|
|
12
12
|
async function runPython3(scriptName, ...args) {
|
|
13
|
-
const command = await extension.patchPythonPath(["python", scriptName, ...args], { version: ">=3.
|
|
13
|
+
const command = await extension.patchPythonPath(["python", scriptName, ...args], { version: ">=3.9", environmentVariable: "AUTOREST_PYTHON_EXE" });
|
|
14
14
|
cp.execSync(command.join(" "), {
|
|
15
15
|
stdio: [0, 1, 2]
|
|
16
16
|
});
|
package/scripts/run-python3.ts
CHANGED
|
@@ -11,7 +11,7 @@ import { patchPythonPath } from "./system-requirements.js";
|
|
|
11
11
|
|
|
12
12
|
async function runPython3(...args: string[]) {
|
|
13
13
|
const command = await patchPythonPath(["python", ...args], {
|
|
14
|
-
version: ">=3.
|
|
14
|
+
version: ">=3.9",
|
|
15
15
|
environmentVariable: "AUTOREST_PYTHON_EXE",
|
|
16
16
|
});
|
|
17
17
|
cp.execSync(command.join(" "), {
|
package/scripts/start.py
CHANGED
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
# --------------------------------------------------------------------------
|
|
8
8
|
import sys
|
|
9
9
|
|
|
10
|
-
if not sys.version_info >= (3,
|
|
11
|
-
raise Exception("Autorest for Python extension requires Python 3.
|
|
10
|
+
if not sys.version_info >= (3, 9, 0):
|
|
11
|
+
raise Exception("Autorest for Python extension requires Python 3.9 at least")
|
|
12
12
|
|
|
13
13
|
from pathlib import Path
|
|
14
14
|
import venv
|
package/scripts/venvtools.py
CHANGED
|
@@ -21,9 +21,6 @@ class ExtendedEnvBuilder(venv.EnvBuilder):
|
|
|
21
21
|
|
|
22
22
|
def __init__(self, *args, **kwargs):
|
|
23
23
|
self.context = None
|
|
24
|
-
if sys.version_info < (3, 9, 0):
|
|
25
|
-
# Not supported on Python 3.8, and we don't need it
|
|
26
|
-
kwargs.pop("upgrade_deps", None)
|
|
27
24
|
super().__init__(*args, **kwargs)
|
|
28
25
|
|
|
29
26
|
def ensure_directories(self, env_dir):
|
package/setup.py
CHANGED
|
@@ -34,7 +34,6 @@ setup(
|
|
|
34
34
|
"Development Status :: 4 - Beta",
|
|
35
35
|
"Programming Language :: Python",
|
|
36
36
|
"Programming Language :: Python :: 3",
|
|
37
|
-
"Programming Language :: Python :: 3.8",
|
|
38
37
|
"Programming Language :: Python :: 3.9",
|
|
39
38
|
"Programming Language :: Python :: 3.10",
|
|
40
39
|
"Programming Language :: Python :: 3.11",
|