agora inbox for pgsql-bugs@postgresql.org  
help / color / mirror / Atom feed
BUG #19562: pgcli packaged by the PostgreSQL Yum Repository:ModuleNotFoundError: No module named 'pgspecial'
4+ messages / 2 participants
[nested] [flat]

* BUG #19562: pgcli packaged by the PostgreSQL Yum Repository:ModuleNotFoundError: No module named 'pgspecial'
@ 2026-07-21 06:41 PG Bug reporting form <noreply@postgresql.org>
  2026-07-27 17:47 ` Re: BUG #19562: pgcli packaged by the PostgreSQL Yum Repository:ModuleNotFoundError: No module named 'pgspecial' Pritt Balagopal <pritt1999@gmail.com>
  2026-09-20 11:12 ` Re: BUG #19562: pgcli packaged by the PostgreSQL Yum Repository:ModuleNotFoundError: No module named 'pgspecial' Pritt Balagopal <pritt1999@gmail.com>
  0 siblings, 2 replies; 4+ messages in thread

From: PG Bug reporting form @ 2026-07-21 06:41 UTC (permalink / raw)
  To: pgsql-bugs@lists.postgresql.org; +Cc: pritt1999@gmail.com

The following bug has been logged on the website:

Bug reference:      19562
Logged by:          Pritt Balagopal
Email address:      pritt1999@gmail.com
PostgreSQL version: 18.4
Operating system:   Fedora 44
Description:        

This bug report does not apply to PostgreSQL 18.4, nor to pgcli either.
Rather, it concerns the specific methodology by which pgcli is packaged for
distribution within the PostgreSQL Yum Repository.

How to reproduce the bug:

Create the Fedora 44 container environment using Podman (Docker is also
applicable here, the commands work the same way):

```
podman create -it --name fedora44 quay.io/fedora/fedora:44 /bin/bash
```

Run the Fedora 44 container environment, and enter its shell:

```
podman start -ai fedora44
```

Within the shell, run a quick `dnf update` and then proceed to import the
PostgreSQL yum repository as outlined in:
https://www.postgresql.org/download/linux/redhat/

```
dnf install
https://download.postgresql.org/pub/repos/yum/reporpms/F-44-x86_64/pgdg-fedora-repo-latest.noarch.rp...
```

Now, install pgcli:

```
dnf install pgcli
```

You should see dnf prompting you for confirmation with the pgcli being
sourced from `pgdg-common`. Accept and import GPG keys as prompted:

```
Package                                                                 Arch
Version
Repository                                    Size
Installing:
 pgcli
noarch          0:4.3.0-2PGDG.f44
pgdg-common                               60.3 KiB
Installing dependencies:
 expat
x86_64          0:2.8.1-1.fc44
updates                                  327.4 KiB
 mpdecimal
x86_64          0:4.0.1-3.fc44
fedora                                   217.1 KiB
 python-pip-wheel
noarch          0:26.0.1-2.fc44
fedora                                     1.2 MiB
 python3
x86_64          0:3.14.6-1.fc44
updates                                   28.7 KiB
 python3-cli-helpers
noarch          0:2.2.1-2.f44
pgdg-common                              115.2 KiB
 python3-cli-helpers+styles
noarch          0:2.2.1-2.f44
pgdg-common                                0.0   B
 python3-click
noarch          1:8.3.3-1.fc44
updates                                    1.2 MiB
 python3-configobj
noarch          0:5.0.9-9.fc44
fedora                                   399.3 KiB
 python3-humanize
noarch          0:4.15.0-2.fc44
fedora                                   231.5 KiB
 python3-jedi
noarch          0:0.19.2-10.fc44
fedora                                     5.6 MiB
 python3-libs
x86_64          0:3.14.6-1.fc44
updates                                   43.9 MiB
 python3-parso
noarch          0:0.8.5-3.fc44
fedora                                   900.7 KiB
 python3-pgcli
noarch          0:4.3.0-2PGDG.f44
pgdg-common                              637.8 KiB
 python3-pygments
noarch          0:2.19.1-9.fc44
fedora                                    11.3 MiB
 python3-setproctitle
x86_64          0:1.3.7-4.fc44
fedora                                    41.7 KiB
 python3-sqlparse
noarch          0:0.5.3-4.fc44
fedora                                   386.3 KiB
 python3-tabulate
noarch          0:0.9.0-19.fc44
fedora                                   347.1 KiB
 python3-tabulate+widechars
noarch          0:0.9.0-19.fc44
fedora                                     0.0   B
 python3-terminaltables
noarch          0:3.1.10-20.fc44
fedora                                    94.7 KiB
 python3-wcwidth
noarch          0:0.6.0-1.fc44
fedora                                   470.6 KiB
Installing weak dependencies:
 python-unversioned-command
noarch          0:3.14.6-1.fc44
updates
```

