Closed skinny85 closed 3 years ago
I have a suspicion this might be related to this comment from #15722, which resulted in changes to the jsii
keys of the unstable packages on the v2-main
branch, like these.
All of the service module packages (both stable and experimental) include a from .._jsii import *
import line within their __init__.py
file.
This works for all of the stable services, because they are all in a flat directory structure alongside the _jsii
module:
% ls -1 ./lib/python3.9/site-packages/aws_cdk | head
__init__.py
__pycache__
_jsii
alexa_ask
alpha
aws_accessanalyzer
aws_acmpca
aws_amazonmq
aws_apigateway
aws_appconfig
However, the alpha packages are all one level deeper (under the alpha
directory), meaning the correct import statement would be from ..._jsii import *
(note the extra .
). This is indeed related to the changes to add a nested module name (e.g., "aws-cdk.alpha.aws-amplify") to the jsii packages.
Still tracking down where this import is being generated and if there is a way to customize it.
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.
After #15722 was merged, the
cdk-v2-main
pipeline failed in the doc build:Looks like the
@aws-cdk-alpha/*
packages are somehow being picked up by the Python doc build, despite not producing an artifact frompack
.Perhaps it's something in the
gen_doc_index.py
file in the doc build for Python?