Re: [Django] #33022: main-random test failures (build #8): field_deconstruction.tests.FieldDeconstructionTests and migrations.test_commands.MigrateTests

2021-08-13 Thread Django
#33022: main-random test failures (build #8):
field_deconstruction.tests.FieldDeconstructionTests and
migrations.test_commands.MigrateTests
-+-
 Reporter:  Chris Jerdonek   |Owner:  nobody
 Type:   |   Status:  new
  Cleanup/optimization   |
Component:  Uncategorized|  Version:  dev
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:
 |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Description changed by Chris Jerdonek:

Old description:

> I noticed that `main-random` job !#8 [https://djangoci.com/job/main-
> random/8/ failed recently]. I don't know if these were "real" failures.
> The failures were--
>
> * `field_deconstruction.tests.FieldDeconstructionTests.test_foreign_key`
> *
> `field_deconstruction.tests.FieldDeconstructionTests.test_many_to_many_field`
> * `field_deconstruction.tests.FieldDeconstructionTests.test_one_to_one`
> *
> `migrations.test_commands.MigrateTests.test_migrate_partially_applied_squashed_migration`
> * `migrations.test_commands.MigrateTests.test_migrate_plan`
>
> The shuffle seed was `5300426296`.
>
> These recent PR's seem related:
> [https://github.com/django/django/pull/14730 PR #14730] (ticket #32983)
> for the `FieldDeconstructionTests` ones and
> [https://github.com/django/django/pull/14727 PR #14727] (ticket #29063)
> for the `MigrateTests` ones.

New description:

 I noticed that `main-random` job !#8 [https://djangoci.com/job/main-
 random/8/ failed recently]. I don't know if these were "real" failures.
 The failures were (database=spatialite,bionic,python3.9)--

 * `field_deconstruction.tests.FieldDeconstructionTests.test_foreign_key`
 *
 `field_deconstruction.tests.FieldDeconstructionTests.test_many_to_many_field`
 * `field_deconstruction.tests.FieldDeconstructionTests.test_one_to_one`
 *
 
`migrations.test_commands.MigrateTests.test_migrate_partially_applied_squashed_migration`
 * `migrations.test_commands.MigrateTests.test_migrate_plan`

 The shuffle seed was `5300426296`.

 These recent PR's seem related:
 [https://github.com/django/django/pull/14730 PR #14730] (ticket #32983)
 for the `FieldDeconstructionTests` ones and
 [https://github.com/django/django/pull/14727 PR #14727] (ticket #29063)
 for the `MigrateTests` ones.

--

-- 
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/067.13f7dfce0941ee82631d6bd523bd8aba%40djangoproject.com.


Re: [Django] #33022: main-random test failures (build #8): field_deconstruction.tests.FieldDeconstructionTests and migrations.test_commands.MigrateTests

2021-08-13 Thread Django
#33022: main-random test failures (build #8):
field_deconstruction.tests.FieldDeconstructionTests and
migrations.test_commands.MigrateTests
-+-
 Reporter:  Chris Jerdonek   |Owner:  nobody
 Type:   |   Status:  new
  Cleanup/optimization   |
Component:  Uncategorized|  Version:  dev
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:
 |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Chris Jerdonek):

 Here is a shuffle seed of the same migration tests as above, but with 4
 failures:

 {{{
 ./tests/runtests.py migrations.test_commands.MigrateTests
 migrations.test_executor.ExecutorTests --shuffle 3472950421
 }}}

-- 
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/067.b6755283b6230d9ff293a508a57280d9%40djangoproject.com.


Re: [Django] #33022: main-random test failures (build #8): field_deconstruction.tests.FieldDeconstructionTests and migrations.test_commands.MigrateTests

2021-08-13 Thread Django
#33022: main-random test failures (build #8):
field_deconstruction.tests.FieldDeconstructionTests and
migrations.test_commands.MigrateTests
-+-
 Reporter:  Chris Jerdonek   |Owner:  nobody
 Type:   |   Status:  new
  Cleanup/optimization   |
Component:  Uncategorized|  Version:  dev
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:
 |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Chris Jerdonek):

 I narrowed down the `MigrateTests` failures somewhat to--

 {{{
 ./tests/runtests.py --shuffle 5300426296
 migrations.test_commands.MigrateTests migrations.test_executor
 ...
 Ran 62 tests in 2.041s

 FAILED (errors=2)
 }}}

-- 
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/067.3348763ff4cfbb6f6befbcec8e5919f1%40djangoproject.com.


[Django] #33022: main-random test failures (build #8): field_deconstruction.tests.FieldDeconstructionTests and migrations.test_commands.MigrateTests

2021-08-13 Thread Django
#33022: main-random test failures (build #8):
field_deconstruction.tests.FieldDeconstructionTests and
migrations.test_commands.MigrateTests
+
   Reporter:  Chris Jerdonek|  Owner:  nobody
   Type:  Cleanup/optimization  | Status:  new
  Component:  Uncategorized |Version:  dev
   Severity:  Normal|   Keywords:
   Triage Stage:  Unreviewed|  Has patch:  0
Needs documentation:  0 |Needs tests:  0
Patch needs improvement:  0 |  Easy pickings:  0
  UI/UX:  0 |
+
 I noticed that `main-random` job !#8 [https://djangoci.com/job/main-
 random/8/ failed recently]. I don't know if these were "real" failures.
 The failures were--

 * `field_deconstruction.tests.FieldDeconstructionTests.test_foreign_key`
 *
 `field_deconstruction.tests.FieldDeconstructionTests.test_many_to_many_field`
 * `field_deconstruction.tests.FieldDeconstructionTests.test_one_to_one`
 *
 
`migrations.test_commands.MigrateTests.test_migrate_partially_applied_squashed_migration`
 * `migrations.test_commands.MigrateTests.test_migrate_plan`

 The shuffle seed was `5300426296`.

 These recent PR's seem related:
 [https://github.com/django/django/pull/14730 PR #14730] (ticket #32983)
 for the `FieldDeconstructionTests` ones and
 [https://github.com/django/django/pull/14727 PR #14727] (ticket #29063)
 for the `MigrateTests` ones.

-- 
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/052.60b6e73afaff63c7b4af5200467749ce%40djangoproject.com.


Re: [Django] #26142: Provide a way for model formsets to disallow new object creation

2021-08-13 Thread Django
#26142: Provide a way for model formsets to disallow new object creation
-+
 Reporter:  Tim Graham   |Owner:  Vlad
 Type:  New feature  |   Status:  assigned
Component:  Forms|  Version:  dev
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  1|UI/UX:  0
-+
Changes (by Vlad):

 * needs_tests:  1 => 0


-- 
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/067.2ddcf1fad6c6e026b307a2f95f7da4e4%40djangoproject.com.


Re: [Django] #33015: QuerySet.extra Use Case: filtering on large lists of tuples

2021-08-13 Thread Django
#33015: QuerySet.extra Use Case: filtering on large lists of tuples
-+-
 Reporter:  kris-swann   |Owner:  nobody
 Type:  Uncategorized|   Status:  new
Component:  Database layer   |  Version:  2.2
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  QuerySet.extra   | Triage Stage:
 |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Simon Charette):

 I think you might be able to achieve what you're after with the following
 (off the main branch)

 {{{#!python
 from django.db.models import lookups
 from django.db.models.expressions import Func

 ExampleModel.objects.filter(
 lookups.In(
 Func('val1', 'val2', template='(%(expressions)s)'),
 tuple(items_to_fetch),
 )
 )
 }}}

-- 
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/068.125c9093b50d7ded84e10c100a21fc0f%40djangoproject.com.


Re: [Django] #33018: Incorrect annotation value when doing a subquery with empty queryset

2021-08-13 Thread Django
#33018: Incorrect annotation value when doing a subquery with empty queryset
-+-
 Reporter:  decomorreno  |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Database layer   |  Version:  3.2
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  orm, annotate,   | Triage Stage:  Accepted
  EmptyQuerySet, empty, count|
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Simon Charette):

 * stage:  Unreviewed => Accepted


Comment:

 The `0` assignment on empty result set comes from
 
[https://github.com/django/django/blob/6c3525a09db5177bf4e3856de85bf8b1300402d5/django/db/models/sql/compiler.py#L268-L270
 this line]. I assume we could adjust the logic to rely on `getattr(col,
 'empty_aggregate_value', NotImplemented)` and fallback to `'0'` if it's
 missing.

 Makes me wonder if we want to rename `empty_aggregate_value` to
 `empty_result_set_value` instead since it's not entirely bound to
 aggregation anymore.

 e.g. the following should exhibit the same behavior

 {{{#!python
 Author.objects.annotate(annotation=Coalesce(Author.objects.empty(), 42))
 }}}

 It also seems weird that we default to `0` as opposed to `NULL` which
 would be a more correct value.

 Alternatively we could adjust `Coalesce.as_sql` to catch `EmptyResultSet`
 when it's compiling its source expressions but that's more involved as
 most of the logic for that currently lives in `Func.as_sql`. We could also
 use both of these approaches.

