summaryrefslogtreecommitdiffstats
path: root/Doc/whatsnew/3.9.rst
diff options
context:
space:
mode:
Diffstat (limited to 'Doc/whatsnew/3.9.rst')
-rw-r--r--Doc/whatsnew/3.9.rst12
1 files changed, 12 insertions, 0 deletions
diff --git a/Doc/whatsnew/3.9.rst b/Doc/whatsnew/3.9.rst
index 9a7f2cd..772fb5a 100644
--- a/Doc/whatsnew/3.9.rst
+++ b/Doc/whatsnew/3.9.rst
@@ -537,6 +537,10 @@ Scoped IPv6 addresses can be parsed using :class:`ipaddress.IPv6Address`.
If present, scope zone ID is available through the :attr:`~ipaddress.IPv6Address.scope_id` attribute.
(Contributed by Oleksandr Pavliuk in :issue:`34788`.)
+Starting with Python 3.9.5 the :mod:`ipaddress` module no longer
+accepts any leading zeros in IPv4 address strings.
+(Contributed by Christian Heimes in :issue:`36384`).
+
math
----
@@ -1114,6 +1118,14 @@ Changes in the Python API
compatible classes that don't inherit from those mentioned types.
(Contributed by Roger Aiudi in :issue:`34775`).
+* Starting with Python 3.9.5 the :mod:`ipaddress` module no longer
+ accepts any leading zeros in IPv4 address strings. Leading zeros are
+ ambiguous and interpreted as octal notation by some libraries. For example
+ the legacy function :func:`socket.inet_aton` treats leading zeros as octal
+ notatation. glibc implementation of modern :func:`~socket.inet_pton` does
+ not accept any leading zeros.
+ (Contributed by Christian Heimes in :issue:`36384`).
+
* :func:`codecs.lookup` now normalizes the encoding name the same way as
:func:`encodings.normalize_encoding`, except that :func:`codecs.lookup` also
converts the name to lower case. For example, ``"latex+latin1"`` encoding