Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.maint.python > #7789
| From | Brian May <bam@debian.org> |
|---|---|
| Newsgroups | linux.debian.bugs.dist, linux.debian.maint.python |
| Subject | Bug#802839: django-celery: python 3 tests not invoked and break |
| Date | 2015-10-25 02:30 +0200 |
| Message-ID | <qnhm9-7Wg-1@gated-at.bofh.it> (permalink) |
| References | <qmVYl-2cr-3@gated-at.bofh.it> <qmWB4-3gM-5@gated-at.bofh.it> <qmY9Q-5tz-3@gated-at.bofh.it> |
| Organization | Debian |
Cross-posted to 2 groups.
Robert Collins <robertc@robertcollins.net> writes:
> I'd probably shut that warning up using the warnings module API rather
> than weaking the test more broadly.
Might be the best thing.
> Also - track down and file a bug on the leak source.
How *do* you track these down? The warning doesn't say where the file
was opened.
Anyway, I suspect the problem is with the call to imp.find_module(),
which is a depreciated function in Python 3.4:
It ends with:
file = open(file_path, mode, encoding=encoding)
return file, file_path, (suffix, mode, type_)
djcelery.loaders.find_related_module() calls this function and ignores
the result. Which obviously means the file doesn't get closed.
try:
imp.find_module(related_name, app_path)
except ImportError:
return
return importlib.import_module('{0}.{1}'.format(app, related_name))
Need to think about if it is worth fixing, and what the best fix is.
--
Brian May <bam@debian.org>
Back to linux.debian.maint.python | Previous | Next — Previous in thread | Find similar | Unroll thread
Bug#802839: django-celery: python 3 tests not invoked and break Brian May <bam@debian.org> - 2015-10-24 04:20 +0200
Bug#802839: django-celery: python 3 tests not invoked and break Robert Collins <robertc@robertcollins.net> - 2015-10-24 06:00 +0200
Bug#802839: django-celery: python 3 tests not invoked and break Brian May <bam@debian.org> - 2015-10-25 02:30 +0200
csiph-web