Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 3dc23d4

Browse files
committed
Merge: whatsnew updates for smtplib and collections.Counter.
2 parents 5bab078 + a21e515 commit 3dc23d4

2 files changed

Lines changed: 16 additions & 9 deletions

File tree

Doc/whatsnew/3.3.rst

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1005,20 +1005,20 @@ collections
10051005
-----------
10061006

10071007
Addition of a new :class:`~collections.ChainMap` class to allow treating a
1008-
number of mappings as a single unit.
1009-
1010-
(Written by Raymond Hettinger for :issue:`11089`, made public in
1011-
:issue:`11297`)
1008+
number of mappings as a single unit. (Written by Raymond Hettinger for
1009+
:issue:`11089`, made public in :issue:`11297`)
10121010

10131011
The abstract base classes have been moved in a new :mod:`collections.abc`
10141012
module, to better differentiate between the abstract and the concrete
10151013
collections classes. Aliases for ABCs are still present in the
1016-
:mod:`collections` module to preserve existing imports.
1017-
1018-
(:issue:`11085`)
1014+
:mod:`collections` module to preserve existing imports. (:issue:`11085`)
10191015

10201016
.. XXX addition of __slots__ to ABCs not recorded here: internal detail
10211017
1018+
The :class:`~collections.Counter` class now supports the unary ``+`` and ``-``
1019+
operators, as well as the in-place operators ``+=``, ``-=``, ``|=``, and
1020+
``&=``. (Contributed by Raymond Hettinger in :issue:`13121`.)
1021+
10221022

10231023
contextlib
10241024
----------
@@ -1806,6 +1806,12 @@ Orrù and Dan Boswell. :issue:`8739`)
18061806
smtplib
18071807
-------
18081808

1809+
The :class:`~smtplib.SMTP`, :class:`~smtplib.SMTP_SSL`, and
1810+
:class:`~smtplib.LMTP` classes now accept a ``source_address`` keyword argument
1811+
to specify the ``(host, port)`` to use as the source address in the bind call
1812+
when creating the outgoing socket. (Contributed by Paulo Scardine in
1813+
:issue:`11281`.)
1814+
18091815
:class:`~smtplib.SMTP` now supports the context manager protocol, allowing an
18101816
``SMTP`` instance to be used in a ``with`` statement. (Contributed
18111817
by Giampaolo Rodolà in :issue:`11289`.)

Misc/HISTORY

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2881,8 +2881,9 @@ Library
28812881
- Issue #12540: Prevent zombie IDLE processes on Windows due to changes
28822882
in os.kill().
28832883

2884-
- Add support for unary plus and unary minus to collections.Counter().
2885-
Issue #13121: Also add support for inplace math operators.
2884+
- Issue #13121: add support for inplace math operators to collections.Counter.
2885+
2886+
- Add support for unary plus and unary minus to collections.Counter.
28862887

28872888
- Issue #12683: urlparse updated to include svn as schemes that uses relative
28882889
paths. (svn from 1.5 onwards support relative path).

0 commit comments

Comments
 (0)