-- 
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.3c3697a9acf163402273031a90166e61%40djangoproject.com.


Re: [Django] #24900: KeyError when trying to migrate to a replaced migration

2021-08-13 Thread Django
#24900: KeyError when trying to migrate to a replaced migration
+-
 Reporter:  Carl Meyer  |Owner:  Jacob Walls
 Type:  Bug |   Status:  assigned
Component:  Migrations  |  Version:  dev
 Severity:  Normal  |   Resolution:
 Keywords:  | Triage Stage:  Ready for checkin
Has patch:  1   |  Needs documentation:  0
  Needs tests:  0   |  Patch needs improvement:  0
Easy pickings:  0   |UI/UX:  0
+-
Changes (by Shai Berger):

 * stage:  Accepted => Ready for checkin


-- 
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/064.bce06dfede6c80b22f0f4c7b1ddbfb25%40djangoproject.com.


Re: [Django] #32640: Non-manager instance assigned to model class' objects is silently ignored

2021-08-13 Thread Django
#32640: Non-manager instance assigned to model class' objects is silently  
ignored
-+-
 Reporter:  Shai Berger  |Owner:  Shai
 |  Berger
 Type:  Bug  |   Status:  assigned
Component:  Database layer   |  Version:  2.2
  (models, ORM)  |
 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 Shai Berger):

 * needs_better_patch:  1 => 0
 * needs_tests:  1 => 0


Comment:

 The flags "needs improvement" and "needs tests" were set on this ticket
 with vague comments on the PR which basically say the same as the flags,
 with no more details. A request for clarification has been left unanswered
 for two months. Hence, I'm putting this back on the review queue.

-- 
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/063.c206902e195dbfe9cfcb755a20bbd383%40djangoproject.com.


Re: [Django] #21961: Add support for database-level cascading options

2021-08-13 Thread Django
#21961: Add support for database-level cascading options
-+-
 Reporter:  Christophe Pettus|Owner:  Thibault
 Type:  New feature  |   Status:  assigned
