Skip to content

[DPE-10163] Compatibility class for PGB#128

Merged
dragomirp merged 4 commits into
16/edgefrom
pgb-compat
May 21, 2026
Merged

[DPE-10163] Compatibility class for PGB#128
dragomirp merged 4 commits into
16/edgefrom
pgb-compat

Conversation

@dragomirp
Copy link
Copy Markdown
Contributor

@dragomirp dragomirp commented May 19, 2026

@dragomirp dragomirp added the enhancement New feature or request label May 19, 2026
@dragomirp dragomirp changed the title [MISC] Compatibility clas for PGB [MISC] Compatibility class for PGB May 19, 2026
@dragomirp dragomirp changed the title [MISC] Compatibility class for PGB [DPE-10163] Compatibility class for PGB May 20, 2026
"""Exception raised when enabling/disabling an extension fails."""


class PostgreSQLBase:
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Base class for PGB, so that we maintain a minimum of 3.8 compatible code.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

literals are used around the place. We can update the substrate to StrEnum in 3.12, but that's not available for 3.8.

from ..compat.postgresql import (
ACCESS_GROUP_RELATION,
ALLOWED_ROLES,
INVALID_DATABASE_NAME_BLOCKING_MESSAGE, # noqa: F401
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Imported to keep the namespace consistent. Alternatively, we can define exports instead of noqa.



class PostgreSQL:
class PostgreSQL(PostgreSQLBase):
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moved duplicate functions to the base class.

@dragomirp dragomirp marked this pull request as ready for review May 20, 2026 14:52
@dragomirp dragomirp requested a review from a team as a code owner May 20, 2026 14:52
@dragomirp dragomirp requested review from carlcsaposs-canonical, juju-charm-bot, marceloneppel and taurus-forever and removed request for a team May 20, 2026 14:52
Copy link
Copy Markdown
Member

@marceloneppel marceloneppel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@dragomirp dragomirp merged commit 4023d49 into 16/edge May 21, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants