TypeError: 'dict' object does not support the context manager protocol

Bug #2053129 reported by Thomas Goirand
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Object Storage (swift)
New
Undecided
Unassigned

Bug Description

Hi,

Building Swift in Debian Sid currently fails because of the below errors. Please help me fix them.

======================================================================
FAIL: test.unit.proxy.controllers.test_obj.TestECObjController.test_feed_remaining_primaries
test.unit.proxy.controllers.test_obj.TestECObjController.test_feed_remaining_primaries
----------------------------------------------------------------------
testtools.testresult.real._StringException: Traceback (most recent call last):
  File "/<<PKGBUILDDIR>>/test/unit/proxy/controllers/test_obj.py", line 2820, in test_feed_remaining_primaries
    feeder_q.get.side_effect = feeder_timeout
    ^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/mock/mock.py", line 699, in __getattr__
    with NonCallableMock._lock:
TypeError: 'dict' object does not support the context manager protocol

======================================================================
FAIL: test.unit.proxy.test_mem_server.TestAccountController.test_DELETE
test.unit.proxy.test_mem_server.TestAccountController.test_DELETE
----------------------------------------------------------------------
testtools.testresult.real._StringException: Traceback (most recent call last):
  File "/<<PKGBUILDDIR>>/test/unit/__init__.py", line 191, in setUp
    orig_setUp(cls_self)
  File "/<<PKGBUILDDIR>>/test/unit/proxy/test_server.py", line 11052, in setUp
    self.app = proxy_server.Application(conf,
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/<<PKGBUILDDIR>>/swift/proxy/server.py", line 204, in __init__
    self.logger = get_logger(conf, log_route='proxy-server',
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/<<PKGBUILDDIR>>/swift/common/utils/__init__.py", line 1970, in get_logger
    SysLogHandler.LOG_LOCAL0)
    ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/mock/mock.py", line 699, in __getattr__
    with NonCallableMock._lock:
TypeError: 'dict' object does not support the context manager protocol

======================================================================
FAIL: test.unit.proxy.test_mem_server.TestAccountController.test_DELETE_with_query_string
test.unit.proxy.test_mem_server.TestAccountController.test_DELETE_with_query_string
----------------------------------------------------------------------
testtools.testresult.real._StringException: Traceback (most recent call last):
  File "/<<PKGBUILDDIR>>/test/unit/__init__.py", line 191, in setUp
    orig_setUp(cls_self)
  File "/<<PKGBUILDDIR>>/test/unit/proxy/test_server.py", line 11052, in setUp
    self.app = proxy_server.Application(conf,
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/<<PKGBUILDDIR>>/swift/proxy/server.py", line 204, in __init__
    self.logger = get_logger(conf, log_route='proxy-server',
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/<<PKGBUILDDIR>>/swift/common/utils/__init__.py", line 1970, in get_logger
    SysLogHandler.LOG_LOCAL0)
    ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/mock/mock.py", line 699, in __getattr__
    with NonCallableMock._lock:
TypeError: 'dict' object does not support the context manager protocol

======================================================================
FAIL: test.unit.proxy.test_mem_server.TestAccountController.test_GET
test.unit.proxy.test_mem_server.TestAccountController.test_GET
----------------------------------------------------------------------
testtools.testresult.real._StringException: Traceback (most recent call last):
  File "/<<PKGBUILDDIR>>/test/unit/__init__.py", line 191, in setUp
    orig_setUp(cls_self)
  File "/<<PKGBUILDDIR>>/test/unit/proxy/test_server.py", line 11052, in setUp
    self.app = proxy_server.Application(conf,
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/<<PKGBUILDDIR>>/swift/proxy/server.py", line 204, in __init__
    self.logger = get_logger(conf, log_route='proxy-server',
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/<<PKGBUILDDIR>>/swift/common/utils/__init__.py", line 1970, in get_logger
    SysLogHandler.LOG_LOCAL0)
    ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/mock/mock.py", line 699, in __getattr__
    with NonCallableMock._lock:
TypeError: 'dict' object does not support the context manager protocol

======================================================================
FAIL: test.unit.proxy.test_mem_server.TestAccountController.test_GET_autocreate
test.unit.proxy.test_mem_server.TestAccountController.test_GET_autocreate
----------------------------------------------------------------------
testtools.testresult.real._StringException: Traceback (most recent call last):
  File "/<<PKGBUILDDIR>>/test/unit/__init__.py", line 191, in setUp
    orig_setUp(cls_self)
  File "/<<PKGBUILDDIR>>/test/unit/proxy/test_server.py", line 11052, in setUp
    self.app = proxy_server.Application(conf,
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/<<PKGBUILDDIR>>/swift/proxy/server.py", line 204, in __init__
    self.logger = get_logger(conf, log_route='proxy-server',
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/<<PKGBUILDDIR>>/swift/common/utils/__init__.py", line 1970, in get_logger
    SysLogHandler.LOG_LOCAL0)
    ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/mock/mock.py", line 699, in __getattr__
    with NonCallableMock._lock:
TypeError: 'dict' object does not support the context manager protocol

======================================================================
FAIL: test.unit.proxy.test_mem_server.TestAccountController.test_HEAD
test.unit.proxy.test_mem_server.TestAccountController.test_HEAD
----------------------------------------------------------------------
testtools.testresult.real._StringException: Traceback (most recent call last):
  File "/<<PKGBUILDDIR>>/test/unit/__init__.py", line 191, in setUp
    orig_setUp(cls_self)
  File "/<<PKGBUILDDIR>>/test/unit/proxy/test_server.py", line 11052, in setUp
    self.app = proxy_server.Application(conf,
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/<<PKGBUILDDIR>>/swift/proxy/server.py", line 204, in __init__
    self.logger = get_logger(conf, log_route='proxy-server',
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/<<PKGBUILDDIR>>/swift/common/utils/__init__.py", line 1970, in get_logger
    SysLogHandler.LOG_LOCAL0)
    ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/mock/mock.py", line 699, in __getattr__
    with NonCallableMock._lock:
TypeError: 'dict' object does not support the context manager protocol

======================================================================
FAIL: test.unit.proxy.test_mem_server.TestAccountController.test_HEAD_autocreate
test.unit.proxy.test_mem_server.TestAccountController.test_HEAD_autocreate
----------------------------------------------------------------------
testtools.testresult.real._StringException: Traceback (most recent call last):
  File "/<<PKGBUILDDIR>>/test/unit/__init__.py", line 191, in setUp
    orig_setUp(cls_self)
  File "/<<PKGBUILDDIR>>/test/unit/proxy/test_server.py", line 11052, in setUp
    self.app = proxy_server.Application(conf,
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/<<PKGBUILDDIR>>/swift/proxy/server.py", line 204, in __init__
    self.logger = get_logger(conf, log_route='proxy-server',
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/<<PKGBUILDDIR>>/swift/common/utils/__init__.py", line 1970, in get_logger
    SysLogHandler.LOG_LOCAL0)
    ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/mock/mock.py", line 699, in __getattr__
    with NonCallableMock._lock:
TypeError: 'dict' object does not support the context manager protocol

======================================================================
FAIL: test.unit.proxy.test_mem_server.TestAccountController.test_OPTIONS
test.unit.proxy.test_mem_server.TestAccountController.test_OPTIONS
----------------------------------------------------------------------
testtools.testresult.real._StringException: Traceback (most recent call last):
  File "/<<PKGBUILDDIR>>/test/unit/__init__.py", line 191, in setUp
    orig_setUp(cls_self)
  File "/<<PKGBUILDDIR>>/test/unit/proxy/test_server.py", line 11052, in setUp
    self.app = proxy_server.Application(conf,
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/<<PKGBUILDDIR>>/swift/proxy/server.py", line 204, in __init__
    self.logger = get_logger(conf, log_route='proxy-server',
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/<<PKGBUILDDIR>>/swift/common/utils/__init__.py", line 1970, in get_logger
    SysLogHandler.LOG_LOCAL0)
    ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/mock/mock.py", line 699, in __getattr__
    with NonCallableMock._lock:
TypeError: 'dict' object does not support the context manager protocol

======================================================================
FAIL: test.unit.proxy.test_mem_server.TestAccountController.test_POST_autocreate
test.unit.proxy.test_mem_server.TestAccountController.test_POST_autocreate
----------------------------------------------------------------------
testtools.testresult.real._StringException: Traceback (most recent call last):
  File "/<<PKGBUILDDIR>>/test/unit/__init__.py", line 191, in setUp
    orig_setUp(cls_self)
  File "/<<PKGBUILDDIR>>/test/unit/proxy/test_server.py", line 11052, in setUp
    self.app = proxy_server.Application(conf,
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/<<PKGBUILDDIR>>/swift/proxy/server.py", line 204, in __init__
    self.logger = get_logger(conf, log_route='proxy-server',
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/<<PKGBUILDDIR>>/swift/common/utils/__init__.py", line 1970, in get_logger
    SysLogHandler.LOG_LOCAL0)
    ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/mock/mock.py", line 699, in __getattr__
    with NonCallableMock._lock:
TypeError: 'dict' object does not support the context manager protocol

======================================================================
FAIL: test.unit.proxy.test_mem_server.TestAccountController.test_POST_autocreate_with_sysmeta
test.unit.proxy.test_mem_server.TestAccountController.test_POST_autocreate_with_sysmeta
----------------------------------------------------------------------
testtools.testresult.real._StringException: Traceback (most recent call last):
  File "/<<PKGBUILDDIR>>/test/unit/__init__.py", line 191, in setUp
    orig_setUp(cls_self)
  File "/<<PKGBUILDDIR>>/test/unit/proxy/test_server.py", line 11052, in setUp
    self.app = proxy_server.Application(conf,
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/<<PKGBUILDDIR>>/swift/proxy/server.py", line 204, in __init__
    self.logger = get_logger(conf, log_route='proxy-server',
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/<<PKGBUILDDIR>>/swift/common/utils/__init__.py", line 1970, in get_logger
    SysLogHandler.LOG_LOCAL0)
    ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/mock/mock.py", line 699, in __getattr__
    with NonCallableMock._lock:
TypeError: 'dict' object does not support the context manager protocol

======================================================================
FAIL: test.unit.proxy.test_mem_server.TestAccountController.test_POST_bad_metadata
test.unit.proxy.test_mem_server.TestAccountController.test_POST_bad_metadata
----------------------------------------------------------------------
testtools.testresult.real._StringException: Traceback (most recent call last):
  File "/<<PKGBUILDDIR>>/test/unit/__init__.py", line 191, in setUp
    orig_setUp(cls_self)
  File "/<<PKGBUILDDIR>>/test/unit/proxy/test_server.py", line 11052, in setUp
    self.app = proxy_server.Application(conf,
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/<<PKGBUILDDIR>>/swift/proxy/server.py", line 204, in __init__
    self.logger = get_logger(conf, log_route='proxy-server',
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/<<PKGBUILDDIR>>/swift/common/utils/__init__.py", line 1970, in get_logger
    SysLogHandler.LOG_LOCAL0)
    ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/mock/mock.py", line 699, in __getattr__
    with NonCallableMock._lock:
TypeError: 'dict' object does not support the context manager protocol

======================================================================
FAIL: test.unit.proxy.test_mem_server.TestAccountController.test_POST_metadata
test.unit.proxy.test_mem_server.TestAccountController.test_POST_metadata
----------------------------------------------------------------------
testtools.testresult.real._StringException: Traceback (most recent call last):
  File "/<<PKGBUILDDIR>>/test/unit/__init__.py", line 191, in setUp
    orig_setUp(cls_self)
  File "/<<PKGBUILDDIR>>/test/unit/proxy/test_server.py", line 11052, in setUp
    self.app = proxy_server.Application(conf,
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/<<PKGBUILDDIR>>/swift/proxy/server.py", line 204, in __init__
    self.logger = get_logger(conf, log_route='proxy-server',
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/<<PKGBUILDDIR>>/swift/common/utils/__init__.py", line 1970, in get_logger
    SysLogHandler.LOG_LOCAL0)
    ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/mock/mock.py", line 699, in __getattr__
    with NonCallableMock._lock:
TypeError: 'dict' object does not support the context manager protocol

======================================================================
FAIL: test.unit.proxy.test_mem_server.TestAccountController.test_PUT
test.unit.proxy.test_mem_server.TestAccountController.test_PUT
----------------------------------------------------------------------
testtools.testresult.real._StringException: Traceback (most recent call last):
  File "/<<PKGBUILDDIR>>/test/unit/__init__.py", line 191, in setUp
    orig_setUp(cls_self)
  File "/<<PKGBUILDDIR>>/test/unit/proxy/test_server.py", line 11052, in setUp
    self.app = proxy_server.Application(conf,
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/<<PKGBUILDDIR>>/swift/proxy/server.py", line 204, in __init__
    self.logger = get_logger(conf, log_route='proxy-server',
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/<<PKGBUILDDIR>>/swift/common/utils/__init__.py", line 1970, in get_logger
    SysLogHandler.LOG_LOCAL0)
    ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/mock/mock.py", line 699, in __getattr__
    with NonCallableMock._lock:
TypeError: 'dict' object does not support the context manager protocol

======================================================================
FAIL: test.unit.proxy.test_mem_server.TestAccountController.test_PUT_bad_metadata
test.unit.proxy.test_mem_server.TestAccountController.test_PUT_bad_metadata
----------------------------------------------------------------------
testtools.testresult.real._StringException: Traceback (most recent call last):
  File "/<<PKGBUILDDIR>>/test/unit/__init__.py", line 191, in setUp
    orig_setUp(cls_self)
  File "/<<PKGBUILDDIR>>/test/unit/proxy/test_server.py", line 11052, in setUp
    self.app = proxy_server.Application(conf,
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/<<PKGBUILDDIR>>/swift/proxy/server.py", line 204, in __init__
    self.logger = get_logger(conf, log_route='proxy-server',
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/<<PKGBUILDDIR>>/swift/common/utils/__init__.py", line 1970, in get_logger
    SysLogHandler.LOG_LOCAL0)
    ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/mock/mock.py", line 699, in __getattr__
    with NonCallableMock._lock:
TypeError: 'dict' object does not support the context manager protocol

======================================================================
FAIL: test.unit.proxy.test_mem_server.TestAccountController.test_PUT_connect_exceptions
test.unit.proxy.test_mem_server.TestAccountController.test_PUT_connect_exceptions
----------------------------------------------------------------------
testtools.testresult.real._StringException: Traceback (most recent call last):
  File "/<<PKGBUILDDIR>>/test/unit/__init__.py", line 191, in setUp
    orig_setUp(cls_self)
  File "/<<PKGBUILDDIR>>/test/unit/proxy/test_server.py", line 11052, in setUp
    self.app = proxy_server.Application(conf,
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/<<PKGBUILDDIR>>/swift/proxy/server.py", line 204, in __init__
    self.logger = get_logger(conf, log_route='proxy-server',
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/<<PKGBUILDDIR>>/swift/common/utils/__init__.py", line 1970, in get_logger
    SysLogHandler.LOG_LOCAL0)
    ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/mock/mock.py", line 699, in __getattr__
    with NonCallableMock._lock:
TypeError: 'dict' object does not support the context manager protocol

======================================================================
FAIL: test.unit.proxy.test_mem_server.TestAccountController.test_PUT_max_account_name_length
test.unit.proxy.test_mem_server.TestAccountController.test_PUT_max_account_name_length
----------------------------------------------------------------------
testtools.testresult.real._StringException: Traceback (most recent call last):
  File "/<<PKGBUILDDIR>>/test/unit/__init__.py", line 191, in setUp
    orig_setUp(cls_self)
  File "/<<PKGBUILDDIR>>/test/unit/proxy/test_server.py", line 11052, in setUp
    self.app = proxy_server.Application(conf,
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/<<PKGBUILDDIR>>/swift/proxy/server.py", line 204, in __init__
    self.logger = get_logger(conf, log_route='proxy-server',
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/<<PKGBUILDDIR>>/swift/common/utils/__init__.py", line 1970, in get_logger
    SysLogHandler.LOG_LOCAL0)
    ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/mock/mock.py", line 699, in __getattr__
    with NonCallableMock._lock:
TypeError: 'dict' object does not support the context manager protocol

======================================================================
FAIL: test.unit.proxy.test_mem_server.TestAccountController.test_PUT_metadata
test.unit.proxy.test_mem_server.TestAccountController.test_PUT_metadata
----------------------------------------------------------------------
testtools.testresult.real._StringException: Traceback (most recent call last):
  File "/<<PKGBUILDDIR>>/test/unit/__init__.py", line 191, in setUp
    orig_setUp(cls_self)
  File "/<<PKGBUILDDIR>>/test/unit/proxy/test_server.py", line 11052, in setUp
    self.app = proxy_server.Application(conf,
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/<<PKGBUILDDIR>>/swift/proxy/server.py", line 204, in __init__
    self.logger = get_logger(conf, log_route='proxy-server',
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/<<PKGBUILDDIR>>/swift/common/utils/__init__.py", line 1970, in get_logger
    SysLogHandler.LOG_LOCAL0)
    ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/mock/mock.py", line 699, in __getattr__
    with NonCallableMock._lock:
TypeError: 'dict' object does not support the context manager protocol

======================================================================
FAIL: test.unit.proxy.test_mem_server.TestAccountController.test_PUT_status
test.unit.proxy.test_mem_server.TestAccountController.test_PUT_status
----------------------------------------------------------------------
testtools.testresult.real._StringException: Traceback (most recent call last):
  File "/<<PKGBUILDDIR>>/test/unit/__init__.py", line 191, in setUp
    orig_setUp(cls_self)
  File "/<<PKGBUILDDIR>>/test/unit/proxy/test_server.py", line 11052, in setUp
    self.app = proxy_server.Application(conf,
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/<<PKGBUILDDIR>>/swift/proxy/server.py", line 204, in __init__
    self.logger = get_logger(conf, log_route='proxy-server',
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/<<PKGBUILDDIR>>/swift/common/utils/__init__.py", line 1970, in get_logger
    SysLogHandler.LOG_LOCAL0)
    ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/mock/mock.py", line 699, in __getattr__
    with NonCallableMock._lock:
TypeError: 'dict' object does not support the context manager protocol

======================================================================
FAIL: test.unit.proxy.test_mem_server.TestAccountController.test_auto_create_account_listing_response_is_json
test.unit.proxy.test_mem_server.TestAccountController.test_auto_create_account_listing_response_is_json
----------------------------------------------------------------------
testtools.testresult.real._StringException: Traceback (most recent call last):
  File "/<<PKGBUILDDIR>>/test/unit/__init__.py", line 191, in setUp
    orig_setUp(cls_self)
  File "/<<PKGBUILDDIR>>/test/unit/proxy/test_server.py", line 11052, in setUp
    self.app = proxy_server.Application(conf,
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/<<PKGBUILDDIR>>/swift/proxy/server.py", line 204, in __init__
    self.logger = get_logger(conf, log_route='proxy-server',
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/<<PKGBUILDDIR>>/swift/common/utils/__init__.py", line 1970, in get_logger
    SysLogHandler.LOG_LOCAL0)
    ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/mock/mock.py", line 699, in __getattr__
    with NonCallableMock._lock:
TypeError: 'dict' object does not support the context manager protocol

======================================================================
FAIL: test.unit.proxy.test_mem_server.TestAccountController.test_connection_refused
test.unit.proxy.test_mem_server.TestAccountController.test_connection_refused
----------------------------------------------------------------------
testtools.testresult.real._StringException: Traceback (most recent call last):
  File "/<<PKGBUILDDIR>>/test/unit/__init__.py", line 191, in setUp
    orig_setUp(cls_self)
  File "/<<PKGBUILDDIR>>/test/unit/proxy/test_server.py", line 11052, in setUp
    self.app = proxy_server.Application(conf,
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/<<PKGBUILDDIR>>/swift/proxy/server.py", line 204, in __init__
    self.logger = get_logger(conf, log_route='proxy-server',
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/<<PKGBUILDDIR>>/swift/common/utils/__init__.py", line 1970, in get_logger
    SysLogHandler.LOG_LOCAL0)
    ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/mock/mock.py", line 699, in __getattr__
    with NonCallableMock._lock:
TypeError: 'dict' object does not support the context manager protocol

======================================================================
FAIL: test.unit.proxy.test_mem_server.TestAccountController.test_other_socket_error
test.unit.proxy.test_mem_server.TestAccountController.test_other_socket_error
----------------------------------------------------------------------
testtools.testresult.real._StringException: Traceback (most recent call last):
  File "/<<PKGBUILDDIR>>/test/unit/__init__.py", line 191, in setUp
    orig_setUp(cls_self)
  File "/<<PKGBUILDDIR>>/test/unit/proxy/test_server.py", line 11052, in setUp
    self.app = proxy_server.Application(conf,
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/<<PKGBUILDDIR>>/swift/proxy/server.py", line 204, in __init__
    self.logger = get_logger(conf, log_route='proxy-server',
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/<<PKGBUILDDIR>>/swift/common/utils/__init__.py", line 1970, in get_logger
    SysLogHandler.LOG_LOCAL0)
    ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/mock/mock.py", line 699, in __getattr__
    with NonCallableMock._lock:
TypeError: 'dict' object does not support the context manager protocol

======================================================================
FAIL: test.unit.proxy.test_mem_server.TestAccountController.test_response_get_accept_ranges_header
test.unit.proxy.test_mem_server.TestAccountController.test_response_get_accept_ranges_header
----------------------------------------------------------------------
testtools.testresult.real._StringException: Traceback (most recent call last):
  File "/<<PKGBUILDDIR>>/test/unit/__init__.py", line 191, in setUp
    orig_setUp(cls_self)
  File "/<<PKGBUILDDIR>>/test/unit/proxy/test_server.py", line 11052, in setUp
    self.app = proxy_server.Application(conf,
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/<<PKGBUILDDIR>>/swift/proxy/server.py", line 204, in __init__
    self.logger = get_logger(conf, log_route='proxy-server',
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/<<PKGBUILDDIR>>/swift/common/utils/__init__.py", line 1970, in get_logger
    SysLogHandler.LOG_LOCAL0)
    ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/mock/mock.py", line 699, in __getattr__
    with NonCallableMock._lock:
TypeError: 'dict' object does not support the context manager protocol

======================================================================
FAIL: test.unit.proxy.test_mem_server.TestAccountController.test_response_head_accept_ranges_header
test.unit.proxy.test_mem_server.TestAccountController.test_response_head_accept_ranges_header
----------------------------------------------------------------------
testtools.testresult.real._StringException: Traceback (most recent call last):
  File "/<<PKGBUILDDIR>>/test/unit/__init__.py", line 191, in setUp
    orig_setUp(cls_self)
  File "/<<PKGBUILDDIR>>/test/unit/proxy/test_server.py", line 11052, in setUp
    self.app = proxy_server.Application(conf,
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/<<PKGBUILDDIR>>/swift/proxy/server.py", line 204, in __init__
    self.logger = get_logger(conf, log_route='proxy-server',
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/<<PKGBUILDDIR>>/swift/common/utils/__init__.py", line 1970, in get_logger
    SysLogHandler.LOG_LOCAL0)
    ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/mock/mock.py", line 699, in __getattr__
    with NonCallableMock._lock:
TypeError: 'dict' object does not support the context manager protocol

----------------------------------------------------------------------
Ran 8404 tests in 73.914s

FAILED (failures=23, skipped=1802)
+ echo ======> STESTR TEST SUITE FAILED FOR python3.12: displaying pip3 freeze output...
======> STESTR TEST SUITE FAILED FOR python3.12: displaying pip3 freeze output...
+ [ -x /usr/bin/pip3 ]
+ pip3 freeze
WARNING: The directory '/sbuild-nonexistent/.cache/pip' or its parent directory is not owned or is not writable by the current user. The cache has been disabled. Check the permissions and owner of that directory. If executing pip with sudo, you should use sudo's -H flag.
alabaster==0.7.12
appdirs==1.4.4
attrs==23.2.0
autopage==0.4.0
Babel==2.10.3
blinker==1.7.0
boto==2.49.0
boto3==1.34.18
botocore==1.34.18
certifi==2023.11.17
cffi==1.16.0
chardet==5.2.0
charset-normalizer==3.3.2
cliff==4.3.0
cmd2==2.4.3+ds
colorama==0.4.6
coverage==7.2.7
cryptography==41.0.7
debtcollector==2.5.0
decorator==5.1.1
deprecation==2.0.7
dnspython==2.5.0
docutils==0.20.1
dogpile.cache==1.1.8
dulwich==0.21.6
eventlet==0.33.3
extras==1.0.0
fixtures==4.0.1
greenlet==3.0.1
idna==3.3
imagesize==1.4.1
importlib-metadata==4.12.0
iso8601==1.0.2
jaraco.classes==3.2.1
jeepney==0.8.0
Jinja2==3.1.2
jmespath==1.0.1
jsonpatch==1.32
jsonpointer==2.3
jsonschema==4.10.3
keyring==24.3.0
keystoneauth1==5.3.0
keystonemiddleware==10.4.1
lxml==5.1.0
Mako==1.3.2.dev0
MarkupSafe==2.1.5
mock==5.1.0
more-itertools==10.2.0
msgpack==1.0.3
netaddr==0.8.0
netifaces==0.11.0
nose==1.3.7
oauthlib==3.2.2
openstack.nose-plugin==0.11
openstackdocstheme==3.2.0
openstacksdk==1.5.0
os-api-ref==2.3.0
os-client-config==2.1.0
os-service-types==1.7.0
os-testr==3.0.0
osc-lib==2.8.1
oslo.cache==3.5.0
oslo.config==9.2.0
oslo.context==5.2.0
oslo.i18n==6.1.0
oslo.log==5.3.0
oslo.serialization==5.2.0
oslo.utils==6.2.1
oslosphinx==4.18.0
packaging==23.2
Paste==3.7.1
PasteDeploy==3.1.0
pbr==5.11.1
ply==3.11
prettytable==3.6.0
pyasyncore==1.0.2
pycadf==3.1.1
pycparser==2.21
pyeclib==1.6.0
Pygments==2.17.2
pyinotify==0.9.6
PyJWT==2.7.0
pyOpenSSL==23.2.0
pyparsing==3.1.1
pyperclip==1.8.2
pyrsistent==0.18.1
python-binary-memcached==0.31.1
python-cinderclient==9.4.0
python-dateutil==2.8.2
python-glanceclient==4.4.0
python-keystoneclient==5.2.0
python-memcached==1.58
python-neutronclient==11.0.0
python-novaclient==18.4.0
python-openstackclient==6.3.0
python-subunit==1.4.2
python-swiftclient==4.4.0
pytz==2024.1
PyYAML==6.0.1
requests==2.31.0
requests-mock==1.10.0
requestsexceptions==1.4.0
rfc3986==2.0.0
roman==3.3
s3transfer==0.10.0
SecretStorage==3.3.3
simplejson==3.19.2
six==1.16.0
snowballstemmer==2.2.0
Sphinx==7.2.6
stestr==4.1.0
stevedore==5.1.0
swift==2.32.0
Tempita==0.5.2
termcolor==1.1.0
testtools==2.6.0
tomlkit==0.12.3
uhashring==2.3
urllib3==1.26.18
voluptuous==0.12.2
warlock==2.0.1
wcwidth==0.2.5
WebOb==1.8.6
wrapt==1.15.0
xattr==0.10.1
zipp==1.0.0
zombie-imp==0.0.2

Revision history for this message
Tim Burke (1-tim-z) wrote :

Have you tried upgrading eventlet? These look a lot like failures I'd see on 0.34.1. I know that was eventlet's first public release with py312 support, but the first release I've seen a clean unit test run on was 0.35.0 (0.35.1 also seems good). I sometimes see troubles with test/unit/common/test_http_protocol.py::TestSwiftHttpProtocolSomeMore::test_bad_request_app_logging but then it passes on a re-test.

Note that I needed the following patches applied:

- https://review.opendev.org/c/openstack/swift/+/904652
- https://review.opendev.org/c/openstack/swift/+/904600

Revision history for this message
Tim Burke (1-tim-z) wrote :

https://review.opendev.org/c/openstack/swift/+/909033 should address the failure in test_bad_request_app_logging if you see it, too.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.