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

Python 3.6 Support #793

Closed
Miserlou opened this issue Apr 18, 2017 · 10 comments
Closed

Python 3.6 Support #793

Miserlou opened this issue Apr 18, 2017 · 10 comments

Comments

@Miserlou
Copy link
Owner

https://aws.amazon.com/releasenotes/5198208415517126

@jleclanche
Copy link

Is this where the party is? :)

@Miserlou
Copy link
Owner Author

Yep!

I don't think this will actually be too hard to take care of, I've tried to keep most of the code forward-compatible so far, at least on the Lambda side. Some parts of cli.py and zappa.py may need small refactors here and there, especially around some of the imports, string casts and hex operators. We'll also have to wait 24 hours for it to actually arrive on AWS, according to that link.

@ryansb
Copy link

ryansb commented Apr 18, 2017

It's been available in us-east-2 all day, so it depends on your region.

@FlipperPA
Copy link
Contributor

AWESOMENESS.

@Miserlou
Copy link
Owner Author

screen shot 2017-04-20 at 12 02 26 pm

Ohhhhhhhhhh snappppppp

@fifthecho
Copy link

When this is merged, would there be any issues using sanic rather than Flask/Django?

@Miserlou
Copy link
Owner Author

That's the plan - want to try it? master is ready..

@fifthecho
Copy link

fifthecho commented Apr 21, 2017

Working on my first Sanic app now. Will test in Zappa Master when the app is working.

...and it looks like there's some issues.

[1492803091188] [DEBUG] 2017-04-21T19:31:31.188Z 1e86ec3b-26c9-11e7-8d39-675d00368992 Zappa Event: {'resource': '/', 'path': '/', 'httpMethod': 'POST', 'headers': {'Accept': '*/*', 'Accept-Encoding': 'deflate, gzip', 'CloudFront-Forwarded-Proto': 'https', 'CloudFront-Is-Desktop-Viewer': 'true', 'CloudFront-Is-Mobile-Viewer': 'false', 'CloudFront-Is-SmartTV-Viewer': 'false', 'CloudFront-Is-Tablet-Viewer': 'false', 'CloudFront-Viewer-Country': 'US', 'Content-Type': 'multipart/form-data; boundary=------------------------7c00f57f3885d2a5', 'Host': 'oyn744qikj.execute-api.us-east-1.amazonaws.com', 'User-Agent': 'insomnia/5.0.3', 'Via': '1.1 a1bc06b7f7932216e8d406a348288eac.cloudfront.net (CloudFront)', 'X-Amz-Cf-Id': '4p7JV4jmjNtB5KshFDuYnmYe3V_4txKeSbVNzZIp_MznJV3lORfwXQ==', 'X-Amzn-Trace-Id': 'Root=1-58fa5e11-52449eba1dbcb40e121bb50b', 'X-Forwarded-For': '108.29.95.21, 54.240.159.105', 'X-Forwarded-Port': '443', 'X-Forwarded-Proto': 'https'}, 'queryStringParameters': None, 'pathParameters': None, 'stageVariables': None, 'requestContext': {'accountId': '074567182610', 'resourceId': 'zf1pblv31c', 'stage': 'staging', 'requestId': '1e7e8722-26c9-11e7-93ac-45c462b16c20', 'identity': {'cognitoIdentityPoolId': None, 'accountId': None, 'cognitoIdentityId': None, 'caller': None, 'apiKey': None, 'sourceIp': '108.29.95.21', 'accessKey': None, 'cognitoAuthenticationType': None, 'cognitoAuthenticationProvider': None, 'userArn': None, 'userAgent': 'insomnia/5.0.3', 'user': None}, 'resourcePath': '/', 'httpMethod': 'POST', 'apiId': 'oyn744qikj'}, 'body': 'LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS03YzAwZjU3ZjM4ODVkMmE1DQpDb250ZW50LURpc3Bvc2l0aW9uOiBmb3JtLWRhdGE7IG5hbWU9InVybCINCg0KaHR0cDovL3d3dy56eXBlLmNvbS9kZW1vLw0KLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS03YzAwZjU3ZjM4ODVkMmE1LS0NCg==', 'isBase64Encoded': True}
[1492803091205] __call__() takes 1 positional argument but 3 were given

When trying to test a route defined like:

app = Sanic()
@app.route("/ping")
async def test(request):
    return json({"ping": "pong"})

@Miserlou
Copy link
Owner Author

Python3 support has arrived! Try it out in 0.41.0! Please report any bugs you find! Nothing is guaranteed but it Works For Me™!

@fifthecho - Please explore Sanic integration in a new Issue. Thanks!

@tomchristie
Copy link

Awesomeness! 👍
Related: #801 (Now have API Star successfully deployed using Zappa, thanks @Miserlou)

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

No branches or pull requests

6 participants