Repository navigation
osn-selenium v1.1.0
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:
-
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
MetaPathFinderto 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 newCDPPackageErrorprovides 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.
- Dynamic Imports: The library now utilizes a custom
-
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.
-
Modern Packaging with
pyproject.toml:
The build system has been migrated fromsetup.pytopyproject.toml. This ensures better compatibility with modern Python tooling, stricter dependency management, and a cleaner project structure. -
Enhanced Logging Flow Control:
The DevTools logging system now includes asend_waitparameter inCDPLoggerSettingsandFingerprintLoggerSettings.- 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).
-
Refactored Asynchronous Core:
- Renamed
base_mixin.pytotrio_threads_mixin.pyto better reflect its role in bridging synchronous Selenium calls to the Trio event loop. - Improved lifecycle management in
background_task_decoratorto handle Trio cancellation scopes more gracefully during target detachment.
- Renamed
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.