From 3ae22be8a2d969a1722f7bfb237eeadabac81c59 Mon Sep 17 00:00:00 2001 From: Soumil Rathi Date: Mon, 13 Apr 2026 11:24:14 -0700 Subject: [PATCH] =?UTF-8?q?fix:=20resolve=20CI=20failures=20=E2=80=94=20li?= =?UTF-8?q?nt=20errors,=20pytz=20in=20redis,=20lockfile=20mismatch?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Remove unused imports: get_update_memory_messages, get_fact_retrieval_messages - Fix pytz.timezone("US/Pacific") → timezone.utc in redis vector store - Remove unused entity_types variable in test_entity_extraction - Regenerate pnpm-lock.yaml after neo4j-driver removal Co-Authored-By: Claude Opus 4.6 (1M context) --- mem0-ts/pnpm-lock.yaml | 41 --------------------------- mem0/memory/main.py | 2 -- mem0/vector_stores/redis.py | 4 +-- tests/utils/test_entity_extraction.py | 1 - 4 files changed, 2 insertions(+), 46 deletions(-) diff --git a/mem0-ts/pnpm-lock.yaml b/mem0-ts/pnpm-lock.yaml index a8172f9d2..1b559939c 100644 --- a/mem0-ts/pnpm-lock.yaml +++ b/mem0-ts/pnpm-lock.yaml @@ -59,9 +59,6 @@ importers: natural: specifier: ^8.0.1 version: 8.1.1 - neo4j-driver: - specifier: ^5.28.1 - version: 5.28.1 ollama: specifier: ^0.5.14 version: 0.5.14 @@ -1127,9 +1124,6 @@ packages: buffer@5.7.1: resolution: {integrity: sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==} - buffer@6.0.3: - resolution: {integrity: sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==} - bundle-name@4.1.0: resolution: {integrity: sha512-tjwM5exMg6BGRI+kNmTntNsvdZS1X8BFYS6tnJ2hdH0kVxM6/eVZ2xy+FqStSWvYmtfFMDLIxurorHwDKfDz5Q==} engines: {node: '>=18'} @@ -2281,15 +2275,6 @@ packages: resolution: {integrity: sha512-8Ofs/AUQh8MaEcrlq5xOX0CQ9ypTF5dl78mjlMNfOK08fzpgTHQRQPBxcPlEtIw0yRpws+Zo/3r+5WRby7u3Gg==} engines: {node: '>= 0.6'} - neo4j-driver-bolt-connection@5.28.1: - resolution: {integrity: sha512-nY8GBhjOW7J0rDtpiyJn6kFdk2OiNVZZhZrO8//mwNXnf5VQJ6HqZQTDthH/9pEaX0Jvbastz1xU7ZL8xzqY0w==} - - neo4j-driver-core@5.28.1: - resolution: {integrity: sha512-14vN8TlxC0JvJYfjWic5PwjsZ38loQLOKFTXwk4fWLTbCk6VhrhubB2Jsy9Rz+gM6PtTor4+6ClBEFDp1q/c8g==} - - neo4j-driver@5.28.1: - resolution: {integrity: sha512-jbyBwyM0a3RLGcP43q3hIxPUPxA+1bE04RovOKdNAS42EtBMVCKcPSeOvWiHxgXp1ZFd0a8XqK+7LtguInOLUg==} - node-abi@3.74.0: resolution: {integrity: sha512-c5XK0MjkGBrQPGYG24GBADZud0NCbznxNx0ZkS+ebUTrmV1qTDxPxSL8zEAPURXSbLRWVexxmP4986BziahL5w==} engines: {node: '>=10'} @@ -2714,9 +2699,6 @@ packages: run-parallel@1.2.0: resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==} - rxjs@7.8.2: - resolution: {integrity: sha512-dhKf903U/PQZY6boNNtAGdWbG85WAbjT/1xYoZIC7FAY0yWapOBQVsVrDl58W86//e1VpMNBtRV4MaXfdMySFA==} - safe-buffer@5.2.1: resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==} @@ -4410,11 +4392,6 @@ snapshots: base64-js: 1.5.1 ieee754: 1.2.1 - buffer@6.0.3: - dependencies: - base64-js: 1.5.1 - ieee754: 1.2.1 - bundle-name@4.1.0: dependencies: run-applescript: 7.1.0 @@ -5746,20 +5723,6 @@ snapshots: negotiator@1.0.0: {} - neo4j-driver-bolt-connection@5.28.1: - dependencies: - buffer: 6.0.3 - neo4j-driver-core: 5.28.1 - string_decoder: 1.3.0 - - neo4j-driver-core@5.28.1: {} - - neo4j-driver@5.28.1: - dependencies: - neo4j-driver-bolt-connection: 5.28.1 - neo4j-driver-core: 5.28.1 - rxjs: 7.8.2 - node-abi@3.74.0: dependencies: semver: 7.7.1 @@ -6197,10 +6160,6 @@ snapshots: dependencies: queue-microtask: 1.2.3 - rxjs@7.8.2: - dependencies: - tslib: 2.8.1 - safe-buffer@5.2.1: {} safe-stable-stringify@2.5.0: {} diff --git a/mem0/memory/main.py b/mem0/memory/main.py index 509e2b209..04245c570 100644 --- a/mem0/memory/main.py +++ b/mem0/memory/main.py @@ -20,7 +20,6 @@ from mem0.configs.prompts import ( AGENT_CONTEXT_SUFFIX, generate_additive_extraction_prompt, PROCEDURAL_MEMORY_SYSTEM_PROMPT, - get_update_memory_messages, ) from mem0.utils.lemmatization import lemmatize_for_bm25 from mem0.utils.entity_extraction import extract_entities, extract_entities_batch @@ -32,7 +31,6 @@ from mem0.memory.storage import SQLiteManager from mem0.memory.telemetry import MEM0_TELEMETRY, capture_event from mem0.memory.utils import ( extract_json, - get_fact_retrieval_messages, parse_messages, parse_vision_messages, process_telemetry_filters, diff --git a/mem0/vector_stores/redis.py b/mem0/vector_stores/redis.py index f9b5d81b6..cb030ac35 100644 --- a/mem0/vector_stores/redis.py +++ b/mem0/vector_stores/redis.py @@ -217,12 +217,12 @@ class RedisDB(VectorStoreBase): "hash": result["hash"], "data": result["memory"], "created_at": datetime.fromtimestamp( - int(result["created_at"]), tz=pytz.timezone("US/Pacific") + int(result["created_at"]), tz=timezone.utc ).isoformat(timespec="microseconds"), **( { "updated_at": datetime.fromtimestamp( - int(result["updated_at"]), tz=pytz.timezone("US/Pacific") + int(result["updated_at"]), tz=timezone.utc ).isoformat(timespec="microseconds") } if "updated_at" in result diff --git a/tests/utils/test_entity_extraction.py b/tests/utils/test_entity_extraction.py index 267b569a6..76d1a6c44 100644 --- a/tests/utils/test_entity_extraction.py +++ b/tests/utils/test_entity_extraction.py @@ -17,7 +17,6 @@ class TestExtractEntities: entities = extract_entities("John Smith works at Google on machine learning projects") entity_texts = [e[1] for e in entities] - entity_types = [e[0] for e in entities] # Should extract proper nouns found_proper = any("John" in t or "Google" in t for t in entity_texts) assert found_proper, f"Expected proper nouns, got {entities}"