Opened 15 years ago

Closed 15 years ago

Last modified 12 years ago

#8235 closed (fixed)

admin_scripts tests deprecation warning on Linux/Python 2.6b2

Reported by: Karen Tracey Owned by: nobody
Component: Testing framework Version: dev
Severity: Keywords: python26
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


Running the admin_scripts tests on Python 2.6 beta 2 I get a deprecation warning about popen3 (though that doesn't cause the tests to fail):

user@gutsy:~/tmp/django/trunk/tests$ /homedir/Python/Python-2.6b2/python --settings=testsettings admin_scripts
/homedir/tmp/django/trunk/tests/regressiontests/admin_scripts/ DeprecationWarning: os.popen3 is deprecated.  Use the subprocess module.
  stdin, stdout, stderr = os.popen3(cmd)
Ran 109 tests in 22.997s


I do not get the warning running on Windows, so this may be specific to the way I built python (on Windows I used a prebuilt binary), though the warning is also seen in the Python community buildbot output:

I don't see any harm in using subprocess if it's available so I'll attach a patch that does that. Patch was tested on

1 -- Linux Python 2.4.4, 2.5.1, 2.5b2

2 -- Windows Pyhton 2.3.5, 2.5.1, 2.6b2

Attachments (1)

popen.diff (777 bytes) - added by Karen Tracey 15 years ago.

Download all attachments as: .zip

Change History (4)

Changed 15 years ago by Karen Tracey

Attachment: popen.diff added

comment:1 Changed 15 years ago by Karen Tracey

I meant tested on Linux 2.6b2 of course, not 2.5b2.

comment:2 Changed 15 years ago by Jacob

Resolution: fixed
Status: newclosed

(In [8309]) Fixed #8235: use subprocess instead of popen3 so that Python 2.6 is happy. Thanks, Karen Tracey.

comment:3 Changed 12 years ago by Jacob

milestone: 1.0 beta

Milestone 1.0 beta deleted

Note: See TracTickets for help on using tickets.
Back to Top