Issue 2551161
Created on 2021-09-06 03:33 by rouilj, last changed 2026-08-22 21:16 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 engine_zopetal.py's load() method is opening file for processing and not
closing. Looks like instance.py's _compile routine is doing the same.
Also an mo file is not closed in the i18n.py 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' mode::docutils.io"
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"
|
| msg8499 |
Author: [hidden] (rouilj) |
Date: 2026-08-22 21:16 |
|
Fixed two classes of ResourceErrors:
python 3.13+ uses sqlite (dbm.sqlite) as DBM, It report
ResourceWarnings because read only
database connections are left unclosed. All instances are now
closed.
changeset: 8766:99876ff604f8
logging files are left open when roundup exits because of invalid .ini
or .json
spec file in configuration.py. logging.shutdown() is called as part
of raising
the LoggingConfigError exception.
changeset: 8765:82d84399b22f
|
|
| Date |
User |
Action |
Args |
| 2026-08-22 21:16:49 | rouilj | set | messages:
+ msg8499 |
| 2021-09-06 20:09:59 | rouilj | set | status: 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:17 | rouilj | create | |
|