Code

Opened 6 years ago

Closed 6 years ago

Last modified 3 years ago

#8235 closed (fixed)

admin_scripts tests deprecation warning on Linux/Python 2.6b2

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

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 kmtracey 6 years ago.

Download all attachments as: .zip

Change History (4)

Changed 6 years ago by kmtracey

comment:1 Changed 6 years ago by kmtracey

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

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

comment:2 Changed 6 years ago by jacob

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

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

comment:3 Changed 3 years ago by jacob

  • milestone 1.0 beta deleted

Milestone 1.0 beta deleted

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.