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

adding support for Python 3.10 #1231

Merged
merged 1 commit into from
May 8, 2023
Merged

adding support for Python 3.10 #1231

merged 1 commit into from
May 8, 2023

Conversation

dennybiasiolli
Copy link
Contributor

@dennybiasiolli dennybiasiolli commented Apr 18, 2023

Ref #1160, #1124

@sridhar562345
Copy link
Contributor

@dennybiasiolli

There are changes that need to be done regarding manylinux formats for 3.10

Zappa/zappa/core.py

Lines 308 to 324 in 73ee393

if self.runtime == "python3.7":
self.manylinux_suffix_start = "cp37m"
elif self.runtime == "python3.8":
# The 'm' has been dropped in python 3.8+ since builds with and without pymalloc are ABI compatible
# See https://github.com/pypa/manylinux for a more detailed explanation
self.manylinux_suffix_start = "cp38"
else:
self.manylinux_suffix_start = "cp39"
# AWS Lambda supports manylinux1/2010, manylinux2014, and manylinux_2_24
manylinux_suffixes = ("_2_24", "2014", "2010", "1")
self.manylinux_wheel_file_match = re.compile(
rf'^.*{self.manylinux_suffix_start}-(manylinux_\d+_\d+_x86_64[.])?manylinux({"|".join(manylinux_suffixes)})_x86_64[.]whl$' # noqa: E501
)
self.manylinux_wheel_abi3_file_match = re.compile(
rf'^.*cp3.-abi3-manylinux({"|".join(manylinux_suffixes)})_x86_64.whl$'

@dennybiasiolli
Copy link
Contributor Author

Thank you @sridhar562345 , changes added 😉

@buko106
Copy link

buko106 commented Apr 24, 2023

any update?

Copy link
Collaborator

@hellno hellno left a comment

Choose a reason for hiding this comment

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

LGTM 🔥
After approving the tests failed: can you look into those Lint errors in the build? Can I support in any way to fix those?
I assume when you run make black and make isort the lint errors wil be fixed.

@dennybiasiolli
Copy link
Contributor Author

@hellno sure, give me a couple of hours.
I forgot to check the linting, I'm sorry

Copy link
Collaborator

@monkut monkut left a comment

Choose a reason for hiding this comment

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

Just curious as to why all of format changes?
Is this the result of running black on previously untouched code? Or, is this the result of a local dev environment configuration?

@monkut
Copy link
Collaborator

monkut commented May 1, 2023

Unfortunately it looks like the nose testsuite that zappa has been using doesn't support python 3.10.
Looks like we will need to migrate our tests from nose to pytest.

@sridhar562345
Copy link
Contributor

Just curious as to why all of format changes? Is this the result of running black on previously untouched code? Or, is this the result of a local dev environment configuration?

The new version of Black has added new code format guidelines, so some blank lines have been removed.

@dennybiasiolli
Copy link
Contributor Author

Just curious as to why all of format changes? Is this the result of running black on previously untouched code? Or, is this the result of a local dev environment configuration?

As @sridhar562345 said, something in the update of black.
I just created a specific PR (here #1238) in order to fix the style there instead of having to do the same in every PR:

@dennybiasiolli dennybiasiolli mentioned this pull request May 1, 2023
@dennybiasiolli
Copy link
Contributor Author

Unfortunately it looks like the nose testsuite that zappa has been using doesn't support python 3.10. Looks like we will need to migrate our tests from nose to pytest.

You asked for it 😉 --> #1239

@dennybiasiolli
Copy link
Contributor Author

Rebased on top of #1239 to use pytest for tests

@coveralls
Copy link

coveralls commented May 3, 2023

Coverage Status

Coverage: 74.403% (+0.03%) from 74.375% when pulling 9d2aeb7 on dennybiasiolli:python310 into 7a5e153 on zappa:master.

@monkut
Copy link
Collaborator

monkut commented May 6, 2023

Strange that 3.7/3.8 coverage is down... can you find a way to add a couple of simple testcases to bump up the coverage?

@dennybiasiolli
Copy link
Contributor Author

@monkut the reason for the coverage decrease is here: https://coveralls.io/jobs/120605047/source_files/7598797035#L213

We added specific lines of code for python 3.9 or 3.10, so more lines, but less executed code when on 3.7, 3.8.
I think you can consider safe the coverage decrease in this case.

@monkut monkut merged commit bc0d0da into zappa:master May 8, 2023
@dennybiasiolli dennybiasiolli deleted the python310 branch May 8, 2023 05:20
@devxoul
Copy link

devxoul commented May 10, 2023

I love this! Do you have any plan to bump the new release?

I just saw 0.57.0 has release 🎉

Ian288 pushed a commit to tackle-io/Zappa that referenced this pull request Jul 11, 2023
BarNehemia added a commit to Lightricks/Zappa that referenced this pull request Aug 10, 2023
…zappa-0.57.0

* commit '0b1eab14ca39c3a3bfb4e915347e07495171dcba': (27 commits)
  updating workflow actions to remove deprecation warnings (zappa#1243)
  📝 CHANGELOG.md update for 0.57.0 (zappa#1246)
  fixing compatibility with Django 4.2 (zappa#1237)
  Update Readme with patreon and donors (zappa#1234)
  adding support for Python 3.10 (zappa#1231)
  Nose to pytest (zappa#1239)
  lint: updating code style with `make black` (zappa#1238)
  Alternative way to check if running in Docker (zappa#1204)
  📝 CHANGELOG.md update for 0.56.0 release (zappa#1187)
  Improve `get_best_match_zone()` to match by most matched components instead of by length of domain (zappa#1193)
  Bypass python version runtime check when code run in docker (zappa#1180)
  Be able to pass in a batch window when using batch size (zappa#1118)
  Correction to README. (zappa#1177)
  (zappa#908) Update BINARY_SUPPORT to use Content-Encoding to identify if data is binary (zappa#1155)
  Remove special check for Django<1.7, fix for zappa#1158  (zappa#1159)
  Resolve (zappa#410) Logs are missing query strings (zappa#1165)
  Handle spaces in x-forwared-for/remove six (zappa#1127) (zappa#1163)
  add feature (zappa#704) Check if args/kwargs are JSON Serializable while running locally (zappa#1154)
  docs: Add documentation for s3 event object key_filters (zappa#1169)
  Add feature pyenv virtualenv detecting .python-version file (zappa#1153)
  ...

# Conflicts:
#	zappa/cli.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants