Debian Codegraph @

docs/news.rst

raw
1 What's New
2 ==========
3
4 2.1.0
5 ^^^^^
6
7 * Various internal modernizations and maintenance.
8 * Dropped Python 3.6 and 3.7 support.
9
10 2.0.0
11 ^^^^^
12
13 New features:
14
15 * It's possible to decorate ``async/await`` Twisted functions with ``@wait_for`` and ``@run_in_reactor``, thanks to Árni Már Jónsson.
16 * Added type hints, thanks to Merlin Davis.
17 * Added formal support for Python 3.9.
18
19
20 Removed features:
21
22 * Dropped the deprecated APIs ``@wait_for_reactor``, ``@in_reactor``, ``DeferredResult``, the ``wrapped_function`` attribute, and unlimited timeouts on ``EventualResult.wait()``.
23 * Dropped support for Python 2.7 and 3.5.
24
25 1.12.0
26 ^^^^^^
27
28 Bug fixes:
29
30 * Fix a timeout overflow bug in 32-bit machines.
31
32
33 1.11.0
34 ^^^^^^
35
36 New features:
37
38 * Added support for Python 3.8 and PyPy 3.
39
40 Backwards incompatibility:
41
42 * Dropped support for Python 3.4, since latest Twisted doesn't support it.
43
44 1.10.0
45 ^^^^^^
46
47 New features:
48
49 * Added support for Python 3.7. Thanks to Jeremy Cline for the patch.
50
51 1.9.0
52 ^^^^^
53
54 New features:
55
56 * The underlying callable wrapped ``@run_in_reactor`` and ``@wait_for`` is now available via the more standard ``__wrapped__`` attribute.
57
58 Backwards incompatibility (in tests):
59
60 * This was actually introduced in 1.8.0: ``wrapped_function`` may not always be available on decorated callables.
61 You should use ``__wrapped__`` instead.
62
63 Bug fixes:
64
65 * Fixed regression in 1.8.0 where bound method couldn't be wrapped.
66 Thanks to 2mf for the bug report.
67
68 1.8.0
69 ^^^^^
70
71 New features:
72
73 * Signatures on decorated functions now match the original functions.
74 Thanks to Mikhail Terekhov for the original patch.
75 * Documentation improvements, including an API reference.
76
77 Bug fixes:
78
79 * Switched to EPoll reactor for logging thread.
80 Anecdotal evidence suggests this fixes some issues on AWS Lambda, but it's not clear why.
81 Thanks to Rolando Espinoza for the patch.
82 * It's now possible to call ``@run_in_reactor`` and ``@wait_for`` above a ``@classmethod``.
83 Thanks to vak for the bug report.
84
85 1.7.0
86 ^^^^^
87
88 Bug fixes:
89
90 * If the Python ``logging.Handler`` throws an exception Crochet no longer goes into a death spiral.
91 Thanks to Michael Schlenker for the bug report.
92
93 Removed features:
94
95 * Versions of Twisted < 16.0 are no longer supported (i.e. no longer tested in CI.)
96
97 1.6.0
98 ^^^^^
99
100 New features:
101
102 * Added support for Python 3.6.
103
104 1.5.0
105 ^^^^^
106
107 New features:
108
109 * Added support for Python 3.5.
110
111 Removed features:
112
113 * Python 2.6, Python 3.3, and versions of Twisted < 15.0 are no longer supported.
114
115 1.4.0
116 ^^^^^
117
118 New features:
119
120 * Added support for Python 3.4.
121
122 Documentation:
123
124 * Added a section on known issues and workarounds.
125
126 Bug fixes:
127
128 * Main thread detection (used to determine when Crochet should shutdown) is now less fragile.
129 This means Crochet now supports more environments, e.g. uWSGI.
130 Thanks to Ben Picolo for the patch.
131
132 1.3.0
133 ^^^^^
134
135 Bug fixes:
136
137 * It is now possible to call ``EventualResult.wait()`` (or functions
138 wrapped in ``wait_for``) at import time if another thread holds the
139 import lock. Thanks to Ken Struys for the patch.
140
141 1.2.0
142 ^^^^^
143 New features:
144
145 * ``crochet.wait_for`` implements the timeout/cancellation pattern documented
146 in previous versions of Crochet. ``crochet.wait_for_reactor`` and
147 ``EventualResult.wait(timeout=None)`` are now deprecated, since lacking
148 timeouts they could potentially block forever.
149 * Functions wrapped with ``wait_for`` and ``run_in_reactor`` can now be accessed
150 via the ``wrapped_function`` attribute, to ease unit testing of the underlying
151 Twisted code.
152
153 API changes:
154
155 * It is no longer possible to call ``EventualResult.wait()`` (or functions
156 wrapped with ``wait_for``) at import time, since this can lead to deadlocks
157 or prevent other threads from importing. Thanks to Tom Prince for the bug
158 report.
159
160 Bug fixes:
161
162 * ``warnings`` are no longer erroneously turned into Twisted log messages.
163 * The reactor is now only imported when ``crochet.setup()`` or
164 ``crochet.no_setup()`` are called, allowing daemonization if only ``crochet``
165 is imported (http://tm.tl/7105). Thanks to Daniel Nephin for the bug report.
166
167 Documentation:
168
169 * Improved motivation, added contact info and news to the documentation.
170 * Better example of using Crochet from a normal Twisted application.
171
172 1.1.0
173 ^^^^^
174 Bug fixes:
175
176 * ``EventualResult.wait()`` can now be used safely from multiple threads,
177 thanks to Gavin Panella for reporting the bug.
178 * Fixed reentrancy deadlock in the logging code caused by
179 http://bugs.python.org/issue14976, thanks to Rod Morehead for reporting the
180 bug.
181 * Crochet now installs on Python 3.3 again, thanks to Ben Cordero.
182 * Crochet should now work on Windows, thanks to Konstantinos Koukopoulos.
183 * Crochet tests can now run without adding its absolute path to PYTHONPATH or
184 installing it first.
185
186 Documentation:
187
188 * ``EventualResult.original_failure`` is now documented.
189
190 1.0.0
191 ^^^^^
192 Documentation:
193
194 * Added section on use cases and alternatives. Thanks to Tobias Oberstein for
195 the suggestion.
196
197 Bug fixes:
198
199 * Twisted does not have to be pre-installed to run ``setup.py``, thanks to
200 Paul Weaver for bug report and Chris Scutcher for patch.
201 * Importing Crochet does not have side-effects (installing reactor event)
202 any more.
203 * Blocking calls are interrupted earlier in the shutdown process, to reduce
204 scope for deadlocks. Thanks to rmorehead for bug report.
205
206 0.9.0
207 ^^^^^
208 New features:
209
210 * Expanded and much improved documentation, including a new section with
211 design suggestions.
212 * New decorator ``@wait_for_reactor`` added, a simpler alternative to
213 ``@run_in_reactor``.
214 * Refactored ``@run_in_reactor``, making it a bit more responsive.
215 * Blocking operations which would otherwise never finish due to reactor having
216 stopped (``EventualResult.wait()`` or ``@wait_for_reactor`` decorated call)
217 will be interrupted with a ``ReactorStopped`` exception. Thanks to rmorehead
218 for the bug report.
219
220 Bug fixes:
221
222 * ``@run_in_reactor`` decorated functions (or rather, their generated wrapper)
223 are interrupted by Ctrl-C.
224 * On POSIX platforms, a workaround is installed to ensure processes started by
225 `reactor.spawnProcess` have their exit noticed. See `Twisted ticket 6378`_
226 for more details about the underlying issue.
227
228 .. _Twisted ticket 6378: http://tm.tl/6738
229
230 0.8.1
231 ^^^^^
232 * ``EventualResult.wait()`` now raises error if called in the reactor thread,
233 thanks to David Buchmann.
234 * Unittests are now included in the release tarball.
235 * Allow Ctrl-C to interrupt ``EventualResult.wait(timeout=None)``.
236
237 0.7.0
238 ^^^^^
239 * Improved documentation.
240
241 0.6.0
242 ^^^^^
243 * Renamed ``DeferredResult`` to ``EventualResult``, to reduce confusion with
244 Twisted's ``Deferred`` class. The old name still works, but is deprecated.
245 * Deprecated ``@in_reactor``, replaced with ``@run_in_reactor`` which doesn't
246 change the arguments to the wrapped function. The deprecated API still works,
247 however.
248 * Unhandled exceptions in ``EventualResult`` objects are logged.
249 * Added more examples.
250 * ``setup.py sdist`` should work now.
251
252 0.5.0
253 ^^^^^
254 * Initial release.