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

chore: Add decorator @deprecated and add it to is_str() #2889

Merged
merged 7 commits into from
Feb 10, 2023

Conversation

aahung
Copy link
Contributor

@aahung aahung commented Feb 10, 2023

Issue #, if available

Description of changes

Description of how you validated changes

Create a file "bin/test_deprecation.py" with the content:

from samtranslator.model.types import is_str

if __name__ == "__main__":
    is_str()("hi")

Then:

(samtranslator37) ~/P/serverless-application-model ❯❯❯ python bin/test_deprecation.py
bin/test_deprecation.py:4: DeprecationWarning: is_str is deprecated, please consider to use IS_STR
  is_str()("hi")

Checklist

Examples?

Please reach out in the comments if you want to add an example. Examples will be
added to sam init through aws/aws-sam-cli-app-templates.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@aahung aahung requested a review from a team as a code owner February 10, 2023 20:08
@aahung aahung enabled auto-merge (squash) February 10, 2023 20:18
@aahung aahung changed the title chore: Add decorator @deprecated and @pending_deprecation chore: Add decorator @deprecated and add it to is_str() Feb 10, 2023
@aahung aahung merged commit 0da8c8c into aws:develop Feb 10, 2023
@aahung aahung deleted the add-deprecate-warning-utils branch February 10, 2023 20:35
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

Successfully merging this pull request may close these issues.

None yet

4 participants