Skip to content

Update postgis version in CI to latest #2218

@tim-schilling

Description

@tim-schilling

We need to update the postgis version from postgis/postgis:14-3.1 to the latest (see their Docker page for the latest versions)

This is because we're getting the following error in CI:

py313-djmain-psycopg3: commands[0]> python -b -W always -m coverage run -m django test -v2 tests
  Creating test database for alias 'default' ('test_debug_toolbar')...
  /home/runner/work/django-debug-toolbar/django-debug-toolbar/.tox/py313-djmain-psycopg3/lib/python3.13/site-packages/django/db/backends/postgresql/base.py:513: RuntimeWarning: Normally Django will use a connection to the 'postgres' database to avoid running initialization queries against the production database when it's not needed (for example, when running tests). Django was unable to create a connection to the 'postgres' database and will use the first PostgreSQL database instead.
    warnings.warn(
  Traceback (most recent call last):
    File "/home/runner/work/django-debug-toolbar/django-debug-toolbar/.tox/py313-djmain-psycopg3/lib/python3.13/site-packages/django/db/backends/postgresql/base.py", line 508, in _nodb_cursor
      with super()._nodb_cursor() as cursor:
           ~~~~~~~~~~~~~~~~~~~~^^
    File "/opt/hostedtoolcache/Python/3.13.7/x64/lib/python3.13/contextlib.py", line 141, in __enter__
      return next(self.gen)
    File "/home/runner/work/django-debug-toolbar/django-debug-toolbar/.tox/py313-djmain-psycopg3/lib/python3.13/site-packages/django/db/backends/base/base.py", line 712, in _nodb_cursor
      with conn.cursor() as cursor:
           ~~~~~~~~~~~^^
    File "/home/runner/work/django-debug-toolbar/django-debug-toolbar/.tox/py313-djmain-psycopg3/lib/python3.13/site-packages/django/utils/asyncio.py", line 26, in inner
      return func(*args, **kwargs)
    File "/home/runner/work/django-debug-toolbar/django-debug-toolbar/.tox/py313-djmain-psycopg3/lib/python3.13/site-packages/django/db/backends/base/base.py", line 320, in cursor
      return self._cursor()
             ~~~~~~~~~~~~^^
    File "/home/runner/work/django-debug-toolbar/django-debug-toolbar/.tox/py313-djmain-psycopg3/lib/python3.13/site-packages/django/db/backends/base/base.py", line 296, in _cursor
      self.ensure_connection()
      ~~~~~~~~~~~~~~~~~~~~~~^^
    File "/home/runner/work/django-debug-toolbar/django-debug-toolbar/.tox/py313-djmain-psycopg3/lib/python3.13/site-packages/django/utils/asyncio.py", line 26, in inner
      return func(*args, **kwargs)
    File "/home/runner/work/django-debug-toolbar/django-debug-toolbar/.tox/py313-djmain-psycopg3/lib/python3.13/site-packages/django/db/backends/base/base.py", line 279, in ensure_connection
      self.connect()
      ~~~~~~~~~~~~^^
    File "/home/runner/work/django-debug-toolbar/django-debug-toolbar/.tox/py313-djmain-psycopg3/lib/python3.13/site-packages/django/utils/asyncio.py", line 26, in inner
      return func(*args, **kwargs)
    File "/home/runner/work/django-debug-toolbar/django-debug-toolbar/.tox/py313-djmain-psycopg3/lib/python3.13/site-packages/django/db/backends/base/base.py", line 258, in connect
      self.init_connection_state()
      ~~~~~~~~~~~~~~~~~~~~~~~~~~^^
    File "/home/runner/work/django-debug-toolbar/django-debug-toolbar/.tox/py313-djmain-psycopg3/lib/python3.13/site-packages/django/db/backends/postgresql/base.py", line 399, in init_connection_state
      super().init_connection_state()
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
    File "/home/runner/work/django-debug-toolbar/django-debug-toolbar/.tox/py313-djmain-psycopg3/lib/python3.13/site-packages/django/db/backends/base/base.py", line 225, in init_connection_state
      self.check_database_version_supported()
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
    File "/home/runner/work/django-debug-toolbar/django-debug-toolbar/.tox/py313-djmain-psycopg3/lib/python3.13/site-packages/django/db/backends/base/base.py", line 201, in check_database_version_supported
      raise NotSupportedError(
      ...<2 lines>...
      )
  django.db.utils.NotSupportedError: PostgreSQL 15 or later is required (found 14.1).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions