Opened 5 months ago

Closed 5 weeks 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 Craig Rodrigues)

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 5 months ago by Craig Rodrigues

Description: modified (diff)

comment:2 Changed 5 months ago by Craig Rodrigues

Component: coretrial
Summary: Lots of ResourceWarning on Python 3.5Lots of ResourceWarning on Python 3.5 in trial

comment:3 Changed 5 weeks ago by mark williams

Resolution: duplicate
Status: newclosed
Note: See TracTickets for help on using tickets.