python / asyncio

asyncio historical repository
https://docs.python.org/3/library/asyncio.html
1.04k stars 177 forks source link

SO_REUSEPORT is defined but not implemented on Android #352

Closed xdegaye closed 8 years ago

xdegaye commented 8 years ago

See Python issue 26858 [1]. The following patch defines is_android in a backward compatible way to support the changes in Python issue 26858 [1].

[1] http://bugs.python.org/issue26858.

diff -r 2a742cf69c8d asyncio/test_support.py
--- a/asyncio/test_support.py   Sun May 22 09:02:27 2016 +0200
+++ b/asyncio/test_support.py   Sun May 22 10:11:48 2016 +0200
@@ -102,6 +102,9 @@

 is_jython = sys.platform.startswith('java')

+is_android = (hasattr(platform, 'android_ver') and
+              bool(platform.android_ver()[0]))
+
 def gc_collect():
     """Force as many objects as possible to be collected.
1st1 commented 8 years ago

Closing this one now.