serverless / dashboard

MIT License
26 stars 10 forks source link

[Python Lambda SDK] Absolute imports should be made internal #814

Closed selcukcihan closed 1 year ago

selcukcihan commented 1 year ago

This PR builds on https://github.com/serverless/console/pull/812 and should be reviewed after we release the other PR in a breaking change:

  1. We should update the pyproject.toml to use the latest version
  2. Review the PR and merge
  3. Release a new version of the serverless-aws-lambda-sdk package

Description

Testing done

selcukcihan commented 1 year ago

@medikoo this PR will need to be taken care of after https://github.com/serverless/console/pull/812

selcukcihan commented 1 year ago

@medikoo this is now ready, I've enhanced the integration test to test the scenario where client bundles their own module named "secrets" and our sdk still works fine by importing the system's "secrets" module. I was going to add more to the list in the test but it interferes with other test modules such as flask, aiohttp which uses modules like "sys", "os, "typing", "contextvars" etc. Which is fair, because the customer can't both use aiohttp and have a module named "typing" as it will shadow the system module and aiohttp will break.