Skip to content

Commit 3a70a8c

Browse files
committed
Update historical issue references to be bpo- prefixed
1 parent 85a196e commit 3a70a8c

File tree

1 file changed

+87
-87
lines changed

1 file changed

+87
-87
lines changed

CHANGELOG.rst

+87-87
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
11
4.0.3
22
-----
33

4-
- Issue #42532: Remove unexpected call of ``__bool__`` when passing a
4+
- bpo-42532: Remove unexpected call of ``__bool__`` when passing a
55
``spec_arg`` argument to a Mock.
66

7-
- Issue #39966: Revert bpo-25597. :class:`unittest.mock.MagicMock` with
7+
- bpo-39966: Revert bpo-25597. :class:`unittest.mock.MagicMock` with
88
wraps' set uses default return values for magic methods.
99

10-
- Issue #41877: Mock objects which are not unsafe will now raise an
10+
- bpo-41877: Mock objects which are not unsafe will now raise an
1111
AttributeError if an attribute with the prefix asert, aseert, or assrt is
1212
accessed, in addition to this already happening for the prefixes assert or
1313
assret.
1414

15-
- Issue #40126: Fixed reverting multiple patches in unittest.mock. Patcher's
15+
- bpo-40126: Fixed reverting multiple patches in unittest.mock. Patcher's
1616
``__exit__()`` is now never called if its ``__enter__()`` is failed.
1717
Returning true from ``__exit__()`` silences now the exception.
1818

1919
4.0.2
2020
-----
2121

22-
- Issue #39915: Ensure :attr:`unittest.mock.AsyncMock.await_args_list` has
22+
- bpo-39915: Ensure :attr:`unittest.mock.AsyncMock.await_args_list` has
2323
call objects in the order of awaited arguments instead of using
2424
:attr:`unittest.mock.Mock.call_args` which has the last value of the call.
2525
Patch by Karthikeyan Singaravelan.
@@ -43,106 +43,106 @@
4343

4444
__ https://github.com/python/cpython/commit/4a686504eb2bbf69adf78077458508a7ba131667
4545

46-
- Issue #37972: Subscripts to the `unittest.mock.call` objects now receive
46+
- bpo-37972: Subscripts to the `unittest.mock.call` objects now receive
4747
the same chaining mechanism as any other custom attributes, so that the
4848
following usage no longer raises a `TypeError`:
4949

5050
call().foo().__getitem__('bar')
5151

5252
Patch by blhsing
5353

54-
- Issue #38839: Fix some unused functions in tests. Patch by Adam Johnson.
54+
- bpo-38839: Fix some unused functions in tests. Patch by Adam Johnson.
5555

56-
- Issue #39485: Fix a bug in :func:`unittest.mock.create_autospec` that
56+
- bpo-39485: Fix a bug in :func:`unittest.mock.create_autospec` that
5757
would complain about the wrong number of arguments for custom descriptors
5858
defined in an extension module returning functions.
5959

60-
- Issue #39082: Allow AsyncMock to correctly patch static/class methods
60+
- bpo-39082: Allow AsyncMock to correctly patch static/class methods
6161

62-
- Issue #38093: Fixes AsyncMock so it doesn't crash when used with
62+
- bpo-38093: Fixes AsyncMock so it doesn't crash when used with
6363
AsyncContextManagers or AsyncIterators.
6464

65-
- Issue #38859: AsyncMock now returns StopAsyncIteration on the exaustion of
65+
- bpo-38859: AsyncMock now returns StopAsyncIteration on the exaustion of
6666
a side_effects iterable. Since PEP-479 its Impossible to raise a
6767
StopIteration exception from a coroutine.
6868

69-
- Issue #38163: Child mocks will now detect their type as either synchronous
69+
- bpo-38163: Child mocks will now detect their type as either synchronous
7070
or asynchronous, asynchronous child mocks will be AsyncMocks and
7171
synchronous child mocks will be either MagicMock or Mock (depending on
7272
their parent type).
7373

74-
- Issue #38473: Use signature from inner mock for autospecced methods
74+
- bpo-38473: Use signature from inner mock for autospecced methods
7575
attached with :func:`unittest.mock.attach_mock`. Patch by Karthikeyan
7676
Singaravelan.
7777

78-
- Issue #38136: Changes AsyncMock call count and await count to be two
78+
- bpo-38136: Changes AsyncMock call count and await count to be two
7979
different counters. Now await count only counts when a coroutine has been
8080
awaited, not when it has been called, and vice-versa. Update the
8181
documentation around this.
8282

