Issues

Issue #155 new

Python 3 support

Anonymous created an issue

I see that the source for this project hasn't been ported to Python 3 in this branch. I'll bet there is a plan and possible a branch somewhere. I haven't seen it explicitly. Where can I learn more about django-storages plan to support to python 3?

Comments (18)

  1. David Larlet repo owner

    For now there hasn't been any discussion about it, glad you're the first to bring it :-)

    Doing it through a separate branch is a way to go (there are other paths like 2to3 in this area), I'm afraid we'll be anyway dependent of boto's move here which is still incompatible with Py3: https://python3wos.appspot.com/

    Thoughts?

  2. Max Peterson

    David Larlet I have started work on a Python 3 compatible storage backend ( storages.s3boto3.S3BotoStorage ) using boto3, the basic functionaliity works but there is still pleanty to do.

    I am trying to decide where I should put this backend. Would you include a backend based on the the currently unstable boto3 in django-storages or would you prefer I started a new django-storages-boto3 package until boto3 is stable?

    If you would include this backend then should it replace the existing storages.s3boto.S3BotoStorage or should it be an alternative (e.g storages.s3boto3.S3BotoStorage)

  3. Dražen Lučanin

    Thanks, Anders Petersson. Yes, I also stumbled upon that repository today and successfully uploaded a file to S3 in Django using the boto backend. It would be great if the two forks could be merged, so that we can have a stable package on PyPI for both Python 2 and 3 support, as I really like the elegance of just doing a couple of tweaks in settings.py to have a different storage backend.

  4. youngrok

    I don't know well hg and bitbucket so I don't send pull request, but I can tell you how to fix s3boto.

    • StringIO -> BytesIO
    • force_unicode -> force_text
    • smart_str -> smart_bytes
  5. Josh Schneier

    Since it seems no one is maintaining this anymore I forked the repository here: https://github.com/jschneier/django-storages and released the current bitbucket code under django-storages-redux 1.1.9 I just merged in single codebase py3k support in my branch but could use some assistance testing it. Happy to accept activity there and to see this project further maintained in the future.

  6. Log in to comment