Skip to content
This repository has been archived by the owner on Jan 18, 2020. It is now read-only.

Django 1.8 support #335

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
Open

Conversation

sgithens
Copy link
Contributor

@sgithens sgithens commented Feb 8, 2017

No description provided.

Re-generating initial migration using 1.8 makemigrations command.
Looking at the diff comparison with south, the output is actually
pretty close, with some minor options changing format.

Signed-off-by: Steven Githens <[email protected]>
Finishing API rename of get_query_set -> get_queryset. Finishing API
rename of Meta options module_name -> model_name. Removing removed
"+" idiom on model related_name. These remainders were detected by
the serrano unit tests.

Signed-off-by: Steven Githens <[email protected]>
@coveralls
Copy link

coveralls commented Feb 8, 2017

Coverage Status

Coverage increased (+0.1%) to 80.353% when pulling cc5f36d on sgithens:django-1.8-support into c081e31 on chop-dbhi:master.

@bruth
Copy link
Contributor

bruth commented Feb 14, 2017

@sgithens It appears the the other Django versions are not actually being tested. screen shot 2017-02-14 at 6 45 43 am

The reason this is happening is because you put a hard version in requirements.txt. Can you change this back to a range django>=1.5,<1.9 and update setup.py to the same range.

I am sure there will be an issue with 1.5 and it may be time to drop support for it, but I would like the tests to tell us that. Thanks!

@coveralls
Copy link

Coverage Status

Coverage increased (+0.1%) to 80.353% when pulling 7b26d37 on sgithens:django-1.8-support into c081e31 on chop-dbhi:master.

@sgithens
Copy link
Contributor Author

@bruth Updated, and all the builds except 1.8 failed. :)

I wonder if maybe we should explore including post 1.8 versions to get a heads up on what issues we might encounter going forward.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.1%) to 80.353% when pulling 284c7a6 on sgithens:django-1.8-support into c081e31 on chop-dbhi:master.

@bruth
Copy link
Contributor

bruth commented Feb 16, 2017

@sgithens From the Travis errors, 1.5 and 1.6 are failing because South is not installed. 1.7 is failing because modeltree 2.0.0 is being used and it should be 1.1.10 since 2.0.0 is 1.8 only (this is true for Django 1.5 and 1.6).

Django 1.9 and 1.10 are failing due to a failed import presumably because it was deprecated in an earlier release.

ValueError: Unable to configure handler 'null': Cannot resolve 'django.utils.log.NullHandler': No module named NullHandler

On the call today, I think it is worth getting feedback on whether we should just cut over to 1.8+ for future development. We can increment new releases under the 3.x series to denote this change.

Admin views must have an include or exclude in Meta. Changing commit_on_success to atomic

Signed-off-by: Steven Githens <[email protected]>
@coveralls
Copy link

Coverage Status

Coverage increased (+0.1%) to 80.353% when pulling 0d1bf82 on sgithens:django-1.8-support into c081e31 on chop-dbhi:master.

I had incorrectly put the django.setup call at the top,
such that the specific database flags weren't being used.

Signed-off-by: Steven Githens <[email protected]>
Old version of guardian (presumably before 1.8 migrations)
was failing to create it's DB tables on MySQL

Signed-off-by: Steven Githens <[email protected]>
@coveralls
Copy link

Coverage Status

Coverage increased (+0.4%) to 80.647% when pulling 59da86f on sgithens:django-1.8-support into c081e31 on chop-dbhi:master.

@sgithens
Copy link
Contributor Author

Looking at the travis output from this, and also from previous travis builds before the 1.8 work... it looks like travis was always only running the tests on sqlite, even if it was also creating the postgres and mysql databases. Unless I'm reading things wrong. Looking at making the test running run the actual tests against all the enabled databases, as well as 20 errors/failures that have appeared after I actually enabled MySQL locally.

Checking for OperationalError 1094 when cancelling queries.
If the query already finished, trying to kill it will throw
an error.

Signed-off-by: Steven Githens <[email protected]>
This is sort of lame, but I think we need to check for backticks and
change them to double quotes.  MySQL is alone in having it's own syntax,
backticks `, for quoting names instead of using the sql standard double
quote. There is a MySQL option to change to ansi quotes, however, it
appears that in the django.db MySQL backend, it does generate statements
using backticks, so we will have to check for it.

https://github.com/django/django/blob/master/django/db/backends/mysql/operations.py#L115-L118

Signed-off-by: Steven Githens <[email protected]>
On MySQL these field keys often come is as type long rather than int.

Signed-off-by: Steven Githens <[email protected]>
Signed-off-by: Steven Githens <[email protected]>
@coveralls
Copy link

Coverage Status

Coverage increased (+0.4%) to 80.592% when pulling d020165 on sgithens:django-1.8-support into c081e31 on chop-dbhi:master.

@sgithens
Copy link
Contributor Author

Finished fixing most of the MySQL issues, 2 fails and an error to go, and then fixing up the travis config to make sure it actually runs them on mysql/postgres in addition to sqlite.

- Creating a matrix of environments to test each database one at a time.
  Looking for a better way to list these in travis.yml that isn't so
  hard on the eyes.
- Removed exclusion for a python 2.6 configuration
- Removed pre-django 1.8 versions, and added latest supported versions
  of 1.10 and 1.11. Not including 1.9 as it's out of support.

Signed-off-by: Steven Githens <[email protected]>
@coveralls
Copy link

Coverage Status

Coverage increased (+0.07%) to 80.274% when pulling 3d5f4ad on sgithens:django-1.8-support into c081e31 on chop-dbhi:master.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants