Skip to content

Python39 layer.zip - #8

Merged
nonbeing merged 5 commits into
nonbeing:masterfrom
smatsumt:python39-layer-zip
Jun 12, 2022
Merged

Python39 layer.zip#8
nonbeing merged 5 commits into
nonbeing:masterfrom
smatsumt:python39-layer-zip

Conversation

@smatsumt

@smatsumt smatsumt commented Jun 7, 2022

Copy link
Copy Markdown
Contributor

Sorry for bothering you!

I've forgotten update layer.zip Python3.9 version.

This PR includes following PR changes.

PR #6

Thank you very much for publishing such a nice repository!

Unfortunately, current build.sh would fail because MySQL GPG Key is updated.

This PR update MySQL GPG Key to fix the problem.

PR #7

This PR update Python 3.8 to Python 3.9, which is up-to-date version in AWS Lambda.

lambci/lambda Docker image does not provide 3.9 image, so I use public.ecr.aws/sam/build-python3.9 instead.

This was referenced Jun 7, 2022
@nonbeing

nonbeing commented Jun 7, 2022

Copy link
Copy Markdown
Owner

Thank you so much for the PR! 🙂

Will the new layer.zip work with Python3.8 also? In other words, if I merge in your changes, it won't break anything for existing users, right?

@smatsumt

smatsumt commented Jun 7, 2022

Copy link
Copy Markdown
Contributor Author

Will the new layer.zip work with Python3.8 also? In other words, if I merge in your changes, it won't break anything for existing users, right?

No, the new layer.zip work with only Python 3.9...

@smatsumt

smatsumt commented Jun 7, 2022

Copy link
Copy Markdown
Contributor Author

At least, MySQL GPG update is mandatory for Python 3.8 build, too.

So I recreated MySQL GPG update PR #9

@nonbeing

nonbeing commented Jun 8, 2022

Copy link
Copy Markdown
Owner

Thanks so much for PR #9 - I tested everything in that PR and it worked as expected and I have merged in PR #9 👍

As for your PR #8 (Python 3.9), let me run some tests and I can either:

  • create a new branch called something like python3.9 or
  • if it is backward compatible (which is what I suspect), then it can be directly merged into master branch

Give me a day or so, and I will accordingly merge in your PR. Sounds good?

@smatsumt

smatsumt commented Jun 8, 2022

Copy link
Copy Markdown
Contributor Author

Thanks a lot!

  • if it is backward compatible (which is what I suspect), then it can be directly merged into master branch

I guess, layer.zip created by this PR is not backward compatible.

build.sh in base implementation (Python 3.8) creates build_output/python/MySQLdb/_mysql.cpython-38-x86_64-linux-gnu.so.
And build_output/python/MySQLdb/_mysql.cpython-39-x86_64-linux-gnu.so for Python3.9

I think backward compatible layer.zip should contains both .so files. But my PR creates _mysql.cpython-39-x86_64-linux-gnu.so only.

@nonbeing

nonbeing commented Jun 9, 2022

Copy link
Copy Markdown
Owner

You're right, it's not backward-compatible with Python 3.8

I think it makes sense to keep master up-to-date with the latest Python version supported by Lambda. So I will merge in this PR to master. To keep supporting Python3.8 users, I'll create a new branch called Py3.8 or something.

@nonbeing
nonbeing merged commit 3f54445 into nonbeing:master Jun 12, 2022
@tk-iitd

tk-iitd commented Dec 27, 2022

Copy link
Copy Markdown

aws_lambda_layer_mysqlclient-2_1_1.zip
This is the layer for Python3.9 with the latest version of mysqlclient (v.2.1.1).

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