[issue14758] SMTPServer of smptd does not support binding to an IPv6 address

2014-06-11 Thread R. David Murray

R. David Murray added the comment:

Thanks, Milan.  I had to fix a couple things: you had left the refactored 
methods on the SMTPDServerTest, and somehow your new TestFamilyDetection class 
got indented under SMTPDServerTest in the new version of the patch.  (I also 
had to update it to compensate for the decode_data patch, which copy-and-pasted 
the DummyServer calling bugs you fixed in the other tests...)

--
resolution:  - fixed
stage: patch review - resolved
status: open - closed

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



[issue14758] SMTPServer of smptd does not support binding to an IPv6 address

2014-06-11 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 1efbc86a200a by R David Murray in branch 'default':
#14758: add IPv6 support to smtpd.
http://hg.python.org/cpython/rev/1efbc86a200a

--
nosy: +python-dev

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



[issue14758] SMTPServer of smptd does not support binding to an IPv6 address

2014-06-11 Thread R. David Murray

R. David Murray added the comment:

Hmm.  Looks like the IPv6 support is making the FreeBSD and and OSX buildbots 
unhappy :(.

--
status: closed - open

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



[issue14758] SMTPServer of smptd does not support binding to an IPv6 address

2014-06-11 Thread Roundup Robot

Roundup Robot added the comment:

New changeset d8e0fca7cbe3 by R David Murray in branch 'default':
#14758: Need to specify the desired socket type in the getaddrinfo call.
http://hg.python.org/cpython/rev/d8e0fca7cbe3

--

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



[issue14758] SMTPServer of smptd does not support binding to an IPv6 address

2014-06-11 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 9b0d58b0c712 by R David Murray in branch 'default':
#14758: Fix the fix (fix getaddrinfo in mock_socket)
http://hg.python.org/cpython/rev/9b0d58b0c712

--

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



[issue14758] SMTPServer of smptd does not support binding to an IPv6 address

2014-06-11 Thread R. David Murray

R. David Murray added the comment:

OK, I think this is fixed.

--
status: open - closed

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



[issue14758] SMTPServer of smptd does not support binding to an IPv6 address

2014-06-10 Thread Milan Oberkirch

Milan Oberkirch added the comment:

Fixed it.

--
Added file: http://bugs.python.org/file35556/smtpd_061014.patch

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



[issue14758] SMTPServer of smptd does not support binding to an IPv6 address

2014-06-09 Thread Milan Oberkirch

Milan Oberkirch added the comment:

I applied your suggestions.

--
Added file: http://bugs.python.org/file35542/smtpd_060914.patch

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



[issue14758] SMTPServer of smptd does not support binding to an IPv6 address

2014-06-09 Thread Milan Oberkirch

Changes by Milan Oberkirch milan...@oberkirch.org:


--
nosy: +jesstess

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



[issue14758] SMTPServer of smptd does not support binding to an IPv6 address

2014-06-09 Thread R. David Murray

R. David Murray added the comment:

When I run the modified test suite on a machine regrtest tells me that the test 
modified the environment, specifically the asyncore.socket_map.  Presumably 
there is some missing cleanup logic.

--

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



[issue14758] SMTPServer of smptd does not support binding to an IPv6 address

2014-04-11 Thread R. David Murray

R. David Murray added the comment:

I added some review comments.  Since this is a new feature, the patch also 
needs a 'versionchanged' that indicates that ipv6 support was added.

--
stage: needs patch - patch review
versions: +Python 3.5 -Python 3.3

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



[issue14758] SMTPServer of smptd does not support binding to an IPv6 address

2014-03-05 Thread Milan Oberkirch

Milan Oberkirch added the comment:

I was going to work on #3461 where IPv6-tests are missing for smtplib and 
stumbled over this bug. I would be willing to work on this, since it's quiet 
clear what needs to be done to me: implement what (vsergeev) suggested and 
write tests (which includes fixing design flaws in current ones).

It may be a good idea to teach mouckup_socket some IPv6, since it's needed for 
test_smtpd and test_smtplib, but IMHO that can be done as a extra task / will 
be easy after doing the above.

--
nosy: +zvyn

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



[issue14758] SMTPServer of smptd does not support binding to an IPv6 address

2014-03-05 Thread Milan Oberkirch

Milan Oberkirch added the comment:

The cleaning up of smtpd.socket was already implemented, so there was nothing 
to do there.

What I did:
- Write two TestCases to check if the IP version is chosen depending on the 
host-parameter
- Testing, that everything still works with an IPv6 address by inheriting from 
SMTPDChannelTest and overriding setUp with an IPv6-Server

--
keywords: +patch
Added file: http://bugs.python.org/file34289/smtpd.patch

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



[issue14758] SMTPServer of smptd does not support binding to an IPv6 address

2012-05-09 Thread Hynek Schlawack

Changes by Hynek Schlawack h...@ox.cx:


--
nosy: +hynek

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14758
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14758] SMTPServer of smptd does not support binding to an IPv6 address

2012-05-09 Thread Giampaolo Rodola'

Giampaolo Rodola' g.rod...@gmail.com added the comment:

Unfortunately unit tests overwrite the original smtpd.socket module object with 
test.mock_socket [1] and the latter one doesn't expose socket.getaddrinfo().

[1] http://hg.python.org/cpython/file/d937b527b76e/Lib/test/test_smtpd.py#l54

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14758
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14758] SMTPServer of smptd does not support binding to an IPv6 address

2012-05-09 Thread Jesús Cea Avión

Changes by Jesús Cea Avión j...@jcea.es:


--
nosy: +jcea

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14758
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14758] SMTPServer of smptd does not support binding to an IPv6 address

2012-05-09 Thread R. David Murray

R. David Murray rdmur...@bitdance.com added the comment:

Well, that should be fixed anyway (a cleanup added that restores the original 
value).  Then a new TestCase can test the socket stuff.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14758
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14758] SMTPServer of smptd does not support binding to an IPv6 address

2012-05-08 Thread Ivan Sergeev

New submission from Ivan Sergeev vserg...@gmail.com:

The SMTPServer class of the smtpd module creates a server socket with the IPv4 
socket.AF_INET address family hardcoded, and this prevents it from later 
binding to an IPv6 local address.

This occurs on line 282 of smtpd.py for the Python 2.7 branch:
http://hg.python.org/cpython/file/5319a4bf72e7/Lib/smtpd.py#l282

And on line 435 of smtpd for the Python 3.2 branch ( Lib/smtpd.py:435 ):
http://hg.python.org/cpython/file/d937b527b76e/Lib/smtpd.py#l435

One IPv4/IPv6 agnostic solution is to look up provided local address with 
getaddrinfo(), and use one of the result's address family, socket type and 
address tuple for create_socket() and bind() at those lines:

...
try:
gai_results = socket.getaddrinfo(localaddr[0], localaddr[1])
self.create_socket(gai_results[0][0], gai_results[0][1])
# try to re-use a server port if possible
self.set_reuse_addr()
self.bind(gai_results[0][4])
self.listen(5)
...

--
components: Library (Lib)
messages: 160226
nosy: vsergeev
priority: normal
severity: normal
status: open
title: SMTPServer of smptd does not support binding to an IPv6 address
type: behavior
versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14758
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14758] SMTPServer of smptd does not support binding to an IPv6 address

2012-05-08 Thread Antoine Pitrou

Changes by Antoine Pitrou pit...@free.fr:


--
nosy: +giampaolo.rodola, r.david.murray
stage:  - needs patch
type: behavior - enhancement
versions:  -Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.4

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14758
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14758] SMTPServer of smptd does not support binding to an IPv6 address

2012-05-08 Thread Giampaolo Rodola'

Giampaolo Rodola' g.rod...@gmail.com added the comment:

Agreed. The only problem I see is that unit tests rely on a mock socket object 
and should be rewritten by using an actual socket.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14758
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14758] SMTPServer of smptd does not support binding to an IPv6 address

2012-05-08 Thread R. David Murray

R. David Murray rdmur...@bitdance.com added the comment:

I don't think it is necessary to rewrite the existing tests, just add some that 
test the socket functionality.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14758
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com