(core): Python package aws-cdk-lib is missing the __version__ attribute #28875
Labels
@aws-cdk/core
Related to core CDK functionality
effort/small
Small work item – less than a day of effort
feature-request
A feature should be added or improved.
p2
Describe the bug
The normal convention in the Python world is for pip-installed packages to report their version number via the
__version__
attribute. However,aws_cdk
does not currently support this, so code cannot introspect its environment to check whether, for example, the expected version ofaws_cdk
is being used.Expected Behavior
I expected it to work in the same was as most other Python packages, e.g
Thus, I should be able to do
Current Behavior
Reproduction Steps
This can be tested in a stand-alone environment easily enough
Show that version not defined
The version is available in the package metadata, it's just not exposed as a python attribute
Possible Solution
No response
Additional Information/Context
The following workaround can be used to get what appears to be the CDK version, but it's clearly an irregular approach.
CDK CLI Version
2.113.0 (build ccd534a)
Framework Version
No response
Node.js Version
v20.10.0
OS
macOS 13.4.1
Language
Python
Language Version
Python (3.11.6)
Other information
No response
The text was updated successfully, but these errors were encountered: