[issue38851] UDPLITE tests fail on android

2019-12-09 Thread Gabe Appleton


Gabe Appleton  added the comment:

Also, isn't this just a permissions error? I wouldn't think that would indicate 
a failure of the feature, but instead one of the testing environment.

On December 10, 2019 7:47:10 AM UTC, Xavier de Gaye  
wrote:
>
>Xavier de Gaye  added the comment:
>
>Not interested anymore in android stuff.
>
>--
>
>___
>Python tracker 
><https://bugs.python.org/issue38851>
>___

--

___
Python tracker 
<https://bugs.python.org/issue38851>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37345] Add formal support for UDPLITE protococl

2019-06-19 Thread Gabe Appleton


New submission from Gabe Appleton :

At the moment you can definitely use UDPLITE sockets on Linux systems, but it 
would be good if this support were formalized such that you can detect support 
at runtime easily.

At the moment, to make and use a UDPLITE socket requires something like the 
following code:

>>> import socket
>>> a = socket.socket(socket.AF_INET, socket.SOCK_DGRAM, 136)
>>> b = socket.socket(socket.AF_INET, socket.SOCK_DGRAM, 136)
>>> a.bind(('localhost', 4))
>>> b.sendto(b'test'*256, ('localhost', 4))
>>> b.setsockopt(136, 10, 16)
>>> b.sendto(b'test'*256, ('localhost', 4))
>>> b.setsockopt(136, 10, 32)
>>> b.sendto(b'test'*256, ('localhost', 4))
>>> b.setsockopt(136, 10, 64)
>>> b.sendto(b'test'*256, ('localhost', 4))

If you look at this through Wireshark, you can see that the packets are 
different in that the checksums and checksum coverages change.

With the pull request that I am submitting momentarily, you could do the 
following code instead:

>>> import socket
>>> a = socket.socket(socket.AF_INET, socket.SOCK_DGRAM, socket.IPPROTO_UDPLITE)
>>> b = socket.socket(socket.AF_INET, socket.SOCK_DGRAM, socket.IPPROTO_UDPLITE)
>>> a.bind(('localhost', 4))
>>> b.sendto(b'test'*256, ('localhost', 4))
>>> b.set_send_checksum_coverage(16)
>>> b.sendto(b'test'*256, ('localhost', 4))
>>> b.set_send_checksum_coverage(32)
>>> b.sendto(b'test'*256, ('localhost', 4))
>>> b.set_send_checksum_coverage(64)
>>> b.sendto(b'test'*256, ('localhost', 4))

One can also detect support for UDPLITE just by checking

>>> hasattr(socket, 'IPPROTO_UDPLITE')

--
components: Library (Lib)
messages: 346103
nosy: gappleto97
priority: normal
severity: normal
status: open
title: Add formal support for UDPLITE protococl
type: enhancement
versions: Python 3.8, Python 3.9

___
Python tracker 
<https://bugs.python.org/issue37345>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37345] Add formal support for UDPLITE protococl

2019-06-19 Thread Gabe Appleton


Change by Gabe Appleton :


--
keywords: +patch
pull_requests: +14088
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/14258

___
Python tracker 
<https://bugs.python.org/issue37345>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37345] Add formal support for UDPLITE protococl

2019-06-20 Thread Gabe Appleton


Gabe Appleton  added the comment:

Its true that this doesnt exist at the C level, however I worry that having it 
purely through getsockopt() and setsockopt() would make things more confusing, 
so I added it as a helper function.

I can remove it in lieu of documentation if that would block merging, though I 
dont think that is the right move here.

On June 20, 2019 10:54:58 AM UTC, Andrew Svetlov  wrote:
>
>Andrew Svetlov  added the comment:
>
>Adding new constants like socket.IPPROTO_UDPLITE is fine.
>The question is: why we need a new function?
>There is no set_send_checksum_coverage() on C level IIRC
>
>--
>nosy: +asvetlov
>
>___
>Python tracker 
><https://bugs.python.org/issue37345>
>___

--

___
Python tracker 
<https://bugs.python.org/issue37345>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37345] Add formal support for UDPLITE protococl

2019-06-20 Thread Gabe Appleton


Gabe Appleton  added the comment:

I just want to be explicit so I don't mess up on protocol, since I am new to 
this project. Does that mean that you want me to remove the helper function and 
put documentation in about that sockopt, or that an exception could be made in 
this case?

--

___
Python tracker 
<https://bugs.python.org/issue37345>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37345] Add formal support for UDPLITE protococl

2019-06-21 Thread Gabe Appleton


Gabe Appleton  added the comment:

Okay, I removed the helper functions and added some additional documentation. 
Does that look okay now?

--
versions: +Python 3.8

___
Python tracker 
<https://bugs.python.org/issue37345>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37345] Add formal support for UDPLITE protocol

2019-06-22 Thread Gabe Appleton


Gabe Appleton  added the comment:

I didn't realize that when I submitted this the first time, but I corrected 
that in the documentation when someone else removed it from the tags. If I 
re-added it it was by mistake. I notice that my browser had that 
auto-highlighted. Should be fixed now.

--

___
Python tracker 
<https://bugs.python.org/issue37345>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33402] Change the fractions.Fraction class to convert to a unicode fraction string

2018-05-01 Thread Gabe Appleton

New submission from Gabe Appleton :

Currently it has a __repr__() which returns `Fraction(x, y)`, and a __str__() 
which returns `x/y`. I have a ready pull request to change this to a scheme 
where both return unicode fractions.

--
components: Library (Lib)
messages: 316026
nosy: gappleto97
priority: normal
severity: normal
status: open
title: Change the fractions.Fraction class to convert to a unicode fraction 
string
type: enhancement
versions: Python 3.8

___
Python tracker 
<https://bugs.python.org/issue33402>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33402] Change the fractions.Fraction class to convert to a unicode fraction string

2018-05-01 Thread Gabe Appleton

Change by Gabe Appleton :


--
keywords: +patch
pull_requests: +6372
stage:  -> patch review

___
Python tracker 
<https://bugs.python.org/issue33402>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33402] Change the fractions.Fraction class to convert to a unicode fraction string

2018-05-01 Thread Gabe Appleton

Gabe Appleton  added the comment:

Would it be workable if I instead just changed the __str__() method? I'm 
willing to go either way, but I feel like it's a bit nicer to have it output a 
nice fraction that way.

--

___
Python tracker 
<https://bugs.python.org/issue33402>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33402] Change the fractions.Fraction class to convert to a unicode fraction string

2018-05-02 Thread Gabe Appleton

Change by Gabe Appleton :


--
resolution:  -> rejected
stage: patch review -> resolved
status: open -> closed

___
Python tracker 
<https://bugs.python.org/issue33402>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com