Component:  Database layer   |  Version:  dev
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  1
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Florian Demmer):

 * cc: Florian Demmer (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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/061.c7927e0fad3c150a62a29ca9a46ea7c9%40djangoproject.com.


Re: [Django] #33013: "AppConfig" subclass imports found in Django 3.2's automatic "AppConfig" discovery

2021-08-13 Thread Django
#33013: "AppConfig" subclass imports found in Django 3.2's automatic "AppConfig"
discovery
---+--
 Reporter:  Joseph Wayodi  |Owner:  nobody
 Type:  Bug|   Status:  new
Component:  Core (Other)   |  Version:  3.2
 Severity:  Normal |   Resolution:
 Keywords: | Triage Stage:  Unreviewed
Has patch:  0  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  0
Easy pickings:  0  |UI/UX:  0
---+--
Changes (by Joseph Wayodi):

 * cc: Joseph Wayodi (added)
 * status:  closed => new
 * resolution:  invalid =>


-- 
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/065.2d217497755ec017177e2feccd5d2de6%40djangoproject.com.


Re: [Django] #33013: "AppConfig" subclass imports found in Django 3.2's automatic "AppConfig" discovery

2021-08-13 Thread Django
#33013: "AppConfig" subclass imports found in Django 3.2's automatic "AppConfig"
discovery
---+--
 Reporter:  Joseph Wayodi  |Owner:  nobody
 Type:  Bug|   Status:  closed
Component:  Core (Other)   |  Version:  3.2
 Severity:  Normal |   Resolution:  invalid
 Keywords: | Triage Stage:  Unreviewed
Has patch:  0  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  0
Easy pickings:  0  |UI/UX:  0
---+--

Comment (by Joseph Wayodi):

 Oscar provides a drop-in replacement for Django's default `AppConfig`, for
 use by Oscar itself, and by any projects that depend on it:
 {{{
 # oscar/core/application.py (Oscar's base "AppConfig" subclass)
 class OscarConfig(AppConfig):
 # Oscar's extensions to "AppConfig"

 # oscar/apps/basket/apps.py (one of Oscar's apps)
 from oscar.core.application import OscarConfig
 class BasketConfig(OscarConfig):
 # Oscar's "basket" app configurations

 # project/settings.py (a project that depends on Oscar)
 INSTALLED_APPS = [
 ...
 'oscar.apps.basket',
 ...
 ]
 }}}

 With `default_app_config` for `oscar.apps.basket` set, the following
 deprecation warning is displayed:
 {{{
 /project-venv/lib/python3.8/site-packages/django/apps/registry.py:91:
 RemovedInDjango41Warning: 'oscar.apps.basket' defines default_app_config =
 'oscar.apps.basket.apps.BasketConfig'. However, Django's automatic
 detection did not find this configuration. You should move the default
 config class to the apps submodule of your application and, if this module
 defines several config classes, mark the default one with default = True.
   app_config = AppConfig.create(entry)
 }}}

 If `default_app_config` for `oscar.apps.basket` is removed, Django finds
 multiple non-default `AppConfig` subclasses (the imported `OscarConfig`,
 and its subclass `BasketConfig`), and ends up using its default
 `AppConfig` class.

 If `OscarConfig.default` is set to `False`, this attribute gets inherited
 by its `BasketConfig` subclass, and Django finds no default `AppConfig`
 subclass, and ends up using its default `AppConfig` class. This would
 require us to switch to specifying the app in `INSTALLED_APPS` using only
 `oscar.apps.basket.apps.BasketConfig`. Or for projects using Oscar to
 subclass `BasketConfig` just to set `BasketConfig.default` to `True`.

 We could set `BasketConfig.default` to `True`, but this then causes a
 problem for any project using Oscar, which should in turn be able to
 subclass `BasketConfig`:
 {{{
 # project/basket/apps.py (overriden app in a project that depends on
 Oscar)
 from oscar.apps.basket.apps import BasketConfig
 class OverriddenBasketConfig(BasketConfig):
 # overridden "basket" app configurations

 # project/settings.py (a project that depends on Oscar)
 INSTALLED_APPS = [
 ...
 'project.basket',
 ...
 ]
 }}}
 The `default` attribute gets inherited by its `OverriddenBasketConfig`
 subclass, and Django finds multiple default `AppConfig` subclasses (the
 imported `BasketConfig`, and its subclass `OverriddenBasketConfig`):
 {{{
 RuntimeError: 'project.basket.apps' declares more than one default
 AppConfig: 'OverriddenBasketConfig', 'BasketConfig'.
 }}}

 Note that the same underlying issue exists with Django's own `AppConfig`,
 which is why it is necessary to
 
[https://github.com/django/django/commit/3f2821af6bc48fa8e7970c1ce27bc54c3172545e
 #diff-0f8bc657bc27c9f80385c4814c2c2ebc033bda3e03285a7212965309a481cc70R117
 check for that special case]. What we are asking for is a generic solution
 to that problem, which replacements for `AppConfig` can rely on.

-- 
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/065.006b4c7dfb38461557d2fac5e94225da%40djangoproject.com.


Re: [Django] #33020: Run Time Error

2021-08-13 Thread Django
#33020: Run Time Error
---+--
 Reporter:  Rana Zain  |Owner:  nobody
 Type:  Uncategorized  |   Status:  closed
Component:  Uncategorized  |  Version:  3.2
 Severity:  Normal |   Resolution:  invalid
 Keywords:  Django Erroe   | Triage Stage:  Unreviewed
Has patch:  0  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  0
Easy pickings:  0  |UI/UX:  0
---+--
Changes (by Tim Graham):

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


Old description:

> When I run every project it shows me this error.
>

