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

Feature/support python35 #499

Closed
wants to merge 4 commits into from

Conversation

SBillion
Copy link

Description

I did some update to work with python3. It's not finish and I won't have the time to do more before a while, so I would like to share it with you

GitHub Issues

#6

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.2%) to 80.158% when pulling 246f2bd on SBillion:feature/support-python35 into 1321ef6 on Miserlou:master.

@Miserlou
Copy link
Owner

Damn, this is huge, and I have a feeling that it'll be very relevant in the coming 48h - want to take the final step and make that test pass? Also poking @xuru since I think it's your test :)

@xuru
Copy link

xuru commented Dec 5, 2016

Hey, sorry, just saw this. Yeah, I think the problem is in python 3.5, str doesn't have a decode method. Looking through the documentation for both 3.5 and 2.7, it looks like we can just add a b to the open function. For example:

    with open(egg_link, 'rb') as df:

The "binary" mode will have no effect in python 2.7, but will return the string from the .read method as a byte array which does have a decode method.

The other option, is to do some kind of if statement around every file read which would be really ugly.

@SBillion
Copy link
Author

SBillion commented Dec 5, 2016

Yes, problems are around bytes and str, mostly.
I didn't have the time to find a good way to use base64 with python35
An other point of fail is patch_open:

with (patch_open(), mock.patch('glob.glob'), mock.patch( 'zappa.util.copytree')
        ) as ((mock_open, mock_file), mock_glob, mock_copytree):

@Miserlou
Copy link
Owner

Closing because we support P36 now! :D

@Miserlou Miserlou closed this Apr 28, 2017
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

Successfully merging this pull request may close these issues.

None yet

4 participants