Chris Jerdonek added the comment:
I made a naive attempt at addressing this issue here:
https://github.com/python/cpython/pull/19811
The code has diverged significantly since Nathaniel first linked to a specific
line above. However, what I came up with is simple, and seems to work. But I
Chris Jerdonek added the comment:
> Oh, no! Buildbot failures. Help?!
Yes, I'm sorry. There's something not so simple going on that I haven't yet
reproduced locally. Will reply on the tracker.
--
___
Python tracker
<ht
Change by Chris Jerdonek :
--
pull_requests: +19143
stage: resolved -> patch review
pull_request: https://github.com/python/cpython/pull/19823
___
Python tracker
<https://bugs.python.org/issu
Chris Jerdonek added the comment:
Okay, I was able to get the tests passing on the other platforms.
I'm still not sure why Mac and Fedora behaved differently with my original PR.
I was able to come up with a simple script that isolated the behavior
difference (posted in the PR com
New submission from Chris Jerdonek :
This issue is about how if a coroutine is wrapped in a Task with
asyncio.ensure_future(), then portions of the exception chain can be lost.
Specifically, if you run the following code, then ValueError will be raised
with exc.__context__ equal to the
Chris Jerdonek added the comment:
By the way, I just posted a new issue about exception chaining getting
suppressed, but this time in an asyncio setting with ensure_future():
https://bugs.python.org/issue40466
I first noticed this issue two or three years ago and raised it on the
async-sig
Chris Jerdonek added the comment:
New changeset 02047265eb83a43ba18cc7fee81756f1a1a1f968 by Chris Jerdonek in
branch 'master':
bpo-29587: Update gen.throw() to chain exceptions (#19823)
https://github.com/python/cpython/commit/02047265eb83a43ba18cc7fee81756
Chris Jerdonek added the comment:
Okay, thanks everyone. I think I'll take a look at issue 40466 next.
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.pyth
Change by Chris Jerdonek :
--
keywords: +patch
pull_requests: +19174
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/19858
___
Python tracker
<https://bugs.python.org/issu
Change by Chris Jerdonek :
--
pull_requests: +19175
pull_request: https://github.com/python/cpython/pull/19859
___
Python tracker
<https://bugs.python.org/issue29
Chris Jerdonek added the comment:
FYI, I just created a PR to add one more test to the prior fix, to test a
slightly different aspect.
Whereas the test in the first PR checks that exc.__context__ is set after
gen.throw() is finished, the new test checks that exc.__context__ is available
Change by Chris Jerdonek :
--
nosy: +chris.jerdonek
___
Python tracker
<https://bugs.python.org/issue29590>
___
___
Python-bugs-list mailing list
Unsubscribe:
Chris Jerdonek added the comment:
My PR is ready for review: https://github.com/python/cpython/pull/19858
--
___
Python tracker
<https://bugs.python.org/issue40
Chris Jerdonek added the comment:
FYI, I was able to finish addressing the other exception-chaining cases (the
ones covered by the other issue) with a simple change to the fix for this PR.
I moved the call to _PyErr_ChainExceptions() a bit deeper: into gen_send_ex()
before the call to
Change by Chris Jerdonek :
--
pull_requests: +19189
pull_request: https://github.com/python/cpython/pull/19877
___
Python tracker
<https://bugs.python.org/issue29
Chris Jerdonek added the comment:
Okay, I was able to remove the NULL value check and get things working with a
NULL exception value. I just posted a second follow-on PR that does this (which
Guido approved - thanks, Guido!):
https://github.com/python/cpython/pull/19877
I wanted to tell you
Chris Jerdonek added the comment:
New changeset 21893fbb74e8fde2931fbed9b511e2a41362b1ab by Chris Jerdonek in
branch 'master':
bpo-29587: allow chaining NULL exceptions in _gen_throw() (GH-19877)
https://github.com/python/cpython/commit/21893fbb74e8fde2931fbed9b511e2
Change by Chris Jerdonek :
--
versions: +Python 3.8, Python 3.9
___
Python tracker
<https://bugs.python.org/issue29590>
___
___
Python-bugs-list mailin
Change by Chris Jerdonek :
--
keywords: +patch
pull_requests: +19207
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/19896
___
Python tracker
<https://bugs.python.org/issu
Chris Jerdonek added the comment:
I proposed a PR to fix this: https://github.com/python/cpython/pull/19896
--
___
Python tracker
<https://bugs.python.org/issue29
Chris Jerdonek added the comment:
Since none of you are subscribed to the other issue except for Nathaniel, I
thought I'd let you know I also posted a PR to fix another issue he filed
similar to this one (but this time about the stack trace being incorrect for
`gen.throw()` in ce
Change by Chris Meyer :
--
nosy: +cmeyer
___
Python tracker
<https://bugs.python.org/issue39232>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Chris Drake :
> The sample on this page is not demonstrating anything asynchronous:
> https://docs.python.org/3/library/asyncio.html
Put something that is relevant please. e.g.
import asyncio
import time
async def say_after(delay, what):
await asyncio.sleep
Change by Chris Jerdonek :
--
pull_requests: +19266
pull_request: https://github.com/python/cpython/pull/19858
___
Python tracker
<https://bugs.python.org/issue29
Chris Jerdonek added the comment:
Closing this as a duplicate of https://bugs.python.org/issue29587
It turns out that, as Nathaniel first suggested, this is really just another
special case of that issue (the "yield from" case as opposed to the "yield"
case). It's
Change by Chris Jerdonek :
--
keywords: +patch
pull_requests: +19267
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/19951
___
Python tracker
<https://bugs.python.org/issu
Chris Jerdonek added the comment:
I just posted a draft, proof-of-concept PR for one aspect of this issue:
https://github.com/python/cpython/pull/19951
Namely, the PR makes it so that cancelled tasks have full tracebacks, all the
way to where the code first gets interrupted. I did the C
Chris Jerdonek added the comment:
Okay, I completed my draft PR (both C and pure Python implementations are done).
--
___
Python tracker
<https://bugs.python.org/issue31
Change by Chris Jerdonek :
--
pull_requests: +19295
pull_request: https://github.com/python/cpython/pull/19979
___
Python tracker
<https://bugs.python.org/issue31
Chris Jerdonek added the comment:
I also posted a second PR (separate from the first) that adds a "msg" argument
to Future.cancel() and Task.cancel(). That PR is also now ready for review:
https://github.com/python/cpython/pull/19979
The other PR is simpler and more essential th
New submission from Chris Jerdonek :
There is a missing Py_DECREF in task_step_impl() in _asynciomodule.c:
https://github.com/python/cpython/blob/02fa0ea9c1073e4476c9bde3d7112f5dd964aa57/Modules/_asynciomodule.c#L2641
It should have the form:
if (clear_exc) {
Py_DECREF(exc
Chris Jerdonek added the comment:
Here is the original issue: https://bugs.python.org/issue31185
--
___
Python tracker
<https://bugs.python.org/issue40
Change by Chris Jerdonek :
--
keywords: +patch
pull_requests: +19306
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/19990
___
Python tracker
<https://bugs.python.org/issu
Chris Jerdonek added the comment:
FYI, there is a missing Py_DECREF from this change:
https://bugs.python.org/issue40559
(though it's an obscure code path as mentioned elsewhere in these comments)
--
nosy: +chris.jerdonek
___
Python tr
Chris Jerdonek added the comment:
New changeset d2c349b190bcba21a4a38e6520a48ad97a9f1529 by Chris Jerdonek in
branch 'master':
bpo-40559: Add Py_DECREF to _asynciomodule.c:task_step_impl() (GH-19990)
https://github.com/python/cpython/commit/d2c349b190bcba21a4a38e6520a48a
Chris Jerdonek added the comment:
New changeset 0e4a5e96f011989736bde824ab817146bd7c9cfc by Miss Islington (bot)
in branch '3.8':
[3.8] bpo-40559: Add Py_DECREF to _asynciomodule.c:task_step_impl() (GH-19990)
https://github.com/python/cpython/commit/0e4a5e96f011989736bde824ab8171
Chris Jerdonek added the comment:
New changeset 25014289887cb521c1041df4773c839d3fbf784e by Miss Islington (bot)
in branch '3.7':
[3.7] bpo-40559: Add Py_DECREF to _asynciomodule.c:task_step_impl() (GH-19990)
https://github.com/python/cpython/commit/25014289887cb521c1041df4773c83
Change by Chris Jerdonek :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Chris Jerdonek added the comment:
I looked into this a little after reproducing it locally.
What I found is that MultiLoopChildWatcher._sig_chld() *is* called. It's just
that it's only called immediately after timeout=5 has elapsed. (The timeout=5
was added by Andrew he
Chris Jerdonek added the comment:
I'm attaching a stand-alone script that can reproduce the issue. It doesn't use
unittest or even MultiLoopChildWatcher.
It starts an event loop and then repeatedly calls loop.subprocess_exec() with
0.2 seconds in between until the "hang&
Chris Jerdonek added the comment:
I'm attaching a slightly simpler version of the script.
--
Added file: https://bugs.python.org/file49145/test-kill2.py
___
Python tracker
<https://bugs.python.org/is
Chris Jerdonek added the comment:
I'm adding Nathaniel in case he can recognize this as one of the signal handler
cases he's already come across.
--
nosy: +njs
___
Python tracker
<https://bugs.python.o
Chris Jerdonek added the comment:
This looks like a duplicate of #38323: https://bugs.python.org/issue38323
--
nosy: +chris.jerdonek
___
Python tracker
<https://bugs.python.org/issue37
Chris Jerdonek added the comment:
> this seems like an awful lot of energy to spend on some code
that's not even used by default.
True, but it seems likely to me that this signals :) a deeper, more general
issue about CPython / signals (which is why I spent time on it). For exam
Chris Jerdonek added the comment:
I came up with the script by (1) running the test locally and seeing the same
hang, (2) moving the test function to its own script separate from the unit
tests and seeing the same hang, and (3) successively stripping away code while
continuing to check for
Chris Jerdonek added the comment:
> 4. use call_later() to terminate the future after 5 seconds
You should read that as "3.5" (I inserted it later).
--
___
Python tracker
<https://bugs.pytho
Chris Jerdonek added the comment:
Would someone be able to approve / take a look at this small PR addressing
another aspect of this issue?
https://github.com/python/cpython/pull/19858
I'm hoping it can be part of 3.9, and the deadline is just a week away.
It builds on the already merg
Chris Meyer added the comment:
Here is another way to reproduce this (or an extremely similar) error without a
loop. Since may be a race condition, I'm not sure this works 100% of the time
on all machines - but it did on several machines I tried.
```
import asyncio
Chris Jerdonek added the comment:
I was able to simplify the script a lot more and continue to reproduce the
hang. It's attached as test-kill3.py (80 lines). It doesn't use
subprocess_exec() or a watcher anymore -- just subprocess.Popen() followed by
popen.kill(), and then awa
Chris Jerdonek added the comment:
I think I have a possible explanation for this now.
In my reproducer script and in the original test, the wakeup file descriptor
isn't set. I think this explains why the loop isn't waking up to call SIGCHLD's
handler when the signal comes in.
Chris Jerdonek added the comment:
Closing as a duplicate of #38323: https://bugs.python.org/issue38323
--
stage: -> resolved
status: open -> closed
superseder: -> asyncio: MultiLoopWatcher has a race condition (test_asyncio:
test_close_kill_running() hangs on AMD64 RHEL7 R
Change by Chris Jerdonek :
--
resolution: -> duplicate
___
Python tracker
<https://bugs.python.org/issue37573>
___
___
Python-bugs-list mailing list
Un
Chris Jerdonek added the comment:
Also adding Nathaniel since he's the one that filed #32751. Nathaniel, do you
agree that if an exception occurs while waiting for the cancellation, the
exception should be what's raised instead of TimeoutError?
--
nosy: +chris.jer
Chris Jerdonek added the comment:
Do you know about this section of the docs?
https://docs.python.org/3/library/argparse.html#argument-abbreviations-prefix-matching
--
nosy: +chris.jerdonek
___
Python tracker
<https://bugs.python.org/issue40
Chris Jerdonek added the comment:
One thing that's interesting is that you don't get the "ambiguous option" error
if what's provided is an exact match (even if a prefix of both).
For example, if you instead parsed "--clea", it would give the error:
>
Chris Jerdonek added the comment:
New changeset 75cd8e48c62c97fdb9d9a94fd2335be06084471d by Chris Jerdonek in
branch 'master':
bpo-29587: Make gen.throw() chain exceptions with yield from (GH-19858)
https://github.com/python/cpython/commit/75cd8e48c62c97fdb9d9a94fd2335b
Change by Chris Billington :
--
title: APPDATA location in Microsoft Store version -> APPDATA
___
Python tracker
<https://bugs.python.org/issue40377>
___
_
Change by Chris Billington :
--
title: APPDATA -> APPDATA location in Microsoft Store version
___
Python tracker
<https://bugs.python.org/issue40377>
___
_
New submission from Chris Herdt :
The documentation for socket.getfqdn() includes this info:
"In case no fully qualified domain name is available, the hostname as returned
by gethostname() is returned."
However, that does not appear to be correct. To reproduce a case that exhibits
Chris Jerdonek added the comment:
New changeset 1ce5841eca6d96b1b1e8c213d04f2e92b1619bb5 by Chris Jerdonek in
branch 'master':
bpo-31033: Add a msg argument to Future.cancel() and Task.cancel() (GH-19979)
https://github.com/python/cpython/commit/1ce5841eca6d96b1b1e8c213d04f2e
Chris Jerdonek added the comment:
The msg argument has now been added (second PR). I'm going to keep this issue
open until the traceback issue has also been addressed (the other PR), as that
was one part of the discussions here.
--
___
P
Chris Jerdonek added the comment:
I just want to flag one issue after rebasing my traceback PR onto what was
merged. If task.cancel() is called like this--
task.cancel("POSSIBLY LONG CANCEL MESSAGE")
There is the question of whether the passed message should be repeated each
Chris AtLee added the comment:
Is there anything I can do to help get this landed? The PR in github works for
me.
--
nosy: +catlee
___
Python tracker
<https://bugs.python.org/issue12
Change by Chris Jerdonek :
--
nosy: +chris.jerdonek
___
Python tracker
<https://bugs.python.org/issue32309>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Chris Jerdonek :
--
pull_requests: +19447
pull_request: https://github.com/python/cpython/pull/20142
___
Python tracker
<https://bugs.python.org/issue38
Chris Jerdonek added the comment:
I posted a draft PR for this issue: https://github.com/python/cpython/pull/20142
--
___
Python tracker
<https://bugs.python.org/issue38
Change by Chris Jerdonek :
--
type: -> behavior
___
Python tracker
<https://bugs.python.org/issue38323>
___
___
Python-bugs-list mailing list
Unsubscrib
Chris Jerdonek added the comment:
New changeset d7184d3dbd249444ec3961641dc08a9ad3c1ac34 by Chris Jerdonek in
branch 'master':
bpo-29587: Add another test for the gen.throw() fix. (GH-19859)
https://github.com/python/cpython/commit/d7184d3dbd249444ec3961641dc08a
Chris Jerdonek added the comment:
New changeset 46545000c2a30b46aed717b546bc09e5bae7148f by Zackery Spytz in
branch 'master':
bpo-39976: Add **other_popen_kwargs to subprocess docs (GH-20145)
https://github.com/python/cpython/commit/46545000c2a30b46aed717b546bc09e5bae7148f
-
Chris Jerdonek added the comment:
I'm not sure if this is worth backporting, but let me know if you think it
should.
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https:
Change by Chris Jerdonek :
--
nosy: +chris.jerdonek
___
Python tracker
<https://bugs.python.org/issue40152>
___
___
Python-bugs-list mailing list
Unsubscribe:
Chris AtLee added the comment:
It's caused by the combination of the symlink existing, and having the tarfile
opened in r| mode.
If I run the attached test file in a fresh directory, I get the following
exception:
raceback (most recent call last):
File "/home/catlee/.pyenv/vers
Chris Jerdonek added the comment:
New changeset da742ba826721da84140abc785856d4ccc2d787f by Chris Jerdonek in
branch 'master':
bpo-31033: Improve the traceback for cancelled asyncio tasks (GH-19951)
https://github.com/python/cpython/commit/da742ba826721da84140abc785856d
Chris Jerdonek added the comment:
Thanks so much, Yury.
(Removing the "release blocker" flag now that it has been merged.)
--
priority: release blocker -> normal
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
title: Add argument to
Chris Jerdonek added the comment:
This issue was just resolved by the combination of #40607 followed by #31033
(merged for 3.9.0 beta 1).
Running the example code above now results in the following:
Traceback (most recent call last):
File "/.../cpython/test-31131.py", line
Chris Jerdonek added the comment:
Thank you again, Roman and all.
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.9 -Python 3.8
___
Python tracker
<https://bugs.python.or
Change by Chris Jerdonek :
--
pull_requests: +19472
pull_request: https://github.com/python/cpython/pull/20173
___
Python tracker
<https://bugs.python.org/issue31
Chris Jerdonek added the comment:
New changeset ff7a8b03c49153021d6de5d0b2fa8b5163059ed6 by Chris Jerdonek in
branch 'master':
Use _PyErr_ChainStackItem() inside gen_send_ex(). (GH-20173)
https://github.com/python/cpython/commit/ff7a8b03c49153021d6de5d0b2fa8b
Chris Jerdonek added the comment:
Regarding the documentation, I'm not sure we _need_ to say what happens in this
edge case for 3.9. It was already unspecified before 3.9, so we're not any
worse off. (The change in issue 40607 was, however, documented.)
I'd rather come to
Change by Chris Jerdonek :
--
nosy: +chris.jerdonek
___
Python tracker
<https://bugs.python.org/issue39839>
___
___
Python-bugs-list mailing list
Unsubscribe:
Chris Withers added the comment:
New changeset c598a04dd29b89ad072245ddaf738badcfb41ac7 by idanw206 in branch
'master':
bpo-42532: Check if NonCallableMock's spec_arg is not None instead of call its
__bool__ function (GH23613)
https://github.com/python
Change by Chris Gahagan :
--
files: SubClass.py
nosy: ccgahagan
priority: normal
severity: normal
status: open
title: __init_subclass__ only called for first subclass when class has multiple
inheritance
type: behavior
versions: Python 3.8
Added file: https://bugs.python.org/file49691
Chris Withers added the comment:
@iritkatriel - if Tim thinks this is hard, it probably is hard ;-)
--
___
Python tracker
<https://bugs.python.org/issue3
Change by Chris Withers :
--
keywords: -easy
___
Python tracker
<https://bugs.python.org/issue3722>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Chris Jerdonek :
--
nosy: +chris.jerdonek
___
Python tracker
<https://bugs.python.org/issue31212>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Chris Griffith :
It is possible to run into an IndexError in the subprocess module's
_communicate function.
```
return run(
File "subprocess.py", line 491, in run
File "subprocess.py", line 1024, in communicate
File "subprocess.p
Change by Chris Griffith :
--
keywords: +patch
pull_requests: +23542
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/24777
___
Python tracker
<https://bugs.python.org/issu
Chris Jerdonek added the comment:
I took a look at this.
Basically, the reason the exception handler isn't firing when the task is still
in scope is that the exception handler is only a handler of "last resort." You
can see that the exception handler is called inside Ta
Change by Chris Jerdonek :
--
nosy: +chris.jerdonek
___
Python tracker
<https://bugs.python.org/issue39060>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Chris Jerdonek :
--
nosy: +chris.jerdonek
___
Python tracker
<https://bugs.python.org/issue36456>
___
___
Python-bugs-list mailing list
Unsubscribe:
Chris Jerdonek added the comment:
Is this issue the same as this one? https://bugs.python.org/issue32309
--
nosy: +chris.jerdonek
___
Python tracker
<https://bugs.python.org/issue38
New submission from Chris Jerdonek :
When calling an instance method incorrectly, you will often get a TypeError
that is some variation of the following:
Traceback (most recent call last):
File "/.../test.py", line 6, in
a.foo(1)
TypeError: foo() takes 1
Chris Jerdonek added the comment:
New changeset 257e11cebde6b29177a206abd1e395367799ed42 by Miss Islington (bot)
in branch '3.8':
bpo-39976: Add **other_popen_kwargs to subprocess docs (GH-20145)
https://github.com/python/cpython/commit/257e11cebde6b29177a206abd1e395
Chris Jerdonek added the comment:
New changeset 05525fff8a46f4d479cc029e4ea57b35b153f015 by Miss Islington (bot)
in branch '3.7':
bpo-39976: Add **other_popen_kwargs to subprocess docs (GH-20145)
https://github.com/python/cpython/commit/05525fff8a46f4d479cc029e4ea57b
Chris Jerdonek added the comment:
How about we review Phil's PR, which adds a message to the assertion. And then
we can keep this issue open to discuss converting the assertion to an
exception. I think Phil's PR is an improvement.
--
nosy: +chri
New submission from Chris Danis :
When difflib.unified_diff is asked to produce a diff of inputs a.txt and b.txt
(attached), with 10 context lines, it produces the following:
--- codfw/groupLoadsBySection live
+++ codfw/groupLoadsBySection generated
@@ -90,37 +90,31 @@
},
&qu
Change by Chris Danis :
Added file: https://bugs.python.org/file49172/b.txt
___
Python tracker
<https://bugs.python.org/issue40691>
___
___
Python-bugs-list mailin
Chris Jerdonek added the comment:
Thanks! I think it does.
Also, I see now that using the __qualname__ is better than including the
object's type for locating the method because you can have cases like
super().foo() or even--
class A:
def foo(self):
pass
def bar():
New submission from Chris Jerdonek :
Here is another gen.throw() exception chain example similar to the examples in
issue 29587: https://bugs.python.org/issue29587
def f():
yield
def g():
try:
raise RuntimeError('a')
except Exception as exc:
print(f'
Chris Jerdonek added the comment:
I just filed a related issue to this that's also similar to issue 29587:
https://bugs.python.org/issue40694
--
___
Python tracker
<https://bugs.python.org/is
401 - 500 of 2758 matches
Mail list logo