diff --git a/programming/language/python3/python3-zappa/actions.py b/programming/language/python3/python3-zappa/actions.py index 0446538e97..3530842eb3 100644 --- a/programming/language/python3/python3-zappa/actions.py +++ b/programming/language/python3/python3-zappa/actions.py @@ -6,7 +6,6 @@ # See the file http://www.gnu.org/licenses/gpl.txt from pisi.actionsapi import pythonmodules -from pisi.actionsapi import pisitools from pisi.actionsapi import shelltools @@ -17,6 +16,4 @@ def build(): pythonmodules.compile(pyVer="3") def install(): - pythonmodules.install(pyVer="3") - - pisitools.dodoc("README*","PKG-INFO","MANIFEST*") + pythonmodules.install(pyVer="3") \ No newline at end of file diff --git a/programming/language/python3/python3-zappa/files/SupportForRunningOnPy38.patch b/programming/language/python3/python3-zappa/files/SupportForRunningOnPy38.patch new file mode 100644 index 0000000000..996589fc52 --- /dev/null +++ b/programming/language/python3/python3-zappa/files/SupportForRunningOnPy38.patch @@ -0,0 +1,123 @@ +From 261d0a4c9a6201d61cc05222c2f1456112f3566e Mon Sep 17 00:00:00 2001 +From: Amit Shah +Date: Thu, 12 Dec 2019 11:24:53 +0000 +Subject: [PATCH] Support for running on python 3.8 + +--- + .travis.yml | 1 + + setup.py | 1 + + tests/test_app.py | 10 +++++++++- + tests/tests.py | 13 +++++++++++++ + zappa/__init__.py | 2 +- + zappa/core.py | 2 +- + zappa/utilities.py | 4 +++- + 7 files changed, 29 insertions(+), 4 deletions(-) + +diff --git a/.travis.yml b/.travis.yml +index cd59b5b4..9a7e9488 100644 +--- a/.travis.yml ++++ b/.travis.yml +@@ -3,6 +3,7 @@ python: + - "2.7" + - "3.6" + - "3.7" ++ - "3.8" + dist: xenial + # command to install dependencies + cache: +diff --git a/setup.py b/setup.py +index afe4d72f..2cc18602 100755 +--- a/setup.py ++++ b/setup.py +@@ -52,6 +52,7 @@ + 'Programming Language :: Python :: 2.7', + 'Programming Language :: Python :: 3.6', + 'Programming Language :: Python :: 3.7', ++ 'Programming Language :: Python :: 3.8', + 'Framework :: Django', + 'Framework :: Django :: 1.11', + 'Framework :: Django :: 2.0', +diff --git a/tests/test_app.py b/tests/test_app.py +index 021dc971..5a1ea08d 100644 +--- a/tests/test_app.py ++++ b/tests/test_app.py +@@ -1,5 +1,13 @@ +-from cgi import parse_qs, escape + from zappa.asynchronous import task ++try: ++ from urllib.parse import parse_qs ++except ImportError: ++ from cgi import parse_qs ++ ++try: ++ from html import escape ++except ImportError: ++ from cgi import escape + + + def hello_world(environ, start_response): +diff --git a/tests/tests.py b/tests/tests.py +index 76b241f9..3520719f 100644 +--- a/tests/tests.py ++++ b/tests/tests.py +@@ -174,6 +174,19 @@ def test_get_manylinux_python37(self): + self.assertTrue(os.path.isfile(path)) + os.remove(path) + ++ def test_get_manylinux_python38(self): ++ z = Zappa(runtime='python3.8') ++ self.assertIsNotNone(z.get_cached_manylinux_wheel('psycopg2', '2.7.6')) ++ self.assertIsNone(z.get_cached_manylinux_wheel('derp_no_such_thing', '0.0')) ++ ++ # mock with a known manylinux wheel package so that code for downloading them gets invoked ++ mock_installed_packages = {'psycopg2': '2.7.6'} ++ with mock.patch('zappa.core.Zappa.get_installed_packages', return_value=mock_installed_packages): ++ z = Zappa(runtime='python3.8') ++ path = z.create_lambda_zip(handler_file=os.path.realpath(__file__)) ++ self.assertTrue(os.path.isfile(path)) ++ os.remove(path) ++ + def test_should_use_lambda_packages(self): + z = Zappa(runtime='python2.7') + +diff --git a/zappa/__init__.py b/zappa/__init__.py +index 08be42cb..629ef075 100644 +--- a/zappa/__init__.py ++++ b/zappa/__init__.py +@@ -1,6 +1,6 @@ + import sys + +-SUPPORTED_VERSIONS = [(2, 7), (3, 6), (3, 7)] ++SUPPORTED_VERSIONS = [(2, 7), (3, 6), (3, 7), (3, 8)] + + python_major_version = sys.version_info[0] + python_minor_version = sys.version_info[1] +diff --git a/zappa/core.py b/zappa/core.py +index 09af9132..d4725dc0 100644 +--- a/zappa/core.py ++++ b/zappa/core.py +@@ -665,7 +665,7 @@ def splitpath(path): + # This is a special case! + # SQLite3 is part of the _system_ Python, not a package. Still, it lives in `lambda-packages`. + # Everybody on Python3 gets it! +- if self.runtime in ("python3.6", "python3.7"): ++ if self.runtime in ("python3.6", "python3.7", "python3.8"): + print(" - sqlite==python3: Using precompiled lambda package") + self.extract_lambda_package('sqlite3', temp_project_path) + +diff --git a/zappa/utilities.py b/zappa/utilities.py +index 6e8b83d7..5facc968 100644 +--- a/zappa/utilities.py ++++ b/zappa/utilities.py +@@ -181,8 +181,10 @@ def get_runtime_from_python_version(): + else: + if sys.version_info[1] <= 6: + return 'python3.6' +- else: ++ elif sys.version_info[1] <= 7: + return 'python3.7' ++ else: ++ return 'python3.8' + + ## + # Async Tasks diff --git a/programming/language/python3/python3-zappa/pspec.xml b/programming/language/python3/python3-zappa/pspec.xml index 0da47a0fcf..4c694ea9dd 100644 --- a/programming/language/python3/python3-zappa/pspec.xml +++ b/programming/language/python3/python3-zappa/pspec.xml @@ -1,5 +1,5 @@ - + python3-zappa @@ -9,21 +9,26 @@ ismetsezer1996@gmail.com LGPLv2.1 + programming.language.python3 library app:console Zappa - Serverless Python Server-less Python Web Services for AWS Lambda and API Gateway - https://files.pythonhosted.org/packages/ab/ee/da7efa911104a6b4827e2acfa06177a1739c061ed8cc7d0257927223be9f/zappa-0.46.2.tar.gz + https://github.com/Miserlou/Zappa/archive/0.48.2.tar.gz - python3-devel - python3-setuptools + python3-devel + python3-setuptools + + SupportForRunningOnPy38.patch + python3-zappa + Zappa - Serverless Python - python3 + python3 /usr/lib @@ -34,6 +39,13 @@ + + 2020-01-14 + 0.48.2 + Version bump. + Blue Devil + bluedevil@sctzine.com + 2018-08-30 0.46.2 @@ -49,4 +61,4 @@ ismetsezer1996@gmail.com - + \ No newline at end of file diff --git a/programming/language/python3/python3-zappa/translations.xml b/programming/language/python3/python3-zappa/translations.xml new file mode 100644 index 0000000000..33f909905c --- /dev/null +++ b/programming/language/python3/python3-zappa/translations.xml @@ -0,0 +1,8 @@ + + + + python3-zappa + Zappa - Sunucusuz Python + python3-zappa, AWS Lambda ve API Ağ geçidi için sunucusuz Python ağ hizmetleri sunan python arayüzüdür. + + \ No newline at end of file