p(b=7)
self.assertEqual(d, {'a':3})
+ def test_kwargs_copy(self):
+ # Issue #29532: Altering a kwarg dictionary passed to a constructor
+ # should not affect a partial object after creation
+ d = {'a': 3}
+ p = self.partial(capture, **d)
+ self.assertEqual(p(), ((), {'a': 3}))
+ d['a'] = 5
+ self.assertEqual(p(), ((), {'a': 3}))
+
def test_arg_combinations(self):
# exercise special code paths for zero args in either partial
# object or the caller
Library
-------
+- bpo-29532: Altering a kwarg dictionary passed to functools.partial()
+ no longer affects a partial object after creation.
+
+- bpo-22807: Add uuid.SafeUUID and uuid.UUID.is_safe to relay information from
+ the platform about whether generated UUIDs are generated with a
+ multiprocessing safe method.
+
+- bpo-29576: Improve some deprecations in importlib. Some deprecated methods
+ now emit DeprecationWarnings and have better descriptive messages.
+
+- bpo-29534: Fixed different behaviour of Decimal.from_float()
+ for _decimal and _pydecimal. Thanks Andrew Nester.
+
- Issue #28556: Various updates to typing module: typing.Counter, typing.ChainMap,
improved ABC caching, etc. Original PRs by Jelle Zijlstra, Ivan Levkivskyi,
Manuel Krebber, and Ćukasz Langa.