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

Python3.6 Packages #43

Closed
Miserlou opened this issue Apr 22, 2017 · 8 comments
Closed

Python3.6 Packages #43

Miserlou opened this issue Apr 22, 2017 · 8 comments

Comments

@Miserlou
Copy link
Owner

This is annoying. Is everything going to have to be repackaged for 3.6?

We'll have to change the manifest format as welll, suggest we simply add another layer so that the runtime is before the package name.

@wagmiwiz
Copy link
Contributor

wagmiwiz commented Apr 23, 2017

I am happy to do the "pre-pend runtime" update for current python 2.7 packages as am updating that bit of code in Zappa anyways. For 3.6 I suggest to only recompile those that don't have a wheels version for the particular package version, perhaps via a separate PR per new package.

Just to be clear before proceeding, would the following work?

Package file name

Same directory name but instead of filename being something like pycrypto-2.6.1.tar.gz we now have python2.7-pycrypto-2.6.1.tar.gz

Manifest

Instead of:

'psycopg2': {
        'version': '2.6.1',
        'path': os.path.join(os.path.dirname(os.path.abspath(__file__)),
                            'psycopg2', 'psycopg2-2.6.1.tar.gz')
    },

we have:

'psycopg2': {
        'version': '2.6.1',
        'path': os.path.join(os.path.dirname(os.path.abspath(__file__)),
                            'psycopg2', 'python2.7-psycopg2-2.6.1.tar.gz')
    },
'python2.7-psycopg2': {
        'version': '2.6.1',
        'path': os.path.join(os.path.dirname(os.path.abspath(__file__)),
                            'psycopg2', 'python2.7-psycopg2-2.6.1.tar.gz')
    },

I am suggesting to keep the old entry which defaults to python2.7 for backwards compatibility with anyone who is using this outside of Zappa, but to then mention in docs to prefer the new format.

@Miserlou whacha say?

@wagmiwiz
Copy link
Contributor

Or perhaps even simpler:

'psycopg2': {
        'version': '2.6.1',
        'path': os.path.join(os.path.dirname(os.path.abspath(__file__)),
                            'psycopg2', 'python2.7-psycopg2-2.6.1.tar.gz'),
        'python2.7-path': os.path.join(os.path.dirname(os.path.abspath(__file__)),
                            'psycopg2', 'python2.7-psycopg2-2.6.1.tar.gz')
    },

@Miserlou
Copy link
Owner Author

Don't like this method at all, sorry. It's redundant and non-semantic. Also, backwards compatibility is not a design requirement here. Additionally, we may have situations where the P2 and P3 versions of a package differ.

So, we have two choices:

{
'python2.7': {
    'psycopg2': {
        'version': '2.6.1',
        'path': os.path.join(os.path.dirname(os.path.abspath(__file__)),
                                'psycopg2', 'python2.7-psycopg2-2.6.1.tar.gz'),
    }
},
'python3.6': {
    'psycopg2': {
        'version': '3.0.0',
        'path': os.path.join(os.path.dirname(os.path.abspath(__file__)),
                                'psycopg2', 'python3.6-psycopg2-3.0.0.tar.gz'),
    }
},

OR

{
'psycopg2': {
    'python2.7': {
        'version': '2.6.1',
        'path': os.path.join(os.path.dirname(os.path.abspath(__file__)),
                                'psycopg2', 'python2.7-psycopg2-2.6.1.tar.gz'),
        }
    },
    'python3.6': {
        'version': '3.0.0',
        'path': os.path.join(os.path.dirname(os.path.abspath(__file__)),
                                'psycopg2', 'python3.6-psycopg2-3.0.0.tar.gz'),
        }
    }
}

Looking at it now, I think I prefer the second.

@wagmiwiz
Copy link
Contributor

Agree. Have thought of the same but was under impression backwards compatibility was important. If not then this is much nicer, will update PR.

@wagmiwiz
Copy link
Contributor

Done: #45

@readevalprint
Copy link

Thanks for the work you all have done on this because this problem just hit me. I'd be happy to help test it.

@u-nux
Copy link

u-nux commented May 8, 2017

#45 merged, why issue still open, is that not full support yet?

@Miserlou
Copy link
Owner Author

Miserlou commented May 8, 2017

Yeah, this can be changed, it landed in Zappa 0.41.2.

@Miserlou Miserlou closed this as completed May 8, 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

No branches or pull requests

4 participants