From 6f27faf0d252d160398e838d6e691dfd0a6a3324 Mon Sep 17 00:00:00 2001 From: YANG Xudong Date: Tue, 12 Nov 2019 18:08:39 +0900 Subject: [PATCH 1/9] Remove config on vendored library because it is removed. --- lambda_local/main.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/lambda_local/main.py b/lambda_local/main.py index 315962e..1e42398 100644 --- a/lambda_local/main.py +++ b/lambda_local/main.py @@ -10,7 +10,6 @@ import logging import os import timeit -from botocore.vendored.requests.packages import urllib3 import multiprocessing from . import event @@ -22,7 +21,6 @@ logging.basicConfig(stream=sys.stdout, level=logging.INFO, format='[%(name)s - %(levelname)s - %(asctime)s] %(message)s') -urllib3.disable_warnings() ERR_TYPE_EXCEPTION = 0 From 321efb25f1dafbba05deb8960cffe725d194d3d1 Mon Sep 17 00:00:00 2001 From: YANG Xudong Date: Tue, 12 Nov 2019 18:29:18 +0900 Subject: [PATCH 2/9] Try to fix pytest error on py27. --- setup.py | 1 + 1 file changed, 1 insertion(+) diff --git a/setup.py b/setup.py index b569510..6965ef5 100644 --- a/setup.py +++ b/setup.py @@ -45,6 +45,7 @@ def run_tests(self): packages=find_packages(exclude=['examples', 'tests']), include_package_data=True, zip_safe=False, + python_requires='>=2.7 >=3.6', tests_require=['pytest'], cmdclass={'test': PyTest}, install_requires=['boto3'], From fb17e7f49b23a873520a6572abb888f204bc021c Mon Sep 17 00:00:00 2001 From: YANG Xudong Date: Tue, 12 Nov 2019 18:34:37 +0900 Subject: [PATCH 3/9] Fix versions. --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 6965ef5..fbb65fd 100644 --- a/setup.py +++ b/setup.py @@ -45,7 +45,7 @@ def run_tests(self): packages=find_packages(exclude=['examples', 'tests']), include_package_data=True, zip_safe=False, - python_requires='>=2.7 >=3.6', + python_requires='>=2.7,!=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*, <4', tests_require=['pytest'], cmdclass={'test': PyTest}, install_requires=['boto3'], From 7c2583a7e4936a59dbe0883736efc007387a3ac2 Mon Sep 17 00:00:00 2001 From: Iskandar Setiadi Date: Tue, 12 Nov 2019 19:16:33 +0900 Subject: [PATCH 4/9] Set specific pytest version for Python 2 --- setup.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index fbb65fd..04f9858 100644 --- a/setup.py +++ b/setup.py @@ -25,6 +25,10 @@ def run_tests(self): version = "0.1.8" +TEST_REQUIRE = ['pytest'] +if sys.version_info[0] == 2: + TEST_REQUIRE = ['pytest==4.6.3'] + setup(name="python-lambda-local", version=version, description="Run lambda function in python on local machine.", @@ -46,7 +50,7 @@ def run_tests(self): include_package_data=True, zip_safe=False, python_requires='>=2.7,!=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*, <4', - tests_require=['pytest'], + tests_require=TEST_REQUIRE, cmdclass={'test': PyTest}, install_requires=['boto3'], entry_points={ From 6429155529e14438185ada8bc7c8ccc4097134be Mon Sep 17 00:00:00 2001 From: Iskandar Setiadi Date: Tue, 12 Nov 2019 19:21:05 +0900 Subject: [PATCH 5/9] Remove python_requires line --- setup.py | 1 - 1 file changed, 1 deletion(-) diff --git a/setup.py b/setup.py index 04f9858..1d26fe7 100644 --- a/setup.py +++ b/setup.py @@ -49,7 +49,6 @@ def run_tests(self): packages=find_packages(exclude=['examples', 'tests']), include_package_data=True, zip_safe=False, - python_requires='>=2.7,!=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*, <4', tests_require=TEST_REQUIRE, cmdclass={'test': PyTest}, install_requires=['boto3'], From 6462db47e40e7ee6ea3d5e2d3b393301fb07c095 Mon Sep 17 00:00:00 2001 From: YANG Xudong Date: Fri, 15 Nov 2019 18:13:40 +0900 Subject: [PATCH 6/9] Add missing CHANGELOG entries. --- CHANGELOG.txt | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 5776446..7a70fcd 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -22,3 +22,23 @@ Version 0.1.4 ------------- - Support Python 3.6. + +Version 0.1.5 +------------- + + - Support reading environment variables from file. + +Version 0.1.6 +------------- + + - Add timeout feature for Windows. + +Version 0.1.7 +------------- + + - Add tests in CI. + +Version 0.1.8 +------------- + + - Support running as a library. From 80cd952f1f24fd42049626b3dff9ec391e4d1c58 Mon Sep 17 00:00:00 2001 From: YANG Xudong Date: Fri, 15 Nov 2019 18:31:22 +0900 Subject: [PATCH 7/9] Update copyright information. --- lambda_local/__init__.py | 2 +- lambda_local/context.py | 2 +- lambda_local/event.py | 2 +- lambda_local/main.py | 2 +- lambda_local/timeout.py | 2 +- setup.py | 4 ++-- tests/__init__.py | 2 +- tests/basic_test.py | 2 +- tests/test_direct_invocations.py | 2 +- 9 files changed, 10 insertions(+), 10 deletions(-) diff --git a/lambda_local/__init__.py b/lambda_local/__init__.py index 45b457b..2a21140 100644 --- a/lambda_local/__init__.py +++ b/lambda_local/__init__.py @@ -1,7 +1,7 @@ ''' python-lambda-local: Main module -Copyright 2015-2018 HDE, Inc. +Copyright 2015-2019 HENNGE K.K. (formerly known as HDE, Inc.) Licensed under MIT. ''' diff --git a/lambda_local/context.py b/lambda_local/context.py index 1f21657..dbc287e 100644 --- a/lambda_local/context.py +++ b/lambda_local/context.py @@ -1,5 +1,5 @@ ''' -Copyright 2015-2018 HDE, Inc. +Copyright 2015-2019 HENNGE K.K. (formerly known as HDE, Inc.) Licensed under MIT. ''' from __future__ import print_function diff --git a/lambda_local/event.py b/lambda_local/event.py index 3d0f23f..a9d3c98 100644 --- a/lambda_local/event.py +++ b/lambda_local/event.py @@ -1,5 +1,5 @@ ''' -Copyright 2015-2018 HDE, Inc. +Copyright 2015-2019 HENNGE K.K. (formerly known as HDE, Inc.) Licensed under MIT. ''' diff --git a/lambda_local/main.py b/lambda_local/main.py index 1e42398..f3ff166 100644 --- a/lambda_local/main.py +++ b/lambda_local/main.py @@ -1,5 +1,5 @@ ''' -Copyright 2015-2018 HDE, Inc. +Copyright 2015-2019 HENNGE K.K. (formerly known as HDE, Inc.) Licensed under MIT. ''' diff --git a/lambda_local/timeout.py b/lambda_local/timeout.py index 9d0354a..5dcbd58 100644 --- a/lambda_local/timeout.py +++ b/lambda_local/timeout.py @@ -1,5 +1,5 @@ ''' -Copyright 2015-2018 HDE, Inc. +Copyright 2015-2019 HENNGE K.K. (formerly known as HDE, Inc.) Licensed under MIT. ''' diff --git a/setup.py b/setup.py index 1d26fe7..a6a85b5 100644 --- a/setup.py +++ b/setup.py @@ -1,7 +1,7 @@ ''' python-lambda-local: Run lambda function in python on local machine. -Copyright 2015-2018 HDE, Inc. +Copyright 2015-2019 HENNGE K.K. (formerly known as HDE, Inc.) Licensed under MIT. ''' import io @@ -23,7 +23,7 @@ def run_tests(self): sys.exit(pytest.main(self.test_args)) -version = "0.1.8" +version = "0.1.9" TEST_REQUIRE = ['pytest'] if sys.version_info[0] == 2: diff --git a/tests/__init__.py b/tests/__init__.py index 98c7f83..9e074ad 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -5,6 +5,6 @@ Organize tests into files, each named xxx_test.py Read more here: http://pytest.org/ -Copyright 2015 HDE, Inc. +Copyright 2015-2019 HENNGE K.K. (formerly known as HDE, Inc.) Licensed under MIT ''' diff --git a/tests/basic_test.py b/tests/basic_test.py index 427173d..46e81d2 100644 --- a/tests/basic_test.py +++ b/tests/basic_test.py @@ -5,7 +5,7 @@ Write each test as a function named test_. Read more here: http://pytest.org/ -Copyright 2015 HDE, Inc. +Copyright 2015-2019 HENNGE K.K. (formerly known as HDE, Inc.) Licensed under MIT ''' diff --git a/tests/test_direct_invocations.py b/tests/test_direct_invocations.py index 129666c..c496a4d 100644 --- a/tests/test_direct_invocations.py +++ b/tests/test_direct_invocations.py @@ -4,7 +4,7 @@ Meant for use with py.test. -Copyright 2015 HDE, Inc. +Copyright 2015-2019 HENNGE K.K. (formerly known as HDE, Inc.) Licensed under MIT ''' import json From 5aaad087928e878961c42daf4a7b3fdd839157d7 Mon Sep 17 00:00:00 2001 From: YANG Xudong Date: Fri, 15 Nov 2019 18:38:47 +0900 Subject: [PATCH 8/9] Update changelog. --- CHANGELOG.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 7a70fcd..5325016 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -42,3 +42,8 @@ Version 0.1.8 ------------- - Support running as a library. + +Version 0.1.9 +------------- + + - Support latest boto3. From 5b9d3eae90658ae57aa6b76f662c49cbc095b626 Mon Sep 17 00:00:00 2001 From: YANG Xudong Date: Fri, 15 Nov 2019 18:41:42 +0900 Subject: [PATCH 9/9] Update for python 3.7. --- setup.py | 2 +- wercker.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/setup.py b/setup.py index a6a85b5..de50429 100644 --- a/setup.py +++ b/setup.py @@ -38,7 +38,7 @@ def run_tests(self): 'Operating System :: POSIX', 'Programming Language :: Python', 'Programming Language :: Python :: 2.7', - 'Programming Language :: Python :: 3.6', + 'Programming Language :: Python :: 3.7', 'License :: OSI Approved :: MIT License' ], keywords="AWS Lambda", diff --git a/wercker.yml b/wercker.yml index 7d3c6bf..4dd83fd 100644 --- a/wercker.yml +++ b/wercker.yml @@ -1,4 +1,4 @@ -box: python:2.7-slim +box: python:3.7-slim build: steps: @@ -32,7 +32,7 @@ build-py2: python setup.py test build-py3: - box: python:3.6-slim + box: python:3.7-slim steps: - script: name: virtualenv install