jmcclell / django-bootstrap-pagination

Django template tag for rendering Page objects as Bootstrap pagination HTML
MIT License
212 stars 83 forks source link

python 3? #21

Closed fccoelho closed 8 years ago

fccoelho commented 10 years ago

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

jmcclell commented 10 years ago

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 commented 10 years ago

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 commented 10 years ago

Wonderful! Thanks!

denilsonsa commented 10 years ago

FYI, have a bunch of patches for Python 3 support in my fork: https://github.com/denilsonsa/django-bootstrap-pagination/compare/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 commented 10 years ago

@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 commented 10 years ago

@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 commented 9 years ago

Where does this stand?

Or who has the most official and py3k compatible fork?

jmcclell commented 9 years ago

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

kvdveer commented 8 years ago

I've been using 1.5.1 from pypy on python 3.4 and 3.5. I have yet to encounter any issues.