Once the installation is complete, invoke the `pgcli` executable and you
will be met with an error:

```
Traceback (most recent call last):
  File "/usr/bin/pgcli", line 3, in <module>
    from pgcli.main import cli
  File "/usr/lib/python3.14/site-packages/pgcli/main.py", line 3, in
<module>
    from pgspecial.namedqueries import NamedQueries
ModuleNotFoundError: No module named 'pgspecial'
```

The fact that this module is not imported by default when `pgcli` is
packaged for RPM is not the expected behavior. However, even if one were to
bypass this limitation by manually installing the `pgspecial` python module
via:

```
dnf install python3-pgspecial
```

This still does not solve the problem of using `pgcli` as packaged by the
PostgreSQL Yum repository:

```
Traceback (most recent call last):
  File "/usr/bin/pgcli", line 3, in <module>
    from pgcli.main import cli
  File "/usr/lib/python3.14/site-packages/pgcli/main.py", line 23, in
<module>
    from cli_helpers.tabular_output.preprocessors import (
    ...<3 lines>...
    )
ImportError: cannot import name 'format_timestamps' from
'cli_helpers.tabular_output.preprocessors'
(/usr/lib/python3.14/site-packages/cli_helpers/tabular_output/preprocessors.py)
```

Note. This is NOT a bug within `pgcli` itself. Rather, this is a bug in the
packaging of `pgcli` within the PostgreSQL Yum repository. We can verify
this by installing `pgcli` from Fedora official repositories instead of
`pgdg-common`. To do this, delete the previous container and begin anew.
This time, do not import the PostgreSQL Yum Repository:

```
dnf install pgcli
```

```
Package                                                                 Arch
Version
Repository                                    Size
Installing:
 pgcli
noarch          0:4.5.0-1.fc44
updates                                  649.9 KiB
Installing dependencies:
 expat
x86_64          0:2.8.1-1.fc44
updates                                  327.4 KiB
 libpq
x86_64          0:18.0-4.fc44
fedora                                     1.0 MiB
 mpdecimal
x86_64          0:4.0.1-3.fc44
fedora                                   217.1 KiB
 python-pip-wheel
noarch          0:26.0.1-2.fc44
fedora                                     1.2 MiB
 python3
x86_64          0:3.14.6-1.fc44
updates                                   28.7 KiB
 python3-cli-helpers
noarch          0:2.10.1-1.fc44
fedora                                   129.6 KiB
 python3-cli-helpers+styles
noarch          0:2.10.1-1.fc44
fedora                                     0.0   B
 python3-click
noarch          1:8.3.3-1.fc44
updates                                    1.2 MiB
 python3-configobj
noarch          0:5.0.9-9.fc44
fedora                                   399.3 KiB
 python3-libs
x86_64          0:3.14.6-1.fc44
updates                                   43.9 MiB
 python3-pgspecial
noarch          0:2.2.1-7.fc44
fedora                                   363.8 KiB
 python3-prompt-toolkit
noarch          0:3.0.52-2.fc44
fedora                                     4.2 MiB
 python3-psycopg3
noarch          0:3.3.4-1.fc44
updates                                    2.0 MiB
 python3-pygments
noarch          0:2.19.1-9.fc44
fedora                                    11.3 MiB
 python3-setproctitle
x86_64          0:1.3.7-4.fc44
fedora                                    41.7 KiB
 python3-sqlparse
noarch          0:0.5.3-4.fc44
fedora                                   386.3 KiB
 python3-tabulate
noarch          0:0.9.0-19.fc44
fedora                                   347.1 KiB
 python3-tabulate+widechars
noarch          0:0.9.0-19.fc44
fedora                                     0.0   B
 python3-terminaltables
noarch          0:3.1.10-20.fc44
fedora                                    94.7 KiB
 python3-tzlocal
noarch          0:5.3.1-6.fc44
fedora                                   125.3 KiB
 python3-wcwidth
noarch          0:0.6.0-1.fc44
fedora                                   470.6 KiB
Installing weak dependencies:
 python-unversioned-command
noarch          0:3.14.6-1.fc44
updates
```

