[issue27269] ipaddress: Wrong behavior with ::ffff:1.2.3.4 style IPs

2017-05-22 Thread Alex Perry

Changes by Alex Perry :


--
pull_requests: +1831

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27269] ipaddress: Wrong behavior with ::ffff:1.2.3.4 style IPs

2017-05-22 Thread Alex Perry

Alex Perry added the comment:

https://github.com/python/cpython/commit/5cc274262a99e5633177fc540261abbbecbbc51c

... seems to implement the principle in this bug, but I'm not convinced this is 
a good idea.

--
nosy: +arp11

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27269] ipaddress: Wrong behavior with ::ffff:1.2.3.4 style IPs

2016-07-08 Thread Марк Коренберг

Марк Коренберг added the comment:

Also, it should be marked explicitly, if cross-type lookup is safe. I mean code 
like that:

some_net = ipaddress.ip_network(some_input1)
some_addr = ipaddress.ip_address(some_input2)
return some_addr in some_net

Is it safe to write such code? Docs say:

21.28.2.3. Operators
Address objects support some operators. Unless stated otherwise,
operators can only be applied between compatible objects
(i.e. IPv4 with IPv4, IPv6 with IPv6).

1. It is not said if exception will be raised if incompatible objects are used, 
and not said if result is defined.
2. "Unless stated otherwise" - Seem it is stated nowhere.

--
assignee:  -> docs@python
components: +Documentation
nosy: +docs@python

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27269] ipaddress: Wrong behavior with ::ffff:1.2.3.4 style IPs

2016-07-08 Thread Марк Коренберг

Марк Коренберг added the comment:

see also issue20446

--
nosy: +mmarkk

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27269] ipaddress: Wrong behavior with ::ffff:1.2.3.4 style IPs

2016-06-08 Thread SilentGhost

Changes by SilentGhost :


--
nosy: +pmoody
versions:  -Python 3.3, Python 3.4

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27269] ipaddress: Wrong behavior with ::ffff:1.2.3.4 style IPs

2016-06-08 Thread ThiefMaster

New submission from ThiefMaster:

I'd expect the IPv4 address to be considered part of that network (or actually 
parsed as an IPv4Address and not IPv6Address) even if it's written in IPv6 
notation. It's an IPv4 after all.

Python 3.5.1 (default, Jun  7 2016, 09:20:44)
[GCC 4.9.3] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import ipaddress
>>> ipaddress.ip_address(':::127.0.0.1')
IPv6Address(':::7f00:1')
>>> ipaddress.ip_address(':::127.0.0.1') in 
>>> ipaddress.ip_network('127.0.0.0/8')
False
>>> ipaddress.ip_address('127.0.0.1') in ipaddress.ip_network('127.0.0.0/8')
True

--
components: Library (Lib)
messages: 267861
nosy: ThiefMaster
priority: normal
severity: normal
status: open
title: ipaddress: Wrong behavior with :::1.2.3.4 style IPs
type: behavior
versions: Python 3.3, Python 3.4, Python 3.5, Python 3.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com