> Traceback (most recent call last):
>   File "E:\Git Project\django-calculator\mainproject\manage.py", line 22,
> in 
> execute_from_command_line(sys.argv)
>   File "C:\Users\iamra\AppData\Local\Programs\Python\Python39\lib\site-
> packages\django\core\management\__init__.py", line 419, in
> execute_from_command_l
> ine
> utility.execute()
>   File "C:\Users\iamra\AppData\Local\Programs\Python\Python39\lib\site-
> packages\django\core\management\__init__.py", line 413, in execute
> self.fetch_command(subcommand).run_from_argv(self.argv)
>   File "C:\Users\iamra\AppData\Local\Programs\Python\Python39\lib\site-
> packages\django\core\management\base.py", line 367, in run_from_argv
> connections.close_all()
>   File "C:\Users\iamra\AppData\Local\Programs\Python\Python39\lib\site-
> packages\django\db\utils.py", line 208, in close_all
> for alias in self:
>   File "C:\Users\iamra\AppData\Local\Programs\Python\Python39\lib\site-
> packages\django\utils\connection.py", line 73, in __iter__
> return iter(self.settings)
>   File "C:\Users\iamra\AppData\Local\Programs\Python\Python39\lib\site-
> packages\django\utils\functional.py", line 48, in __get__
> res = instance.__dict__[self.name] = self.func(instance)
>   File "C:\Users\iamra\AppData\Local\Programs\Python\Python39\lib\site-
> packages\django\utils\connection.py", line 45, in settings
> self._settings = self.configure_settings(self._settings)
>   File "C:\Users\iamra\AppData\Local\Programs\Python\Python39\lib\site-
> packages\django\db\utils.py", line 144, in configure_settings
> databases = super().configure_settings(databases)
>   File "C:\Users\iamra\AppData\Local\Programs\Python\Python39\lib\site-
> packages\django\utils\connection.py", line 50, in configure_settings
> settings = getattr(django_settings, self.settings_name)
>   File "C:\Users\iamra\AppData\Local\Programs\Python\Python39\lib\site-
> packages\django\conf\__init__.py", line 82, in __getattr__
> self._setup(name)
>   File "C:\Users\iamra\AppData\Local\Programs\Python\Python39\lib\site-
> packages\django\conf\__init__.py", line 69, in _setup
> self._wrapped = Settings(settings_module)
>   File "C:\Users\iamra\AppData\Local\Programs\Python\Python39\lib\site-
> packages\django\conf\__init__.py", line 170, in __init__
> mod = importlib.import_module(self.SETTINGS_MODULE)
>   File
> "C:\Users\iamra\AppData\Local\Programs\Python\Python39\lib\importlib\__init__.py",
> line 127, in import_module
> return _bootstrap._gcd_import(name[level:], package, level)
>   File "", line 1030, in _gcd_import
>   File "", line 1007, in _find_and_load
>   File "", line 972, in
> _find_and_load_unlocked
>   File "", line 228, in
> _call_with_frames_removed
>   File "", line 1030, in _gcd_import
>   File "", line 1007, in _find_and_load
>   File "", line 984, in
> _find_and_load_unlocked
> ModuleNotFoundError: No module named 'main'

