Version 2.0.0 - Enhanced Cookie Handling and Stability Improvements
This major release fundamentally changes how cookies are managed and addresses several critical issues with redirect handling and session persistence. The TLS client now handles cookies natively through the shared library rather than Python-side implementations.
Major Changes
🍪 Cookie Handling Improvements
- Native cookie management through shared library fixes redirect cookie persistence (#120)
- Added
session.get_cookies()
andsession.add_cookies()
methods - Automatic domain/path validation using standard library rules
- Full support for secure/httpOnly flags and expiration
- Cookies now persist correctly through redirect chains
⚠ Breaking Changes
- Dropped
requests
dependency and related structures session.cookies
is now read-only (CookieJar interface)CaseInsensitiveDict
replaced withnocasedict
implementation
🛠 Known Limitations
- Manual cookie modification via
session.cookies
is not supported (issues #25, #73) - Cookie deletion/clearing methods are not yet implemented in the shared library
- Session cookies should be managed through
add_cookies()
/get_cookies()
methods
🚀 Other Improvements
- Added proper type hints and request options typing
Upgrade Instructions
-
Replace any
session.cookies
manipulation with explicit cookie methods:# Get cookies for domain cookies = await session.get_cookies("https://example.com") # Add new cookies await session.add_cookies([ {"name": "test", "value": "123", "domain": "example.com"} ], "https://example.com")
-
Remove any
requests
-specific code from your implementation