BerriAI / litellm
github.com·3d ago

TL;DR
Python 3.15 introduces UTF-8 as the default text encoding for text I/O, ensuring consistent behavior across all platforms. This change eliminates issues with character misinterpretation that previously arose from locale-based defaults.
✦ Why It Matters
Update your code to explicitly use UTF-8 encoding for text I/O to avoid compatibility issues.
Key Takeaways
How It Works
Python 3.15 sets UTF-8 as the default encoding for text I/O, meaning that when you open a file without specifying an encoding, it will automatically decode using UTF-8. This change standardizes behavior across platforms, eliminating discrepancies that arose from locale-based defaults.