Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Version detection fails on Ubuntu (Mint) installation #100

Closed
@mykmartin

Description

@mykmartin

On Linux Mint (an Ubuntu derivative), the version string produced by postgres isn't parsed correctly byget_pg_version() in utils.py:

$ /usr/lib/postgresql/15/bin/postgres --versionpostgres (PostgreSQL) 15.5 (Ubuntu 15.5-1.pgdg22.04+1)$ python ./tests/test_simple.py Traceback (most recent call last):  File "testgres/env/lib/python3.10/site-packages/testgres/utils.py", line 31, in __init__    super().__init__(version)  File "testgres/env/lib/python3.10/site-packages/packaging/version.py", line 200, in __init__    raise InvalidVersion(f"Invalid version: '{version}'")packaging.version.InvalidVersion: Invalid version: '15.5-1.pgdg22.04+1)'

There appears to be a fairly simple fix inget_pg_version(), line 185:

    # Remove "(Homebrew)" and "(Ubuntu <version>)" if present    raw_ver = raw_ver.replace('(Homebrew)', '').strip()    raw_ver = re.sub('\(Ubuntu[^)]*\)', '', raw_ver).strip()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp