Opened 5 years ago

Closed 5 years ago

#3986 enhancement closed duplicate (duplicate)

test_process.py # DeprecationWarning: The popen2 module is deprecated. Use the subprocess # module

Reported by: truekonrads Owned by: konrads
Priority: normal Milestone:
Component: core Keywords: easy
Cc: truekonrads Branch:
Author: Launchpad Bug:

Description

C:\Documents and Settings\Konrads\My Documents\Twisted\twisted\test\test_process.py:10: DeprecationWarning: The popen2 module is deprecated. Use the subprocess module.

import popen2

Patch attached. However, I am getting error from Python 2.5.2 interpreter:
PASSED (skips=8, successes=66)
Exception exceptions.AttributeError: "'NoneType' object has no attribute 'error'" in <bound method Popen.del of <subprocess.Popen object at 0x845d88c>> ignored.

It appears to be a known bug.

Attachments (1)

test_process.patch (1.1 KB) - added by truekonrads 5 years ago.

Download all attachments as: .zip

Change History (5)

Changed 5 years ago by truekonrads

comment:1 Changed 5 years ago by truekonrads

  • Cc truekonrads added

comment:2 Changed 5 years ago by exarkun

  • Keywords review removed
  • Owner changed from glyph to konrads

This is a reasonable attempt. However, as long as this code is changing, I suggest getting rid of the child process junk entirely. The test uses it to check that it can get the stderr from a child process. Instead, it should run a child process which it knows the stderr of in advance. It could easily do this by running a custom program defined in the test.

Thanks!

comment:3 Changed 5 years ago by thijs

Duplicate of #3431?

comment:4 Changed 5 years ago by truekonrads

  • Resolution set to duplicate
  • Status changed from new to closed

This indeed is a duplicate of #3431. It should be addressed in manner as exarkun has pointed out. I think it would be best addressed by running a python program - this will guaranteed produce stderr.

Note: See TracTickets for help on using tickets.