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.

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

118118 'psql',
119119 'pgsql',
120120 'postgis',
121- 'prometheus_postgresql',
122- 'prometheus_postgis',
121+ 'prometheus-postgresql',
122+ 'prometheus-postgis',
123123 ]
124124
125125 DEFAULT_DATABASE_ENV = 'DATABASE_URL'
129129 'psql': DJANGO_POSTGRES,
130130 'pgsql': DJANGO_POSTGRES,
131131 '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',
134134 'cockroachdb': 'django_cockroachdb',
135135 'mysql': 'django.db.backends.mysql',
136136 'mysql2': 'django.db.backends.mysql',
137137 'mysql-connector': 'mysql.connector.django',
138138 'mysqlgis': 'django.contrib.gis.db.backends.mysql',
139- 'prometheus_mysql': 'django_prometheus.db.backends.mysql',
139+ 'prometheus-mysql': 'django_prometheus.db.backends.mysql',
140140 'mssql': 'mssql',
141141 'oracle': 'django.db.backends.oracle',
142142 'pyodbc': 'sql_server.pyodbc',
143143 'redshift': 'django_redshift_backend',
144144 'spatialite': 'django.contrib.gis.db.backends.spatialite',
145- 'prometheus_spatialite': 'django_prometheus.db.backends.spatialite',
145+ 'prometheus-spatialite': 'django_prometheus.db.backends.spatialite',
146146 'sqlite': 'django.db.backends.sqlite3',
147- 'prometheus_sqlite': 'django_prometheus.db.backends.sqlite3',
147+ 'prometheus-sqlite': 'django_prometheus.db.backends.sqlite3',
148148 'ldap': 'ldapdb.backends.ldap',
149149 }
150150 _DB_BASE_OPTIONS = [

The check that tells the two apart

failpass·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