Python 3 support

Issue #155 new
Former user 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:


  2. Max Peterson

    @david 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

    Yes, any chance of supporting Python 3 now that boto supports it as well? Is there any django-storages Python 3 branch/fork that is already usable?

  4. Dražen Lučanin

    Thanks, @anderspetersson. 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 to have a different storage backend.

  5. 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
  6. Josh Schneier

    Since it seems no one is maintaining this anymore I forked the repository here: 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.

  7. Log in to comment