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.

classification
Title: cannot set_inheritable() for a file descriptor on Android
Type: behavior Stage: resolved
Components: Interpreter Core Versions: Python 3.7, Python 3.6
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: xdegaye Nosy List: python-dev, xdegaye
Priority: normal Keywords: patch

Created on 2016-11-19 14:19 by xdegaye, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
set_inheritable.patch xdegaye, 2016-11-19 14:26 review
Pull Requests
URL Status Linked Edit
PR 552 closed dstufft, 2017-03-31 16:36
Messages (3)
msg281221 - (view) Author: Xavier de Gaye (xdegaye) * (Python triager) Date: 2016-11-19 14:19
test_socket on Android fails with:
FAIL: test_set_inheritable (test.test_socket.InheritanceTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/sdcard/org.bitbucket.pyona/lib/python3.7/test/test_socket.py", line 4936, in test_set_inheritable
    self.assertEqual(sock.get_inheritable(), True)
AssertionError: False != True

======================================================================
FAIL: test_set_inheritable_cloexec (test.test_socket.InheritanceTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/sdcard/org.bitbucket.pyona/lib/python3.7/test/test_socket.py", line 4965, in test_set_inheritable_cloexec
    0)
AssertionError: 1 != 0

Setting a file descriptor with os.set_inheritable() also fails.
Setting directly the file descriptor with fcntl.fcntl() succeeds.
msg281222 - (view) Author: Xavier de Gaye (xdegaye) * (Python triager) Date: 2016-11-19 14:26
It seems the code path run by Android is not tested by any of the buildbots.
Patch attached.
msg281224 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2016-11-19 15:21
New changeset 2fb2e3dc450e by Xavier de Gaye in branch '3.6':
Issue #28746: Fix the set_inheritable() file descriptor method on platforms
https://hg.python.org/cpython/rev/2fb2e3dc450e

New changeset 3248782c3176 by Xavier de Gaye in branch 'default':
Issue #28746: Merge 3.6
https://hg.python.org/cpython/rev/3248782c3176
History
Date User Action Args
2022-04-11 14:58:39adminsetgithub: 72932
2017-03-31 16:36:10dstufftsetpull_requests: + pull_request860
2016-11-21 15:40:04xdegayelinkissue26865 dependencies
2016-11-19 16:35:49xdegayesetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2016-11-19 15:21:29python-devsetnosy: + python-dev
messages: + msg281224
2016-11-19 14:26:07xdegayesetfiles: + set_inheritable.patch
keywords: + patch
messages: + msg281222

stage: needs patch -> patch review
2016-11-19 14:19:33xdegayecreate