msg204506 - (view) |
Author: (deleted250130) |
Date: 2013-11-26 17:06 |
socket(7) does contain SO_PRIORITY but trying to use this value will result in this error: AttributeError: 'module' object has no attribute 'SO_PRIORITY' |
|
|
msg204509 - (view) |
Author: R. David Murray (r.david.murray) *  |
Date: 2013-11-26 17:35 |
For the record, a little googling indicates this may be a linux-only option (FreeBSD 6.4, for example, does not support it, nor does OS X 10.8, which are two systems to which I currently have access). That doesn't mean it shouldn't be added. |
|
|
msg204511 - (view) |
Author: PCManticore (Claudiu.Popa) *  |
Date: 2013-11-26 17:59 |
Here's a simple patch which adds this flag. It has no tests, because I noticed that there are no tests for per-platform flags in test_socket.py (only for CAN, RDS and general flags). |
|
|
msg204512 - (view) |
Author: R. David Murray (r.david.murray) *  |
Date: 2013-11-26 18:08 |
Yeah, I'm not sure how you'd write a test in such a way that it would test anything meaningful. Parse the .h file in the test? Seems like overkill. |
|
|
msg204547 - (view) |
Author: Vajrasky Kok (vajrasky) * |
Date: 2013-11-27 02:13 |
I agree. The test is not that meaningful. But hey, we have the test that tests this kind of constant. http://hg.python.org/cpython/rev/513da56d28de |
|
|
msg204586 - (view) |
Author: STINNER Victor (vstinner) *  |
Date: 2013-11-27 14:20 |
You should also modify Doc/library/socket.rst to mention the new constant in the documentation (don't forget the ".. versionadded::" flag). Adding a new constant cannot break anything in Python, so I propose to it in Python 3.4. @Larry (our release manager): Do you agree? |
|
|
msg204593 - (view) |
Author: Larry Hastings (larry) *  |
Date: 2013-11-27 14:58 |
It's *possible* but I'm willing to risk it. You have my permission to apply that patch. |
|
|
msg204598 - (view) |
Author: Roundup Robot (python-dev)  |
Date: 2013-11-27 15:19 |
New changeset 9bbada125b3f by Benjamin Peterson in branch 'default': add SO_PRIORITY (closes #19802) http://hg.python.org/cpython/rev/9bbada125b3f |
|
|
msg269457 - (view) |
Author: Larry Hastings (larry) *  |
Date: 2016-06-29 01:30 |
Sorry, this is now too late for 3.4. 3.4 is now in "security fixes only" mode. This is not a security fix, therefore 3.4 is now ineligible. Since this change was committed to 3.5, it's better to let the historical record reflect that. So I'm changing the version back to 3.5 (and not 3.4). |
|
|