Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Replace pendulum by home-made duration-to-words function #1452

Merged
merged 1 commit into from
Feb 20, 2024

Commits on Feb 20, 2024

  1. 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: sdispater/pendulum#784
    dbaty committed Feb 20, 2024
    Configuration menu
    Copy the full SHA
    9f114c4 View commit details
    Browse the repository at this point in the history