From 831c5ca66e0d8ba79edecb6528e589dc4890aaed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Misty=20De=20M=C3=A9o?= Date: Wed, 26 Feb 2025 13:04:02 -0800 Subject: [PATCH] chore: rethinkdb 2.4.10 --- setup.py | 2 +- tests/test_cli.py | 14 ++++++++++---- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/setup.py b/setup.py index 614e818..a8370e6 100644 --- a/setup.py +++ b/setup.py @@ -19,7 +19,7 @@ 'Programming Language :: Python :: 3.11', 'Programming Language :: Python :: 3.12', ], - install_requires=['rethinkdb==2.4.9'], + install_requires=['rethinkdb==2.4.10.post1'], extras_require={'test': test_deps}, url='https://github.com/internetarchive/doublethink', author='Noah Levitt', diff --git a/tests/test_cli.py b/tests/test_cli.py index f313898..613b9a3 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -18,11 +18,11 @@ import doublethink import doublethink.cli +import importlib.metadata import logging import sys import pytest import rethinkdb as rdb -import pkg_resources r = rdb.RethinkDB() @@ -50,10 +50,16 @@ def rr(): assert result["dbs_created"] == 1 return RethinkerForTesting(db="doublethink_test_db") +def console_scripts(): + return { + ep.name: ep + for ep in importlib.metadata.distribution("doublethink").entry_points + if ep.group == "console_scripts" + } + def test_cli(capsys, rr): - entrypoint = pkg_resources.get_entry_map( - 'doublethink')['console_scripts']['doublethink-purge-stale-services'] - callable = entrypoint.resolve() + entrypoint = console_scripts()['doublethink-purge-stale-services'] + callable = entrypoint.load() with pytest.raises(SystemExit) as exit: callable(['doublethink-purge-stale-services']) print(dir(exit))