Commit 6ea93b8
Test User
fix: addressing code review comments:
* Fixed _upload.py to check and safely .decode("utf-8") header values if they are of type bytes
* Fixed requests_upload.py to gracefully handle naive datetime deadlines by replacing timezone info with UTC.
* Re-implemented the chunk_size property in _upload.py using the "standard formula for alignment": ((size + granularity - 1) // granularity) * granularity.
* Updated the chunk transmission loop to check for state machine invalid state.
* Added `requests.exceptions.ChunkedEncodingError` to the list of default retriable exceptions1 parent a93c07e commit 6ea93b8
2 files changed
Lines changed: 17 additions & 10 deletions
Lines changed: 6 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
76 | | - | |
77 | 76 | | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
83 | 82 | | |
84 | 83 | | |
85 | 84 | | |
| |||
110 | 109 | | |
111 | 110 | | |
112 | 111 | | |
113 | | - | |
| 112 | + | |
114 | 113 | | |
115 | 114 | | |
116 | 115 | | |
| |||
Lines changed: 11 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
112 | 112 | | |
113 | 113 | | |
114 | 114 | | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
115 | 120 | | |
116 | 121 | | |
117 | 122 | | |
118 | | - | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
119 | 127 | | |
120 | 128 | | |
121 | 129 | | |
| |||
128 | 136 | | |
129 | 137 | | |
130 | 138 | | |
131 | | - | |
| 139 | + | |
132 | 140 | | |
133 | 141 | | |
134 | 142 | | |
| |||
469 | 477 | | |
470 | 478 | | |
471 | 479 | | |
472 | | - | |
| 480 | + | |
473 | 481 | | |
474 | 482 | | |
475 | 483 | | |
0 commit comments