1
0
Fork 0
pgcli/tests
Damien Baty 9f114c4549 feat: Replace pendulum by home-made duration-to-words function
`pgcli` uses Pendulum to display the query execution time in words:

    > select pg_sleep(62)
    +----------+
    | pg_sleep |
    |----------|
    |          |
    +----------+
    SELECT 1
    Time: 62.066s (1 minute 2 seconds), executed in: 62.063s (1 minute 2 seconds)

Pendulum 3 (which has been released in December 2023 and is now
written in Rust) does not build on 32-bit architectures [1]. As such,
installing `pgcli` on such architectures fails. We could pin Pendulum
to version 2 (which was written in Python and builds "everywhere"),
but requiring a whole library and its own dependencies for such a
small feature seems unwarranted.

This commit thus removes the requirement on Pendulum and replaces it
by a simple "duration-to-words" function.

Fixes #1451.

[1] Upstream issue: https://github.com/sdispater/pendulum/issues/784
2024-02-20 12:51:20 +01:00
..
features Raised notices (#1450) 2024-02-05 21:41:28 -08:00
formatter Fix sql-insert format emits NULL as 'None' (#1409) 2023-06-23 07:05:58 +02:00
parseutils Changed destructive_warning to take a list of destructive commands (#1328) 2022-10-13 14:42:22 -07:00
conftest.py Finer control over destructive warning. (#1242) 2021-02-12 21:09:38 -08:00
metadata.py Modernize code to Python 3.6+ (#1229) 2021-02-12 21:34:56 +02:00
pytest.ini Fix problem with travis not using correct python versions when testing. 2015-01-09 12:33:27 +02:00
test_application_name.py Support PGAPPNAME (#1444) 2023-12-08 20:21:28 -08:00
test_auth.py Add test. 2022-06-10 11:26:53 -07:00
test_completion_refresher.py Another attempt to fix pgbouncer error (1093.) (#1097) 2021-05-21 15:32:34 -07:00
test_config.py skip initial comment in pg_session file (#1245) 2021-02-22 14:55:55 -08:00
test_fuzzy_completion.py removed py2-related stuff 2020-03-14 10:53:43 +08:00
test_main.py feat: Replace pendulum by home-made duration-to-words function 2024-02-20 12:51:20 +01:00
test_naive_completion.py Modernize code to Python 3.6+ (#1229) 2021-02-12 21:34:56 +02:00
test_pgcompleter.py Allow defining a json file with preferred aliases (#1382) 2023-10-06 16:13:28 -07:00
test_pgexecute.py Raised notices (#1450) 2024-02-05 21:41:28 -08:00
test_pgspecial.py Modernize code to Python 3.6+ (#1229) 2021-02-12 21:34:56 +02:00
test_prioritization.py black all the things. (#1049) 2019-05-25 13:08:56 -07:00
test_prompt_utils.py Changed destructive_warning to take a list of destructive commands (#1328) 2022-10-13 14:42:22 -07:00
test_rowlimit.py Fix typos (#1345) 2022-06-08 11:38:29 -07:00
test_smart_completion_multiple_schemata.py Blacken. 2021-05-07 12:43:32 -07:00
test_smart_completion_public_schema_only.py Modernize code to Python 3.6+ (#1229) 2021-02-12 21:34:56 +02:00
test_sqlcompletion.py Fix typos (#1345) 2022-06-08 11:38:29 -07:00
test_ssh_tunnel.py ssh tunnels: allow configuring auto matches (#1302) 2022-02-21 10:20:11 -08:00
utils.py Port to psycopg3 (#1324) 2022-06-06 11:20:48 -07:00