Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Asynchronous input in Linux/macOS (use ainput/aprint only) #23

Merged
merged 7 commits into from
Jun 12, 2022

Commits on Jun 8, 2022

  1. Revert "Revert "fix: Use async input in pause()""

    This reverts commit cd98b2c.
    plammens committed Jun 8, 2022
    Configuration menu
    Copy the full SHA
    7ca2d9e View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    8c8a1b0 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    a109c4e View commit details
    Browse the repository at this point in the history
  4. refactor: Extract more common parts between ask_valid_input and async…

    … version
    
    I made a change in 1ecea2 that was meant to affect both versions, but I only
    changed it in the non-async version.
    
    It's hard to share code between a non-async and an async function.
    (The only line that changes is how input is received, `input()` vs `await ainput()`,
    but there's no way to make that into a "parameter" since one is async and the
    other is not.)
    plammens committed Jun 8, 2022
    Configuration menu
    Copy the full SHA
    6d29cf7 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    b202562 View commit details
    Browse the repository at this point in the history
  6. fix: Use async IO (ainput() / aprint()) throughout

    This is to avoid conflicts with blocking IO, i.e. input() and print().
    On Linux ainput() sets the O_NONBLOCK flag, which then makes input() and print() fail.
    
    Fixes #17, #19
    plammens committed Jun 8, 2022
    Configuration menu
    Copy the full SHA
    187df83 View commit details
    Browse the repository at this point in the history

Commits on Jun 11, 2022

  1. Merge branch 'master' into fix/ainput-only

    # Conflicts:
    #	src/loveletter_cli/session.py
    plammens committed Jun 11, 2022
    Configuration menu
    Copy the full SHA
    b6f2ed5 View commit details
    Browse the repository at this point in the history