[issue43079] wrong IP address range given for ipv4_mapped

2022-01-22 Thread Kumar Aditya
Change by Kumar Aditya : -- versions: +Python 3.11 -Python 3.6, Python 3.7, Python 3.8 ___ Python tracker ___ ___ Python-bugs-list

[issue43079] wrong IP address range given for ipv4_mapped

2022-01-19 Thread jiahua wang
Change by jiahua wang : -- keywords: +patch nosy: +wangjiahua nosy_count: 2.0 -> 3.0 pull_requests: +28885 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30687 ___ Python tracker

[issue31399] Let OpenSSL verify hostname and IP address

2021-10-07 Thread ramikg
Change by ramikg : -- nosy: +ramikg nosy_count: 4.0 -> 5.0 pull_requests: +27115 pull_request: https://github.com/python/cpython/pull/28602 ___ Python tracker ___

[issue23239] SSL match_hostname does not accept IP Address

2021-04-17 Thread Christian Heimes
Christian Heimes added the comment: Python 2 is out of support. Python 3 can verify IP addresses in certificates correctly. -- resolution: -> out of date stage: needs patch -> resolved status: open -> closed ___ Python tracker

[issue43769] ipaddress module takes bytes input as valid ip address

2021-04-07 Thread Philip Bond
Philip Bond added the comment: Thanks Eric. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43769] ipaddress module takes bytes input as valid ip address

2021-04-07 Thread Eric V. Smith
Eric V. Smith added the comment: This is documented behavior. See https://docs.python.org/3/library/ipaddress.html#ipaddress.IPv4Address "The following constitutes a valid IPv4 address: ... An integer packed into a bytes object of length 4 (most significant octet first). " And the

[issue43769] ipaddress module takes bytes input as valid ip address

2021-04-07 Thread Eric V. Smith
Eric V. Smith added the comment: The reproducer is: >>> ipaddress.IPv4Address(b"PING") IPv4Address('80.73.78.71') -- components: +Library (Lib) -Unicode nosy: +eric.smith ___ Python tracker

[issue43769] ipaddress module takes bytes input as valid ip address

2021-04-07 Thread Philip Bond
Philip Bond added the comment: To replicate ./cidr-gen.py google.com You will see the IP variable is a Russian IP but that was a red herring, I initially thought its was a compromised module. -- ___ Python tracker

[issue43769] ipaddress module takes bytes input as valid ip address

2021-04-07 Thread Philip Bond
New submission from Philip Bond : Hi I came across an issue with the ipaddress module where it doesent raise a ValueError when passed a non IP address. Example see attached file use tabs for indents and that doesent work with the form. What happens is it when it takes b'PING' as the call

[issue43079] wrong IP address range given for ipv4_mapped

2021-01-30 Thread Al
, docs@python priority: normal severity: normal status: open title: wrong IP address range given for ipv4_mapped type: behavior versions: Python 3.10, Python 3.6, Python 3.7, Python 3.8, Python 3.9 ___ Python tracker <https://bugs.python.org/issue43

Re: IP address to binary conversion

2020-05-09 Thread al . alexiev
Hi Alan, Yes, agreed that any '!I' or '!L' combination will work on different type of platforms in a consistent manner, when applied in both directions. I was referring to Alex Martelli's output, where the conversion back to IP seems to be reversed, even with '!L', which means that he's

Re: IP address to binary conversion

