`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
* Fix deprecation.
* Drop python 3.7 and add 3.12.
* Bump pendulum.
* Changelog.
* Update gh actions.
* See if things pass without this scenario.
* Skip failing scenarios in 3.12.
* runs test on main branch as well.
reasons:
- tests passed on PR branches do not mean they will pass on main branch,
for e.g. alice changed A in branch-a, bob changed B in branch-b, both
tests passed and no conflict, but after merged to main, a bug occurs.
- wanna fix the badge in main branch ;D
* change the badge status to main branch only.
* WIP.
* Add some comments about porting from psycopg 2 to 3 (#1318)
* WIP
* Disable _set_wait_callback()
* TransactionStatus.
* First working query.
* More pg3 changes.
* test_pgexecute still fails.
* Fix bytea support.
* Fix json and enum unicode.
* Get unit tests to pass.
* Behave tests still break, WIP.
* Prompt seems to be displayed fine, why don't the tests see the whitespace?
* Python version.
* Fix test.
* Black.
* Added black to dev reqs.
* nbu link for donations.
* Use psycopg.sql to format statement.
* Special case for show help in pgbouncer.
* Fix test.
* Added integration test.
* Install pgbouncer in ci.
* Fix integration test.
* Remove tmate session.
* Revert commenting out python versions.
* Pin pgspecial to >=2.
* Changelog.
Co-authored-by: Daniele Varrazzo <daniele.varrazzo@gmail.com>
Co-authored-by: Amjith Ramanujam <amjith.r@gmail.com>
* added black to develop guide
* no need for pep8radius.
* changelog.
* Add pre-commit checkbox.
* Add pre-commit to dev reqs.
* Add pyproject.toml for black.
* Pre-commit config.
* Add black to travis and dev reqs.
* Install and run black in travis.
* Remove black from dev reqs.
* Lower black target version.
* Re-format with black.