Skip to content

Commit

Permalink
Merge branch 'main' into merge-back/1.95.0
Browse files Browse the repository at this point in the history
  • Loading branch information
iliapolo authored Mar 6, 2024
2 parents f1ff514 + 7426684 commit 6a52988
Show file tree
Hide file tree
Showing 20 changed files with 483 additions and 321 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/close-stale-issues.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ jobs:
closed-for-staleness-label: closed-for-staleness

# Issue timing
days-before-stale: 2
days-before-close: 5
days-before-stale: 10
days-before-close: 4
days-before-ancient: 36500

# If you don't want to mark a issue as being ancient based on a
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/closed-issue-message.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,5 @@ jobs:
# These inputs are both required
repo-token: "${{ secrets.GITHUB_TOKEN }}"
message: |
### ⚠️COMMENT VISIBILITY WARNING⚠️
Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.
This issue is now closed. Comments on closed issues are hard for our team to see.
If you need more assistance, please open a new issue that references this one.
2 changes: 1 addition & 1 deletion .mergify/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ pull_request_rules:
label:
add: [contribution/core]
conditions:
- author~=^(RomainMuller|rix0rrr|MrArnoldPalmer|iliapolo|madeline-k|comcalvi|kaizencc|corymhall|otaviomacedo|TheRealAmazonKendra|vinayak-kukreja|mrgrain|colifran|mikewrighton|paulhcsun)$
- author~=^(RomainMuller|rix0rrr|iliapolo|comcalvi|kaizencc|corymhall|otaviomacedo|TheRealAmazonKendra|vinayak-kukreja|mrgrain|colifran|mikewrighton|paulhcsun)$
- -label~="contribution/core"
- name: Tell them we're good now
actions:
Expand Down
2 changes: 1 addition & 1 deletion gh-pages/content/compiler-and-rosetta-maintenance.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ built on). This change was designed in [RFC-374], and removes the need for devel
to releases still compatible with TypeScript 3.9 without necessarily requiring their dependents to do the same at the
same time. Upgrading your `jsii` and `jsii-rosetta` dependencies to `v5.0.x` is transparent to your users.

[RFC-374]: https://github.com/aws/aws-cdk-rfcs/blob/rmuller/jsii-version-unlock/text/0374-jsii-ts-version.md
[RFC-374]: https://github.com/aws/aws-cdk-rfcs/blob/main/text/0374-jsii-ts-version.md

Starting with the `5.0.x` release of `jsii` and `jsii-rosetta`, we are using a new versioning strategy for these two
tools. Going forward we will closely follow new TypeScript compiler releases with new `jsii` and `jsii-rosetta` releases,
Expand Down
2 changes: 1 addition & 1 deletion gh-pages/requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
mkdocs~=1.5.3
mkdocs-awesome-pages-plugin~=2.9.2
mkdocs-material~=9.5.9
mkdocs-material~=9.5.12
mkdocs-git-revision-date-plugin~=0.3.2
6 changes: 3 additions & 3 deletions packages/@jsii/Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@
<PackageReference Update="Microsoft.Extensions.Logging" Version="8.0.0" />
<PackageReference Update="Microsoft.Extensions.Logging.Console" Version="8.0.0" />

<PackageReference Update="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="4.8.0" />
<PackageReference Update="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="4.9.2" />
<PackageReference Update="Microsoft.CodeAnalysis.Analyzers" Version="3.3.4" />
<PackageReference Update="Microsoft.CodeQuality.Analyzers" Version="3.3.2" />

<PackageReference Update="Microsoft.NET.Test.Sdk" Version="17.9.0" />
<PackageReference Update="NSubstitute" Version="5.1.0" />
<PackageReference Update="xunit" Version="2.6.6" />
<PackageReference Update="xunit.runner.visualstudio" Version="2.5.6" />
<PackageReference Update="xunit" Version="2.7.0" />
<PackageReference Update="xunit.runner.visualstudio" Version="2.5.7" />
<PackageReference Update="XunitXml.TestLogger" Version="3.1.17" />

<PackageReference Update="Newtonsoft.Json" Version="13.0.3" />
Expand Down
2 changes: 1 addition & 1 deletion packages/@jsii/go-runtime-test/project/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ require (
github.com/aws/jsii/jsii-calc/go/jcb v0.0.0
github.com/aws/jsii/jsii-calc/go/jsiicalc/v3 v3.20.120
github.com/aws/jsii/jsii-calc/go/scopejsiicalclib v0.0.0-devpreview
github.com/stretchr/testify v1.8.4
github.com/stretchr/testify v1.9.0
golang.org/x/lint v0.0.0-20210508222113-6edffad5e616
golang.org/x/tools v0.18.0
)
Expand Down
2 changes: 2 additions & 0 deletions packages/@jsii/go-runtime-test/project/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk=
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
github.com/yuin/goldmark v1.4.13 h1:fVcFKWvrslecOb/tg+Cc05dkeYx540o0FuFt3nUVDoE=
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
Expand Down
6 changes: 3 additions & 3 deletions packages/@jsii/go-runtime/jsii-runtime-go/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@ require (
github.com/mattn/go-isatty v0.0.20
github.com/stretchr/testify v1.8.4
golang.org/x/lint v0.0.0-20210508222113-6edffad5e616
golang.org/x/tools v0.17.0
golang.org/x/tools v0.18.0
)