Once the installation of pgcli from Fedora packaging has completed, invoking
the command `pgcli` shows the expected response:

```
connection is bad: connection to server on socket
"/var/run/postgresql/.s.PGSQL.5432" failed: No such file or directory
        Is the server running locally and accepting connections on that
socket?
```








^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: BUG #19562: pgcli packaged by the PostgreSQL Yum Repository:ModuleNotFoundError: No module named 'pgspecial'
  2026-07-21 06:41 BUG #19562: pgcli packaged by the PostgreSQL Yum Repository:ModuleNotFoundError: No module named 'pgspecial' PG Bug reporting form <noreply@postgresql.org>
@ 2026-07-27 17:47 ` Pritt Balagopal <pritt1999@gmail.com>
  1 sibling, 0 replies; 4+ messages in thread

From: Pritt Balagopal @ 2026-07-27 17:47 UTC (permalink / raw)
  To: pritt1999@gmail.com; pgsql-bugs@lists.postgresql.org

I have conducted some further investigation, and have narrowed down
the cause of the packaging error. In order to fix this error, the
following needs to be done:

- Upgrade `python3-cli-helpers` to atleast 2.10.1. Currently,
`pgdg-common` supplies version 2.2.1, which is not compatible with
`pgcli` version 4.3.0. Version 2.10.1 sourced from the `fedora`
repository satisfies `pgcli` requirements. I have not tested if any
previous version also satisfies or not

- Mark `python3-pgspecial`, `python3-tzlocal`,
`python3-prompt-toolkit` as strong dependencies of the `pgcli` RPM
package because pgcli cannot function without these python modules.






^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: BUG #19562: pgcli packaged by the PostgreSQL Yum Repository:ModuleNotFoundError: No module named 'pgspecial'
  2026-07-21 06:41 BUG #19562: pgcli packaged by the PostgreSQL Yum Repository:ModuleNotFoundError: No module named 'pgspecial' PG Bug reporting form <noreply@postgresql.org>
@ 2026-09-20 11:12 ` Pritt Balagopal <pritt1999@gmail.com>
  2026-09-26 10:10   ` Re: BUG #19562: pgcli packaged by the PostgreSQL Yum Repository:ModuleNotFoundError: No module named 'pgspecial' Pritt Balagopal <pritt1999@gmail.com>
  1 sibling, 1 reply; 4+ messages in thread

From: Pritt Balagopal @ 2026-09-20 11:12 UTC (permalink / raw)
  To: pritt1999@gmail.com; pgsql-bugs@lists.postgresql.org

Update:

On 19th Sep, 2026 the `pgcli` version `4.7.0` and
`python3-cli-helpers` version `2.15.1` were released, which partially
resolved the issue. Nevertheless, the following issues remain:

`python3-pgspecial`, `python3-tzlocal`, and `python3-prompt-toolkit`
are still not marked as strong dependencies of `pgcli` as packaged by
PGDG. This is necessary as pgcli cannot function without these python
modules.

On Tue, 21 Jul 2026 at 12:12, PG Bug reporting form
<noreply@postgresql.org> wrote:
>
> The following bug has been logged on the website:
>
> Bug reference:      19562
> Logged by:          Pritt Balagopal
> Email address:      pritt1999@gmail.com
> PostgreSQL version: 18.4
> Operating system:   Fedora 44
> Description:
>
> This bug report does not apply to PostgreSQL 18.4, nor to pgcli either.
> Rather, it concerns the specific methodology by which pgcli is packaged for
> distribution within the PostgreSQL Yum Repository.
>
> How to reproduce the bug:
>
> Create the Fedora 44 container environment using Podman (Docker is also
> applicable here, the commands work the same way):
>
> ```
> podman create -it --name fedora44 quay.io/fedora/fedora:44 /bin/bash
> ```
>
> Run the Fedora 44 container environment, and enter its shell:
>
> ```
> podman start -ai fedora44
> ```
>
> Within the shell, run a quick `dnf update` and then proceed to import the
> PostgreSQL yum repository as outlined in:
> https://www.postgresql.org/download/linux/redhat/
>
> ```
> dnf install
> https://download.postgresql.org/pub/repos/yum/reporpms/F-44-x86_64/pgdg-fedora-repo-latest.noarch.rp...
> ```
>
> Now, install pgcli:
>
> ```
> dnf install pgcli
> ```
>
> You should see dnf prompting you for confirmation with the pgcli being
> sourced from `pgdg-common`. Accept and import GPG keys as prompted:
>
> ```
> Package                                                                 Arch
> Version
> Repository                                    Size
> Installing:
>  pgcli
> noarch          0:4.3.0-2PGDG.f44
> pgdg-common                               60.3 KiB
> Installing dependencies:
>  expat
> x86_64          0:2.8.1-1.fc44
> updates                                  327.4 KiB
>  mpdecimal
> x86_64          0:4.0.1-3.fc44
> fedora                                   217.1 KiB
>  python-pip-wheel
> noarch          0:26.0.1-2.fc44
> fedora                                     1.2 MiB
>  python3
> x86_64          0:3.14.6-1.fc44
> updates                                   28.7 KiB
>  python3-cli-helpers
> noarch          0:2.2.1-2.f44
> pgdg-common                              115.2 KiB
>  python3-cli-helpers+styles
> noarch          0:2.2.1-2.f44
> pgdg-common                                0.0   B
>  python3-click
> noarch          1:8.3.3-1.fc44
> updates                                    1.2 MiB
>  python3-configobj
> noarch          0:5.0.9-9.fc44
> fedora                                   399.3 KiB
>  python3-humanize
> noarch          0:4.15.0-2.fc44
> fedora                                   231.5 KiB
>  python3-jedi
> noarch          0:0.19.2-10.fc44
> fedora                                     5.6 MiB
>  python3-libs
> x86_64          0:3.14.6-1.fc44
> updates                                   43.9 MiB
>  python3-parso
> noarch          0:0.8.5-3.fc44
> fedora                                   900.7 KiB
>  python3-pgcli
> noarch          0:4.3.0-2PGDG.f44
> pgdg-common                              637.8 KiB
>  python3-pygments
> noarch          0:2.19.1-9.fc44
> fedora                                    11.3 MiB
>  python3-setproctitle
> x86_64          0:1.3.7-4.fc44
> fedora                                    41.7 KiB
>  python3-sqlparse
> noarch          0:0.5.3-4.fc44
> fedora                                   386.3 KiB
>  python3-tabulate
> noarch          0:0.9.0-19.fc44
> fedora                                   347.1 KiB
>  python3-tabulate+widechars
> noarch          0:0.9.0-19.fc44
> fedora                                     0.0   B
>  python3-terminaltables
> noarch          0:3.1.10-20.fc44
> fedora                                    94.7 KiB
>  python3-wcwidth
> noarch          0:0.6.0-1.fc44
> fedora                                   470.6 KiB
> Installing weak dependencies:
>  python-unversioned-command
> noarch          0:3.14.6-1.fc44
> updates
> ```
>
> Once the installation is complete, invoke the `pgcli` executable and you
> will be met with an error:
>
> ```
> Traceback (most recent call last):
>   File "/usr/bin/pgcli", line 3, in <module>
>     from pgcli.main import cli
>   File "/usr/lib/python3.14/site-packages/pgcli/main.py", line 3, in
> <module>
>     from pgspecial.namedqueries import NamedQueries
> ModuleNotFoundError: No module named 'pgspecial'
> ```
>
> The fact that this module is not imported by default when `pgcli` is
> packaged for RPM is not the expected behavior. However, even if one were to
> bypass this limitation by manually installing the `pgspecial` python module
> via:
>
> ```
> dnf install python3-pgspecial
> ```
>
> This still does not solve the problem of using `pgcli` as packaged by the
> PostgreSQL Yum repository:
>
> ```
> Traceback (most recent call last):
>   File "/usr/bin/pgcli", line 3, in <module>
>     from pgcli.main import cli
>   File "/usr/lib/python3.14/site-packages/pgcli/main.py", line 23, in
> <module>
>     from cli_helpers.tabular_output.preprocessors import (
>     ...<3 lines>...
>     )
> ImportError: cannot import name 'format_timestamps' from
> 'cli_helpers.tabular_output.preprocessors'
> (/usr/lib/python3.14/site-packages/cli_helpers/tabular_output/preprocessors.py)
> ```
>
> Note. This is NOT a bug within `pgcli` itself. Rather, this is a bug in the
> packaging of `pgcli` within the PostgreSQL Yum repository. We can verify
> this by installing `pgcli` from Fedora official repositories instead of
> `pgdg-common`. To do this, delete the previous container and begin anew.
> This time, do not import the PostgreSQL Yum Repository:
>
> ```
> dnf install pgcli
> ```
>
> ```
> Package                                                                 Arch
> Version
> Repository                                    Size
> Installing:
>  pgcli
> noarch          0:4.5.0-1.fc44
> updates                                  649.9 KiB
> Installing dependencies:
>  expat
> x86_64          0:2.8.1-1.fc44
> updates                                  327.4 KiB
>  libpq
> x86_64          0:18.0-4.fc44
> fedora                                     1.0 MiB
>  mpdecimal
> x86_64          0:4.0.1-3.fc44
> fedora                                   217.1 KiB
>  python-pip-wheel
> noarch          0:26.0.1-2.fc44
> fedora                                     1.2 MiB
>  python3
> x86_64          0:3.14.6-1.fc44
> updates                                   28.7 KiB
>  python3-cli-helpers
> noarch          0:2.10.1-1.fc44
> fedora                                   129.6 KiB
>  python3-cli-helpers+styles
> noarch          0:2.10.1-1.fc44
> fedora                                     0.0   B
>  python3-click
> noarch          1:8.3.3-1.fc44
> updates                                    1.2 MiB
>  python3-configobj
> noarch          0:5.0.9-9.fc44
> fedora                                   399.3 KiB
>  python3-libs
> x86_64          0:3.14.6-1.fc44
> updates                                   43.9 MiB
>  python3-pgspecial
> noarch          0:2.2.1-7.fc44
> fedora                                   363.8 KiB
>  python3-prompt-toolkit
> noarch          0:3.0.52-2.fc44
> fedora                                     4.2 MiB
>  python3-psycopg3
> noarch          0:3.3.4-1.fc44
> updates                                    2.0 MiB
>  python3-pygments
> noarch          0:2.19.1-9.fc44
> fedora                                    11.3 MiB
>  python3-setproctitle
> x86_64          0:1.3.7-4.fc44
> fedora                                    41.7 KiB
>  python3-sqlparse
> noarch          0:0.5.3-4.fc44
> fedora                                   386.3 KiB
>  python3-tabulate
> noarch          0:0.9.0-19.fc44
> fedora                                   347.1 KiB
>  python3-tabulate+widechars
> noarch          0:0.9.0-19.fc44
> fedora                                     0.0   B
>  python3-terminaltables
> noarch          0:3.1.10-20.fc44
> fedora                                    94.7 KiB
>  python3-tzlocal
> noarch          0:5.3.1-6.fc44
> fedora                                   125.3 KiB
>  python3-wcwidth
> noarch          0:0.6.0-1.fc44
> fedora                                   470.6 KiB
> Installing weak dependencies:
>  python-unversioned-command
> noarch          0:3.14.6-1.fc44
> updates
> ```
>
> Once the installation of pgcli from Fedora packaging has completed, invoking
> the command `pgcli` shows the expected response:
>
> ```
> connection is bad: connection to server on socket
> "/var/run/postgresql/.s.PGSQL.5432" failed: No such file or directory
>         Is the server running locally and accepting connections on that
> socket?
> ```
>
>


-- 
Regards,
Pritt






^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: BUG #19562: pgcli packaged by the PostgreSQL Yum Repository:ModuleNotFoundError: No module named 'pgspecial'
  2026-07-21 06:41 BUG #19562: pgcli packaged by the PostgreSQL Yum Repository:ModuleNotFoundError: No module named 'pgspecial' PG Bug reporting form <noreply@postgresql.org>
  2026-09-20 11:12 ` Re: BUG #19562: pgcli packaged by the PostgreSQL Yum Repository:ModuleNotFoundError: No module named 'pgspecial' Pritt Balagopal <pritt1999@gmail.com>
@ 2026-09-26 10:10   ` Pritt Balagopal <pritt1999@gmail.com>
  0 siblings, 0 replies; 4+ messages in thread

From: Pritt Balagopal @ 2026-09-26 10:10 UTC (permalink / raw)
  To: pritt1999@gmail.com; pgsql-bugs@lists.postgresql.org

On the 23rd of September, the `pgcli` RPM package in `pgdg-commons`
has been updated, resolving the bug.

-- 
Regards,
Pritt






^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2026-09-26 10:10 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2026-07-21 06:41 BUG #19562: pgcli packaged by the PostgreSQL Yum Repository:ModuleNotFoundError: No module named 'pgspecial' PG Bug reporting form <noreply@postgresql.org>
2026-07-27 17:47 ` Pritt Balagopal <pritt1999@gmail.com>
2026-09-20 11:12 ` Pritt Balagopal <pritt1999@gmail.com>
2026-09-26 10:10   ` Pritt Balagopal <pritt1999@gmail.com>

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox