[Python-ideas] IPLike objects
Damla Altun
initalize.damla at gmail.com
Sun Oct 21 12:47:44 EDT 2018
> I followed your instructions and appended them to the last commit of
> DamlaAltun/cpython (branch: _iplike-socket)[0] .
>
>>
> - Bytes and Integer support removed, only allowed string and IPLike. If
> string passed in it returns without any func call / modification. [1]
> - IPLike moved to socket [2]
> - `get_ipaddr()` renamed as `_ipaddr` and moved to socket. [3]
> - IPLike & ipaddr() tests moved to test_socket [4]
> - Created a header (ipaddrmodule.h) file and imported into Python.h and
> added header files list in makefile.pre.in [5]
> - In socketmodule.c;
> - 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].
> - Created `socket_ipaddr_impl(PyObject *module, PyObject *address)
> [8], it used for exporting c method to python [9]. It calls PySocket_IPAddr.
> - Added IPLike objects support to socket's idna_converter [10]
>
> [0] https://github.com/DamlaAltun/cpython/tree/_iplike-socket
> [1]
> https://github.com/DamlaAltun/cpython/commit/d39a261edb91d6e423d319b1dd20f94998f61539#diff-1f037cd6b68ccd47326d99aeb7ae2c6aR763
> [2]
> https://github.com/DamlaAltun/cpython/commit/d39a261edb91d6e423d319b1dd20f94998f61539#diff-1f037cd6b68ccd47326d99aeb7ae2c6aR789
> [3]
> https://github.com/DamlaAltun/cpython/commit/d39a261edb91d6e423d319b1dd20f94998f61539#diff-1f037cd6b68ccd47326d99aeb7ae2c6aR756
> [4]
> https://github.com/DamlaAltun/cpython/commit/d39a261edb91d6e423d319b1dd20f94998f61539#diff-30065f853d7944a19b3e17b55db67733R147
> [5]
> https://github.com/DamlaAltun/cpython/commit/d39a261edb91d6e423d319b1dd20f94998f61539#diff-45e8b91057f0c5b60efcb5944125b585R970
> [6]
> https://github.com/DamlaAltun/cpython/commit/d39a261edb91d6e423d319b1dd20f94998f61539#diff-a47fd74731aeb547ad780900bb8e6953R4698
> [7]
> https://github.com/DamlaAltun/cpython/commit/d39a261edb91d6e423d319b1dd20f94998f61539#diff-1f037cd6b68ccd47326d99aeb7ae2c6aR785
> [8]
> https://github.com/DamlaAltun/cpython/commit/d39a261edb91d6e423d319b1dd20f94998f61539#diff-a47fd74731aeb547ad780900bb8e6953R4723
> [9]
> https://github.com/DamlaAltun/cpython/commit/d39a261edb91d6e423d319b1dd20f94998f61539#diff-a47fd74731aeb547ad780900bb8e6953R6749
> [10]
> https://github.com/DamlaAltun/cpython/commit/d39a261edb91d6e423d319b1dd20f94998f61539#diff-a47fd74731aeb547ad780900bb8e6953R1550
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20181021/3d0c19e6/attachment-0001.html>
More information about the Python-ideas
mailing list