[Django] #22645: Gis tests broken without a models.py

10 views
Skip to first unread message

Django

unread,
May 17, 2014, 4:20:10 AM5/17/14
to django-...@googlegroups.com
#22645: Gis tests broken without a models.py
--------------------------------------+------------------------
Reporter: apollo13 | Owner: nobody
Type: Bug | Status: new
Component: Migrations | Version: master
Severity: Normal | Keywords:
Triage Stage: Accepted | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
--------------------------------------+------------------------
This commit:
https://github.com/django/django/commit/cebd8753c65ec33730f495bb7085f34884f7c3d6
broke the GIS tests with the following error:
http://ci.djangoproject.com/job/Django/database=postgis,python=python2.7/4456/testReport/junit/django.contrib.gis.tests.gis_migrations.test_commands/MigrateTests/test_migrate_gis_2/
-- readding an empty models.py fixed it but should be considered as
workaround.

Assigning to migrations, but could also be an app-refactor issue?

--
Ticket URL: <https://code.djangoproject.com/ticket/22645>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
May 18, 2014, 3:50:35 AM5/18/14
to django-...@googlegroups.com
#22645: Gis tests broken without a models.py
----------------------------+----------------------------------------
Reporter: apollo13 | Owner: andrewgodwin
Type: Bug | Status: assigned
Component: Migrations | Version: master
Severity: Normal | Resolution:

Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
----------------------------+----------------------------------------
Changes (by andrewgodwin):

* owner: nobody => andrewgodwin
* status: new => assigned


Comment:

I'll look into this. Probably a simple fix.

--
Ticket URL: <https://code.djangoproject.com/ticket/22645#comment:1>

Django

unread,
May 18, 2014, 5:34:01 AM5/18/14
to django-...@googlegroups.com
#22645: Gis tests broken without a models.py
----------------------------+----------------------------------------
Reporter: apollo13 | Owner: andrewgodwin
Type: Bug | Status: assigned
Component: Migrations | Version: master
Severity: Normal | Resolution:

Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
----------------------------+----------------------------------------

Comment (by aaugustin):

IIRC SpatialSysRef is a model, so it should be imported in models.py.

--
Ticket URL: <https://code.djangoproject.com/ticket/22645#comment:2>

Django

unread,
May 20, 2014, 8:20:13 AM5/20/14
to django-...@googlegroups.com
#22645: Gis tests broken without a models.py
----------------------------+----------------------------------------
Reporter: apollo13 | Owner: andrewgodwin
Type: Bug | Status: closed
Component: Migrations | Version: master
Severity: Normal | Resolution: fixed

Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
----------------------------+----------------------------------------
Changes (by Andrew Godwin <andrew@…>):

* status: assigned => closed
* resolution: => fixed


Comment:

In [changeset:"a4737bf6ae36a5f1cb29f2232f6deeff084fabff"]:
{{{
#!CommitTicketReference repository=""
revision="a4737bf6ae36a5f1cb29f2232f6deeff084fabff"
Fixed #22645: Allow apps with no models module to still have migrations
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/22645#comment:3>

Django

unread,
May 20, 2014, 8:20:31 AM5/20/14
to django-...@googlegroups.com
#22645: Gis tests broken without a models.py
----------------------------+----------------------------------------
Reporter: apollo13 | Owner: andrewgodwin
Type: Bug | Status: closed
Component: Migrations | Version: master
Severity: Normal | Resolution: fixed

Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
----------------------------+----------------------------------------

Comment (by andrewgodwin):

It's fine, this was just an overzealous check in MigrationLoader that I've
removed.

--
Ticket URL: <https://code.djangoproject.com/ticket/22645#comment:4>

Django

unread,
May 20, 2014, 11:53:50 AM5/20/14
to django-...@googlegroups.com
#22645: Gis tests broken without a models.py
----------------------------+----------------------------------------
Reporter: apollo13 | Owner: andrewgodwin
Type: Bug | Status: closed
Component: Migrations | Version: master
Severity: Normal | Resolution: fixed

Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
----------------------------+----------------------------------------

Comment (by Andrew Godwin <andrew@…>):

In [changeset:"12c72796c3a385f21bc97389bef91dcd4148c0f9"]:
{{{
#!CommitTicketReference repository=""
revision="12c72796c3a385f21bc97389bef91dcd4148c0f9"
Revert "Fixed #22645: Allow apps with no models module to still have
migrations"

This reverts commit a4737bf6ae36a5f1cb29f2232f6deeff084fabff.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/22645#comment:5>

Django

unread,
May 20, 2014, 12:18:52 PM5/20/14
to django-...@googlegroups.com
#22645: Gis tests broken without a models.py
----------------------------+----------------------------------------
Reporter: apollo13 | Owner: andrewgodwin
Type: Bug | Status: new
Component: Migrations | Version: master
Severity: Normal | Resolution:

Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
----------------------------+----------------------------------------
Changes (by timo):

* status: closed => new
* resolution: fixed =>


--
Ticket URL: <https://code.djangoproject.com/ticket/22645#comment:6>

Django

unread,
Sep 21, 2014, 3:22:59 PM9/21/14
to django-...@googlegroups.com
#22645: Gis tests broken without a models.py
----------------------------+----------------------------------------
Reporter: apollo13 | Owner: andrewgodwin
Type: Bug | Status: new
Component: Migrations | Version: master
Severity: Normal | Resolution:

Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
----------------------------+----------------------------------------

Comment (by claudep):

Should we then simply change the comment? Removing `These aliases are
provided for backwards-compatibility.`?

--
Ticket URL: <https://code.djangoproject.com/ticket/22645#comment:7>

Django

unread,
Oct 24, 2014, 9:05:47 AM10/24/14
to django-...@googlegroups.com
#22645: Gis tests broken without a models.py
----------------------------+----------------------------------------
Reporter: apollo13 | Owner: andrewgodwin
Type: Bug | Status: new
Component: Migrations | Version: master
Severity: Normal | Resolution:

Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
----------------------------+----------------------------------------

Comment (by claudep):

Even if the problem related to migrations for apps without models.py will
be solved by #23618, I still think that we should keep those imports, as
Aymeric said in comment:2, and update the comment accordingly. We have now
the `has_spatialrefsys_table` database feature for the conditional import.

--
Ticket URL: <https://code.djangoproject.com/ticket/22645#comment:8>

Django

unread,
Dec 11, 2014, 1:11:47 PM12/11/14
to django-...@googlegroups.com
#22645: Gis tests broken without a models.py
----------------------------+----------------------------------------
Reporter: apollo13 | Owner: andrewgodwin
Type: Bug | Status: new
Component: Migrations | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
----------------------------+----------------------------------------
Changes (by timgraham):

* has_patch: 0 => 1


Comment:

[https://github.com/django/django/pull/3716 PR] to restore the spatial
models in `models.py`.

--
Ticket URL: <https://code.djangoproject.com/ticket/22645#comment:9>

Django

unread,
Dec 13, 2014, 10:55:50 AM12/13/14
to django-...@googlegroups.com
#22645: Gis tests broken without a models.py
----------------------------+----------------------------------------
Reporter: apollo13 | Owner: andrewgodwin
Type: Bug | Status: new
Component: Migrations | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
----------------------------+----------------------------------------

Comment (by claudep):

I'm sorry, but I'm not so sure any more about recreating `models.py`. The
problem is that the presence of `SpatialRefSys/GeometryColumns` is backend
dependent, so adding them based on the default `connection` object might
break in case of multi-db setups where a non-default database has no such
tables, like MySQL.
I've just tested removing the empty `models.py` from `django.contrib.gis`
and the test suite now passes: https://github.com/django/django/pull/3724

--
Ticket URL: <https://code.djangoproject.com/ticket/22645#comment:10>

Django

unread,
Dec 13, 2014, 10:58:34 AM12/13/14
to django-...@googlegroups.com
#22645: Gis tests broken without a models.py
----------------------------+----------------------------------------
Reporter: apollo13 | Owner: andrewgodwin
Type: Bug | Status: new
Component: Migrations | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
----------------------------+----------------------------------------

Comment (by timgraham):

No objection from me.

--
Ticket URL: <https://code.djangoproject.com/ticket/22645#comment:11>

Django

unread,
Dec 13, 2014, 11:10:21 AM12/13/14
to django-...@googlegroups.com
#22645: Gis tests broken without a models.py
----------------------------+----------------------------------------
Reporter: apollo13 | Owner: andrewgodwin
Type: Bug | Status: new
Component: Migrations | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
----------------------------+----------------------------------------

Comment (by Claude Paroz <claude@…>):

In [changeset:"a5499b0916298caedfd683041515f4e3aa2c5d6d"]:
{{{
#!CommitTicketReference repository=""
revision="a5499b0916298caedfd683041515f4e3aa2c5d6d"
Removed empty gis models.py

Refs #22645.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/22645#comment:12>

Django

unread,
Dec 13, 2014, 11:11:11 AM12/13/14
to django-...@googlegroups.com
#22645: Gis tests broken without a models.py
----------------------------+----------------------------------------
Reporter: apollo13 | Owner: andrewgodwin
Type: Bug | Status: closed
Component: Migrations | Version: master
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
----------------------------+----------------------------------------
Changes (by claudep):

* status: new => closed
* resolution: => fixed


--
Ticket URL: <https://code.djangoproject.com/ticket/22645#comment:13>

Reply all
Reply to author
Forward
0 new messages