83-
- Issue #37555: Fix `NonCallableMock._call_matcher` returning tuple instead
83+
- bpo-37555: Fix `NonCallableMock._call_matcher` returning tuple instead
8484
of `_Call` object when `self._spec_signature` exists. Patch by Elizabeth
8585
Uselton
8686

87-
- Issue #37251: Remove `__code__` check in AsyncMock that incorrectly
87+
- bpo-37251: Remove `__code__` check in AsyncMock that incorrectly
8888
evaluated function specs as async objects but failed to evaluate classes
8989
with `__await__` but no `__code__` attribute defined as async objects.
9090

91-
- Issue #38669: Raise :exc:`TypeError` when passing target as a string with
91+
- bpo-38669: Raise :exc:`TypeError` when passing target as a string with
9292
:meth:`unittest.mock.patch.object`.
9393

94-
- Issue #25597: Ensure, if ``wraps`` is supplied to
94+
- bpo-25597: Ensure, if ``wraps`` is supplied to
9595
:class:`unittest.mock.MagicMock`, it is used to calculate return values
9696
for the magic methods instead of using the default return values. Patch by
9797
Karthikeyan Singaravelan.
9898

99-
- Issue #38108: Any synchronous magic methods on an AsyncMock now return a
99+
- bpo-38108: Any synchronous magic methods on an AsyncMock now return a
100100
MagicMock. Any asynchronous magic methods on a MagicMock now return an
101101
AsyncMock.
102102

103-
- Issue #21478: Record calls to parent when autospecced object is attached
103+
- bpo-21478: Record calls to parent when autospecced object is attached
104104
to a mock using :func:`unittest.mock.attach_mock`. Patch by Karthikeyan
105105
Singaravelan.
106106

107-
- Issue #38857: AsyncMock fix for return values that are awaitable types.
107+
- bpo-38857: AsyncMock fix for return values that are awaitable types.
108108
This also covers side_effect iterable values that happend to be awaitable,
109109
and wraps callables that return an awaitable type. Before these awaitables
110110
were being awaited instead of being returned as is.
111111

112-
- Issue #38932: Mock fully resets child objects on reset_mock(). Patch by
112+
- bpo-38932: Mock fully resets child objects on reset_mock(). Patch by
113113
Vegard Stikbakke
114114

115-
- Issue #37685: Fixed ``__eq__``, ``__lt__`` etc implementations in some
115+
- bpo-37685: Fixed ``__eq__``, ``__lt__`` etc implementations in some
116116
classes. They now return :data:`NotImplemented` for unsupported type of
117117
the other operand. This allows the other operand to play role (for example
118118
the equality comparison with :data:`~unittest.mock.ANY` will return
119119
``True``).
120120

121-
- Issue #37212: :func:`unittest.mock.call` now preserves the order of
121+
- bpo-37212: :func:`unittest.mock.call` now preserves the order of
122122
keyword arguments in repr output. Patch by Karthikeyan Singaravelan.
123123

124-
- Issue #37828: Fix default mock name in
124+
- bpo-37828: Fix default mock name in
125125
:meth:`unittest.mock.Mock.assert_called` exceptions. Patch by Abraham
126126
Toriz Cruz.
127127

128-
- Issue #36871: Improve error handling for the assert_has_calls and
128+
- bpo-36871: Improve error handling for the assert_has_calls and
129129
assert_has_awaits methods of mocks. Fixed a bug where any errors
130130
encountered while binding the expected calls to the mock's spec were
131131
silently swallowed, leading to misleading error output.
132132

133-
- Issue #21600: Fix :func:`mock.patch.stopall` to stop active patches that
133+
- bpo-21600: Fix :func:`mock.patch.stopall` to stop active patches that
134134
were created with :func:`mock.patch.dict`.
135135

136-
- Issue #38161: Removes _AwaitEvent from AsyncMock.
136+
- bpo-38161: Removes _AwaitEvent from AsyncMock.
137137

138-
- Issue #36871: Ensure method signature is used instead of constructor
138+
- bpo-36871: Ensure method signature is used instead of constructor
139139
signature of a class while asserting mock object against method calls.
140140
Patch by Karthikeyan Singaravelan.
141141

142142
3.0.5
143143
-----
144144

145-
- Issue #31855: :func:`unittest.mock.mock_open` results now respects the
145+
- bpo-31855: :func:`unittest.mock.mock_open` results now respects the
146146
argument of read([size]). Patch contributed by Rémi Lapeyre.
147147

148148
3.0.4
@@ -169,179 +169,179 @@
169169
3.0.0
170170
-----
171171

172-
- Issue #35226: Recursively check arguments when testing for equality of
172+
- bpo-35226: Recursively check arguments when testing for equality of
173173
:class:`unittest.mock.call` objects and add note that tracking of
174174
parameters used to create ancestors of mocks in ``mock_calls`` is not
175175
possible.
176176

177-
- Issue #31177: Fix bug that prevented using :meth:`reset_mock
177+
- bpo-31177: Fix bug that prevented using :meth:`reset_mock
178178
<unittest.mock.Mock.reset_mock>` on mock instances with deleted attributes
179179

180-
- Issue #26704: Added test demonstrating double-patching of an instance
180+
- bpo-26704: Added test demonstrating double-patching of an instance
181181
method. Patch by Anthony Sottile.
182182

183-
- Issue #35500: Write expected and actual call parameters on separate lines
183+
- bpo-35500: Write expected and actual call parameters on separate lines
184184
in :meth:`unittest.mock.Mock.assert_called_with` assertion errors.
185185
Contributed by Susan Su.
186186

187-
- Issue #35330: When a :class:`Mock` instance was used to wrap an object, if
187+
- bpo-35330: When a :class:`Mock` instance was used to wrap an object, if
188188
`side_effect` is used in one of the mocks of it methods, don't call the
189189
original implementation and return the result of using the side effect the
190190
same way that it is done with return_value.
191191

192-
- Issue #30541: Add new function to seal a mock and prevent the
192+
- bpo-30541: Add new function to seal a mock and prevent the
193193
automatically creation of child mocks. Patch by Mario Corchero.
194194

195-
- Issue #35022: :class:`unittest.mock.MagicMock` now supports the
195+
- bpo-35022: :class:`unittest.mock.MagicMock` now supports the
196196
``__fspath__`` method (from :class:`os.PathLike`).
197197

198-
- Issue #33516: :class:`unittest.mock.MagicMock` now supports the
198+
- bpo-33516: :class:`unittest.mock.MagicMock` now supports the
199199
``__round__`` magic method.
200200

201-
- Issue #35512: :func:`unittest.mock.patch.dict` used as a decorator with
201+
- bpo-35512: :func:`unittest.mock.patch.dict` used as a decorator with
202202
string target resolves the target during function call instead of during
203203
decorator construction. Patch by Karthikeyan Singaravelan.
204204

205-
- Issue #36366: Calling ``stop()`` on an unstarted or stopped
205+
- bpo-36366: Calling ``stop()`` on an unstarted or stopped
206206
:func:`unittest.mock.patch` object will now return `None` instead of
207207
raising :exc:`RuntimeError`, making the method idempotent. Patch
208208
byKarthikeyan Singaravelan.
209209

210-
- Issue #35357: Internal attributes' names of unittest.mock._Call and
210+
- bpo-35357: Internal attributes' names of unittest.mock._Call and
211211
unittest.mock.MagicProxy (name, parent & from_kall) are now prefixed with
212212
_mock_ in order to prevent clashes with widely used object attributes.
213213
Fixed minor typo in test function name.
214214

215-
- Issue #20239: Allow repeated assignment deletion of
215+
- bpo-20239: Allow repeated assignment deletion of
216216
:class:`unittest.mock.Mock` attributes. Patch by Pablo Galindo.
217217

218-
- Issue #35082: Don't return deleted attributes when calling dir on a
218+
- bpo-35082: Don't return deleted attributes when calling dir on a
219219
:class:`unittest.mock.Mock`.
220220

221-
- Issue #0: Improved an error message when mock assert_has_calls fails.
221+
- bpo-0: Improved an error message when mock assert_has_calls fails.
222222

223-
- Issue #23078: Add support for :func:`classmethod` and :func:`staticmethod`
223+
- bpo-23078: Add support for :func:`classmethod` and :func:`staticmethod`
224224
to :func:`unittest.mock.create_autospec`. Initial patch by Felipe Ochoa.
225225

226-
- Issue #21478: Calls to a child function created with
226+
- bpo-21478: Calls to a child function created with
227227
:func:`unittest.mock.create_autospec` should propagate to the parent.
228228
Patch by Karthikeyan Singaravelan.
229229

230-
- Issue #36598: Fix ``isinstance`` check for Mock objects with spec when the
230+
- bpo-36598: Fix ``isinstance`` check for Mock objects with spec when the
231231
code is executed under tracing. Patch by Karthikeyan Singaravelan.
232232

233-
- Issue #32933: :func:`unittest.mock.mock_open` now supports iteration over
233+
- bpo-32933: :func:`unittest.mock.mock_open` now supports iteration over
234234
the file contents. Patch by Tony Flury.
235235

236-
- Issue #21269: Add ``args`` and ``kwargs`` properties to mock call objects.
236+
- bpo-21269: Add ``args`` and ``kwargs`` properties to mock call objects.
237237
Contributed by Kumar Akshay.
238238

239-
- Issue #17185: Set ``__signature__`` on mock for :mod:`inspect` to get
239+
- bpo-17185: Set ``__signature__`` on mock for :mod:`inspect` to get
240240
signature. Patch by Karthikeyan Singaravelan.
241241

242-
- Issue #35047: ``unittest.mock`` now includes mock calls in exception
242+
- bpo-35047: ``unittest.mock`` now includes mock calls in exception
243243
messages if ``assert_not_called``, ``assert_called_once``, or
244244
``assert_called_once_with`` fails. Patch by Petter Strandmark.
245245

246-
- Issue #28380: unittest.mock Mock autospec functions now properly support
246+
- bpo-28380: unittest.mock Mock autospec functions now properly support
247247
assert_called, assert_not_called, and assert_called_once.
248248

249-
- Issue #28735: Fixed the comparison of mock.MagickMock with mock.ANY.
249+
- bpo-28735: Fixed the comparison of mock.MagickMock with mock.ANY.
250250

251-
- Issue #20804: The unittest.mock.sentinel attributes now preserve their
251+
- bpo-20804: The unittest.mock.sentinel attributes now preserve their
252252
identity when they are copied or pickled.
253253

254-
- Issue #28961: Fix unittest.mock._Call helper: don't ignore the name parameter
254+
- bpo-28961: Fix unittest.mock._Call helper: don't ignore the name parameter
255255
anymore. Patch written by Jiajun Huang.
256256

257-
- Issue #26750: unittest.mock.create_autospec() now works properly for
257+
- bpo-26750: unittest.mock.create_autospec() now works properly for
258258
subclasses of property() and other data descriptors.
259259

260-
- Issue #21271: New keyword only parameters in reset_mock call.
260+
- bpo-21271: New keyword only parameters in reset_mock call.
261261

262-
- Issue #26807: mock_open 'files' no longer error on readline at end of file.
262+
- bpo-26807: mock_open 'files' no longer error on readline at end of file.
263263
Patch from Yolanda Robla.
264264

265-
- Issue #25195: Fix a regression in mock.MagicMock. _Call is a subclass of
265+
- bpo-25195: Fix a regression in mock.MagicMock. _Call is a subclass of
266266
tuple (changeset 3603bae63c13 only works for classes) so we need to
267267
implement __ne__ ourselves. Patch by Andrew Plummer.
268268

269269
2.0.0 and earlier
270270
-----------------
271271

272-
- Issue #26323: Add Mock.assert_called() and Mock.assert_called_once()
272+
- bpo-26323: Add Mock.assert_called() and Mock.assert_called_once()
273273
methods to unittest.mock. Patch written by Amit Saha.
274274

275-
- Issue #22138: Fix mock.patch behavior when patching descriptors. Restore
275+
- bpo-22138: Fix mock.patch behavior when patching descriptors. Restore
276276
original values after patching. Patch contributed by Sean McCully.
277277

278-
- Issue #24857: Comparing call_args to a long sequence now correctly returns a
278+
- bpo-24857: Comparing call_args to a long sequence now correctly returns a
279279
boolean result instead of raising an exception. Patch by A Kaptur.
280280

281-
- Issue #23004: mock_open() now reads binary data correctly when the type of
281+
- bpo-23004: mock_open() now reads binary data correctly when the type of
282282
read_data is bytes. Initial patch by Aaron Hill.
283283

284-
- Issue #21750: mock_open.read_data can now be read from each instance, as it
284+
- bpo-21750: mock_open.read_data can now be read from each instance, as it
285285
could in Python 3.3.
286286

287-
- Issue #18622: unittest.mock.mock_open().reset_mock would recurse infinitely.
287+
- bpo-18622: unittest.mock.mock_open().reset_mock would recurse infinitely.
288288
Patch from Nicola Palumbo and Laurent De Buyst.
289289

290-
- Issue #23661: unittest.mock side_effects can now be exceptions again. This
290+
- bpo-23661: unittest.mock side_effects can now be exceptions again. This
291291
was a regression vs Python 3.4. Patch from Ignacio Rossi
292292

293-
- Issue #23310: Fix MagicMock's initializer to work with __methods__, just
293+
- bpo-23310: Fix MagicMock's initializer to work with __methods__, just
294294
like configure_mock(). Patch by Kasia Jachim.
295295

296-
- Issue #23568: Add rdivmod support to MagicMock() objects.
296+
- bpo-23568: Add rdivmod support to MagicMock() objects.
297297
Patch by Håkan Lövdahl.
298298

299-
- Issue #23581: Add matmul support to MagicMock. Patch by Håkan Lövdahl.
299+
- bpo-23581: Add matmul support to MagicMock. Patch by Håkan Lövdahl.
300300

301-
- Issue #23326: Removed __ne__ implementations. Since fixing default __ne__
302-
implementation in issue #21408 they are redundant. *** NOT BACKPORTED ***
301+
- bpo-23326: Removed __ne__ implementations. Since fixing default __ne__
302+
implementation in bpo-21408 they are redundant. *** NOT BACKPORTED ***
303303

304-
- Issue #21270: We now override tuple methods in mock.call objects so that
304+
- bpo-21270: We now override tuple methods in mock.call objects so that
305305
they can be used as normal call attributes.
306306

307-
- Issue #21256: Printout of keyword args should be in deterministic order in
307+
- bpo-21256: Printout of keyword args should be in deterministic order in
308308
a mock function call. This will help to write better doctests.
309309

310-
- Issue #21262: New method assert_not_called for Mock.
310+
- bpo-21262: New method assert_not_called for Mock.
311311
It raises AssertionError if the mock has been called.
312312

313-
- Issue #21238: New keyword argument `unsafe` to Mock. It raises
313+
- bpo-21238: New keyword argument `unsafe` to Mock. It raises
314314
`AttributeError` incase of an attribute startswith assert or assret.
315315

316-
- Issue #21239: patch.stopall() didn't work deterministically when the same
316+
- bpo-21239: patch.stopall() didn't work deterministically when the same
317317
name was patched more than once.
318318

319-
- Issue #21222: Passing name keyword argument to mock.create_autospec now
319+
- bpo-21222: Passing name keyword argument to mock.create_autospec now
320320
works.
321321

322-
- Issue #17826: setting an iterable side_effect on a mock function created by
322+
- bpo-17826: setting an iterable side_effect on a mock function created by
323323
create_autospec now works. Patch by Kushal Das.
324324

325-
- Issue #17826: setting an iterable side_effect on a mock function created by
325+
- bpo-17826: setting an iterable side_effect on a mock function created by
326326
create_autospec now works. Patch by Kushal Das.
327327

328-
- Issue #20968: unittest.mock.MagicMock now supports division.
328+
- bpo-20968: unittest.mock.MagicMock now supports division.
329329
Patch by Johannes Baiter.
330330

331-
- Issue #20189: unittest.mock now no longer assumes that any object for
331+
- bpo-20189: unittest.mock now no longer assumes that any object for
332332
which it could get an inspect.Signature is a callable written in Python.
333333
Fix courtesy of Michael Foord.
334334

335-
- Issue #17467: add readline and readlines support to mock_open in
335+
- bpo-17467: add readline and readlines support to mock_open in
336336
unittest.mock.
337337

338-
- Issue #17015: When it has a spec, a Mock object now inspects its signature
338+
- bpo-17015: When it has a spec, a Mock object now inspects its signature
339339
when matching calls, so that arguments can be matched positionally or
340340
by name.
341341

342-
- Issue #15323: improve failure message of Mock.assert_called_once_with
342+
- bpo-15323: improve failure message of Mock.assert_called_once_with
343343

344-
- Issue #14857: fix regression in references to PEP 3135 implicit __class__
345-
closure variable (Reopens issue #12370)
344+
- bpo-14857: fix regression in references to PEP 3135 implicit __class__
345+
closure variable (Reopens bpo-12370)
346346

347-
- Issue #14295: Add unittest.mock
347+
- bpo-14295: Add unittest.mock

0 commit comments

Comments
 (0)