Skip to content

Commit

Permalink
feat: use classes for structs in Python (#3232)
Browse files Browse the repository at this point in the history
Update jsii to 0.14.0 to achieve the following:

- Structs are now modeled as regular classes instead of
  TypedDicts, making their use more straightforward and
  snake_casing the attribute names.
- Fix an issue where passing a variadic function taking
  structs would ignore its variadicness.
- Generate ReST-style docstrings instead of Google-style
  docstrings for maximum IDE compatibility
- Rectify the casing of the "MiB" suffix at the end
  of ECS constructs (used to be converted to `_mi_b`, now
  converted to `_mib`).

camelCased dicts can still be passed, but instantiating
classes with snake_cased constructor arguments is preferred.

BREAKING CHANGES:

* **Python**: `memory_limit_mi_b` and others are now named
  `memory_limit_mib`.
  • Loading branch information
rix0rrr committed Jul 8, 2019
1 parent d61bd2c commit 161a459
Show file tree
Hide file tree
Showing 8 changed files with 86 additions and 68 deletions.
32 changes: 16 additions & 16 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -13,7 +13,7 @@
"@types/nodeunit": "^0.0.30",
"conventional-changelog-cli": "^2.0.21",
"jest": "^24.8.0",
"jsii-diff": "0.13.3",
"jsii-diff": "^0.14.0",
"lerna": "^3.15.0",
"nodeunit": "^0.11.3",
"nyc": "^14.1.1",
Expand Down
32 changes: 16 additions & 16 deletions packages/decdk/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions packages/decdk/package.json
Expand Up @@ -141,7 +141,7 @@
"@aws-cdk/cx-api": "^0.37.0",
"@aws-cdk/region-info": "^0.37.0",
"fs-extra": "^8.0.1",
"jsii-reflect": "^0.13.3",
"jsii-reflect": "^0.14.0",
"jsonschema": "^1.2.4",
"yaml": "1.6.0",
"yargs": "^13.2.4"
Expand All @@ -152,7 +152,7 @@
"@types/yaml": "1.0.2",
"@types/yargs": "^13.0.0",
"jest": "^24.8.0",
"jsii": "^0.13.3"
"jsii": "^0.14.0"
},
"keywords": [
"aws",
Expand All @@ -162,4 +162,4 @@
"engines": {
"node": ">= 8.10.0"
}
}
}
24 changes: 12 additions & 12 deletions tools/awslint/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions tools/awslint/package.json
Expand Up @@ -19,8 +19,8 @@
"camelcase": "^5.3.1",
"colors": "^1.3.3",
"fs-extra": "^8.0.1",
"jsii-reflect": "^0.13.3",
"jsii-spec": "^0.13.3",
"jsii-reflect": "^0.14.0",
"jsii-spec": "^0.14.0",
"yargs": "^13.2.4"
},
"devDependencies": {
Expand Down
50 changes: 34 additions & 16 deletions tools/cdk-build-tools/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions tools/cdk-build-tools/package.json
Expand Up @@ -40,8 +40,8 @@
"colors": "^1.3.3",
"fs-extra": "^8.0.1",
"jest": "^24.8.0",
"jsii": "^0.13.3",
"jsii-pacmak": "^0.13.3",
"jsii": "^0.14.0",
"jsii-pacmak": "^0.14.0",
"nodeunit": "^0.11.3",
"nyc": "^14.1.1",
"ts-jest": "^24.0.2",
Expand Down

0 comments on commit 161a459

Please sign in to comment.