Whole file
joke2k/django-environ
The author described this change as “Fix prometheus DB scheme aliases: underscores → hyphens (#585)”. It counts as a record because the check below fails on the code as it stood at 3317ae4c0 and passes on 278686ad0, with nothing else changed between the two runs.
Projectjoke2k/django-environ
Fix saved2026-02-20
Sharing licenceMIT · LICENSE.txt
Change size+7 −7
What the code was meant to do, written into the code itself as a save note
Fix prometheus DB scheme aliases: underscores → hyphens (#585)
The change
| 118 | 118 | 'psql', | |
| 119 | 119 | 'pgsql', | |
| 120 | 120 | 'postgis', | |
| 121 | - | 'prometheus_postgresql', | |
| 122 | - | 'prometheus_postgis', | |
| 121 | + | 'prometheus-postgresql', | |
| 122 | + | 'prometheus-postgis', | |
| 123 | 123 | ] | |
| 124 | 124 | ||
| 125 | 125 | DEFAULT_DATABASE_ENV = 'DATABASE_URL' | |
| ⋯ | |||
| 129 | 129 | 'psql': DJANGO_POSTGRES, | |
| 130 | 130 | 'pgsql': DJANGO_POSTGRES, | |
| 131 | 131 | 'postgis': 'django.contrib.gis.db.backends.postgis', | |
| 132 | - | 'prometheus_postgresql': 'django_prometheus.db.backends.postgresql', | |
| 133 | - | 'prometheus_postgis': 'django_prometheus.db.backends.postgis', | |
| 132 | + | 'prometheus-postgresql': 'django_prometheus.db.backends.postgresql', | |
| 133 | + | 'prometheus-postgis': 'django_prometheus.db.backends.postgis', | |
| 134 | 134 | 'cockroachdb': 'django_cockroachdb', | |
| 135 | 135 | 'mysql': 'django.db.backends.mysql', | |
| 136 | 136 | 'mysql2': 'django.db.backends.mysql', | |
| 137 | 137 | 'mysql-connector': 'mysql.connector.django', | |
| 138 | 138 | 'mysqlgis': 'django.contrib.gis.db.backends.mysql', | |
| 139 | - | 'prometheus_mysql': 'django_prometheus.db.backends.mysql', | |
| 139 | + | 'prometheus-mysql': 'django_prometheus.db.backends.mysql', | |
| 140 | 140 | 'mssql': 'mssql', | |
| 141 | 141 | 'oracle': 'django.db.backends.oracle', | |
| 142 | 142 | 'pyodbc': 'sql_server.pyodbc', | |
| 143 | 143 | 'redshift': 'django_redshift_backend', | |
| 144 | 144 | 'spatialite': 'django.contrib.gis.db.backends.spatialite', | |
| 145 | - | 'prometheus_spatialite': 'django_prometheus.db.backends.spatialite', | |
| 145 | + | 'prometheus-spatialite': 'django_prometheus.db.backends.spatialite', | |
| 146 | 146 | 'sqlite': 'django.db.backends.sqlite3', | |
| 147 | - | 'prometheus_sqlite': 'django_prometheus.db.backends.sqlite3', | |
| 147 | + | 'prometheus-sqlite': 'django_prometheus.db.backends.sqlite3', | |
| 148 | 148 | 'ldap': 'ldapdb.backends.ldap', | |
| 149 | 149 | } | |
| 150 | 150 | _DB_BASE_OPTIONS = [ | |
The check that tells the two apart
fail→pass·tests/test_db.py::test_db_parsing[prometheus-postgresql]
Check file tests/test_db.py, taken without changes from the fix and copied onto the older code, so the exact same check runs against both versions.
Origin and history
The code before it3317ae4c06434e21c7ead274ace7ac0b46ceb210
Broken version dated2026-02-20
Moduleenviron.environ
Units changedEnv
Fingerprint93c461f472f5ffb8
Checked2026-08-18 by goldset/0.1
Every field above is generated by our program. None of it is written by hand.
Other bugs found in joke2k/django-environ
- 2026-02-17Feature/add choice parameter and raise an exception if fetched value is not within (#555)
- 2022-06-14Fix `environ.Path.__eq__()` to compare paths correctly
- 2021-12-13fix unquote vs unquote_plus issue
- 2021-12-09fix[db_url_config]: added postgres cluster DSN support (ie postgresql://username:password@host1:port1,host2:port2/database)
- 2021-09-01Fix db_url_config to work the same for all postgres-like schemes