<div dir="ltr"><div dir="auto"></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I followed your instructions and appended them to the last commit of DamlaAltun/cpython (branch: _iplike-socket)[0] . <div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"></blockquote></div><div><br></div><div>- Bytes and Integer support removed, only allowed string and IPLike. If string passed in it returns without any func call / modification. [1]</div><div>- IPLike moved to socket [2]</div><div>- `get_ipaddr()` renamed as `_ipaddr` and moved to socket. [3]</div><div>- IPLike & ipaddr() tests moved to test_socket [4]</div><div>- Created a header (ipaddrmodule.h) file and imported into Python.h and added header files list in <a href="http://makefile.pre.in/" target="_blank">makefile.pre.in</a> [5]</div><div>- In socketmodule.c; </div><div>    - Created `PySocket_IPAddr(PyObject *address)[6], its behavior exactly same with socket._ipaddr's behavior. In Lib/socket.py it checks builtins for ipaddr method if it can not find it it renames _ipaddr as ipaddr [7]. </div><div>    - Created `socket_ipaddr_impl(PyObject *module, PyObject *address) [8], it used for exporting c method to python [9]. It calls PySocket_IPAddr.</div><div>    - Added IPLike objects support to socket's idna_converter [10]</div><div><br></div><div>[0] <a href="https://github.com/DamlaAltun/cpython/tree/_iplike-socket" target="_blank">https://github.com/DamlaAltun/cpython/tree/_iplike-socket</a></div><div>[1] <a href="https://github.com/DamlaAltun/cpython/commit/d39a261edb91d6e423d319b1dd20f94998f61539#diff-1f037cd6b68ccd47326d99aeb7ae2c6aR763" target="_blank">https://github.com/DamlaAltun/cpython/commit/d39a261edb91d6e423d319b1dd20f94998f61539#diff-1f037cd6b68ccd47326d99aeb7ae2c6aR763</a></div><div>[2] <a href="https://github.com/DamlaAltun/cpython/commit/d39a261edb91d6e423d319b1dd20f94998f61539#diff-1f037cd6b68ccd47326d99aeb7ae2c6aR789" target="_blank">https://github.com/DamlaAltun/cpython/commit/d39a261edb91d6e423d319b1dd20f94998f61539#diff-1f037cd6b68ccd47326d99aeb7ae2c6aR789</a></div><div>[3] <a href="https://github.com/DamlaAltun/cpython/commit/d39a261edb91d6e423d319b1dd20f94998f61539#diff-1f037cd6b68ccd47326d99aeb7ae2c6aR756" target="_blank">https://github.com/DamlaAltun/cpython/commit/d39a261edb91d6e423d319b1dd20f94998f61539#diff-1f037cd6b68ccd47326d99aeb7ae2c6aR756</a></div><div>[4] <a href="https://github.com/DamlaAltun/cpython/commit/d39a261edb91d6e423d319b1dd20f94998f61539#diff-30065f853d7944a19b3e17b55db67733R147" target="_blank">https://github.com/DamlaAltun/cpython/commit/d39a261edb91d6e423d319b1dd20f94998f61539#diff-30065f853d7944a19b3e17b55db67733R147</a></div><div>[5] <a href="https://github.com/DamlaAltun/cpython/commit/d39a261edb91d6e423d319b1dd20f94998f61539#diff-45e8b91057f0c5b60efcb5944125b585R970" target="_blank">https://github.com/DamlaAltun/cpython/commit/d39a261edb91d6e423d319b1dd20f94998f61539#diff-45e8b91057f0c5b60efcb5944125b585R970</a></div><div>[6] <a href="https://github.com/DamlaAltun/cpython/commit/d39a261edb91d6e423d319b1dd20f94998f61539#diff-a47fd74731aeb547ad780900bb8e6953R4698" target="_blank">https://github.com/DamlaAltun/cpython/commit/d39a261edb91d6e423d319b1dd20f94998f61539#diff-a47fd74731aeb547ad780900bb8e6953R4698</a></div><div>[7] <a href="https://github.com/DamlaAltun/cpython/commit/d39a261edb91d6e423d319b1dd20f94998f61539#diff-1f037cd6b68ccd47326d99aeb7ae2c6aR785" target="_blank">https://github.com/DamlaAltun/cpython/commit/d39a261edb91d6e423d319b1dd20f94998f61539#diff-1f037cd6b68ccd47326d99aeb7ae2c6aR785</a></div><div>[8] <a href="https://github.com/DamlaAltun/cpython/commit/d39a261edb91d6e423d319b1dd20f94998f61539#diff-a47fd74731aeb547ad780900bb8e6953R4723" target="_blank">https://github.com/DamlaAltun/cpython/commit/d39a261edb91d6e423d319b1dd20f94998f61539#diff-a47fd74731aeb547ad780900bb8e6953R4723</a></div><div>[9] <a href="https://github.com/DamlaAltun/cpython/commit/d39a261edb91d6e423d319b1dd20f94998f61539#diff-a47fd74731aeb547ad780900bb8e6953R6749" target="_blank">https://github.com/DamlaAltun/cpython/commit/d39a261edb91d6e423d319b1dd20f94998f61539#diff-a47fd74731aeb547ad780900bb8e6953R6749</a></div><div>[10] <a href="https://github.com/DamlaAltun/cpython/commit/d39a261edb91d6e423d319b1dd20f94998f61539#diff-a47fd74731aeb547ad780900bb8e6953R1550" target="_blank">https://github.com/DamlaAltun/cpython/commit/d39a261edb91d6e423d319b1dd20f94998f61539#diff-a47fd74731aeb547ad780900bb8e6953R1550</a></div>
</blockquote></div>
</div>