[issue40941] Merge generator.gi_running and frame executing flag into single frame state

2020-07-09 Thread Chris Jerdonek
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

[issue40932] subprocess docs should warn of shlex use on Windows

2020-06-10 Thread Chris Jerdonek
Change by Chris Jerdonek : -- nosy: +chris.jerdonek ___ Python tracker <https://bugs.python.org/issue40932> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue31213] __context__ reset to None in nested exception

2020-06-06 Thread Chris Jerdonek
Change by Chris Jerdonek : -- nosy: +chris.jerdonek ___ Python tracker <https://bugs.python.org/issue31213> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue40679] show class name in method invocation TypeError

2020-06-03 Thread Chris Jerdonek
Chris Jerdonek added the comment: Thanks a lot, Victor. -- ___ Python tracker <https://bugs.python.org/issue40679> ___ ___ Python-bugs-list mailing list Unsub

[issue40222] "Zero cost" exception handling

2020-06-03 Thread Chris Jerdonek
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

[issue25782] CPython hangs on error __context__ set to the error itself

2020-05-31 Thread Chris Jerdonek
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

[issue25782] CPython hangs on error __context__ set to the error itself

2020-05-30 Thread Chris Jerdonek
Change by Chris Jerdonek : -- nosy: +chris.jerdonek ___ Python tracker <https://bugs.python.org/issue25782> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue40736] better message for re.search TypeError ("expected string or bytes-like object")

2020-05-25 Thread Chris Jerdonek
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.org/issue40

[issue34852] Counter-intuitive behavior of Server.close() / wait_closed()

2020-05-23 Thread Chris Jerdonek
Change by Chris Jerdonek : -- nosy: +chris.jerdonek ___ Python tracker <https://bugs.python.org/issue34852> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue40743] [CMake] It's 2020, where is CMake?

2020-05-23 Thread Chris Jerdonek
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

[issue39343] Travis CI: documentation job fails in library/nntplib.rst with random network issue on news.gmane.io

2020-05-23 Thread Chris Jerdonek
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 ->

[issue23188] Provide a C helper function to chain raised (but not yet caught) exceptions

2020-05-22 Thread Chris Jerdonek
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 -- ___

[issue23188] Provide a C helper function to chain raised (but not yet caught) exceptions

2020-05-22 Thread Chris Jerdonek
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

[issue23188] Provide a C helper function to chain raised (but not yet caught) exceptions

2020-05-22 Thread Chris Jerdonek
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

[issue40696] exception chain cycles cause hangs (was "Exception handling with "await" can hang in Python3.9.0b1")

2020-05-22 Thread Chris Jerdonek
Change by Chris Jerdonek : -- stage: patch review -> needs patch versions: +Python 3.7, Python 3.8 ___ Python tracker <https://bugs.python.org/issu

[issue40696] exception chain cycles cause hangs (was "Exception handling with "await" can hang in Python3.9.0b1")

2020-05-22 Thread Chris Jerdonek
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'handling: {exc!r

[issue40696] Exception handling with "await" can hang in Python3.9.0b1

2020-05-22 Thread Chris Jerdonek
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/7f77ac463cff219e0c8afef2611cad5080cc9df1

[issue40679] show class name in method invocation TypeError

2020-05-22 Thread Chris Jerdonek
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't

[issue19756] test_nntplib: sporadic failures, network isses? server down?

2020-05-22 Thread Chris Jerdonek
Change by Chris Jerdonek : -- nosy: -chris.jerdonek ___ Python tracker <https://bugs.python.org/issue19756> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue19613] test_nntplib: sporadic failures, test_article_head_body()

2020-05-22 Thread Chris Jerdonek
Change by Chris Jerdonek : -- nosy: -chris.jerdonek ___ Python tracker <https://bugs.python.org/issue19613> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue40736] better message for re.search TypeError ("expected string or bytes-like object")

2020-05-22 Thread Chris Jerdonek
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/runners/2.262

[issue19613] test_nntplib: sporadic failures, test_article_head_body()

2020-05-22 Thread Chris Jerdonek
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

[issue19756] test_nntplib: sporadic failures, network isses? server down?

2020-05-22 Thread Chris Jerdonek
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

[issue40735] test_nntplib: sporadic failures, NetworkedNNTP_SSLTests.test_with_statement

2020-05-22 Thread Chris Jerdonek
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

[issue40679] show class name in method invocation TypeError

2020-05-22 Thread Chris Jerdonek
Chris Jerdonek added the comment: Thanks again, Dennis! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue40679] show class name in method invocation TypeError