2020-05-08 Thread Alan Bawden
al.alex...@gmail.com writes: > Just for the records and to have a fully working bidirectional solution: > > >>> ip > '10.44.32.0' > >>> struct.unpack('L', socket.inet_aton(ip))[0] > 2108426 > >>> socket.inet_ntoa(struct.pack(' '10.44.32.0' > >>> > > Good luck ;-) This will not work as expected

Re: IP address to binary conversion

2020-05-08 Thread al . alexiev
Just for the records and to have a fully working bidirectional solution: >>> ip '10.44.32.0' >>> struct.unpack('L', socket.inet_aton(ip))[0] 2108426 >>> socket.inet_ntoa(struct.pack('>> Good luck ;-) -- https://mail.python.org/mailman/listinfo/python-list

[issue38784] ip_network does not clear/update the broadcast_address cache when the IP address is changed.

2019-11-13 Thread Johannes Erwerle
+= 2**24 > print("net2", net2) > print("net2.broadcast_address", net2.broadcast_address) -- messages: 356522 nosy: 992jo priority: normal severity: normal status: open title: ip_network does not

[issue38784] ip_network does not clear/update the broadcast_address cache when the IP address is changed.

2019-11-13 Thread Johannes Erwerle
Change by Johannes Erwerle : -- versions: +Python 3.8 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35820] Inconsistent behavior when parsing IP address

2019-01-24 Thread Eric V. Smith
Eric V. Smith added the comment: >From the documentation of IPv4Address: The following constitutes a valid IPv4 address: 1. A string in decimal-dot notation, consisting of four decimal integers in the inclusive range 0–255, separated by dots (e.g. 192.168.0.1). Each integer represents an

[issue35820] Inconsistent behavior when parsing IP address

2019-01-24 Thread Tinu Tomson
Change by Tinu Tomson : -- type: -> behavior ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35820] Inconsistent behavior when parsing IP address

2019-01-24 Thread Tinu Tomson
.002' ipaddress.IPv4Address(ip) parses correctly. -- components: Library (Lib) messages: 334319 nosy: tinutomson priority: normal severity: normal status: open title: Inconsistent behavior when parsing IP address ___ Python tracker <h

Re: getfqdn passes a hostname to gethostbyaddr instead of an ip address

2018-09-12 Thread Thomas Jollans
the docs say, turning the hostname into an IP address and working with that would be incorrect. Say we have a server, 'fred.weasley.example.com', which is also known as 'www.example.com'. Its reverse DNS pointer is 'fred.weasley.example.com'. Now, if we have 'example.com' on our DNS search path

Re: getfqdn passes a hostname to gethostbyaddr instead of an ip address

2018-09-12 Thread Rhodri James
On 12/09/18 15:29, Florian Bergmann wrote: Hello, While I was debugging some salt issues I dug into the python code and found a piece of code in the `socket.py` module that surprised my a bit: In the `getfqdn` function the `gethostbyaddr` name function is being called with a `hostname` instead

getfqdn passes a hostname to gethostbyaddr instead of an ip address

2018-09-12 Thread Florian Bergmann
e) for name in aliases: if '.' in name: break else: name = hostname return name ``` 1. `gethostname()`: The documentation states: ``` Return a string containing the hostname of the machine where the Python interpreter is currently executing. If you want to

[issue23239] SSL match_hostname does not accept IP Address

2018-03-21 Thread Christian Heimes
Christian Heimes <li...@cheimes.de> added the comment: #32819 and #32185 have solved the last outstanding bugs with IP address validation and handling. I'm fine with a backport of the feature to 2.7 now. -- assignee: christian.heimes -> versions: -Python 3.5, Python 3.6, P

[issue32974] Add bitwise operations and other missing comparison methods to Python's IP address module

2018-02-28 Thread Ned Deily
Change by Ned Deily : -- nosy: +pmoody ___ Python tracker ___ ___ Python-bugs-list mailing

[issue32974] Add bitwise operations and other missing comparison methods to Python's IP address module

2018-02-28 Thread bbayles
Change by bbayles : -- nosy: +bbayles ___ Python tracker ___ ___ Python-bugs-list mailing

[issue32974] Add bitwise operations and other missing comparison methods to Python's IP address module

2018-02-28 Thread Kyle Agronick
New submission from Kyle Agronick <agron...@gmail.com>: I've recently had the experience of implementing a system for managing DNS records at a Fortune 10 company with ~10,000 stores. There were a number of things that I felt were missing from the IP address module and could be added w

[issue31399] Let OpenSSL verify hostname and IP address

2018-02-26 Thread Christian Heimes
Christian Heimes added the comment: The feature has been implemented. I'll take care of the failing tests in #32706. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.8 ___ Python

[issue32572] Add the ftplib option, overrides the IP address.

2018-02-01 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: Considering the security implications and the fact that it's a corner case I don't think this is worth adding as a new, public API, sorry. I think ftplib should expose and promote APIs reflecting common scenarios and good practices,

[issue32572] Add the ftplib option, overrides the IP address.

2018-02-01 Thread Hideyuki
parent. In this case, we recognize that IP packet received by the FTP server is from the external IP address of the NAT BOX, but ftplib will send the IP address on host NIC. So dose not match IP packet source address and PORT address, it will be closed with the indicated code. The purpose of this f

[issue32572] Add the ftplib option, overrides the IP address.

2018-02-01 Thread R. David Murray
R. David Murray added the comment: I too wondered if pasv was the correct solution to the problem. -- ___ Python tracker ___

[issue32572] Add the ftplib option, overrides the IP address.

2018-02-01 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: Mmmm out of curiosity, how common is this? Usually when client is behind a NAT it's supposed to use PASV. What you're proposing is a configuration option which typically belong to servers, not clients. I don't remember ever bumping

[issue32572] Add the ftplib option, overrides the IP address.

2018-02-01 Thread Stéphane Wirtel
Stéphane Wirtel added the comment: +1 for this point David, but also the minimum is the documentation and a test, I suppose you will confirm. -- ___ Python tracker

[issue32572] Add the ftplib option, overrides the IP address.

2018-02-01 Thread R. David Murray
R. David Murray added the comment: I'd like confirmation from someone involved in maintaining the ftplib package that this is in fact the correct solution. -- nosy: +r.david.murray ___ Python tracker

[issue32572] Add the ftplib option, overrides the IP address.

2018-02-01 Thread Stéphane Wirtel
Stéphane Wirtel added the comment: Hi Hideyuki, Thank you for your contribution but we need some changes from your PR. 1. Could you add a documentation in Doc/library/ftplib.rst +- line 170, after FTP.set_debuglevel ? 2. There is no tests, please could you add a test in

[issue31399] Let OpenSSL verify hostname and IP address

2018-01-29 Thread Socob
Change by Socob <206a8...@opayq.com>: -- nosy: +Socob ___ Python tracker ___ ___ Python-bugs-list mailing

[issue31399] Let OpenSSL verify hostname and IP address

2018-01-29 Thread Christian Heimes
Christian Heimes added the comment: New changeset 66e5742becce38e69a8f09e5f7051445fc57e92e by Christian Heimes in branch 'master': bpo-28414: ssl module idna test (#5395) https://github.com/python/cpython/commit/66e5742becce38e69a8f09e5f7051445fc57e92e --

[issue31399] Let OpenSSL verify hostname and IP address

2018-01-29 Thread STINNER Victor
STINNER Victor added the comment: It seems like the commit 61d478c71c5341cdc54e6bfb4ace4252852fd972 introduced a regression in test_ftplib: bpo-32706. Can you please take a look? -- nosy: +vstinner ___ Python tracker

[issue31399] Let OpenSSL verify hostname and IP address

2018-01-28 Thread Christian Heimes
Change by Christian Heimes : -- pull_requests: +5231 ___ Python tracker ___ ___

[issue31399] Let OpenSSL verify hostname and IP address

2018-01-27 Thread Christian Heimes
Christian Heimes <li...@cheimes.de> added the comment: New changeset 61d478c71c5341cdc54e6bfb4ace4252852fd972 by Christian Heimes in branch 'master': bpo-31399: Let OpenSSL verify hostname and IP address (#3462) https://github.com/python/cpython/commit/61d478c71c5341cdc54e6bfb4ace425285

[issue32572] Add the ftplib option, overrides the IP address.

2018-01-19 Thread Terry J. Reedy
Change by Terry J. Reedy : -- nosy: +giampaolo.rodola versions: -Python 3.6, Python 3.7 ___ Python tracker ___

[issue31399] Let OpenSSL verify hostname and IP address

2018-01-18 Thread Christian Heimes
Christian Heimes added the comment: https://github.com/libressl-portable/portable/issues/381 -- ___ Python tracker ___

[issue31399] Let OpenSSL verify hostname and IP address

2018-01-18 Thread Christian Heimes
Christian Heimes added the comment: Bad news, LibreSSL is the worst. Even the latest release 2.6.4 does not implement https://www.openssl.org/docs/man1.0.2/crypto/X509_VERIFY_PARAM_set1_host.html or X509_VERIFY_PARAM_set_hostflags(). I don't get why it provides

[issue32572] Add the ftplib option, overrides the IP address.

2018-01-16 Thread Hideyuki
Change by Hideyuki : -- keywords: +patch pull_requests: +5061 stage: -> patch review ___ Python tracker ___

[issue32572] Add the ftplib option, overrides the IP address.

2018-01-16 Thread Hideyuki
New submission from Hideyuki <studi...@go64.jp>: Add the ftplib's option, overrides the IP address to be used with the PORT command. Currently, the PORT command is sending its self IP address. If the host is connected with NAT, it will not work. If that command has a NAT external IP a

[issue23239] SSL match_hostname does not accept IP Address

2017-09-27 Thread Alex Gaynor
Alex Gaynor added the comment: I'd be in favor of backporting this to the 2.x - encouraging reliance on the nonsense behaviour of putting IPAddresses in DNS Names or relying on CN over SAN is bad, and we shouldn't encourage it. -- nosy: +Alex Gaynor

[issue23239] SSL match_hostname does not accept IP Address

2017-09-27 Thread j-harbott
j-harbott added the comment: The original issue still exists in py27, is there a chance to get the fix backported? See https://github.com/pyca/cryptography/issues/3943 and https://github.com/shazow/urllib3/issues/1269 for sample issues that arise because we need to work

[issue31399] Let OpenSSL verify hostname and IP address

2017-09-15 Thread Jakub Wilk
Changes by Jakub Wilk : -- nosy: +jwilk ___ Python tracker ___ ___ Python-bugs-list mailing

[issue31399] Let OpenSSL verify hostname and IP address

2017-09-08 Thread Christian Heimes
Changes by Christian Heimes : -- keywords: +patch pull_requests: +3454 ___ Python tracker ___

[issue31399] Let OpenSSL verify hostname and IP address

2017-09-08 Thread Christian Heimes
stage: patch review status: open title: Let OpenSSL verify hostname and IP address type: enhancement versions: Python 3.7 ___ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/i

[issue28938] match_hostname treats SAN IP address as DNS name and fails to check CN then

2017-09-05 Thread Christian Heimes
Changes by Christian Heimes : -- stage: -> resolved status: open -> closed ___ Python tracker ___

[issue28938] match_hostname treats SAN IP address as DNS name and fails to check CN then

2017-09-05 Thread Alex Gaynor
Alex Gaynor added the comment: +1 Christian, we should not be expanding our usage of CNs at all. -- status: pending -> open ___ Python tracker ___

[issue28938] match_hostname treats SAN IP address as DNS name and fails to check CN then

2017-09-05 Thread Christian Heimes
Christian Heimes added the comment: I don't like to change the behavior of match_hostname(). RFC 2818 is deprecated. Recent browsers are no longer using CN to verify hostnames. Python is going to ignore CN soonish, too. -- status: open -> pending type: -> behavior versions: +Python

[issue30189] SSL match_hostname does not accept IP Address

2017-04-27 Thread Christian Heimes
Christian Heimes added the comment: In general we don't backport features. https://www.python.org/dev/peps/pep-0466/ allows backports of network security enhancements. However IP address validation is not a security enhancement. You can either update to a new version of Python or role your

[issue30189] SSL match_hostname does not accept IP Address

2017-04-27 Thread Mario Viapiano
New submission from Mario Viapiano: I need this patch to be available in python 2.7.13 https://bugs.python.org/issue23239 -- components: Extension Modules messages: 292468 nosy: emeve89 priority: normal severity: normal status: open title: SSL match_hostname does not accept IP Address

[issue28938] match_hostname treats SAN IP address as DNS name and fails to check CN then

2016-12-11 Thread Ray Satiro
Changes by Ray Satiro : -- nosy: +raysatiro ___ Python tracker ___ ___ Python-bugs-list

[issue28938] match_hostname treats SAN IP address as DNS name and fails to check CN then

2016-12-11 Thread Steffen Ullrich
heck is optional (MAY). Python treats the presence of > an IP Address as indicator that CN check should not be performed. RFC 6125 does not obsolete RFC 2818. In fact it says in section 1.4: This document also does not supersede the rules for verifying service identity provided in spe

[issue28938] match_hostname treats SAN IP address as DNS name and fails to check CN then

2016-12-11 Thread Cory Benfield
Changes by Cory Benfield : -- nosy: +Lukasa status: pending -> open ___ Python tracker ___

[issue28938] match_hostname treats SAN IP address as DNS name and fails to check CN then

2016-12-11 Thread Christian Heimes
Christian Heimes added the comment: Python's implementation of host name verification conforms to RFC 6125, section 6.4.4. The CN check is optional (MAY). Python treats the presence of an IP Address as indicator that CN check should not be performed. In fact hostname verification code should

[issue28938] match_hostname treats SAN IP address as DNS name and fails to check CN then

2016-12-11 Thread Ned Deily
Changes by Ned Deily : -- nosy: +alex, christian.heimes, dstufft, janssen ___ Python tracker ___

[issue28938] match_hostname treats SAN IP address as DNS name and fails to check CN then

2016-12-11 Thread Steffen Ullrich
New submission from Steffen Ullrich: from Lib/ssl.py 303elif key == 'IP Address': 304if host_ip is not None and _ipaddress_match(value, host_ip): 305return 306dnsnames.append(value) 307if not dnsnames: 308# The subject is only checked

[issue23239] SSL match_hostname does not accept IP Address

2016-09-15 Thread Christian Heimes
Changes by Christian Heimes : -- components: +SSL ___ Python tracker ___ ___

[issue23239] SSL match_hostname does not accept IP Address

2016-09-08 Thread Christian Heimes
Changes by Christian Heimes : -- assignee: -> christian.heimes priority: normal -> high versions: +Python 3.7 ___ Python tracker ___

[issue23239] SSL match_hostname does not accept IP Address

2016-08-24 Thread R. David Murray
Changes by R. David Murray : -- stage: commit review -> needs patch ___ Python tracker ___

[issue27694] Socket incorrectly states IP address that start with a zero after a dot are illegal

2016-08-08 Thread R. David Murray
R. David Murray added the comment: See also issue 27612. -- nosy: +r.david.murray ___ Python tracker ___ ___

[issue27694] Socket incorrectly states IP address that start with a zero after a dot are illegal

2016-08-05 Thread SilentGhost
Changes by SilentGhost : -- stage: -> resolved ___ Python tracker ___ ___

[issue27694] Socket incorrectly states IP address that start with a zero after a dot are illegal

2016-08-05 Thread Martin Panter
Martin Panter added the comment: I am pretty sure it isn’t legal. Python’s inet_aton() just wraps the underlying OS call. According to Posix , the leading zero in 093 would indicate octal notation, but the nine is not a

[issue27694] Socket incorrectly states IP address that start with a zero after a dot are illegal

2016-08-05 Thread Haaroon Y
New submission from Haaroon Y: Using the socket library and the method socket.inet_aton(ipAddr) it incorrectly states IP address such as 192.168.093.1 and 192.092.2.1 are not legal when they are. -- components: Library (Lib) messages: 272033 nosy: Haaroon Y priority: normal severity

[issue27694] Socket incorrectly states IP address that start with a zero after a dot are illegal

2016-08-05 Thread Haaroon Y
Haaroon Y added the comment: This seems to occur when a IP value is 078 or higher. -- ___ Python tracker ___

[issue23239] SSL match_hostname does not accept IP Address

2016-04-07 Thread Christian Heimes
Christian Heimes added the comment: I'm -1 on the patch for a practical reason: The current API is broken and I don't want to have it documented as officially supported. In fact it is not only broken but also incompatible with more modern releases of OpenSSL. Recently OpenSSL got proper

[issue23239] SSL match_hostname does not accept IP Address

2016-04-07 Thread Marc Abramowitz
Marc Abramowitz added the comment: `ip_certs_comment.patch` is a simple patch that just removes the verbiage about not supporting IP addresses in hostnames, as that restriction was removed by an earlier commit from Antoine. -- ___ Python tracker

[issue23239] SSL match_hostname does not accept IP Address

2016-03-19 Thread Marc Abramowitz
Marc Abramowitz added the comment: Patch to update the comment to remove "IP addresses are not accepted for *hostname*", because supported for IP addresses was added earlier by @pitrou in https://hg.python.org/cpython/rev/b15a5f239e8a -- nosy: +Marc.Abramowitz Added file:

[issue23239] SSL match_hostname does not accept IP Address

2015-07-12 Thread Antoine Pitrou
Antoine Pitrou added the comment: ping Sorry. I do not have time currently to tackle this issue. Feel free to submit and/or commit improvements if you feel like it. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23239

[issue23239] SSL match_hostname does not accept IP Address

2015-07-05 Thread Christian Heimes
Christian Heimes added the comment: ping -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23239 ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue23239] SSL match_hostname does not accept IP Address

2015-06-02 Thread Christian Heimes
Christian Heimes added the comment: The patch has a couple of issues 1) match_hostname()'s doc string needs to be updated. It still contains but IP addresses are not accepted for *hostname* 2) The stdlib uses server_hostname for SNI and matching. An IP address in the SNI TLS extension

[issue23239] SSL match_hostname does not accept IP Address

2015-02-15 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- resolution: - fixed stage: patch review - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23239 ___

[issue23239] SSL match_hostname does not accept IP Address

2015-02-15 Thread Roundup Robot
Roundup Robot added the comment: New changeset b15a5f239e8a by Antoine Pitrou in branch 'default': Issue #23239: ssl.match_hostname() now supports matching of IP addresses. https://hg.python.org/cpython/rev/b15a5f239e8a -- nosy: +python-dev ___

[issue23239] SSL match_hostname does not accept IP Address

2015-01-17 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- keywords: +patch Added file: http://bugs.python.org/file37746/ip_certs.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23239 ___

[issue23239] SSL match_hostname does not accept IP Address

2015-01-17 Thread Antoine Pitrou
Antoine Pitrou added the comment: Here is a patch. -- stage: needs patch - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23239 ___

[issue23239] SSL match_hostname does not accept IP Address

2015-01-14 Thread Antoine Pitrou
Antoine Pitrou added the comment: This is a feature request. Not supporting IP addresses is a documented limitation of the current implementation. -- nosy: +christian.heimes, dstufft ___ Python tracker rep...@bugs.python.org

[issue23239] SSL match_hostname does not accept IP Address

2015-01-14 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- stage: - needs patch type: security - enhancement versions: -Python 2.7, Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23239 ___

[issue23239] SSL match_hostname does not accept IP Address

2015-01-14 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@gmail.com: -- nosy: +alex, pitrou versions: +Python 3.4, Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23239 ___

[issue23239] SSL match_hostname does not accept IP Address

2015-01-14 Thread Ádám Zsigmond
New submission from Ádám Zsigmond: ssl.match_hostname does not accept the ca certificate if the hostname matches the ip address. I am trying to connect to a servert with a cacert by IP address but I get an error message like: '42.42.42.42' hostname does not match 'hostname_in_cacert' The IP

[issue23239] SSL match_hostname does not accept IP Address

2015-01-14 Thread R. David Murray
Changes by R. David Murray rdmur...@bitdance.com: -- nosy: +r.david.murray ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23239 ___ ___

[issue22753] urllib2 localnet Changed test to lookup IP-address of localhost

2014-11-03 Thread Håkan Lövdahl
Håkan Lövdahl added the comment: Yes, I can confirm that changing 'URL' to be 'http://127.0.0.1' works. I think that would be a solution to this. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22753

[issue22753] urllib2 localnet Changed test to lookup IP-address of localhost

2014-11-01 Thread Wouter van Heyst
Wouter van Heyst added the comment: What the patch does is replace the hard-coded address 127.0.0.1 for the loopback interface with a one-time lookup. I'd argue the hunk @@ -315,7 +316,7 @@ should be dropped. The two arguments that motivate this change are: 1) The address of the loopback

[issue22753] urllib2 localnet Changed test to lookup IP-address of localhost

2014-11-01 Thread R. David Murray
R. David Murray added the comment: The problem is that there are several places in the test suite (and the stdlib itself!) that assume that 127.0.0.1 is a valid loopback address. This is the de-facto Internet standard, and while I know not all systems make 127.0.0.1 a valid loopback and/or

[issue22753] urllib2 localnet Changed test to lookup IP-address of localhost

2014-10-28 Thread Håkan Lövdahl
to 127.0.0.1 made the test pass. My friend puppet made a patch for it so it looks up the IP-address. -- components: Tests messages: 230156 nosy: hakan priority: normal severity: normal status: open title: urllib2 localnet Changed test to lookup IP-address of localhost versions: Python 3.5

[issue22753] urllib2 localnet Changed test to lookup IP-address of localhost

2014-10-28 Thread Daniel Eriksson
Changes by Daniel Eriksson dan...@starstable.com: -- nosy: +puppet ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22753 ___ ___ Python-bugs-list

[issue22753] urllib2 localnet Changed test to lookup IP-address of localhost

2014-10-28 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti, larstiq stage: - patch review type: - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22753 ___

[issue22753] urllib2 localnet Changed test to lookup IP-address of localhost

2014-10-28 Thread Håkan Lövdahl
Changes by Håkan Lövdahl ha...@llsdata.fi: -- keywords: +patch Added file: http://bugs.python.org/file37053/issue_22753.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22753 ___

[issue22753] urllib2 localnet Changed test to lookup IP-address of localhost

2014-10-28 Thread Håkan Lövdahl
Håkan Lövdahl added the comment: Ubuntu Linux 12.04 64bit -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22753 ___ ___ Python-bugs-list mailing

[issue22753] urllib2 localnet Changed test to lookup IP-address of localhost

2014-10-28 Thread R. David Murray
R. David Murray added the comment: Your description of the solution (change localhost to 127.0.0.1) does not match the content of the patch. The patch appears to be looking up the IP address associated with 'localhost' and using that. On most systems that would be 127.0.0.1, but perhaps

urllib/urllib2 support for specifying ip address

2014-06-19 Thread Robin Becker
I want to run torture tests against an https server on domain A; I have configured apache on the server to respond to a specific hostname ipaddress. I don't want to torture the live server so I have set up an alternate instance on a different ip address. Is there a way to get urlib

Re: urllib/urllib2 support for specifying ip address

2014-06-19 Thread Chris Angelico
instance on a different ip address. Since you mention urllib2, I'm assuming this is Python 2.x, not 3.x. The exact version may be significant. Can you simply query the server by IP address rather than host name? According to the docs, urllib2.urlopen() doesn't check the certificate, so it should

Re: urllib/urllib2 support for specifying ip address

2014-06-19 Thread Robin Becker
.. Since you mention urllib2, I'm assuming this is Python 2.x, not 3.x. The exact version may be significant. I can use python = 3.3 if required. Can you simply query the server by IP address rather than host name? According to the docs, urllib2.urlopen() doesn't check

Re: urllib/urllib2 support for specifying ip address

2014-06-19 Thread Chris Angelico
was go to my Python 2 installation (which happens to be 2.7.3, because that's what Debian Wheezy ships with - not sure why it hasn't been updated beyond that), pull up urllib2.py, and step through manually, seeing where the hostname gets turned into an IP address. Hence, this code: import socket

Re: urllib/urllib2 support for specifying ip address

2014-06-19 Thread Robin Becker
it hasn't been updated beyond that), pull up urllib2.py, and step through manually, seeing where the hostname gets turned into an IP address. Hence, this code: . in practice this approach worked well with urllib in python27. -- Robin Becker -- https://mail.python.org/mailman/listinfo/python-list

Re: urllib/urllib2 support for specifying ip address

2014-06-19 Thread Chris Angelico
On Fri, Jun 20, 2014 at 12:19 AM, Robin Becker ro...@reportlab.com wrote: in practice [monkeypatching socket] worked well with urllib in python27. Excellent! That's empirical evidence of success, then. Like with all monkey-patching, you need to keep it as visible as possible, but if your driver

Re: How to send broadcast IP address to network?

2013-08-24 Thread Irmen de Jong
On 23-8-2013 14:32, lightai...@gmail.com wrote: I want to send a broadcast packet to all the computers connected to my home router. The following 2 lines of code do not work; host=192.168.0.102 s.connect((host, port)) Can someone advise? Thank you. Use UDP (datagram) sockets. Use

How to send broadcast IP address to network?

2013-08-23 Thread lightaiyee
I want to send a broadcast packet to all the computers connected to my home router. The following 2 lines of code do not work; host=192.168.0.102 s.connect((host, port)) Can someone advise? Thank you. -- http://mail.python.org/mailman/listinfo/python-list

Re: How to send broadcast IP address to network?

2013-08-23 Thread lightaiyee
Some typo mistake. Should be host=192.168.0.255, not 192.168.0.102 On Friday, August 23, 2013 8:32:10 PM UTC+8, light...@gmail.com wrote: I want to send a broadcast packet to all the computers connected to my home router. The following 2 lines of code do not work;

  1   2   3   4   >