Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python3 support #53

Merged
merged 17 commits into from
Jan 22, 2014
Merged

Python3 support #53

merged 17 commits into from
Jan 22, 2014

Conversation

itbabu
Copy link
Contributor

@itbabu itbabu commented Jan 14, 2014

I'm working on Python 3 support.
This pull request is not ready yet.

First I need to see how tests run with Travis (I wasn't able to run them on my fork) :)

@coveralls
Copy link

Coverage Status

Coverage decreased (-15.43%) when pulling 69a0e0a on itbabu:python3-support into f42751f on makinacorpus:master.

@leplatrem
Copy link
Collaborator

Hey many thanks for this !

Can you explain why you switched to postgis for running tests ? ( just wondering )

If you need help for travis and multiple python versions, just ask, we could setup tox.

@itbabu
Copy link
Contributor Author

itbabu commented Jan 16, 2014

hi,
pysqlite seems to dislike Python3.

https://travis-ci.org/itbabu/django-leaflet/jobs/17015425

$ pip install git+git://github.com/tinio/pysqlite.git@extension-enabled#egg=pysqlite
Downloading/unpacking pysqlite from git+git://github.com/tinio/pysqlite.git@extension-enabled
  Cloning git://github.com/tinio/pysqlite.git (to extension-enabled) to /home/travis/virtualenv/python3.3/build/pysqlite
  Running setup.py egg_info for package pysqlite
    Traceback (most recent call last):
      File "<string>", line 16, in <module>
      File "/home/travis/virtualenv/python3.3/lib/python3.3/codecs.py", line 301, in decode
        (result, consumed) = self._buffer_decode(data, self.errors, final)
    UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe4 in position 98: invalid continuation byte
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
  File "<string>", line 16, in <module>
  File "/home/travis/virtualenv/python3.3/lib/python3.3/codecs.py", line 301, in decode
    (result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe4 in position 98: invalid continuation byte

I was able to pass the tests with python2.7 and Django1.6 / Django 1.5 (here)

But then later (here) Travis got a 503 from external services and it failed before running the tests.
I tried to re-run the tests today, but the 503 is still there.
I 've not yet seen that part of django-leaflet so I don't know what to do now.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.26%) when pulling 0e6795d on itbabu:python3-support into f42751f on makinacorpus:master.

@itbabu
Copy link
Contributor Author

itbabu commented Jan 16, 2014

Tests pass on Python3 too.
I still need to figure out what it is going on with Django 1.4

@itbabu
Copy link
Contributor Author

itbabu commented Jan 20, 2014

@leplatrem This should be ready for review.
I changed a bit the quicktest.py to allow tests with different databases.
The default test behavior is not changed.

python quicktest.py leaflet and the tests will be with sqlite (the--db is optional ).

python quicktest.py leaflet --db=postgres and the he tests will be with postgres.

Notes:
No tests with Django 1.4 and postgres.
No tests with Python 3 and sqlite.

'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.admin',
)
]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why switch to list ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

self.apps is a list now so I cannot concatenate it to a tuple.

@leplatrem
Copy link
Collaborator

I like it very much ! Thank you !

This is amazing :) I wrote a couple of remarks, but those are details...

@leplatrem leplatrem merged commit 1dbd87c into makinacorpus:master Jan 22, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants