Re: [Django] #29039: Disabling migrations doesn't work with --keepdb

2019-12-05 Thread Django
#29039: Disabling migrations doesn't work with --keepdb
-+-
 Reporter:  Vackar Afzal |Owner:  nobody
 Type:  Bug  |   Status:  closed
Component:  Testing framework|  Version:  master
 Severity:  Normal   |   Resolution:  fixed
 Keywords:  database, tests, | Triage Stage:  Accepted
  migrations |
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by felixxm):

 * status:  new => closed
 * version:  1.11 => master
 * resolution:   => fixed


Comment:

 This should be fixed in Django 3.1 by using the new
 [https://docs.djangoproject.com/en/dev/ref/settings/#migrate MIGRATE] test
 database setting that allows disabling of migrations during a test
 database creation (see #25388).

 Fixed in f5ebdfce5c417f9844e86bccc2f12577064d4bad.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/069.810141a003c156fd5afefe8703fb94e7%40djangoproject.com.


Re: [Django] #29039: Disabling migrations doesn't work with --keepdb

2018-02-02 Thread Django
#29039: Disabling migrations doesn't work with --keepdb
-+-
 Reporter:  Vackar Afzal |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Testing framework|  Version:  1.11
 Severity:  Normal   |   Resolution:
 Keywords:  database, tests, | Triage Stage:  Accepted
  migrations |
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Davor Lučić):

 * cc: Davor Lučić (added)


-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/069.8a592a59f00f890cbbd13a436121da6e%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #29039: Disabling migrations doesn't work with --keepdb

2018-01-30 Thread Django
#29039: Disabling migrations doesn't work with --keepdb
-+-
 Reporter:  Vackar Afzal |Owner:  (none)
 Type:  Bug  |   Status:  new
Component:  Testing framework|  Version:  1.11
 Severity:  Normal   |   Resolution:
 Keywords:  database, tests, | Triage Stage:  Accepted
  migrations |
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Sergey Yurchenko):

 I have the same problems with creation of test db.
 For tests I don`t use migrations but models directly like in older
 versions of Django without migrations.
 Tests with migrations run is CI to check that migrations are correct so
 nobody cares about time.

 {{{
 class DisableMigrations(object):
 def __contains__(self, item):
 return True

 def __getitem__(self, item):
 return None

 }}}

 in your settings.py

 {{{
 MIGRATION_MODULES = DisableMigrations()
 }}}

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/069.45147a42e051f57ea22f380da1b7ea27%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #29039: Disabling migrations doesn't work with --keepdb

2018-01-30 Thread Django
#29039: Disabling migrations doesn't work with --keepdb
-+-
 Reporter:  Vackar Afzal |Owner:  (none)
 Type:  Bug  |   Status:  new
Component:  Testing framework|  Version:  1.11
 Severity:  Normal   |   Resolution:
 Keywords:  database, tests, | Triage Stage:  Accepted
  migrations |
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Anoosha keen):

 * owner:  Anoosha keen => (none)
 * status:  assigned => new


-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/069.f990f7953ebc04b326c5db4c4b3c%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #29039: Disabling migrations doesn't work with --keepdb

2018-01-26 Thread Django
#29039: Disabling migrations doesn't work with --keepdb
-+-
 Reporter:  Vackar Afzal |Owner:  Anoosha
 |  keen
 Type:  Bug  |   Status:  assigned
Component:  Testing framework|  Version:  1.11
 Severity:  Normal   |   Resolution:
 Keywords:  database, tests, | Triage Stage:  Accepted
  migrations |
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Tim Graham):

 * component:  Migrations => Testing framework
 * type:  Uncategorized => Bug
 * easy:  1 => 0
 * stage:  Unreviewed => Accepted


-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/069.dcbe202ffe81b95a190c5b0029daece7%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #29039: Disabling migrations doesn't work with --keepdb

2018-01-26 Thread Django
#29039: Disabling migrations doesn't work with --keepdb
-+-
 Reporter:  Vackar Afzal |Owner:  Anoosha
 |  keen
 Type:  Uncategorized|   Status:  assigned
Component:  Migrations   |  Version:  1.11
 Severity:  Normal   |   Resolution:
 Keywords:  database, tests, | Triage Stage:
  migrations |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  1|UI/UX:  0
-+-

Comment (by Tim Graham):

 Is `/home/anoosha/django` using Django's master branch? The traceback
 shows line numbers that makes me think it's not.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/069.e96c0482a7dee2992174c256800c6bab%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #29039: Disabling migrations doesn't work with --keepdb

2018-01-26 Thread Django
#29039: Disabling migrations doesn't work with --keepdb
-+-
 Reporter:  Vackar Afzal |Owner:  Anoosha
 |  keen
 Type:  Uncategorized|   Status:  assigned
Component:  Migrations   |  Version:  1.11
 Severity:  Normal   |   Resolution:
 Keywords:  database, tests, | Triage Stage:
  migrations |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  1|UI/UX:  0
-+-

Comment (by Vackar Afzal):

 Could you please add the print statement before the custom block of code

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/069.57d757c868e25e84b5bb754714222914%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #29039: Disabling migrations doesn't work with --keepdb

2018-01-26 Thread Django
#29039: Disabling migrations doesn't work with --keepdb
-+-
 Reporter:  Vackar Afzal |Owner:  Anoosha
 |  keen
 Type:  Uncategorized|   Status:  assigned
Component:  Migrations   |  Version:  1.11
 Severity:  Normal   |   Resolution:
 Keywords:  database, tests, | Triage Stage:
  migrations |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  1|UI/UX:  0
-+-
Changes (by Anoosha keen):

 * cc: Anoosha keen (added)


-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/069.3e4aca7331dd0aa9597b935d1ea8db23%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #29039: Disabling migrations doesn't work with --keepdb

2018-01-26 Thread Django
#29039: Disabling migrations doesn't work with --keepdb
-+-
 Reporter:  Vackar Afzal |Owner:  Anoosha
 |  keen
 Type:  Uncategorized|   Status:  assigned
Component:  Migrations   |  Version:  1.11
 Severity:  Normal   |   Resolution:
 Keywords:  database, tests, | Triage Stage:
  migrations |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  1|UI/UX:  0
-+-

Comment (by Anoosha keen):

 **Output is this:**
 python manage.py runserver
 None
 None
 None
 None
 None
 None
 None
 None
 None
 None
 None
 None
 None
 None
 Performing system checks...

 System check identified no issues (0 silenced).
 Unhandled exception in thread started by .wrapper at 0x7f570f8098c8>
 Traceback (most recent call last):
   File "/home/anoosha/django/django/utils/autoreload.py", line 220, in
 wrapper
 fn(*args, **kwargs)
   File
 "/home/anoosha/django/django/core/management/commands/runserver.py", line
 113, in inner_run
 self.check_migrations()
   File
 "/home/anoosha/django/django/core/management/commands/runserver.py", line
 159, in check_migrations
 executor = MigrationExecutor(connections[DEFAULT_DB_ALIAS])
   File "/home/anoosha/django/django/db/migrations/executor.py", line 19,
 in __init__
 self.loader = MigrationLoader(self.connection)
   File "/home/anoosha/django/django/db/migrations/loader.py", line 49, in
 __init__
 self.build_graph()
   File "/home/anoosha/django/django/db/migrations/loader.py", line 178, in
 build_graph
 self.load_disk()
   File "/home/anoosha/django/django/db/migrations/loader.py", line 71, in
 load_disk
 module = import_module(module_name)
   File
 "/home/anoosha/.virtualenvs/djangodev/lib/python3.5/importlib/__init__.py",
 line 117, in import_module
 if name.startswith('.'):
 AttributeError: 'NoneType' object has no attribute 'startswith'

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/069.872eaafca2205b1245fd8a5a49f29662%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #29039: Disabling migrations doesn't work with --keepdb

2018-01-26 Thread Django
#29039: Disabling migrations doesn't work with --keepdb
-+-
 Reporter:  Vackar Afzal |Owner:  Anoosha
 |  keen
 Type:  Uncategorized|   Status:  assigned
Component:  Migrations   |  Version:  1.11
 Severity:  Normal   |   Resolution:
 Keywords:  database, tests, | Triage Stage:
  migrations |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  1|UI/UX:  0
-+-

Comment (by Vackar Afzal):

 Replying to [comment:2 Anoosha keen]:
 > **I get this error:**
 >  if name.startswith('.'):
 > AttributeError: 'NoneType' object has no attribute 'startswith'
 > When I add the given code to setting.py I got the error mentioned
 above.Can you explain this please?


 What output do you get from either:
 print INSTALLED_APPS #Python2.x
 or
 print (INSTALLED_APPS) #Python3.x

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/069.da9c430443fccac795025935b7eb45c4%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #29039: Disabling migrations doesn't work with --keepdb

2018-01-26 Thread Django
#29039: Disabling migrations doesn't work with --keepdb
-+-
 Reporter:  Vackar Afzal |Owner:  Anoosha
 |  keen
 Type:  Uncategorized|   Status:  assigned
Component:  Migrations   |  Version:  1.11
 Severity:  Normal   |   Resolution:
 Keywords:  database, tests, | Triage Stage:
  migrations |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  1|UI/UX:  0
-+-

Comment (by Anoosha keen):

 **I get this error:**
  if name.startswith('.'):
 AttributeError: 'NoneType' object has no attribute 'startswith'
 When I add the given code to setting.py I got the error mentioned
 above.Can you explain this please?
 Replying to [ticket:29039 Vackar Afzal]:
 > We have a large number of migrations in our application now, and as a
 result it can take 20 mins to create a test DB.
 > To make this faster I am settings MIGRATION_MODULES in my settings as
 follows:
 >
 > {{{
 > MIGRATION_MODULES = {}
 > for app in INSTALLED_APPS:
 > if app.startswith('django.contrib.'):
 > app=app.replace('django.contrib.', '')
 > MIGRATION_MODULES[app] = None
 >
 > }}}
 >
 > I've found that this breaks the --keepdb option as it Django wants to
 run sync_db internally every time.
 >
 > The workaround I found is to modify django.db.backends.creation.py
 (lines 64 to 70) from
 >
 > {{{
 > call_command(
 > 'migrate',
 > verbosity=max(verbosity - 1, 0),
 > interactive=False,
 > database=self.connection.alias,
 > run_syncdb=true,
 > )
 > }}}
 >
 > To
 >
 >
 > {{{
 > call_command(
 > 'migrate',
 > verbosity=max(verbosity - 1, 0),
 > interactive=False,
 > database=self.connection.alias,
 > run_syncdb=not keepdb,
 > )
 > }}}
 >
 >
 >

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/069.7bb1d3683e62bab9d8e6fb7127db6446%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #29039: Disabling migrations doesn't work with --keepdb

2018-01-26 Thread Django
#29039: Disabling migrations doesn't work with --keepdb
-+-
 Reporter:  Vackar Afzal |Owner:  Anoosha
 |  keen
 Type:  Uncategorized|   Status:  assigned
Component:  Migrations   |  Version:  1.11
 Severity:  Normal   |   Resolution:
 Keywords:  database, tests, | Triage Stage:
  migrations |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  1|UI/UX:  0
-+-
Changes (by Anoosha keen):

 * owner:  nobody => Anoosha keen
 * status:  new => assigned


-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/069.05d59affdf9454985f0edb54e9aa68d9%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.