Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

aws_cloudwatch, aws_secretsmanager: SyntaxWarning: invalid escape sequence '\|' #29518

Closed
garysassano opened this issue Mar 16, 2024 · 2 comments
Assignees
Labels
@aws-cdk/aws-cloudwatch Related to Amazon CloudWatch bug This issue is a bug. duplicate This issue is a duplicate.

Comments

@garysassano
Copy link

Describe the bug

❯ pj deploy
👾 deploy | cdk deploy
/home/user/github/cdk-aws-app/.venv/lib/python3.12/site-packages/aws_cdk/aws_cloudwatch/__init__.py:1: SyntaxWarning: invalid escape sequence '\|'
  '''
/home/user/github/cdk-aws-app/.venv/lib/python3.12/site-packages/aws_cdk/aws_secretsmanager/__init__.py:1: SyntaxWarning: invalid escape sequence '\`'
  '''

Expected Behavior

No warnings displayed when using cdk deploy.

Current Behavior

Warnings are displayed for the aws_cloudwatch and aws_secretsmanager packages.

Reproduction Steps

cdk deploy

Possible Solution

No response

Additional Information/Context

No response

CDK CLI Version

2.127.0

Framework Version

No response

Node.js Version

20.11.1

OS

Ubuntu 22.04.3 LTS

Language

Python

Language Version

3.12.1

Other information

No response

@garysassano garysassano added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Mar 16, 2024
@github-actions github-actions bot added the @aws-cdk/aws-cloudwatch Related to Amazon CloudWatch label Mar 16, 2024
@tim-finnigan tim-finnigan self-assigned this Mar 18, 2024
@tim-finnigan tim-finnigan added investigating This issue is being investigated and/or work is in progress to resolve the issue. and removed needs-triage This issue or PR still needs to be triaged. labels Mar 18, 2024
@tim-finnigan
Copy link

Thanks for reaching out. This looks like a duplicate of aws/jsii#4532. I think this comment may have identified the underlying issue:

This seems to be caused by the generated code that puts the documentation at the top of the module (so maybe this is really a jsii issue?). The fix seems to be as simple as putting an r at the top before the ''', i.e. make it a raw string, so that way Python doesn't try to interpret the backslashes as escape characters.

This needs further review but I think we should continue tracking in aws/jsii#4532 going forward to consolidate the investigation and discussion.

@tim-finnigan tim-finnigan added duplicate This issue is a duplicate. and removed investigating This issue is being investigated and/or work is in progress to resolve the issue. labels Mar 18, 2024
@tim-finnigan tim-finnigan closed this as not planned Won't fix, can't repro, duplicate, stale Mar 18, 2024
Copy link

⚠️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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-cloudwatch Related to Amazon CloudWatch bug This issue is a bug. duplicate This issue is a duplicate.
Projects
None yet
Development

No branches or pull requests

2 participants