Roundup Tracker - Issues

Issue 2551161

Handle errors when running with -W error
Type: behavior Severity: normal
Components: Database, Web interface, Mail interface, Command-line interface Versions: devel
Status: open
: rouilj : rouilj
Priority: normal :

Created on 2021-09-06 03:33 by rouilj, last changed 2021-09-06 20:09 by rouilj.

msg7341 Author: [hidden] (rouilj) Date: 2021-09-06 03:33
When running tracker with python -W default I get a lot of errors like:

   ResourceWarning: unclosed file <_io.TextIOWrapper name='.../demo/html/issue.process.html'
      mode='r' encoding='UTF-8'>
Looks like's load() method is opening file for processing and not
closing. Looks like's _compile routine is doing the same. 
Also an mo file is not closed in the get_translation() function.

Fix by adding 'with open' clause for the first two and closing the file in the last case.
msg7342 Author: [hidden] (rouilj) Date: 2021-09-06 20:09
Fixed some ResourceWarnings in changeset:   6479:808f7a8ed2b6

More have been fixed in other changesets.

Still need to get a clean -W error run, but some are really obscure.

Added a number of ignores. Current list is:

markdown uses onld interface to dict
    -W "ignore:SelectableGroups:DeprecationWarning"

gpgme uses imp and shouldn't
    -W "ignore:the imp module:DeprecationWarning:gpg.gpgme:15"

docutils uses 'U' mode
    -W "ignore:'U'"

roundup.demo leaves socket open when it is shut down.
    -W "ignore:unclosed:ResourceWarning:roundup.roundup.demo"

Odd unclosed file from enum module.
    -W "ignore:unclosed file:ResourceWarning:enum"
Date User Action Args
2021-09-06 20:09:59rouiljsetstatus: new -> open
messages: + msg7342
components: + Database, Mail interface, Command-line interface, - Interface, API
title: Handle ResourceWarnings when running with -W default -> Handle errors when running with -W error
2021-09-06 03:33:17rouiljcreate