This repository was archived by the owner on Jul 22, 2023. It is now read-only.
Commit db9478f
Fix exception pickling (pythonnet#286)
* Remove Python <2.5 exception wrapping.
* Fix crashes when trying to pickle CLR exceptions.
The "args" slot of BaseException was not filled, instead we provided the
args through our __getattr__ implementation. This fails in BaseException_reduce
which depends on "args" being not NULL.
We fix this by explicitly setting the "args" slot on all CLR exception objects
on creation. This also makes tp_repr obsolete.
* Fix Python 2 compatibility.
* Remove access to obsolete message attribute.
* Fix the tests.
* Use cPickle for Python 2.
* Fix typo.1 parent 35cdb12 commit db9478f
File tree
9 files changed
+67
-420
lines changed- src
- runtime
- tests
9 files changed
+67
-420
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
33 | 36 | | |
34 | 37 | | |
35 | 38 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
156 | 156 | | |
157 | 157 | | |
158 | 158 | | |
159 | | - | |
160 | | - | |
161 | | - | |
162 | | - | |
163 | | - | |
164 | | - | |
165 | | - | |
166 | | - | |
167 | | - | |
168 | | - | |
169 | | - | |
170 | | - | |
171 | | - | |
172 | | - | |
| 159 | + | |
173 | 160 | | |
174 | 161 | | |
175 | 162 | | |
| |||
283 | 270 | | |
284 | 271 | | |
285 | 272 | | |
286 | | - | |
287 | | - | |
288 | | - | |
289 | | - | |
290 | | - | |
291 | | - | |
292 | | - | |
293 | | - | |
294 | | - | |
295 | | - | |
296 | | - | |
297 | | - | |
298 | | - | |
299 | | - | |
300 | | - | |
301 | | - | |
302 | | - | |
303 | | - | |
304 | | - | |
305 | | - | |
306 | | - | |
307 | | - | |
308 | | - | |
309 | | - | |
310 | | - | |
311 | | - | |
312 | | - | |
313 | | - | |
314 | | - | |
315 | | - | |
316 | 273 | | |
317 | 274 | | |
318 | 275 | | |
| |||
0 commit comments