Skip to content

Conversation

@briensea
Copy link
Contributor

Issue #, if available:
N/A

Description of changes:
Control unicode encoding behaviour based on execution environment.

Target (OCI, Managed Runtime, both):
Both.

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

@alex-pewpew
Copy link
Contributor

Recommendation is to not implement the features gating abstraction for now to unblock safe version bump, and polish this PR

class Encoder(json.JSONEncoder):
def __init__(self):
super().__init__(use_decimal=False, ensure_ascii=False)
if os.environ.get("AWS_EXECUTION_ENV") in {"AWS_Lambda_python3.12"}:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nitpicks:

if os.environ.get("AWS_EXECUTION_ENV") == "AWS_Lambda_python3.12":

to avoid extra set object creation

@alex-pewpew
Copy link
Contributor

LGTM, thank you!

@briensea briensea merged commit 80eefef into aws:main Oct 27, 2023
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.

3 participants