require (
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/yuin/goldmark v1.4.13 // indirect
golang.org/x/mod v0.14.0 // indirect
golang.org/x/sys v0.14.0 // indirect
golang.org/x/mod v0.15.0 // indirect
golang.org/x/sys v0.17.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)

Expand Down
12 changes: 6 additions & 6 deletions packages/@jsii/go-runtime/jsii-runtime-go/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8U
golang.org/x/lint v0.0.0-20210508222113-6edffad5e616 h1:VLliZ0d+/avPrXXH+OakdXhpJuEoBZuwh1m2j7U6Iug=
golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=
golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg=
golang.org/x/mod v0.14.0 h1:dGoOF9QVLYng8IHTm7BAyWqCqSheQ5pYWGhzW00YJr0=
golang.org/x/mod v0.14.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
golang.org/x/mod v0.15.0 h1:SernR4v+D55NyBH2QiEQrlBAnj1ECL6AGrA5+dPaMY8=
golang.org/x/mod v0.15.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
Expand All @@ -30,12 +30,12 @@ golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5h
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q=
golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y=
golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
golang.org/x/tools v0.17.0 h1:FvmRgNOcs3kOa+T20R1uhfP9F6HgG2mfxDv1vrx1Htc=
golang.org/x/tools v0.17.0/go.mod h1:xsh6VxdV005rRVaS6SSAf9oiAqljS7UZUacMZ8Bnsps=
golang.org/x/tools v0.18.0 h1:k8NLag8AGHnn+PHbl7g43CtqZAwG60vZkLqgyZgIHgQ=
golang.org/x/tools v0.18.0/go.mod h1:GL7B4CwcLLeo59yx/9UWWuNOW1n3VZ4f5axWfML7Lcg=
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
Expand Down
4 changes: 2 additions & 2 deletions packages/@jsii/python-runtime/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
black~=23.12
black~=24.2
mypy==1.8.0
pip~=24.0
pytest~=8.0
pytest-mypy~=0.10
setuptools~=69.1.0
setuptools~=69.1.1
types-python-dateutil~=2.8
wheel~=0.42

Expand Down
51 changes: 17 additions & 34 deletions packages/@jsii/python-runtime/src/jsii/_kernel/providers/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,73 +45,56 @@ class BaseProvider(metaclass=abc.ABCMeta):
# much more Pythonic.

@abc.abstractmethod
def load(self, request: LoadRequest) -> LoadResponse:
...
def load(self, request: LoadRequest) -> LoadResponse: ...

@abc.abstractmethod
def getScriptCommand(
self, request: GetScriptCommandRequest
) -> GetScriptCommandResponse:
...
) -> GetScriptCommandResponse: ...

@abc.abstractmethod
def invokeBinScript(self, request: InvokeScriptRequest) -> InvokeScriptResponse:
...
def invokeBinScript(self, request: InvokeScriptRequest) -> InvokeScriptResponse: ...

@abc.abstractmethod
def create(self, request: CreateRequest) -> CreateResponse:
...
def create(self, request: CreateRequest) -> CreateResponse: ...

@abc.abstractmethod
def get(self, request: GetRequest) -> GetResponse:
...
def get(self, request: GetRequest) -> GetResponse: ...

@abc.abstractmethod
def set(self, request: SetRequest) -> SetResponse:
...
def set(self, request: SetRequest) -> SetResponse: ...

@abc.abstractmethod
def sget(self, request: StaticGetRequest) -> GetResponse:
...
def sget(self, request: StaticGetRequest) -> GetResponse: ...

@abc.abstractmethod
def sset(self, request: StaticSetRequest) -> SetResponse:
...
def sset(self, request: StaticSetRequest) -> SetResponse: ...

@abc.abstractmethod
def invoke(self, request: InvokeRequest) -> Union[InvokeResponse, Callback]:
...
def invoke(self, request: InvokeRequest) -> Union[InvokeResponse, Callback]: ...

@abc.abstractmethod
def sinvoke(self, request: StaticInvokeRequest) -> InvokeResponse:
...
def sinvoke(self, request: StaticInvokeRequest) -> InvokeResponse: ...

@abc.abstractmethod
def complete(self, request: CompleteRequest) -> CompleteResponse:
...
def complete(self, request: CompleteRequest) -> CompleteResponse: ...

