Opened 16 years ago

Closed 16 years ago

Last modified 13 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

Description

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 runtests.py --settings=testsettings admin_scripts
/homedir/tmp/django/trunk/tests/regressiontests/admin_scripts/tests.py:109: DeprecationWarning: os.popen3 is deprecated.  Use the subprocess module.
  stdin, stdout, stderr = os.popen3(cmd)
----------------------------------------------------------------------
Ran 109 tests in 22.997s

OK

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: http://www.python.org/dev/buildbot/community/all/?show=sparc%20Solaris%2010%20trunk

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 16 years ago.

Download all attachments as: .zip

Change History (4)

by Karen Tracey, 16 years ago

Attachment: popen.diff added

comment:1 by Karen Tracey, 16 years ago

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

comment:2 by Jacob, 16 years ago

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 by Jacob, 13 years ago

milestone: 1.0 beta

Milestone 1.0 beta deleted

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