#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)
Change History (4)
by , 17 years ago
| Attachment: | popen.diff added |
|---|
comment:1 by , 17 years ago
comment:2 by , 17 years ago
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |
I meant tested on Linux 2.6b2 of course, not 2.5b2.