-
Notifications
You must be signed in to change notification settings - Fork 557
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
Conversation
82690ad
to
ebb12e6
Compare
I tried to be consistent with what Pendulum, except:
|
ebb12e6
to
05b64a3
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1452 +/- ##
==========================================
+ Coverage 79.88% 80.04% +0.16%
==========================================
Files 25 25
Lines 3047 3067 +20
==========================================
+ Hits 2434 2455 +21
+ Misses 613 612 -1 ☔ View full report in Codecov by Sentry. |
😂 Maybe one day, we'll rewrite |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Feel free to merge, once the changelog is updated.
05b64a3
to
606345f
Compare
606345f
to
da189aa
Compare
`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
da189aa
to
9f114c4
Compare
Bug: https://bugs.gentoo.org/924881 Pull-Request: dbcli/pgcli#1452 Signed-off-by: Michał Górny <[email protected]>
pgcli
uses Pendulum to display the query execution time in words: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 Pendulumto 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
Checklist
changelog.rst
AUTHORS
file (it's already there).pip install pre-commit && pre-commit install
), and ranblack
on my code.