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 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
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
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 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:
Change by Chris Jerdonek :
--
nosy: +chris.jerdonek
___
Python tracker
<https://bugs.python.org/issue31212>
___
___
Python-bugs-list mailing list
Unsubscribe:
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
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
Chris Jerdonek added the comment:
> Or should we be satisfied with the half-measure of including the qualname but
> not the module (at least for now)?
This is something I was wondering myself, too (also for other contexts). Let's
take things one step at a time and limit oursel
Chris Jerdonek added the comment:
Oh, I see now I was hitting a different line:
https://github.com/python/cpython/blob/master/Objects/call.c#L1009
Maybe my suggestion is enough to help you (I didn't really look closely at the
code), or maybe you were already aware of
Chris Jerdonek added the comment:
Oh, that string is used in even more spots (sorry wasn't looking too closely
the first time).
--
___
Python tracker
<https://bugs.python.org/is
Change by Chris Jerdonek :
--
nosy: +chris.jerdonek
___
Python tracker
<https://bugs.python.org/issue40696>
___
___
Python-bugs-list mailing list
Unsubscribe:
Chris Jerdonek added the comment:
I'm getting close to tracking this down. There is a certain point in the code
path of the Django test where `exc is exc.__context__` becomes True. I'm
guessing this is what's causing the hang. I'll try to get a simple reproducer
(ther
Chris Jerdonek added the comment:
FWIW, I found that the following hangs, but it also hangs on earlier versions
of Python:
import traceback
try:
raise RuntimeError
except Exception as exc:
print(f'handling: {exc!r}')
exc.__context__ = exc
print('pri
Chris Jerdonek added the comment:
To start out sharing what I found in the Django code:
Here inside BaseHandler._get_response_async():
https://github.com/django/django/blob/3460ea49e839fd6bb924c48eaa1cd3d6dc888035/django/core/handlers/base.py#L226-L232
try:
response = await
Chris Jerdonek added the comment:
The Django details might not matter so much at this point, but to add to
something I said above: It might not only be process_exception_by_middleware()
as I mentioned, but also asgiref's sync_to_async() function. In that function,
you can see an al
Chris Jerdonek added the comment:
I don't think that would be a real solution because it looks like that would
cause the while loop always to loop at most once (which would defeat its
purpose) -- because the loop ends with "o = context":
while ((context = PyExcepti
Chris Jerdonek added the comment:
>From a process perspective, I think we should probably pursue two PR's for
>this: one for the general issue that affects all Python versions (what Yury is
>talking about), and something narrower that addresses the 3.9.0b1 case that
>came
Chris Jerdonek added the comment:
Okay, I'll keep it one issue then. Someone else is still welcome to work on the
more general issue.
Note that there is some chance the narrower fix should happen independent of
the more general fix. This is because _PyErr_ChainExceptions() (which i
Chris Jerdonek added the comment:
> So maybe the test coverage (or removal?) should be a separate issue.
That sounds good. Want to file the issue?
--
___
Python tracker
<https://bugs.python.org/issu
Change by Chris Jerdonek :
--
nosy: +chris.jerdonek
___
Python tracker
<https://bugs.python.org/issue40706>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Chris Jerdonek :
--
keywords: +patch
pull_requests: +19561
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/20287
___
Python tracker
<https://bugs.python.org/issu
Chris Jerdonek added the comment:
I just posted a draft PR that implements the narrower fix:
https://github.com/python/cpython/pull/20287
I confirmed that the Django test passes with it. I also included two regression
tests: one using only generators, and one more like the Django test that
Chris Jerdonek added the comment:
Also, I just want to point out one thing about _PyErr_SetObject(). I believe it
can detect cycles of arbitrary length (which is what the while loop is for).
It's just that it can only detect cycles that involve the first node. So for
things to fail
Change by Chris Jerdonek :
--
components: +Interpreter Core -asyncio
title: "await" hangs in Python3.9.0b1. -> Exception handling with "await" can
hang in Python3.9.0b1
type: -> behavior
versions: +Python 3.10
Change by Chris Jerdonek :
--
components: +Interpreter Core
versions: +Python 3.10 -Python 3.9
___
Python tracker
<https://bugs.python.org/issue40679>
___
___
Change by Chris Jerdonek :
--
nosy: +chris.jerdonek
___
Python tracker
<https://bugs.python.org/issue23188>
___
___
Python-bugs-list mailing list
Unsubscribe:
Chris Jerdonek added the comment:
Mariusz, someone may also want to review Django's code there. Raising an
exception that would otherwise create a cycle in the chain could be obscuring
another issue, or there could be more straightforward alternatives. (The Python
issue will still be
Chris Jerdonek added the comment:
> then you will have 1 extra test in that module (the imported one), moreover,
> that test will be broken.
If this is true, then how is anyone able to be using FunctionTestCase in their
tests today? Is the feature broken?
--
nosy: +chris.je
Chris Jerdonek added the comment:
New changeset 7c30d12bd5359b0f66c4fbc98aa055398bcc8a7e by Chris Jerdonek in
branch 'master':
bpo-40696: Fix a hang that can arise after gen.throw() (GH-20287)
https://github.com/python/cpython/commit/7c30d12bd5359b0f66c4fbc98aa055
Chris Jerdonek added the comment:
New changeset b5cc2089cc354469f12eabc7ba54280e85fdd6dc by Dennis Sweeney in
branch 'master':
bpo-40679: Use the function's qualname in certain TypeErrors (GH-20236)
https://github.com/python/cpython/commit/b5cc2089cc354469f12eabc7b
Chris Jerdonek added the comment:
Thanks again, Dennis!
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
New submission from Chris Jerdonek :
A sporadic failure of test_nntplib.NetworkedNNTP_SSLTests.test_with_statement
on the CI for macOS:
https://github.com/python/cpython/pull/20321/checks?check_run_id=700729471#step:6:612
See also:
* https://bugs.python.org/issue19613 (test_article_head_body
Chris Jerdonek added the comment:
See also: https://bugs.python.org/issue40735 (test_with_statement)
--
nosy: +chris.jerdonek
___
Python tracker
<https://bugs.python.org/issue19
Chris Jerdonek added the comment:
See also: https://bugs.python.org/issue40735 (test_with_statement)
--
nosy: +chris.jerdonek
___
Python tracker
<https://bugs.python.org/issue19
New submission from Chris Jerdonek :
This TypeError could be a bit better:
"/Users/runner/runners/2.262.1/work/cpython/cpython/Lib/test/test_nntplib.py",
line 293, in test_with_statement
if re.search(r'(?i)KEY.TOO.SMALL', ssl_err.reason):
File "/Users/runner/run
Change by Chris Jerdonek :
--
nosy: -chris.jerdonek
___
Python tracker
<https://bugs.python.org/issue19613>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Chris Jerdonek :
--
nosy: -chris.jerdonek
___
Python tracker
<https://bugs.python.org/issue19756>
___
___
Python-bugs-list mailing list
Unsubscribe:
Chris Jerdonek added the comment:
> _PyObject_FunctionString as discussed here (
> https://bugs.python.org/issue37645 ) returns a string that also includes the
> module name where applicable.
By the way, Dennis, regarding the above, one thing I noticed is that Python
doesn
Chris Jerdonek added the comment:
New changeset 7f77ac463cff219e0c8afef2611cad5080cc9df1 by Miss Islington (bot)
in branch '3.9':
bpo-40696: Fix a hang that can arise after gen.throw() (GH-20287)
https://github.com/python/cpython/commit/7f77ac463cff219e0c8afef2611cad
Chris Jerdonek added the comment:
Good to hear, Mariusz! And thanks for the report!
Also, as discussed above, I'm leaving this issue open (and retitling) until the
following more general issue is fixed:
try:
raise RuntimeError
except Exception as exc:
print(f'handli
Change by Chris Jerdonek :
--
stage: patch review -> needs patch
versions: +Python 3.7, Python 3.8
___
Python tracker
<https://bugs.python.org/issu
Chris Jerdonek added the comment:
I just want to point out one difference between _PyErr_ChainExceptions and
PyErr_SetObject that I encountered while working on this issue:
https://bugs.python.org/issue40696
While both functions set the context, only PyErr_SetObject does a check to
prevent
Change by Chris Jerdonek :
--
keywords: +patch
pull_requests: +19597
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/20329
___
Python tracker
<https://bugs.python.org/issu
Chris Jerdonek added the comment:
> The documentation of PyErr_SetObject, PyErr_SetString et al should also be
> updated to mention exception chaining.
I just posted a PR to do the above:
https://github.com/python/cpython/pull/20329
--
___
Chris Jerdonek added the comment:
Reopening as this is happening again -- twice for me:
https://github.com/python/cpython/pull/20329/checks?check_run_id=701405252#step:7:117
--
nosy: +chris.jerdonek
resolution: fixed ->
status: closed ->
Chris Jerdonek added the comment:
This was discussed a bit last December 2019 here ("Is there prior discussion
around the build system of CPython itself?"):
https://discuss.python.org/t/is-there-prior-discussion-around-the-build-system-of-cpython-itself/2813
--
nosy: +chri
Change by Chris Jerdonek :
--
nosy: +chris.jerdonek
___
Python tracker
<https://bugs.python.org/issue34852>
___
___
Python-bugs-list mailing list
Unsubscribe:
Chris Jerdonek added the comment:
I already started one actually. But if I don't get to it in a week, I'll make a
note here and you can take it up.
--
___
Python tracker
<https://bugs.python.o
Change by Chris Jerdonek :
--
nosy: +chris.jerdonek
___
Python tracker
<https://bugs.python.org/issue25782>
___
___
Python-bugs-list mailing list
Unsubscribe:
Chris Jerdonek added the comment:
I think this issue needs deeper discussion to know how to proceed.
> If there is a chain A -> B -> C -> D -> E, after assignment C.__context__ = A
> we will get a chain C -> A -> B -> D -> E. No exception is lost.
I understand
Chris Jerdonek added the comment:
To clarify, would there be any observable difference in behavior aside from
speed? And would there be any limitations in when the speedup can be applied?
--
nosy: +chris.jerdonek
___
Python tracker
<ht
Chris Jerdonek added the comment:
Thanks a lot, Victor.
--
___
Python tracker
<https://bugs.python.org/issue40679>
___
___
Python-bugs-list mailing list
Unsub
Change by Chris Jerdonek :
--
nosy: +chris.jerdonek
___
Python tracker
<https://bugs.python.org/issue31213>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Chris Jerdonek :
--
nosy: +chris.jerdonek
___
Python tracker
<https://bugs.python.org/issue40932>
___
___
Python-bugs-list mailing list
Unsubscribe:
Chris Jerdonek added the comment:
Mark, I want to flag issue29590 for you ("Incorrect stack traces when
re-entering a generator/coroutine stack via .throw()") in case this issue
relates to or would help at all with that.
--
nosy: +chri
Chris Jerdonek added the comment:
Another API option is to use str.replace's existing arguments: str.replace(old,
new[, count]). In addition to "old" and "new" being strings, they could also be
lists of strings of equal length, similar to how str.maketrans() can acc
Change by Chris Jerdonek :
--
title: Add re.replace(string, replacement_map) -> Add
str.replace(replacement_map)
___
Python tracker
<https://bugs.python.org/issu
Chris Jerdonek added the comment:
I believe this also resolves issue 30181 (which was the same issue).
--
nosy: +chris.jerdonek
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.8
___
Pytho
Chris Jerdonek added the comment:
I believe this was addressed by issue 39450, which I think was technically a
duplicate of this issue.
--
nosy: +chris.jerdonek
___
Python tracker
<https://bugs.python.org/issue30
Change by Chris Jerdonek :
--
pull_requests: +21719
pull_request: https://github.com/python/cpython/pull/22756
___
Python tracker
<https://bugs.python.org/issue38
Change by Chris Jerdonek :
--
nosy: +chris.jerdonek
___
Python tracker
<https://bugs.python.org/issue42130>
___
___
Python-bugs-list mailing list
Unsubscribe:
Chris Jerdonek added the comment:
It looks like issue 37658 might be the relevant change rather.
Here is the new logic it introduced:
https://github.com/python/cpython/blob/db455296be5f792b8c12b7cd7f3962b52e4f44ee/Lib/asyncio/tasks.py#L483-L488
(via https://github.com/python/cpython/pull
Chris Jerdonek added the comment:
Issue #42130 that was recently filed appears related to this change.
--
nosy: +chris.jerdonek
___
Python tracker
<https://bugs.python.org/issue37
Chris Jerdonek added the comment:
I'm closing this as a duplicate of issue 39450, which has been resolved.
--
resolution: -> duplicate
stage: -> resolved
status: open -> closed
superseder: -> unittest TestCase shortDescription does not
Chris Jerdonek added the comment:
Are you suggesting this is a bug, or is it just a suggested code cleanup? I ask
because the docs suggest that a set should be passed:
https://docs.python.org/3/library/asyncio-task.html#asyncio.wait
And the docstring says it should be a sequence:
https
Chris Jerdonek added the comment:
If it's just a code cleanup and not a bugfix though, it shouldn't be
backported. But yes, as a cleanup it's fine. And even if it's expected to go
away later, it's okay to do now.
--
_
101 - 200 of 1575 matches
Mail list logo