2020-05-22 Thread Chris Jerdonek
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/b5cc2089cc354469f12eabc7ba54280e85fdd6dc

[issue40696] Exception handling with "await" can hang in Python3.9.0b1

2020-05-22 Thread Chris Jerdonek
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/7c30d12bd5359b0f66c4fbc98aa055398bcc8a7e

[issue40690] unittest: if FunctionTestCase is imported, the loader loads "tests" from it

2020-05-22 Thread Chris Jerdonek
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

[issue40696] Exception handling with "await" can hang in Python3.9.0b1

2020-05-21 Thread Chris Jerdonek
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 fixed

[issue23188] Provide a C helper function to chain raised (but not yet caught) exceptions

2020-05-21 Thread Chris Jerdonek
Change by Chris Jerdonek : -- nosy: +chris.jerdonek ___ Python tracker <https://bugs.python.org/issue23188> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue40679] show class name in method invocation TypeError

2020-05-21 Thread Chris Jerdonek
Change by Chris Jerdonek : -- components: +Interpreter Core versions: +Python 3.10 -Python 3.9 ___ Python tracker <https://bugs.python.org/issue40679> ___ ___

[issue40696] Exception handling with "await" can hang in Python3.9.0b1

2020-05-21 Thread Chris Jerdonek
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

[issue40696] "await" hangs in Python3.9.0b1.

2020-05-21 Thread Chris Jerdonek
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

[issue40696] "await" hangs in Python3.9.0b1.

2020-05-21 Thread Chris Jerdonek
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

[issue40696] "await" hangs in Python3.9.0b1.

2020-05-21 Thread Chris Jerdonek
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

[issue40706] Unreachable code in _PyEval_EvalCode

2020-05-21 Thread Chris Jerdonek
Change by Chris Jerdonek : -- nosy: +chris.jerdonek ___ Python tracker <https://bugs.python.org/issue40706> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue40679] show class name in method invocation TypeError

2020-05-20 Thread Chris Jerdonek
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

[issue40696] "await" hangs in Python3.9.0b1.

2020-05-20 Thread Chris Jerdonek
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

[issue40696] "await" hangs in Python3.9.0b1.

2020-05-20 Thread Chris Jerdonek
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 up he

[issue40696] "await" hangs in Python3.9.0b1.

2020-05-20 Thread Chris Jerdonek
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 = PyException_Ge

[issue40696] "await" hangs in Python3.9.0b1.

2020-05-20 Thread Chris Jerdonek
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 already

[issue40696] "await" hangs in Python3.9.0b1.

2020-05-20 Thread Chris Jerdonek
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

[issue40696] "await" hangs in Python3.9.0b1.

