Opened 18 months ago
Closed 14 months ago
#9278 defect closed duplicate (duplicate)
Lots of ResourceWarning on Python 3.5 in trial
Reported by: | Craig Rodrigues | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | trial | Keywords: | |
Cc: | Branch: | ||
Author: |
Description (last modified by )
I did the following to enable more warnings when running trial using Python 3.5 under Fedora 25:
python -Wall -m twisted.trial twisted
I saw a lot of ResourceWarnings for example:
twisted.trial._dist.test.test_disttrial DistTrialRunnerTests test_createLocalWorkers ... [OK] test_launchWorkerProcesses ... [OK] test_minimalWorker ... [OK] /home/vagrant/twisted5/src/twisted/trial/_dist/test/test_disttrial.py:217: ResourceWarning: unclosed file <_io.TextIOWrapper name='/home/vagrant/twisted5/src/_trial_temp/twisted.trial._dist.test.test_di/DistTrialRunnerTests/test_minimalWorker/dlun7z9m/temp/0/out.log' mode='w' encoding='UTF-8'>wisted5/src/_trial_temp/twisted.trial._dist.test.test_di/DistTrialRunnerTests/test_minimalWorker/dlun7z9m/temp/0/err.log' mode='w' encoding='UTF-8'> test_runUntilFailure ... [OK] /home/vagrant/twisted5/src/twisted/trial/_dist/test/test_disttrial.py:397: ResourceWarning: unclosed file <_io.TextIOWrapper name='/home/vagrant/twisted5/src/_trial_temp/twisted.trial._dist.test.test_di/DistTrialRunnerTests/test_runUntilFailure/bzgokndm/temp/0/out.log' mode='w' encoding='UTF-8'> /home/vagrant/twisted5/src/twisted/trial/_dist/test/test_disttrial.py:397: ResourceWarning: unclosed file <_io.TextIOWrapper name='/home/vagrant/twisted5/src/_trial_temp/twisted.trial._dist.test.test_di/DistTrialRunnerTests/test_runUntilFailure/bzgokndm/temp/0/err.log' mode='w' encoding='UTF-8'> test_runUsedDirectory ... [OK] /home/vagrant/twisted5/src/twisted/python/reflect.py:448: ResourceWarning: unclosed file <_io.FileIO name='/home/vagrant/twisted5/src/_trial_temp/twisted.trial._dist.test.test_di/DistTrialRunnerTests/test_runUncleanWarnings/08r9fpn6/temp/0/test.log' mode='wb' closefd=True> /home/vagrant/twisted5/src/twisted/python/reflect.py:448: ResourceWarning: unclosed file <_io.FileIO name='/home/vagrant/twisted5/src/_trial_temp/twisted.trial._dist.test.test_di/DistTrialRunnerTests/test_runUnexpectedError/77x3rje8/temp/0/test.log' mode='wb' closefd=True> /home/vagrant/twisted5/src/twisted/python/reflect.py:448: ResourceWarning: unclosed file <_io.FileIO name='/home/vagrant/twisted5/src/_trial_temp/twisted.trial._dist.test.test_di/DistTrialRunnerTests/test_runUntilFailure/bzgokndm/temp/0/test.log' mode='wb' closefd=True> /home/vagrant/twisted5/src/twisted/trial/_dist/test/test_disttrial.py:208: ResourceWarning: unclosed file <_io.TextIOWrapper name='/home/vagrant/twisted5/src/_trial_temp/twisted.trial._dist.test.test_di/DistTrialRunnerTests/test_runUsedDirectory/8qnv1k8q/temp/_trial_temp-1/3/out.log' mode='w' encoding='UTF-8'> /home/vagrant/twisted5/src/twisted/trial/_dist/test/test_disttrial.py:208: ResourceWarning: unclosed file <_io.TextIOWrapper name='/home/vagrant/twisted5/src/_trial_temp/twisted.trial._dist.test.test_di/DistTrialRunnerTests/test_runUsedDirectory/8qnv1k8q/temp/_trial_temp-1/3/err.log' mode='w' encoding='UTF-8'> /home/vagrant/twisted5/src/twisted/trial/_dist/test/test_disttrial.py:208: ResourceWarning: unclosed file <_io.TextIOWrapper name='/home/vagrant/twisted5/src/_trial_temp/twisted.trial._dist.test.test_di/DistTrialRunnerTests/test_runUsedDirectory/8qnv1k8q/temp/_trial_temp-1/2/out.log' mode='w' encoding='UTF-8'> /home/vagrant/twisted5/src/twisted/trial/_dist/test/test_disttrial.py:208: ResourceWarning: unclosed file <_io.TextIOWrapper name='/home/vagrant/twisted5/src/_trial_temp/twisted.trial._dist.test.test_di/DistTrialRunnerTests/test_runUsedDirectory/8qnv1k8q/temp/_trial_temp-1/2/err.log' mode='w' encoding='UTF-8'> /home/vagrant/twisted5/src/twisted/trial/_dist/test/test_disttrial.py:208: ResourceWarning: unclosed file <_io.TextIOWrapper name='/home/vagrant/twisted5/src/_trial_temp/twisted.trial._dist.test.test_di/DistTrialRunnerTests/test_runUsedDirectory/8qnv1k8q/temp/_trial_temp-1/1/out.log' mode='w' encoding='UTF-8'> /home/vagrant/twisted5/src/twisted/trial/_dist/test/test_disttrial.py:208: ResourceWarning: unclosed file <_io.TextIOWrapper name='/home/vagrant/twisted5/src/_trial_temp/twisted.trial._dist.test.test_di/DistTrialRunnerTests/test_runUsedDirectory/8qnv1k8q/temp/_trial_temp-1/1/err.log' mode='w' en:
Change History (3)
comment:1 Changed 18 months ago by
Description: | modified (diff) |
---|
comment:2 Changed 18 months ago by
Component: | core → trial |
---|---|
Summary: | Lots of ResourceWarning on Python 3.5 → Lots of ResourceWarning on Python 3.5 in trial |
comment:3 Changed 14 months ago by
Resolution: | → duplicate |
---|---|
Status: | new → closed |
Note: See
TracTickets for help on using
tickets.
Let's track this in a milestone: https://twistedmatrix.com/trac/milestone/Eliminate%20ResourceWarnings