Issue 8853: getaddrinfo should accept port of type long (original) (raw)

Created on 2010-05-29 17:48 by AndiDog_old, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
issue8853.patch mark.dickinson,2010-05-30 16:45
issue8853_v2.patch petri.lehtinen,2012-12-19 14:31 review
Messages (7)
msg106726 - (view) Author: Andidog_old (AndiDog_old) Date: 2010-05-29 17:48
socket.getaddrinfo("127.0.0.1", 80L) error: Int or String expected I would expect getaddrinfo to convert the port number to an integer.
msg106766 - (view) Author: Mark Dickinson (mark.dickinson) * (Python committer) Date: 2010-05-30 16:45
The attached patch should fix the problem. I'm not sure how to test it, though: the socket module currently seems to have exactly 0 tests for socket.getaddrinfo.
msg106769 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2010-05-30 17:07
See for the tests issue.
msg128250 - (view) Author: Sandro Tosi (sandro.tosi) * (Python committer) Date: 2011-02-09 22:58
Hi Mark, would you like to write some tests about the proposed change? Antoine gave a fast look at the issue and believe it's acceptable for 2.7.
msg177743 - (view) Author: Petri Lehtinen (petri.lehtinen) * (Python committer) Date: 2012-12-19 14:31
Attached a new patch with a test case and fixed error handling.
msg177855 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2012-12-20 19:11
New changeset 39803c20c9bf by Petri Lehtinen in branch '2.7': #8853: Allow port to be of type long for socket.getaddrinfo() http://hg.python.org/cpython/rev/39803c20c9bf
msg177856 - (view) Author: Petri Lehtinen (petri.lehtinen) * (Python committer) Date: 2012-12-20 19:12
Fixed.
History
Date User Action Args
2022-04-11 14:57:01 admin set github: 53099
2012-12-20 19:12:14 petri.lehtinen set status: open -> closedresolution: fixedmessages: + stage: patch review -> resolved
2012-12-20 19:11:22 python-dev set nosy: + python-devmessages: +
2012-12-19 14:31:31 petri.lehtinen set stage: test needed -> patch review
2012-12-19 14:31:22 petri.lehtinen set files: + issue8853_v2.patchmessages: +
2012-12-19 09:29:56 petri.lehtinen set nosy: + petri.lehtinen
2011-02-09 22:58:46 sandro.tosi set versions: + Python 2.7, - Python 2.6nosy: + sandro.tosimessages: + stage: test needed
2010-06-01 09:36:18 giampaolo.rodola set nosy: + giampaolo.rodola
2010-05-30 17:07:27 pitrou set nosy: + pitroumessages: +
2010-05-30 16:45:37 mark.dickinson set files: + issue8853.patchnosy: + mark.dickinsonmessages: + keywords: + patch
2010-05-29 17:48:12 AndiDog_old create