Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

python 3? #21

Open
fccoelho opened this Issue · 8 comments

5 participants

@fccoelho

Does it support python 3? pip install under python 3.3 failed.

@jmcclell
Owner

I don't work with Python much these days, alas. When I wrote this 2.7 was still the most widely used and I made no effort to make it work with 3.x.

However, @itbabu has forked the project and seems to have made some changes for 3.x support. Here is the fork: https://github.com/https://github.com/itbabu/django-bootstrap-pagination/django-bootstrap-pagination

I am not sure if they are working or if they are still compatible with the 2.x series, however.

@itbabu

Hi!
There is still some work to do.
django-bootstrap-pagination should use six (https://github.com/django/django/blob/master/django/utils/six.py) for handing the differences between python2 and python3

https://docs.djangoproject.com/en/dev/topics/python3

for example:

Python 2’s unicode() type was renamed str() in Python 3, str() was renamed bytes(), and 
basestring() disappeared. six provides tools to deal with these changes.

I'll try to make a pull request this or next week.

@jmcclell
Owner

Wonderful! Thanks!

@itbabu itbabu referenced this issue from a commit in itbabu/django-bootstrap-pagination
@itbabu itbabu #21 Use six.integer_types and six.binary_type for handling integer an…
…d string between python 2 and 3
0e5824e
@itbabu itbabu referenced this issue from a commit in itbabu/django-bootstrap-pagination
@itbabu itbabu Update setup #21 344f61c
@itbabu itbabu referenced this issue from a commit in itbabu/django-bootstrap-pagination
@itbabu itbabu PEP8 Code lay-out #21 13226b9
@itbabu itbabu referenced this issue in itbabu/django-bootstrap-pagination
Merged

Using // for integer division. #1

@denilsonsa

FYI, have a bunch of patches for Python 3 support in my fork: denilsonsa@jmcclell:master...master

Indeed, we still need unit tests in order to be sure nothing breaks on either Python version. For now, I just run my django app on both versions and manually check that it works.

@jmcclell
Owner

@denilsonsa Looking at your fork it looks like you and @itbabu did some clean up work, as well. This was one of my first Python projects and I haven't done a whole lot with the language since, alas. I'd be very happy to merge your cumulative changes in once they are complete. If you have the time/desire to add unit tests that, of course, would be great. If not, perhaps it's something I can spend a weekend on.

@denilsonsa

@jmcclell That would be great!

I have never written tests from scratch to a portable/installable django app, and I have no idea on how to integrate them with travis, so some help with testing would be very welcome!

@jplehmann

Where does this stand?

Or who has the most official and py3k compatible fork?

@jmcclell
Owner

@jplehmann I'm not sure whose fork would be most compatible. I just don't use Python enough these days and haven't taken the time to commit to an official Python 3 version. I may do so in the future, but it just hasn't happened yet. One of the biggest issues with this project is a lack of tests so it's hard to make major changes like this if I want to maintain backwards compatibility, which is a goal of mine for now, at least. I would be thrilled for another developer to solve either of those issues, but I don't have the time nor the Python 3 expertise at this time to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.