This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: socket.SO_PRIORITY is missing
Type: enhancement Stage: resolved
Components: Tests Versions: Python 3.5
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: Claudiu.Popa, Sworddragon, larry, python-dev, r.david.murray, vajrasky, vstinner
Priority: normal Keywords: easy, patch

Created on 2013-11-26 17:06 by Sworddragon, last changed 2022-04-11 14:57 by admin. This issue is now closed.

File name Uploaded Description Edit
socket.patch Claudiu.Popa, 2013-11-26 17:59 review
Messages (9)
msg204506 - (view) Author: (Sworddragon) 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) * (Python committer) 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) * (Python triager) 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 (only for CAN, RDS and general flags).
msg204512 - (view) Author: R. David Murray (r.david.murray) * (Python committer) 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.
msg204586 - (view) Author: STINNER Victor (vstinner) * (Python committer) 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) * (Python committer) 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) (Python triager) Date: 2013-11-27 15:19
New changeset 9bbada125b3f by Benjamin Peterson in branch 'default':
add SO_PRIORITY (closes #19802)
msg269457 - (view) Author: Larry Hastings (larry) * (Python committer) 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).
Date User Action Args
2022-04-11 14:57:54adminsetgithub: 64001
2016-06-29 01:30:53larrysetmessages: + msg269457
versions: + Python 3.5, - Python 3.4
2016-06-29 01:28:12martin.pantersetversions: + Python 3.4, - Python 3.5
2013-11-27 15:19:44python-devsetstatus: open -> closed

nosy: + python-dev
messages: + msg204598

resolution: fixed
stage: resolved
2013-11-27 14:58:38larrysetmessages: + msg204593
2013-11-27 14:20:44vstinnersetnosy: + larry
messages: + msg204586
2013-11-27 13:46:19pitrousetnosy: + vstinner
2013-11-27 02:13:47vajraskysetnosy: + vajrasky
messages: + msg204547
2013-11-26 18:08:45r.david.murraysetmessages: + msg204512
2013-11-26 17:59:43Claudiu.Popasetfiles: + socket.patch

nosy: + Claudiu.Popa
messages: + msg204511

keywords: + patch
2013-11-26 17:35:14r.david.murraysetnosy: + r.david.murray
messages: + msg204509

components: + Tests, - Library (Lib)
type: behavior -> enhancement
2013-11-26 17:21:01benjamin.petersonsetkeywords: + easy
versions: + Python 3.5, - Python 2.7, Python 3.3
2013-11-26 17:06:19Sworddragoncreate