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

Upgrade to Tornado 6 #21469

Merged
merged 11 commits into from
May 3, 2022
Merged

Upgrade to Tornado 6 #21469

merged 11 commits into from
May 3, 2022

Commits on Apr 28, 2022

  1. run-dev: Avoid deprecated tornado.gen.engine.

    Signed-off-by: Anders Kaseorg <anders@zulip.com>
    andersk committed Apr 28, 2022
    Configuration menu
    Copy the full SHA
    70539ff View commit details
    Browse the repository at this point in the history
  2. tornado: Unfork tornado.autoreload.

    We previously forked tornado.autoreload to work around a problem where
    it would crash if you introduce a syntax error and not recover if you
    fix it (tornadoweb/tornado#2398).
    
    A much more maintainable workaround for that issue, at least in
    current Tornado, is to use tornado.autoreload as the main module.
    
    Signed-off-by: Anders Kaseorg <anders@zulip.com>
    andersk committed Apr 28, 2022
    Configuration menu
    Copy the full SHA
    a2808cc View commit details
    Browse the repository at this point in the history
  3. tornado: Remove instrument_tornado_ioloop.

    Signed-off-by: Anders Kaseorg <anders@zulip.com>
    andersk committed Apr 28, 2022
    Configuration menu
    Copy the full SHA
    3843149 View commit details
    Browse the repository at this point in the history
  4. runtornado: Avoid deprecated IOLoop debugging methods.

    IOLoop.set_blocking_log_threshold and IOLoop.handle_callback_exception
    are removed in Tornado 6.
    
    Signed-off-by: Anders Kaseorg <anders@zulip.com>
    andersk committed Apr 28, 2022
    Configuration menu
    Copy the full SHA
    87af67d View commit details
    Browse the repository at this point in the history
  5. run-dev: Switch to asyncio event loop.

    Signed-off-by: Anders Kaseorg <anders@zulip.com>
    andersk committed Apr 28, 2022
    Configuration menu
    Copy the full SHA
    10496ea View commit details
    Browse the repository at this point in the history

Commits on May 1, 2022

  1. requirements: Upgrade asgiref.

    Signed-off-by: Anders Kaseorg <anders@zulip.com>
    andersk committed May 1, 2022
    Configuration menu
    Copy the full SHA
    15fe9e2 View commit details
    Browse the repository at this point in the history
  2. cache: Instantiate only one BMemcached cache backend.

    Signed-off-by: Anders Kaseorg <anders@zulip.com>
    andersk committed May 1, 2022
    Configuration menu
    Copy the full SHA
    aed9717 View commit details
    Browse the repository at this point in the history
  3. queue: Use a thread-local Pika connection.

    According to the documentation: “Pika does not have any notion of
    threading in the code. If you want to use Pika with threading, make
    sure you have a Pika connection per thread, created in that thread. It
    is not safe to share one Pika connection across threads, with one
    exception: you may call the connection method add_callback_threadsafe
    from another thread to schedule a callback within an active pika
    connection.”
    
    https://pika.readthedocs.io/en/stable/faq.html
    
    This also means that synchronous Django code running in Tornado will
    use its own synchronous SimpleQueueClient rather than sharing the
    asynchronous TornadoQueueClient, which is unfortunate but necessary as
    they’re about to be on different threads.
    
    Signed-off-by: Anders Kaseorg <anders@zulip.com>
    andersk committed May 1, 2022
    Configuration menu
    Copy the full SHA
    80ae8c1 View commit details
    Browse the repository at this point in the history
  4. runtornado: Switch to asyncio event loop.

    Signed-off-by: Anders Kaseorg <anders@zulip.com>
    andersk committed May 1, 2022
    Configuration menu
    Copy the full SHA
    36af2d3 View commit details
    Browse the repository at this point in the history
  5. run-dev: Fix types.

    Signed-off-by: Anders Kaseorg <anders@zulip.com>
    andersk committed May 1, 2022
    Configuration menu
    Copy the full SHA
    13921dc View commit details
    Browse the repository at this point in the history
  6. requirements: Upgrade to Tornado 6.

    Fixes zulip#8913.
    
    Signed-off-by: Anders Kaseorg <anders@zulip.com>
    andersk committed May 1, 2022
    Configuration menu
    Copy the full SHA
    a61e4c3 View commit details
    Browse the repository at this point in the history