@autorest/python 6.37.1 → 6.37.2

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.
@@ -228,8 +228,8 @@ class JinjaSerializer(ReaderAndWriter):
228
228
  file = template_name.replace(".jinja2", "")
229
229
  output_name = root_of_sdk / file
230
230
  if not self.read_file(output_name) or file in _REGENERATE_FILES:
231
- if self.keep_version_file and file == "setup.py":
232
- # don't regenerate setup.py file if the version file is more up to date
231
+ if self.keep_version_file and file == "setup.py" and not self.code_model.options["azure-arm"]:
232
+ # don't regenerate setup.py file if the version file is more up to date for data-plane
233
233
  continue
234
234
  self.write_file(
235
235
  output_name,
@@ -487,7 +487,11 @@ class JinjaSerializer(ReaderAndWriter):
487
487
 
488
488
  # pylint: disable=line-too-long
489
489
  def exec_path(self, namespace: str) -> Path:
490
- if self.code_model.options["no-namespace-folders"] and not self.code_model.options["multiapi"]:
490
+ if (
491
+ self.code_model.options["no-namespace-folders"]
492
+ and not self.code_model.options["multiapi"]
493
+ and not self.code_model.options["azure-arm"]
494
+ ):
491
495
  # when output folder contains parts different from the namespace, we fall back to current folder directly.
492
496
  # (e.g. https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/communication/azure-communication-callautomation/swagger/SWAGGER.md)
493
497
  return Path(".")
@@ -266,7 +266,7 @@ class DpgModelSerializer(_ModelSerializer):
266
266
  )
267
267
  if model.is_polymorphic:
268
268
  file_import.add_submodule_import("typing", "Dict", ImportType.STDLIB)
269
- if not model.internal and self.init_line(model):
269
+ if self.need_init(model):
270
270
  file_import.add_submodule_import("typing", "overload", ImportType.STDLIB)
271
271
  file_import.add_submodule_import("typing", "Mapping", ImportType.STDLIB)
272
272
  file_import.add_submodule_import("typing", "Any", ImportType.STDLIB)
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": "1",
3
- "pip_version": "25.1.1",
3
+ "pip_version": "25.2",
4
4
  "install": [
5
5
  {
6
6
  "download_info": {
@@ -228,8 +228,8 @@ class JinjaSerializer(ReaderAndWriter):
228
228
  file = template_name.replace(".jinja2", "")
229
229
  output_name = root_of_sdk / file
230
230
  if not self.read_file(output_name) or file in _REGENERATE_FILES:
231
- if self.keep_version_file and file == "setup.py":
232
- # don't regenerate setup.py file if the version file is more up to date
231
+ if self.keep_version_file and file == "setup.py" and not self.code_model.options["azure-arm"]:
232
+ # don't regenerate setup.py file if the version file is more up to date for data-plane
233
233
  continue
234
234
  self.write_file(
235
235
  output_name,
@@ -487,7 +487,11 @@ class JinjaSerializer(ReaderAndWriter):
487
487
 
488
488
  # pylint: disable=line-too-long
489
489
  def exec_path(self, namespace: str) -> Path:
490
- if self.code_model.options["no-namespace-folders"] and not self.code_model.options["multiapi"]:
490
+ if (
491
+ self.code_model.options["no-namespace-folders"]
492
+ and not self.code_model.options["multiapi"]
493
+ and not self.code_model.options["azure-arm"]
494
+ ):
491
495
  # when output folder contains parts different from the namespace, we fall back to current folder directly.
492
496
  # (e.g. https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/communication/azure-communication-callautomation/swagger/SWAGGER.md)
493
497
  return Path(".")
@@ -266,7 +266,7 @@ class DpgModelSerializer(_ModelSerializer):
266
266
  )
267
267
  if model.is_polymorphic:
268
268
  file_import.add_submodule_import("typing", "Dict", ImportType.STDLIB)
269
- if not model.internal and self.init_line(model):
269
+ if self.need_init(model):
270
270
  file_import.add_submodule_import("typing", "overload", ImportType.STDLIB)
271
271
  file_import.add_submodule_import("typing", "Mapping", ImportType.STDLIB)
272
272
  file_import.add_submodule_import("typing", "Any", ImportType.STDLIB)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@autorest/python",
3
- "version": "6.37.1",
3
+ "version": "6.37.2",
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.14.1",
22
+ "@typespec/http-client-python": "~0.14.2",
23
23
  "@autorest/system-requirements": "~1.0.2",
24
24
  "fs-extra": "~11.2.0",
25
25
  "tsx": "~4.19.1"