FIX: guard second usage of PyWeakref_GetObject#934
Conversation
This function was deprecated in 3.13 and will be removed in 3.15. There are two usages in pycurl, one in easy.c was already correctly guarded, the other in share.c was not.
c297b5b to
21bb17d
Compare
|
The failure looks like it might be related, but if it was caused by this I would have expected it on all of the py313 and py314 runs not just one macos py314. |
|
It does look related. @aeroyorch can you please take a look? |
|
I think it is closer to right now (correctly handles the dead ref case), but I think something is still not right with the error-path in the 3.13 code path. |
obj is only `None` in the <3.13 code path if the weakref is dead. Handle and return early to simplify later code.
|
Looks good to me. Can it be moved from draft to ready? |
|
@tacaswell is this ready? |
|
@aeroyorch Ok, I think this is good to go. If the weakref call fails, |
This function was deprecated in 3.13 and will be removed in 3.15. There are two usages in pycurl, one in easy.c was already correctly guarded, the other in share.c was not.
I am not sure what should be done in the case where PyWeakref_GetRef reports an error in this function.