2020-05-20 Thread Chris Jerdonek
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('printing traceback

[issue40696] "await" hangs in Python3.9.0b1.

2020-05-20 Thread Chris Jerdonek
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 (there is a lot of Django

[issue40696] "await" hangs in Python3.9.0b1.

2020-05-20 Thread Chris Jerdonek
Change by Chris Jerdonek : -- nosy: +chris.jerdonek ___ Python tracker <https://bugs.python.org/issue40696> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue40679] show class name in method invocation TypeError

2020-05-20 Thread Chris Jerdonek
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/issue40

[issue40679] show class name in method invocation TypeError

2020-05-20 Thread Chris Jerdonek
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

[issue40679] show class name in method invocation TypeError

2020-05-20 Thread Chris Jerdonek
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 ourselve

[issue29590] Incorrect stack traces when re-entering a generator/coroutine stack via .throw()

2020-05-19 Thread Chris Jerdonek
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/issue29

[issue40694] gen.throw() with multiple yield froms skips intermediate exceptions

2020-05-19 Thread Chris Jerdonek
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'handling: {exc

[issue40679] show class name in method invocation TypeError

2020-05-19 Thread Chris Jerdonek
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(): pass

[issue40124] Clearer assertion error

2020-05-19 Thread Chris Jerdonek
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: +chris.jerdonek

[issue39976] Add "**other_popen_kwargs" to subprocess API signatures in docs

2020-05-19 Thread Chris Jerdonek
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/05525fff8a46f4d479cc029e4ea57b35b153f015

[issue39976] Add "**other_popen_kwargs" to subprocess API signatures in docs

2020-05-19 Thread Chris Jerdonek
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/257e11cebde6b29177a206abd1e395367799ed42

[issue40679] show class name in method invocation TypeError

2020-05-19 Thread Chris Jerdonek
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

[issue38306] High level API for loop.run_in_executor(None, ...)?

2020-05-18 Thread Chris Jerdonek
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

[issue36456] task.cancel unbound recursion

2020-05-18 Thread Chris Jerdonek
Change by Chris Jerdonek : -- nosy: +chris.jerdonek ___ Python tracker <https://bugs.python.org/issue36456> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39060] asyncio.Task.print_stack doesn't print the full stack

2020-05-18 Thread Chris Jerdonek
Change by Chris Jerdonek : -- nosy: +chris.jerdonek ___ Python tracker <https://bugs.python.org/issue39060> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39839] Non-working error handler when creating a task with assigning a variable

2020-05-18 Thread Chris Jerdonek
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 Task.__

[issue39839] Non-working error handler when creating a task with assigning a variable

2020-05-18 Thread Chris Jerdonek
Change by Chris Jerdonek : -- nosy: +chris.jerdonek ___ Python tracker <https://bugs.python.org/issue39839> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue40672] asyncio.wait_for: process future result produced during cancelation

2020-05-18 Thread Chris Jerdonek
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 agreement on (1

[issue31033] Improve traceback of cancelled tasks / add cancel() msg argument

2020-05-18 Thread Chris Jerdonek
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/ff7a8b03c49153021d6de5d0b2fa8b5163059ed6

[issue31033] Improve traceback of cancelled tasks / add cancel() msg argument

2020-05-18 Thread Chris Jerdonek
Change by Chris Jerdonek : -- pull_requests: +19472 pull_request: https://github.com/python/cpython/pull/20173 ___ Python tracker <https://bugs.python.org/issue31

[issue40607] asyncio.wait_for should reraise future exception even if timeout expires

2020-05-18 Thread Chris Jerdonek
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

[issue31131] asyncio.wait_for() TimeoutError doesn't provide full traceback

2020-05-18 Thread Chris Jerdonek
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

[issue31033] Improve traceback of cancelled tasks / add cancel() msg argument

2020-05-17 Thread Chris Jerdonek
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 argumen

[issue31033] Add argument to .cancel() of Task and Future

2020-05-17 Thread Chris Jerdonek
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/da742ba826721da84140abc785856d4ccc2d787f

[issue40152] Coroutine hangs if it performs async operations when handling exception sent using throw()

2020-05-17 Thread Chris Jerdonek
Change by Chris Jerdonek : -- nosy: +chris.jerdonek ___ Python tracker <https://bugs.python.org/issue40152> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39976] Add "**other_popen_kwargs" to subprocess API signatures in docs

2020-05-17 Thread Chris Jerdonek
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://bug

[issue39976] Add "**other_popen_kwargs" to subprocess API signatures in docs

2020-05-17 Thread Chris Jerdonek
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 -- nosy

[issue29587] Generator/coroutine 'throw' discards exc_info state, which is bad

2020-05-16 Thread Chris Jerdonek
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/d7184d3dbd249444ec3961641dc08a9ad3c1ac34

[issue38323] asyncio: MultiLoopWatcher has a race condition (test_asyncio: test_close_kill_running() hangs on AMD64 RHEL7 Refleaks 3.x)

2020-05-16 Thread Chris Jerdonek
Change by Chris Jerdonek : -- type: -> behavior ___ Python tracker <https://bugs.python.org/issue38323> ___ ___ Python-bugs-list mailing list Unsubscrib

[issue38323] asyncio: MultiLoopWatcher has a race condition (test_asyncio: test_close_kill_running() hangs on AMD64 RHEL7 Refleaks 3.x)

2020-05-16 Thread Chris Jerdonek
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

[issue38323] asyncio: MultiLoopWatcher has a race condition (test_asyncio: test_close_kill_running() hangs on AMD64 RHEL7 Refleaks 3.x)

2020-05-16 Thread Chris Jerdonek
Change by Chris Jerdonek : -- pull_requests: +19447 pull_request: https://github.com/python/cpython/pull/20142 ___ Python tracker <https://bugs.python.org/issue38

[issue32309] Implement asyncio.run_in_executor shortcut

2020-05-16 Thread Chris Jerdonek
Change by Chris Jerdonek : -- nosy: +chris.jerdonek ___ Python tracker <https://bugs.python.org/issue32309> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue31033] Add argument to .cancel() of Task and Future

2020-05-15 Thread Chris Jerdonek
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

[issue31033] Add argument to .cancel() of Task and Future

2020-05-15 Thread Chris Jerdonek
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. -- ___ Python

[issue31033] Add argument to .cancel() of Task and Future

2020-05-15 Thread Chris Jerdonek
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/1ce5841eca6d96b1b1e8c213d04f2e92b1619bb5

[issue29587] Generator/coroutine 'throw' discards exc_info state, which is bad

2020-05-13 Thread Chris Jerdonek
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/75cd8e48c62c97fdb9d9a94fd2335be06084471d

[issue40615] unstable behaviour for options in argparse

2020-05-13 Thread Chris Jerdonek
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: > error: ambiguo

[issue40615] unstable behaviour for options in argparse

2020-05-13 Thread Chris Jerdonek
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

[issue40607] asyncio.wait_for should reraise future exception even if timeout expires

2020-05-12 Thread Chris Jerdonek
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.jerdonek, njs

[issue37573] asyncio: freeze when using MultiLoopChildWatcher on Solaris

2020-05-12 Thread Chris Jerdonek
Change by Chris Jerdonek : -- resolution: -> duplicate ___ Python tracker <https://bugs.python.org/issue37573> ___ ___ Python-bugs-list mailing list Un

[issue37573] asyncio: freeze when using MultiLoopChildWatcher on Solaris

2020-05-12 Thread Chris Jerdonek
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

[issue38323] asyncio: MultiLoopWatcher has a race condition (test_asyncio: test_close_kill_running() hangs on AMD64 RHEL7 Refleaks 3.x)

2020-05-12 Thread Chris Jerdonek
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. The reason

[issue38323] asyncio: MultiLoopWatcher has a race condition (test_asyncio: test_close_kill_running() hangs on AMD64 RHEL7 Refleaks 3.x)

2020-05-11 Thread Chris Jerdonek
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 awaiting

[issue29587] Generator/coroutine 'throw' discards exc_info state, which is bad

2020-05-11 Thread Chris Jerdonek
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 merged PR

[issue38323] asyncio: MultiLoopWatcher has a race condition (test_asyncio: test_close_kill_running() hangs on AMD64 RHEL7 Refleaks 3.x)

2020-05-09 Thread Chris Jerdonek
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

[issue38323] asyncio: MultiLoopWatcher has a race condition (test_asyncio: test_close_kill_running() hangs on AMD64 RHEL7 Refleaks 3.x)

2020-05-09 Thread Chris Jerdonek
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

[issue38323] asyncio: MultiLoopWatcher has a race condition (test_asyncio: test_close_kill_running() hangs on AMD64 RHEL7 Refleaks 3.x)

2020-05-09 Thread Chris Jerdonek
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 example,

[issue37573] asyncio: freeze when using MultiLoopChildWatcher on Solaris

2020-05-09 Thread Chris Jerdonek
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

[issue38323] asyncio: MultiLoopWatcher has a race condition (test_asyncio: test_close_kill_running() hangs on AMD64 RHEL7 Refleaks 3.x)

2020-05-09 Thread Chris Jerdonek
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.org/issue38

[issue38323] asyncio: MultiLoopWatcher has a race condition (test_asyncio: test_close_kill_running() hangs on AMD64 RHEL7 Refleaks 3.x)

2020-05-09 Thread Chris Jerdonek
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/issue38

[issue38323] asyncio: MultiLoopWatcher has a race condition (test_asyncio: test_close_kill_running() hangs on AMD64 RHEL7 Refleaks 3.x)

2020-05-09 Thread Chris Jerdonek
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" happ

[issue38323] asyncio: MultiLoopWatcher has a race condition (test_asyncio: test_close_kill_running() hangs on AMD64 RHEL7 Refleaks 3.x)

2020-05-08 Thread Chris Jerdonek
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 here: https

[issue40559] Missing Py_DECREF in task_step_impl() in _asynciomodule.c

2020-05-08 Thread Chris Jerdonek
Change by Chris Jerdonek : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue40559] Missing Py_DECREF in task_step_impl() in _asynciomodule.c

2020-05-08 Thread Chris Jerdonek
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/25014289887cb521c1041df4773c839d3fbf784e

[issue40559] Missing Py_DECREF in task_step_impl() in _asynciomodule.c

2020-05-08 Thread Chris Jerdonek
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/0e4a5e96f011989736bde824ab817146bd7c9cfc

[issue40559] Missing Py_DECREF in task_step_impl() in _asynciomodule.c

2020-05-08 Thread Chris Jerdonek
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/d2c349b190bcba21a4a38e6520a48ad97a9f1529

[issue31185] Miscellaneous errors in asyncio speedup module

2020-05-08 Thread Chris Jerdonek
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 tracker

  1   2   3   4   5   6   7   8   9   10   >