python 3?
fccoelho opened this issue · 9 comments
Does it support python 3? pip install under python 3.3 failed.
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.
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.
Wonderful! Thanks!
FYI, have a bunch of patches for Python 3 support in my fork: denilsonsa/django-bootstrap-pagination@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.
@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.
@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!
Where does this stand?
Or who has the most official and py3k compatible fork?
@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.
I've been using 1.5.1 from pypy on python 3.4 and 3.5.
I have yet to encounter any issues.