New description:

 When I run every project it shows me this error.

 {{{
 Traceback (most recent call last):
   File "E:\Git Project\django-calculator\mainproject\manage.py", line 22,
 in 
 execute_from_command_line(sys.argv)
   File "C:\Users\iamra\AppData\Local\Programs\Python\Python39\lib\site-
 packages\django\core\management\__init__.py", line 419, in
 execute_from_command_l
 ine
 utility.execute()
   File "C:\Users\iamra\AppData\Local\Programs\Python\Python39\lib\site-
 packages\django\core\management\__init__.py", line 413, in execute
 self.fetch_command(subcommand).run_from_argv(self.argv)
   File "C:\Users\iamra\AppData\Local\Programs\Python\Python39\lib\site-
 packages\django\core\management\base.py", line 367, in run_from_argv
 connections.close_all()
   File "C:\Users\iamra\AppData\Local\Programs\Python\Python39\lib\site-
 packages\django\db\utils.py", line 208, in close_all
 for alias in self:
   File "C:\Users\iamra\AppData\Local\Programs\Python\Python39\lib\site-
 packages\django\utils\connection.py", line 73, in __iter__
 return iter(self.settings)
   File "C:\Users\iamra\AppData\Local\Programs\Python\Python39\lib\site-
 packages\django\utils\functional.py", line 4

[Django] #33021: Migration crashes when GIN index with gin_trgm_ops is used

2021-08-13 Thread Django
#33021: Migration crashes when GIN index with gin_trgm_ops is used
-+-
   Reporter:  AlekseiKhatkevich  |  Owner:  nobody
   Type:  Bug| Status:  new
  Component:  Migrations |Version:  3.2
   Severity:  Normal |   Keywords:  gin OpClass
   Triage Stage:  Unreviewed |  Has patch:  0
Needs documentation:  0  |Needs tests:  0
Patch needs improvement:  0  |  Easy pickings:  0
  UI/UX:  0  |
-+-
 I have an index like following:


 {{{
 GinIndex(
 OpClass(Upper('text_id'), name='gin_trgm_ops'),
 name='text_id_idx',
 ),
 }}}

 Migration file creates without any troubles on it.

 sqlmigrate generates following SQL:



 {{{
 CREATE INDEX "text_id_idx" ON "auction_lot" USING gin ((UPPER("text_id")
 gin_trgm_ops));
 }}}

 which obviously has one extra set of (), which causes following exception
 during migration


 {{{
 django.db.utils.ProgrammingError: syntax error at or near "gin_trgm_ops"
 LINE 1: ...dx" ON "auction_lot" USING gin ((UPPER("text_id") gin_trgm_o...
 }}}

-- 
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/060.04acc97b0ab21befffa3921c0665b46b%40djangoproject.com.


[Django] #33020: Run Time Error

2021-08-13 Thread Django
#33020: Run Time Error
-+--
   Reporter:  RanaZain1998   |  Owner:  nobody
   Type:  Uncategorized  | Status:  new
  Component:  Uncategorized  |Version:  3.2
   Severity:  Normal |   Keywords:  Django Erroe
   Triage Stage:  Unreviewed |  Has patch:  0
Needs documentation:  0  |Needs tests:  0
Patch needs improvement:  0  |  Easy pickings:  0
  UI/UX:  0  |
-+--
 When I run every project it shows me this error.


 Traceback (most recent call last):
   File "E:\Git Project\django-calculator\mainproject\manage.py", line 22,
 in 
 execute_from_command_line(sys.argv)
   File "C:\Users\iamra\AppData\Local\Programs\Python\Python39\lib\site-
 packages\django\core\management\__init__.py", line 419, in
 execute_from_command_l
 ine
 utility.execute()
   File "C:\Users\iamra\AppData\Local\Programs\Python\Python39\lib\site-
 packages\django\core\management\__init__.py", line 413, in execute
 self.fetch_command(subcommand).run_from_argv(self.argv)
   File "C:\Users\iamra\AppData\Local\Programs\Python\Python39\lib\site-
 packages\django\core\management\base.py", line 367, in run_from_argv
 connections.close_all()
   File "C:\Users\iamra\AppData\Local\Programs\Python\Python39\lib\site-
 packages\django\db\utils.py", line 208, in close_all
 for alias in self:
   File "C:\Users\iamra\AppData\Local\Programs\Python\Python39\lib\site-
 packages\django\utils\connection.py", line 73, in __iter__
 return iter(self.settings)
   File "C:\Users\iamra\AppData\Local\Programs\Python\Python39\lib\site-
 packages\django\utils\functional.py", line 48, in __get__
 res = instance.__dict__[self.name] = self.func(instance)
   File "C:\Users\iamra\AppData\Local\Programs\Python\Python39\lib\site-
 packages\django\utils\connection.py", line 45, in settings
 self._settings = self.configure_settings(self._settings)
   File "C:\Users\iamra\AppData\Local\Programs\Python\Python39\lib\site-
 packages\django\db\utils.py", line 144, in configure_settings
 databases = super().configure_settings(databases)
   File "C:\Users\iamra\AppData\Local\Programs\Python\Python39\lib\site-
 packages\django\utils\connection.py", line 50, in configure_settings
 settings = getattr(django_settings, self.settings_name)
   File "C:\Users\iamra\AppData\Local\Programs\Python\Python39\lib\site-
 packages\django\conf\__init__.py", line 82, in __getattr__
 self._setup(name)
   File "C:\Users\iamra\AppData\Local\Programs\Python\Python39\lib\site-
 packages\django\conf\__init__.py", line 69, in _setup
 self._wrapped = Settings(settings_module)
   File "C:\Users\iamra\AppData\Local\Programs\Python\Python39\lib\site-
 packages\django\conf\__init__.py", line 170, in __init__
 mod = importlib.import_module(self.SETTINGS_MODULE)
   File
 
"C:\Users\iamra\AppData\Local\Programs\Python\Python39\lib\importlib\__init__.py",
 line 127, in import_module
 return _bootstrap._gcd_import(name[level:], package, level)
   File "", line 1030, in _gcd_import
   File "", line 1007, in _find_and_load
   File "", line 972, in
 _find_and_load_unlocked
   File "", line 228, in
 _call_with_frames_removed
   File "", line 1030, in _gcd_import
   File "", line 1007, in _find_and_load
   File "", line 984, in
 _find_and_load_unlocked
 ModuleNotFoundError: No module named 'main'

-- 
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/055.5b2a5c462565d8ea71f21de8872af618%40djangoproject.com.