Issue1898

classification
Title: Warn about unimplemented subprocess.Popen().terminate()
Type: behaviour Severity: normal
Components: Library Versions: Jython 2.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: amak, dschulten, fwierzbicki, varialus, zyasoft
Priority: high Keywords: patch

Created on 2012-05-26.00:27:00 by varialus, last changed 2014-07-09.23:59:12 by zyasoft.

Files
File name Uploaded Description Edit Remove
subprocess.py.diff varialus, 2012-05-30.06:10:20 Unified diff of improved fix.
Messages
msg7154 (view) Author: Varialus (varialus) Date: 2012-05-26.00:26:59
Subprocess termination not yet implemented. Subprocess should exit during interpreter shutdown.
msg7155 (view) Author: Varialus (varialus) Date: 2012-05-26.01:47:54
The attached diff file fixes the following NameError for me on Windows 7.

Traceback (most recent call last):
  File "JythonTest.py", line 30, in <module>
    PythonSeleniumTest().main()
  File "JythonTest.py", line 22, in main
    driver.quit()
  File "C:\jython\Lib\site-packages\selenium-2.21.3-py2.7.egg\selenium\webdriver\firefox\webdriver.py", line 66, in quit
    self.binary.kill()
  File "C:\jython\Lib\site-packages\selenium-2.21.3-py2.7.egg\selenium\webdriver\firefox\firefox_binary.py", line 52, in kill
    self.process.kill()
  File "C:\jython\Lib\subprocess.py", line 1386, in terminate
    _subprocess.TerminateProcess(self._handle, 1)
NameError: global name '_subprocess' is not defined
msg7214 (view) Author: Varialus (varialus) Date: 2012-06-13.15:35:54
This issue was encountered and fixed while I ported Selenium to run in Jython. Here are a few related issues.
https://code.google.com/p/selenium/issues/detail?id=3988
http://bugs.jython.org/issue1918
http://bugs.jython.org/issue1899
msg8749 (view) Author: Jim Baker (zyasoft) Date: 2014-06-19.14:29:52
Required as of Python 2.6

Readily mappable to Process.destroy, following the convention that Windows uses that kill = terminate
msg8751 (view) Author: Jim Baker (zyasoft) Date: 2014-06-19.14:35:31
Target beta 4
msg8844 (view) Author: Jim Baker (zyasoft) Date: 2014-06-28.06:29:19
Fixed as of http://hg.python.org/jython/rev/e9156cf6283f
History
Date User Action Args
2014-07-09 23:59:12zyasoftsetstatus: pending -> closed
2014-06-28 06:29:19zyasoftsetstatus: open -> pending
resolution: fixed
messages: + msg8844
2014-06-19 14:35:31zyasoftsetmessages: + msg8751
2014-06-19 14:29:52zyasoftsetassignee: fwierzbicki ->
messages: + msg8749
nosy: + zyasoft
2013-02-20 00:43:19fwierzbickisetpriority: high
assignee: fwierzbicki
versions: + Jython 2.7, - 2.7a1
2012-07-23 05:53:25dschultensetnosy: + dschulten
2012-06-13 15:41:09amaksetnosy: + amak
2012-06-13 15:35:54varialussetmessages: + msg7214
2012-05-30 06:10:51varialussetfiles: - subprocess.py.diff
2012-05-30 06:10:21varialussetfiles: + subprocess.py.diff
2012-05-29 05:17:18fwierzbickisetnosy: + fwierzbicki
2012-05-26 01:47:54varialussetmessages: + msg7155
2012-05-26 00:27:00varialuscreate