Ticket #3986 enhancement closed duplicate

Opened 4 years ago

Last modified 4 years ago

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

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

Change History

Changed 4 years ago by truekonrads

1

Changed 4 years ago by truekonrads

  • cc truekonrads added

2

Changed 4 years ago by exarkun

  • owner changed from glyph to konrads
  • keywords easy added; easy, review removed

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!

3

Changed 4 years ago by thijs

Duplicate of #3431?

4

Changed 4 years ago by truekonrads

  • status changed from new to closed
  • resolution set to duplicate

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.