GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — bpo-43950: ensure source_line is present when specializing the traceback by isidentical · Pull Request #27313 · python/cpython Conversation
|
| /* use the right encoding to decode the file as unicode */ | |
| fd = PyObject_AsFileDescriptor(binary); | |
| if (fd < 0) { | |
| Py_DECREF(io); | |
| Py_DECREF(binary); | |
| return 0; | |
| } |
Lines 436 to 446 in 4512848
| if (fob == NULL) { | |
| PyErr_Clear(); | |
| res = _PyObject_CallMethodIdNoArgs(binary, &PyId_close); | |
| Py_DECREF(binary); | |
| if (res) | |
| Py_DECREF(res); | |
| else | |
| PyErr_Clear(); | |
| return 0; | |
| } |
This patch ensures that the line is retrieved and displayed.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Would it be better to fix |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I am not sure how would the fix look beside introducing a new return code
for cases that did not result with printing the line but also without an
error which seems more complicated.
…On Fri, Jul 23, 2021, 10:45 PM Dennis Sweeney ***@***.***> wrote:
Would it be better to fix _Py_DisplaySourceLine() instead?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#27313 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ALJKHQPWWFKTA45LSTO5FS3TZHBGFANCNFSM5A4RI23Q>
.
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Can we add a regression test for this? (Like the one on the BPO issue?) |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
🤖 New build scheduled with the buildbot fleet by @isidentical for commit 8db4e0c 🤖 If you want to schedule another build, you need to add the ":hammer: test-with-buildbots" label again. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
It seems like refleaks bots also fail on the main too, so that can be ignored. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.