`async with` doesn't allow newlines
See original GitHub issueWhen writing a with
statement, pressing enter goes onto a new line, rather than immediately running the code:
In [26]: with example:
...: do_1()[enter]
...: [<-pointer goes here]
However, when using async with
, this does not apply to any lines except for the first after the colon:
In [26]: async with example:
...: do_1()[enter]
[code is run]
(Tested in latest PyPI: IPython.__version__ == "7.23.1"
)
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
Fix: `async with` doesn't allow newlines (ipython ... - GitHub
I'm wondering if the regexp is the best way to check for async await. I believe the re are flags for compile commands,...
Read more >How to async read new lines from logfiles when written in ...
I'm using the aiofile module for reading the file async, but the seek in this module only takes one argument so seeking end...
Read more >How to handle file names containing backslash or newline in ...
Answer. Overview. Aspera transfer and sync subsystems do not allow file names containing backslash and newlines. These characters are legal ...
Read more >Async - Fullstack Node.js
The core fs module has methods that allow us to interact with the filesystem. Most often we'll use this to read and write...
Read more >Asynchronous file access (C#) - Microsoft Learn
Learn how to use the async feature to access files in C#. You can call into asynchronous methods without using callbacks or splitting...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Yes you are right, test were not properly added in previous fix, I just made #13436 that should fix it.
I’ve just come back to this issue, and it doesn’t seem to be fixed; I’ve tested with IPython 7.31.0 in Python 3.8.10, 3.9.9, and 3.10.1, with IPython 7.28.0 (when the backport was introduced) in Python 3.10.1, and with IPython 8.0.0.dev (
pip install git+https://github.com/ipython/ipython
) in Python 3.10.1; all of these versions have the same problem as in the original example.