]> git.ipfire.org Git - thirdparty/tornado.git/commitdiff
Document file descriptor change and start new release notes.
authorBen Darnell <ben@bendarnell.com>
Sat, 18 Jan 2014 20:41:03 +0000 (15:41 -0500)
committerBen Darnell <ben@bendarnell.com>
Sat, 18 Jan 2014 20:41:18 +0000 (15:41 -0500)
docs/ioloop.rst
docs/releases.rst
docs/releases/next.rst [new file with mode: 0644]
tornado/ioloop.py

index 1ddbac446f9a7c6b2321b242763fb7ce86bf53c8..6978c39c225a0c3b776e087b72f2c29a8b9c468f 100644 (file)
@@ -47,3 +47,9 @@
    .. automethod:: IOLoop.set_blocking_signal_threshold
    .. automethod:: IOLoop.set_blocking_log_threshold
    .. automethod:: IOLoop.log_stack
+
+   Methods for subclasses
+   ^^^^^^^^^^^^^^^^^^^^^^
+
+   .. automethod:: IOLoop.close_fd
+   .. automethod:: IOLoop.split_fd
index a4d12a703ebdcc6caea02f95d1aaeafe3234a0bb..00e7b740392ea5a68ef6c468f48559ce027317ba 100644 (file)
@@ -4,6 +4,7 @@ Release notes
 .. toctree::
    :maxdepth: 2
 
+   releases/next
    releases/v3.2.0
    releases/v3.1.1
    releases/v3.1.0
diff --git a/docs/releases/next.rst b/docs/releases/next.rst
new file mode 100644 (file)
index 0000000..0a6d552
--- /dev/null
@@ -0,0 +1,24 @@
+What's new in the next version of Tornado
+=========================================
+
+In progress
+-----------
+
+Backwards-compatibility notes
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+* Authors of alternative `.IOLoop` implementations should see the changes
+  to `.IOLoop.add_handler` in this release.
+
+`tornado.ioloop`
+~~~~~~~~~~~~~~~~
+
+* `.IOLoop.add_handler` and related methods now accept file-like objects
+  in addition to raw file descriptors.  Passing the objects is recommended
+  (when possible) to avoid a garbage-collection-related problem in unit tests.
+
+`tornado.websocket`
+~~~~~~~~~~~~~~~~~~~
+
+* The C speedup module now builds correctly with MSVC, and can support
+  messages larger than 2GB on 64-bit systems.
index 184866146a2a289f149fb3c2d507b3e99f245661..da3d789eee98f6e0824db092f21529b66448d874 100644 (file)
@@ -244,21 +244,40 @@ class IOLoop(Configurable):
         raise NotImplementedError()
 
     def add_handler(self, fd, handler, events):
-        """Registers the given handler to receive the given events for fd.
+        """Registers the given handler to receive the given events for ``fd``.
+
+        The ``fd`` argument may either be an integer file descriptor or
+        a file-like object with a ``fileno()`` method (and optionally a
+        ``close()`` method, which may be called when the `IOLoop` is shut
+        down).
 
         The ``events`` argument is a bitwise or of the constants
         ``IOLoop.READ``, ``IOLoop.WRITE``, and ``IOLoop.ERROR``.
 
         When an event occurs, ``handler(fd, events)`` will be run.
+
+        .. versionchanged:: 3.3
+           Added the ability to pass file-like objects in addition to
+           raw file descriptors.
         """
         raise NotImplementedError()
 
     def update_handler(self, fd, events):
-        """Changes the events we listen for fd."""
+        """Changes the events we listen for ``fd``.
+
+        .. versionchanged:: 3.3
+           Added the ability to pass file-like objects in addition to
+           raw file descriptors.
+        """
         raise NotImplementedError()
 
     def remove_handler(self, fd):
-        """Stop listening for events on fd."""
+        """Stop listening for events on ``fd``.
+
+        .. versionchanged:: 3.3
+           Added the ability to pass file-like objects in addition to
+           raw file descriptors.
+        """
         raise NotImplementedError()
 
     def set_blocking_signal_threshold(self, seconds, action):
@@ -503,6 +522,8 @@ class IOLoop(Configurable):
 
         This method is provided for use by `IOLoop` subclasses and should
         not generally be used by application code.
+
+        .. versionadded:: 3.3
         """
         try:
             return fd.fileno(), fd
@@ -513,11 +534,13 @@ class IOLoop(Configurable):
         """Utility method to close an ``fd``.
 
         If ``fd`` is a file-like object, we close it directly; otherwise
-        we use `os.close()`.
+        we use `os.close`.
 
         This method is provided for use by `IOLoop` subclasses (in
         implementations of ``IOLoop.close(all_fds=True)`` and should
         not generally be used by application code.
+
+        .. versionadded:: 3.3
         """
         try:
             try: