Nathaniel Smith <n...@pobox.com> added the comment: Okay, more context for future archaelogists / me in 6 months, phrased in the form of a timeline:
This discussion started back in March, when I made an issue on the trio tracker [1] with notes on rough edges in CPython that it might make sense to try to target for 3.7; Brett, Yury, Nick, Dave Beazley, Matthias Bussonier joined in and it quickly turned into a discussion around the question of "is there anything we can do to improve developer experience when they forget an await?". Various impractical ideas were brainstormed / critiqued / prototyped. >From discussions at PyCon in May, I realized that while catching missing >'await' where they happen is very difficult, an unobtrusive tweak to the >interpreter might allow catching them soon after they happen; that's when I >filed this issue (bpo-30491) with a vague initial proposal [2]. Matthias also >did some work on prototyping this using set_coroutine_wrapper [3] End of August/beginning of September: more detailed analysis of various tricky edge cases refined this into an design that could actually work [4]; checked with pytest-asyncio devs for their thoughts [5]. Early/Mid December 2017: uh oh, feature freeze is less than 2 months away, better get moving; I posted a full proposal here [6]. After a few rounds of hashing out the basic idea here in the issue tracker, we seemed to have consensus that this was a reasonable approach, but (a) would it be better to add the feature to the interpreter, or to put it in a third-party library using set_coroutine_wrapper? and (b) how do we get this and asyncio debug mode to work together, like you'd want, instead of clashing over the coroutine wrapper and generally making a mess? Mid January 2018: Yury re-emerges from vacation, and in more discussions we realized that implementing "origin tracking" and "unawaited tracking" as built-in features would not only cover all the use cases, but would also open up origin tracking to other async frameworks, allow the two tools to complement each other instead of colliding, and let us deprecate set_coroutine_wrapper (which is a pretty obviously terrible API, much uglier than the two more specialized features here). So I filed bpo-32591 and wrote a patch for it, which was merged, and then reworked my prototype for this (bpo-30491) into something reviewable (gh-5279). Tuesday: Yury realized "oh $#@ in all of that we never talked to Guido" [7]. Lesson learned! [1] https://github.com/python-trio/trio/issues/79 [2] https://bugs.python.org/issue30491#msg294584 https://github.com/python-trio/trio/issues/79#issuecomment-304428955 [3] https://github.com/python-trio/trio/pull/176 [4] https://github.com/python-trio/trio/issues/79#issuecomment-325188030 [5] https://github.com/pytest-dev/pytest-asyncio/issues/67 [6] https://bugs.python.org/issue30491#msg308090 [7] https://bugs.python.org/issue30491#msg310559 ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue30491> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com