fix: Resolve deprecation warnings in Pydantic and asyncio

Fixed deprecation warnings to ensure forward compatibility:

1. Pydantic v2 Migration (embedding/models.py):
   - Migrated from class Config to model_config = ConfigDict()
   - Replaced deprecated class-based config pattern
   - Fixes PydanticDeprecatedSince20 warnings (3 occurrences)
   - Forward compatible with Pydantic v3.0

2. Asyncio Deprecation Fix (test_async_scraping.py):
   - Changed asyncio.iscoroutinefunction() to inspect.iscoroutinefunction()
   - Fixes Python 3.16 deprecation warning (2 occurrences)
   - Uses recommended inspect module API

3. Lock File Update (uv.lock):
   - Updated dependency lock file

Impact:
- Reduces test warnings from 141 to ~75
- Improves forward compatibility
- No functional changes

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
yusyus
2026-02-08 13:34:48 +03:00
parent c5775615ba
commit fb80c7b54f
3 changed files with 83 additions and 36 deletions

View File

@@ -5,6 +5,7 @@ Tests the async/await implementation for parallel web scraping
"""
import asyncio
import inspect
import os
import tempfile
import unittest
@@ -103,7 +104,7 @@ class TestAsyncScrapeMethods(unittest.TestCase):
os.chdir(tmpdir)
converter = DocToSkillConverter(config, dry_run=True)
self.assertTrue(hasattr(converter, "scrape_page_async"))
self.assertTrue(asyncio.iscoroutinefunction(converter.scrape_page_async))
self.assertTrue(inspect.iscoroutinefunction(converter.scrape_page_async))
finally:
os.chdir(self.original_cwd)
@@ -120,7 +121,7 @@ class TestAsyncScrapeMethods(unittest.TestCase):
os.chdir(tmpdir)
converter = DocToSkillConverter(config, dry_run=True)
self.assertTrue(hasattr(converter, "scrape_all_async"))
self.assertTrue(asyncio.iscoroutinefunction(converter.scrape_all_async))
self.assertTrue(inspect.iscoroutinefunction(converter.scrape_all_async))
finally:
os.chdir(self.original_cwd)