#34849: Appending django.contrib.postgres to the INSTALLED_APPS via
@modify_settings crashes.
-------------------------------------+-------------------------------------
Reporter: Mariusz Felisiak | Owner: nobody
Type: Bug | Status: new
Component: Database layer | Version: 5.0
(models, ORM) |
Severity: Release blocker | 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 David Sanders):
@Florian to demonstrate the issue, you can make the postgres tests fail
with `--parallel=1` if you replace the lines getting type oids with their
underlying non-cached versions (`get_hstore_oids()` and
`get_citext_oids()` are cached so when it comes time to reload the module
there's no db interaction for a single process)
Eg this diff shows what I mean (I'm using psycopg2 so I've replaced it in
the psycopg2 block)
{{{
--- a/django/contrib/postgres/signals.py
+++ b/django/contrib/postgres/signals.py
@@ -55,7 +55,7 @@ else:
if connection.vendor != "postgresql" or connection.alias ==
NO_DB_ALIAS:
return
- oids, array_oids = get_hstore_oids(connection.alias)
+ oids, array_oids = get_type_oids(connection.alias, "hstore")
# Don't register handlers when hstore is not available on the
database.
#
# If someone tries to create an hstore field it will error there.
This is
}}}
If you apply that change then `--parallel=1` will fail.
--
Ticket URL: <https://code.djangoproject.com/ticket/34849#comment:7>
Django <https://code.djangoproject.com/>
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/0107018ab3866666-c012b934-8244-40ad-9cdf-5f9f30574694-000000%40eu-central-1.amazonses.com.