@abc.abstractmethod
def sync_complete(
self, request: CompleteRequest, response_type: Type[KernelResponse]
) -> Union[InvokeResponse, GetResponse]:
...
) -> Union[InvokeResponse, GetResponse]: ...

@abc.abstractmethod
def delete(self, request: DeleteRequest) -> DeleteResponse:
...
def delete(self, request: DeleteRequest) -> DeleteResponse: ...

@abc.abstractmethod
def begin(self, request: BeginRequest) -> BeginResponse:
...
def begin(self, request: BeginRequest) -> BeginResponse: ...

@abc.abstractmethod
def end(self, request: EndRequest) -> EndResponse:
...
def end(self, request: EndRequest) -> EndResponse: ...

@abc.abstractmethod
def callbacks(self, request: CallbacksRequest) -> CallbacksResponse:
...
def callbacks(self, request: CallbacksRequest) -> CallbacksResponse: ...

@abc.abstractmethod
def stats(self, request: Optional[StatsRequest] = None) -> StatsResponse:
...
def stats(self, request: Optional[StatsRequest] = None) -> StatsResponse: ...
15 changes: 5 additions & 10 deletions packages/@jsii/python-runtime/src/jsii/_kernel/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,7 @@ class CreateRequest:


@attr.s(auto_attribs=True, frozen=True, slots=True)
class CreateResponse(ObjRef):
...
class CreateResponse(ObjRef): ...


@attr.s(auto_attribs=True, frozen=True, slots=True)
Expand All @@ -84,8 +83,7 @@ class DeleteRequest:


@attr.s(auto_attribs=True, frozen=True, slots=True)
class DeleteResponse:
...
class DeleteResponse: ...


@attr.s(auto_attribs=True, frozen=True, slots=True)
Expand Down Expand Up @@ -120,8 +118,7 @@ class SetRequest:


@attr.s(auto_attribs=True, frozen=True, slots=True)
class SetResponse:
...
class SetResponse: ...


@attr.s(auto_attribs=True, frozen=True, slots=True)
Expand Down Expand Up @@ -175,8 +172,7 @@ class Callback:


@attr.s(auto_attribs=True, frozen=True, slots=True)
class CallbacksRequest:
...
class CallbacksRequest: ...


@attr.s(auto_attribs=True, frozen=True, slots=True)
Expand Down Expand Up @@ -207,8 +203,7 @@ class NamingResponse:


@attr.s(auto_attribs=True, frozen=True, slots=True)
class StatsRequest:
...
class StatsRequest: ...


@attr.s(auto_attribs=True, frozen=True, slots=True)
Expand Down
3 changes: 1 addition & 2 deletions packages/@jsii/python-runtime/tests/test_compliance.py
Original file line number Diff line number Diff line change
Expand Up @@ -1178,8 +1178,7 @@ def return_struct(self):

class IndirectlyImplementsStructReturningDelegate(
ImplementsStructReturningDelegate
):
...
): ...

delegate = IndirectlyImplementsStructReturningDelegate()
consumer = ConsumePureInterface(delegate)
Expand Down
6 changes: 3 additions & 3 deletions packages/@jsii/python-runtime/tests/test_invoke_bin.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ def silence_node_deprecation_warnings():
environ[var] = "1"

# silence this for the next decades
environ[
"JSII_SILENCE_WARNING_END_OF_LIFE_NODE_VERSION"
] = "14,16,18,20,22,24,26,28,30,32,34"
environ["JSII_SILENCE_WARNING_END_OF_LIFE_NODE_VERSION"] = (
"14,16,18,20,22,24,26,28,30,32,34"
)

# Execute the test
yield
Expand Down
14 changes: 14 additions & 0 deletions packages/jsii-pacmak/lib/targets/python.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1700,6 +1700,20 @@ class PythonModule implements PythonType {

// Before we write anything else, we need to write out our module headers, this
// is where we handle stuff like imports, any required initialization, etc.

// If multiple packages use the same namespace (in Python, a directory) it
// depends on how they are laid out on disk if deep imports of multiple packages
// will succeed. `pip` merges all packages into the same directory, and deep
// imports work automatically. `bazel` puts packages into different directories,
// and `import aws_cdk.subpackage` will fail if `aws_cdk/__init__.py` and
// `aws_cdk/subpackage/__init__.py` are not in the same directory.
//
// We can get around this by using `pkgutil` to extend the search path for the
// current module (`__path__`) with all packages found on `sys.path`.
code.line('from pkgutil import extend_path');
code.line('__path__ = extend_path(__path__, __name__)');
code.line();

code.line('import abc');
code.line('import builtins');
code.line('import datetime');
Expand Down

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

Loading

0 comments on commit 6a52988

Please sign in to comment.