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

Syntax warnings on Python 3.12 #1088

Open
siennathesane opened this issue Aug 7, 2024 · 2 comments
Open

Syntax warnings on Python 3.12 #1088

siennathesane opened this issue Aug 7, 2024 · 2 comments

Comments

@siennathesane
Copy link

When running cfn on Python 3.12, it throws this syntax error:

$ cfn --version
/opt/homebrew/Cellar/cloudformation-cli/0.2.38/libexec/lib/python3.12/site-packages/rpdk/core/contract/hook_client.py:451: SyntaxWarning: invalid escape sequence '\s'
  regex = "__CFN_HOOK_START_RESPONSE__([\s\S]*)__CFN_HOOK_END_RESPONSE__"  # noqa: W605,B950 # pylint: disable=C0301
/opt/homebrew/Cellar/cloudformation-cli/0.2.38/libexec/lib/python3.12/site-packages/rpdk/core/contract/resource_client.py:738: SyntaxWarning: invalid escape sequence '\s'
  regex = "__CFN_RESOURCE_START_RESPONSE__([\s\S]*)__CFN_RESOURCE_END_RESPONSE__"  # noqa: W605,B950 # pylint: disable=C0301
cfn 0.2.38
@Scribbd
Copy link

Scribbd commented Aug 9, 2024

How did you install Python, and how are you running cfn-cli?

If cfn-cli or Python was installed via brew, I noticed this occurring with many of my tools that used the brew python as the base environment after an update to Python. I use pipx and reinstalled all tools with a 3.12 runtime created by pyenv.

I had to reinstall python from scratch to resolve the issues I was facing for the tools that do not work well within pipx.

@siennathesane
Copy link
Author

I installed it with pip install cloudformation-cli using my homebrew python

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants