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

#1966: Remove future library from project. #2067

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion requirements.in
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ pip>=9.0.1
python-dateutil
python-slugify
PyYAML
future
# previous version don't work with urllib3 1.24
requests>=2.20.0
six
Expand Down
1 change: 0 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ chardet==3.0.4 # via requests
click==7.1.2 # via cfn-flip, kappa, pip-tools
docutils==0.15.2 # via botocore
durationpy==0.5 # via -r requirements.in (line 3)
future==0.18.2 # via -r requirements.in (line 11)
hjson==3.0.1 # via -r requirements.in (line 4)
idna==2.9 # via requests
jmespath==0.10.0 # via -r requirements.in (line 5), boto3, botocore
Expand Down
1 change: 0 additions & 1 deletion test_requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ docutils==0.15.2 # via botocore
durationpy==0.5 # via -r requirements.in (line 3)
flake8==3.8.3 # via -r test_requirements.in (line 3)
flask==1.1.2 # via -r test_requirements.in (line 4)
future==0.18.2 # via -r requirements.in (line 11)
hjson==3.0.1 # via -r requirements.in (line 4)
idna==2.9 # via requests
itsdangerous==1.1.0 # via flask
Expand Down
3 changes: 0 additions & 3 deletions tests/test_event_script_app.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
from __future__ import print_function


def handler_for_events(event, context):
print('Event:', event)
return True
3 changes: 1 addition & 2 deletions zappa/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
Deploy arbitrary Python programs as serverless Zappa applications.

"""
from past.builtins import basestring
from builtins import input, bytes

import argcomplete
Expand Down Expand Up @@ -1549,7 +1548,7 @@ def check_environment(self, environment):

non_strings = []
for (k,v) in environment.items():
if not isinstance(v, basestring):
if not isinstance(v, str):
non_strings.append(k)
if non_strings:
raise ValueError("The following environment variables are not strings: {}".format(", ".join(non_strings)))
Expand Down
4 changes: 1 addition & 3 deletions zappa/utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
import stat
import sys

from past.builtins import basestring

from urllib.parse import urlparse

LOG = logging.getLogger(__name__)
Expand Down Expand Up @@ -481,7 +479,7 @@ def validate_name(name, maxlen=80):
Return: the name
Raise: InvalidAwsLambdaName, if the name is invalid.
"""
if not isinstance(name, basestring):
if not isinstance(name, str):
msg = "Name must be of type string"
raise InvalidAwsLambdaName(msg)
if len(name) > maxlen:
Expand Down