Skip to content

2.0.0

Latest
Compare
Choose a tag to compare
@diprog diprog released this 13 May 11:38

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() and session.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 with nocasedict 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

  1. 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")
  2. Remove any requests-specific code from your implementation