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

change run_sync #539

Merged
merged 5 commits into from
Jun 13, 2022
Merged

change run_sync #539

merged 5 commits into from
Jun 13, 2022

Commits on Jun 11, 2022

  1. change run_sync

    dantownsend committed Jun 11, 2022
    Configuration menu
    Copy the full SHA
    0a223ed View commit details
    Browse the repository at this point in the history

Commits on Jun 13, 2022

  1. simplify run_sync - call asyncio.run first

    Trying `asyncio.run` first, as in 99% of cases this will work.
    
    Also, using asyncio.run in a thread when running in an event loop.
    dantownsend committed Jun 13, 2022
    Configuration menu
    Copy the full SHA
    e336cdd View commit details
    Browse the repository at this point in the history
  2. Create test-strict.sh

    This runs the tests in Python's development mode, which gives lots of useful information - for example, about deprecated features, and asyncio warnings.
    dantownsend committed Jun 13, 2022
    Configuration menu
    Copy the full SHA
    5b38b72 View commit details
    Browse the repository at this point in the history
  3. close connection if exception is raised by asyncpg

    When running the tests in development mode, I realised that there were situations where the connection wasn't being closed (i.e. if an exception was raised by asyncpg due to a Postgres error).
    dantownsend committed Jun 13, 2022
    Configuration menu
    Copy the full SHA
    8164881 View commit details
    Browse the repository at this point in the history
  4. added create_db_tables and drop_db_tables

    These are async first. They replace `create_tables` and `drop_tables` which were sync first, and had no async equivalent.
    dantownsend committed Jun 13, 2022
    Configuration menu
    Copy the full SHA
    78d6995 View commit details
    Browse the repository at this point in the history