feat: replace urllib with requests library and refactor HTTP client implementation
This commit is contained in:
+1
-1
@@ -1,5 +1,5 @@
|
||||
import unittest
|
||||
import json
|
||||
import unittest
|
||||
from unittest.mock import patch
|
||||
|
||||
from rp.core.api import call_api, list_models
|
||||
|
||||
+20
-19
@@ -1,28 +1,29 @@
|
||||
from unittest.mock import Mock, patch
|
||||
|
||||
from rp.commands.handlers import (
|
||||
handle_command,
|
||||
review_file,
|
||||
refactor_file,
|
||||
obfuscate_file,
|
||||
show_workflows,
|
||||
execute_workflow_command,
|
||||
execute_agent_task,
|
||||
show_agents,
|
||||
collaborate_agents_command,
|
||||
search_knowledge,
|
||||
store_knowledge,
|
||||
show_conversation_history,
|
||||
show_cache_stats,
|
||||
clear_caches,
|
||||
show_system_stats,
|
||||
collaborate_agents_command,
|
||||
execute_agent_task,
|
||||
execute_workflow_command,
|
||||
handle_background_command,
|
||||
start_background_session,
|
||||
list_background_sessions,
|
||||
show_session_status,
|
||||
show_session_output,
|
||||
send_session_input,
|
||||
handle_command,
|
||||
kill_background_session,
|
||||
list_background_sessions,
|
||||
obfuscate_file,
|
||||
refactor_file,
|
||||
review_file,
|
||||
search_knowledge,
|
||||
send_session_input,
|
||||
show_agents,
|
||||
show_background_events,
|
||||
show_cache_stats,
|
||||
show_conversation_history,
|
||||
show_session_output,
|
||||
show_session_status,
|
||||
show_system_stats,
|
||||
show_workflows,
|
||||
start_background_session,
|
||||
store_knowledge,
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import os
|
||||
import sqlite3
|
||||
import tempfile
|
||||
import os
|
||||
import time
|
||||
|
||||
from rp.memory.conversation_memory import ConversationMemory
|
||||
@@ -337,8 +337,8 @@ class TestConversationMemory:
|
||||
|
||||
def test_thread_safety(self):
|
||||
"""Test that the memory can handle concurrent access."""
|
||||
import threading
|
||||
import queue
|
||||
import threading
|
||||
|
||||
results = queue.Queue()
|
||||
|
||||
|
||||
@@ -1,15 +1,16 @@
|
||||
import pytest
|
||||
|
||||
from rp.core.exceptions import (
|
||||
PRException,
|
||||
APIException,
|
||||
APIConnectionError,
|
||||
APITimeoutError,
|
||||
APIException,
|
||||
APIResponseError,
|
||||
APITimeoutError,
|
||||
ConfigurationError,
|
||||
ToolExecutionError,
|
||||
FileSystemError,
|
||||
SessionError,
|
||||
ContextError,
|
||||
FileSystemError,
|
||||
PRException,
|
||||
SessionError,
|
||||
ToolExecutionError,
|
||||
ValidationError,
|
||||
)
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
from rp.commands.help_docs import (
|
||||
get_workflow_help,
|
||||
get_agent_help,
|
||||
get_knowledge_help,
|
||||
get_cache_help,
|
||||
get_background_help,
|
||||
get_cache_help,
|
||||
get_full_help,
|
||||
get_knowledge_help,
|
||||
get_workflow_help,
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import os
|
||||
import sqlite3
|
||||
import tempfile
|
||||
import os
|
||||
import time
|
||||
|
||||
from rp.memory.knowledge_store import KnowledgeStore, KnowledgeEntry
|
||||
from rp.memory.knowledge_store import KnowledgeEntry, KnowledgeStore
|
||||
|
||||
|
||||
class TestKnowledgeStore:
|
||||
@@ -284,8 +284,8 @@ class TestKnowledgeStore:
|
||||
|
||||
def test_thread_safety(self):
|
||||
"""Test that the store can handle concurrent access."""
|
||||
import threading
|
||||
import queue
|
||||
import threading
|
||||
|
||||
results = queue.Queue()
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
from unittest.mock import patch, MagicMock
|
||||
from rp.core.logging import setup_logging, get_logger
|
||||
from unittest.mock import MagicMock, patch
|
||||
|
||||
from rp.core.logging import get_logger, setup_logging
|
||||
|
||||
|
||||
class TestLogging:
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
from unittest.mock import Mock, patch
|
||||
|
||||
from rp.commands.multiplexer_commands import (
|
||||
show_sessions,
|
||||
attach_session,
|
||||
detach_session,
|
||||
kill_session,
|
||||
list_waiting_sessions,
|
||||
send_command,
|
||||
show_session_log,
|
||||
show_session_status,
|
||||
list_waiting_sessions,
|
||||
show_sessions,
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
import math
|
||||
|
||||
import pytest
|
||||
|
||||
from rp.memory.semantic_index import SemanticIndex
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import json
|
||||
from unittest.mock import patch
|
||||
|
||||
from rp.ui.output import OutputFormatter
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user