Issues

Issue #2669 resolved

test_execute.py misses import of logging

Anonymous created an issue

test_execute.py misses import of logging, don't know why. Present in at least 0.7.9 && 0.7.10.

from test.lib import testing, engines from test.lib.engines import testing_engine import logging from sqlalchemy.dialects.oracle.zxjdbc import ReturningParam from sqlalchemy.engine import base, default from sqlalchemy.engine.base import Connection, Engine

import logging which shoulf be fine for some reason requires

from logging import handlers, getLogger, DEBUG, INFO, WARN

Comments (8)

  1. Mike Bayer repo owner

    need to know what "misses" means. There's no issue that I can reproduce here. Do you perhaps have a file called "logging.py" or "logging.pyc" hanging around somewhere it's not supposed to be (like in a very old SQLAlhcemy from version 0.4?)

  2. Anonymous

    testuser@archtester ~/cvsPortage/gentoo-x86/dev-python/matplotlib $ qfile logging dev-lang/python (/usr/lib64/python2.7/logging)

    dev-lang/python (/usr/lib64/python3.2/logging)

    dev-lang/python (/usr/lib64/python2.5/logging)

    dev-lang/python (/usr/lib64/python2.6/logging)

    dev-lang/python (/usr/lib64/python3.3/logging)

    dev-lang/python (/usr/lib64/python3.1/logging)

    dev-java/jython (/usr/share/jython-2.5/Lib/logging)

    dev-python/pypy (/usr/lib64/pypy2.0/lib-python/2.7/logging)

    dev-python/pypy (/usr/lib64/pypy1.9/lib-python/2.7/logging)

    those ones.

    Do you perhaps have a file called "logging.py" or "logging.pyc" hanging around somewhere it's not supposed to be (like in a very old SQLAlhcemy from version 0.4?)

    No

  3. Anonymous

    yes. you found them.

    from invoking the ebuild and from

    testuser@archtester /mnt/gen2/TmpDir/portage/dev-python/sqlalchemy-0.7.10/work/SQLAlchemy-0.7.10 $ PYTHONPATH=. python sqla_nose.py

    yield

    .............................................................................

    ERROR: test.orm.test_mapper.ORMLoggingTest.test_mapper_info_aliased

    Traceback (most recent call last): File "/usr/lib64/python2.6/site-packages/nose/case.py", line 381, in setUp try_run(self.inst, ('setup', 'setUp')) File "/usr/lib64/python2.6/site-packages/nose/util.py", line 479, in try_run return func() File "/mnt/gen2/TmpDir/portage/dev-python/sqlalchemy-0.7.10/work/SQLAlchemy-0.7.10/./test/orm/test_mapper.py", line 1590, in setup self.buf = logging.handlers.BufferingHandler(100) AttributeError: 'module' object has no attribute 'handlers'


    Ran 4033 tests in 114.442s

    FAILED (SKIP=139, errors=16)

    indeed, import logging, logging.handlers is simpler and it appears to cover the misfiring As long as it fixes everything, well and good, however I wonder what happened to import logging, logging.handlers, logging.getlogger, logging.{DEBUG, INFO, WARN}

    But then, who cares, as long as it works.

    "There's no issue that I can reproduce here. ..is there any understanding why this is occurring in this environment? the test has been this way for years. "

    This I predicted. Hence,

    "import logging which should be fine for some reason requires "

    making it some obscure gentoo specific issue. This is why I was reluctant to ever submit this in the first place, though granted I ought have given you either a link to the gentoo bug 458684 or the above cut and paste to help put you in the picture. It's a straight forward import. Why it misfires in a healthy gentoo environment is frankly totally weird, but sometimes you get that.

  4. Log in to comment