Commit 1066564
committed
Fix pickling URLs with Python 3.15.0a6+ (Fixes #1632)
In Python 3.15 urllib.parse.SplitResult gained a new __getstate__
method which fails when called on instances created via tuple.__new__:
python/cpython@c5cfcdf1
Returning self._val directly instead of creating a new SplitResult
instance avoids the problematic code path, and is backwards compatible.1 parent 7829b01 commit 1066564
1 file changed
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
566 | 566 | | |
567 | 567 | | |
568 | 568 | | |
569 | | - | |
570 | | - | |
| 569 | + | |
| 570 | + | |
571 | 571 | | |
572 | 572 | | |
573 | 573 | | |
| |||
0 commit comments