Skip to content

osn-selenium v1.1.0

Choose a tag to compare

@oddshellnick oddshellnick released this 30 Jan 15:51
· 5 commits to main since this release

osn-selenium v1.1.0 - Modular CDP Architecture & Expanded Documentation

Release v1.1.0 marks a significant architectural shift for the library, moving towards a modular approach for Chrome DevTools Protocol (CDP) handling. This update dramatically reduces the core library's footprint by decoupling version-specific CDP logic and introduces a sophisticated lazy-loading mechanism. Additionally, this release launches a comprehensive Wiki, standardizes packaging with pyproject.toml, and refines asynchronous logging controls.

Key Improvements in v1.1.0:

  1. Modular CDP Architecture & Lazy Loading:
    The massive internal library of CDP domains (v140-v144) has been decoupled from the core package.

    • Dynamic Imports: The library now utilizes a custom MetaPathFinder to lazy-load CDP versions only when requested.
    • External Packages: Version-specific logic is now handled via external packages (e.g., osn-selenium-cdp). If a required version is missing, the new CDPPackageError provides the exact command to install it.
    • Custom Paths: WebDrivers now accept cdp_versioned_packages_paths, allowing users to map specific protocol versions to local directories for custom or experimental CDP support.
  2. Comprehensive Wiki Documentation:
    We have published a complete Wiki covering every aspect of the framework.

    • Guides: Detailed explanations on Core Architecture, Anti-Fingerprinting, Human-Like Interactions, and Trio-based concurrency.
    • Reference: Deep dives into Flags Management, Instance wrappers, and DevTools orchestration.
  3. Modern Packaging with pyproject.toml:
    The build system has been migrated from setup.py to pyproject.toml. This ensures better compatibility with modern Python tooling, stricter dependency management, and a cleaner project structure.

  4. Enhanced Logging Flow Control:
    The DevTools logging system now includes a send_wait parameter in CDPLoggerSettings and FingerprintLoggerSettings.

    • True: The driver will await the log transmission (safer for debugging).
    • False: Logs are sent via send_nowait (default, better performance for high-throughput scenarios).
  5. Refactored Asynchronous Core:

    • Renamed base_mixin.py to trio_threads_mixin.py to better reflect its role in bridging synchronous Selenium calls to the Trio event loop.
    • Improved lifecycle management in background_task_decorator to handle Trio cancellation scopes more gracefully during target detachment.

Putting It All Together:
osn-selenium v1.1.0 transforms the library from a monolithic package into a lightweight, extensible framework. By externalizing the rapidly changing CDP definitions, the core remains stable while allowing support for any Chrome version via plugins. Combined with the new official Wiki and modern build standards, this release lays the groundwork for long-term maintainability and easier adoption.