* Package: dev-python/six-1.14.0 * Repository: gentoo * Maintainer: python@gentoo.org * USE: abi_x86_64 amd64 elibc_glibc kernel_linux python_targets_pypy3 python_targets_python3_7 test userland_GNU * FEATURES: network-sandbox preserve-libs sandbox test userpriv usersandbox * FEATURES='assume-digests binpkg-docompress binpkg-dostrip binpkg-logs clean-logs config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict strict-keepdir test unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr' * CFLAGS='-march=bdver2 -pipe -O3 -fgraphite-identity -floop-nest-optimize -fdevirtualize-at-ltrans -fipa-pta -fno-semantic-interposition -flto=10 -fuse-linker-plugin -Wl,-O1 -Wl,--as-needed' * CXXFLAGS='-march=bdver2 -pipe -O3 -fgraphite-identity -floop-nest-optimize -fdevirtualize-at-ltrans -fipa-pta -fno-semantic-interposition -flto=10 -fuse-linker-plugin -Wl,-O1 -Wl,--as-needed' * FFLAGS='-march=bdver2 -pipe -O3 -fgraphite-identity -floop-nest-optimize -fdevirtualize-at-ltrans -fipa-pta -fno-semantic-interposition -flto=10 -fuse-linker-plugin -Wl,-O1 -Wl,--as-needed' * FCFLAGS='-march=bdver2 -pipe -O3 -fgraphite-identity -floop-nest-optimize -fdevirtualize-at-ltrans -fipa-pta -fno-semantic-interposition -flto=10 -fuse-linker-plugin -Wl,-O1 -Wl,--as-needed' * F77FLAGS='-march=bdver2 -pipe -O3 -fgraphite-identity -floop-nest-optimize -fdevirtualize-at-ltrans -fipa-pta -fno-semantic-interposition -flto=10 -fuse-linker-plugin -Wl,-O1 -Wl,--as-needed' * LDFLAGS='-Wl,-O1 -Wl,--as-needed -march=bdver2 -pipe -O3 -fgraphite-identity -floop-nest-optimize -fdevirtualize-at-ltrans -fipa-pta -fno-semantic-interposition -flto=10 -fuse-linker-plugin' * MAKEOPTS='-j10 -l12' * gcc (Gentoo 10.1.0-r1 p2) 10.1.0 * Linux j-galaxy 5.7.0-gentoo-x86_64 #3 SMP Tue Jun 2 03:03:25 CEST 2020 x86_64 AMD FX(tm)-8350 Eight-Core Processor AuthenticAMD GNU/Linux dev-python/six: 26 seconds average for 11 merges 2020-01-17T15:58:56 >>> dev-python/six: 15 seconds 2020-01-24T14:23:29 >>> dev-python/six: 26 seconds 2020-03-27T17:56:15 >>> dev-python/six: 26 seconds 2020-04-08T23:02:47 >>> dev-python/six: 35 seconds 2020-04-09T08:32:46 >>> dev-python/six: 33 seconds 2020-04-29T16:44:10 >>> dev-python/six: 31 seconds 2020-04-30T19:33:41 >>> dev-python/six: 30 seconds 2020-05-04T19:30:59 >>> dev-python/six: 28 seconds 2020-05-05T09:47:43 >>> dev-python/six: 22 seconds 2020-05-05T10:14:52 >>> dev-python/six: 23 seconds 2020-06-17T21:02:42 >>> dev-python/six: 23 seconds ]0;emerge 14:47:32 1|18 six 00:23 (root@j-galaxy)Unable to set hostname: module 'socket' has no attribute 'sethostname' (for FEATURES="network-sandbox") >>> Unpacking source... >>> Unpacking six-1.14.0.tar.gz to /var/tmp/portage/dev-python/six-1.14.0/work >>> Source unpacked in /var/tmp/portage/dev-python/six-1.14.0/work Unable to set hostname: module 'socket' has no attribute 'sethostname' (for FEATURES="network-sandbox") >>> Preparing source in /var/tmp/portage/dev-python/six-1.14.0/work/six-1.14.0 ... >>> Source prepared. Unable to set hostname: module 'socket' has no attribute 'sethostname' (for FEATURES="network-sandbox") >>> Configuring source in /var/tmp/portage/dev-python/six-1.14.0/work/six-1.14.0 ... >>> Source configured. Unable to set hostname: module 'socket' has no attribute 'sethostname' (for FEATURES="network-sandbox") >>> Compiling source in /var/tmp/portage/dev-python/six-1.14.0/work/six-1.14.0 ... * pypy3: running distutils-r1_run_phase distutils-r1_python_compile pypy3 setup.py build -j 10 running build running build_py copying six.py -> /var/tmp/portage/dev-python/six-1.14.0/work/six-1.14.0-pypy3/lib warning: build_py: byte-compiling is disabled, skipping. * python3_7: running distutils-r1_run_phase distutils-r1_python_compile python3.7 setup.py build -j 10 running build running build_py copying six.py -> /var/tmp/portage/dev-python/six-1.14.0/work/six-1.14.0-python3_7/lib warning: build_py: byte-compiling is disabled, skipping. * Using python3.7 in global scope * python3_7: running distutils-r1_run_phase python_compile_all >>> Source compiled. Unable to set hostname: module 'socket' has no attribute 'sethostname' (for FEATURES="network-sandbox") >>> Test phase: dev-python/six-1.14.0 * pypy3: running distutils-r1_run_phase python_test ========================================================================================== test session starts ========================================================================================== platform linux -- Python 3.6.9[pypy-7.3.1-final], pytest-4.6.9, py-1.8.0, pluggy-0.13.1 -- /usr/bin/pypy3 cachedir: .pytest_cache rootdir: /var/tmp/portage/dev-python/six-1.14.0/work/six-1.14.0, inifile: setup.cfg plugins: forked-1.1.3, timeout-1.3.3, backports.unittest-mock-1.5, xdist-1.31.0, betamax-0.8.1, xprocess-0.13.1, shutil-1.7.0, virtualenv-1.7.0, expect-1.1.0, localserver-0.5.0 collecting ... collected 200 items test_six.py::test_add_doc PASSED [ 0%] test_six.py::test_import_module PASSED [ 1%] test_six.py::test_integer_types PASSED [ 1%] test_six.py::test_string_types PASSED [ 2%] test_six.py::test_class_types PASSED [ 2%] test_six.py::test_text_type PASSED [ 3%] test_six.py::test_binary_type PASSED [ 3%] test_six.py::test_MAXSIZE PASSED [ 4%] test_six.py::test_lazy PASSED [ 4%] test_six.py::test_move_items[cStringIO] PASSED [ 5%] test_six.py::test_move_items[filter] PASSED [ 5%] test_six.py::test_move_items[filterfalse] PASSED [ 6%] test_six.py::test_move_items[input] PASSED [ 6%] test_six.py::test_move_items[intern] PASSED [ 7%] test_six.py::test_move_items[map] PASSED [ 7%] test_six.py::test_move_items[getcwd] PASSED [ 8%] test_six.py::test_move_items[getcwdb] PASSED [ 8%] test_six.py::test_move_items[getoutput] PASSED [ 9%] test_six.py::test_move_items[range] PASSED [ 9%] test_six.py::test_move_items[reload_module] PASSED [ 10%] test_six.py::test_move_items[reduce] PASSED [ 10%] test_six.py::test_move_items[shlex_quote] PASSED [ 11%] test_six.py::test_move_items[StringIO] PASSED [ 11%] test_six.py::test_move_items[UserDict] PASSED [ 12%] test_six.py::test_move_items[UserList] PASSED [ 12%] test_six.py::test_move_items[UserString] PASSED [ 13%] test_six.py::test_move_items[xrange] PASSED [ 13%] test_six.py::test_move_items[zip] PASSED [ 14%] test_six.py::test_move_items[zip_longest] PASSED [ 14%] test_six.py::test_move_items[builtins] PASSED [ 15%] test_six.py::test_move_items[configparser] PASSED [ 15%] test_six.py::test_move_items[collections_abc] PASSED [ 16%] test_six.py::test_move_items[copyreg] PASSED [ 16%] test_six.py::test_move_items[dbm_gnu] PASSED [ 17%] test_six.py::test_move_items[dbm_ndbm] FAILED [ 17%] test_six.py::test_move_items[_dummy_thread] PASSED [ 18%] test_six.py::test_move_items[http_cookiejar] PASSED [ 18%] test_six.py::test_move_items[http_cookies] PASSED [ 19%] test_six.py::test_move_items[html_entities] PASSED [ 19%] test_six.py::test_move_items[html_parser] PASSED [ 20%] test_six.py::test_move_items[http_client] PASSED [ 20%] test_six.py::test_move_items[email_mime_base] PASSED [ 21%] test_six.py::test_move_items[email_mime_image] PASSED [ 21%] test_six.py::test_move_items[email_mime_multipart] PASSED [ 22%] test_six.py::test_move_items[email_mime_nonmultipart] PASSED [ 22%] test_six.py::test_move_items[email_mime_text] PASSED [ 23%] test_six.py::test_move_items[BaseHTTPServer] PASSED [ 23%] test_six.py::test_move_items[CGIHTTPServer] PASSED [ 24%] test_six.py::test_move_items[SimpleHTTPServer] PASSED [ 24%] test_six.py::test_move_items[cPickle] PASSED [ 25%] test_six.py::test_move_items[queue] PASSED [ 25%] test_six.py::test_move_items[reprlib] PASSED [ 26%] test_six.py::test_move_items[socketserver] PASSED [ 26%] test_six.py::test_move_items[_thread] PASSED [ 27%] test_six.py::test_move_items[tkinter] SKIPPED [ 27%] test_six.py::test_move_items[tkinter_dialog] SKIPPED [ 28%] test_six.py::test_move_items[tkinter_filedialog] SKIPPED [ 28%] test_six.py::test_move_items[tkinter_scrolledtext] SKIPPED [ 29%] test_six.py::test_move_items[tkinter_simpledialog] SKIPPED [ 29%] test_six.py::test_move_items[tkinter_tix] SKIPPED [ 30%] test_six.py::test_move_items[tkinter_ttk] SKIPPED [ 30%] test_six.py::test_move_items[tkinter_constants] SKIPPED [ 31%] test_six.py::test_move_items[tkinter_dnd] SKIPPED [ 31%] test_six.py::test_move_items[tkinter_colorchooser] SKIPPED [ 32%] test_six.py::test_move_items[tkinter_commondialog] SKIPPED [ 32%] test_six.py::test_move_items[tkinter_tkfiledialog] SKIPPED [ 33%] test_six.py::test_move_items[tkinter_font] SKIPPED [ 33%] test_six.py::test_move_items[tkinter_messagebox] SKIPPED [ 34%] test_six.py::test_move_items[tkinter_tksimpledialog] SKIPPED [ 34%] test_six.py::test_move_items[urllib_parse] PASSED [ 35%] test_six.py::test_move_items[urllib_error] PASSED [ 35%] test_six.py::test_move_items[urllib] PASSED [ 36%] test_six.py::test_move_items[urllib_robotparser] PASSED [ 36%] test_six.py::test_move_items[xmlrpc_client] PASSED [ 37%] test_six.py::test_move_items[xmlrpc_server] PASSED [ 37%] test_six.py::test_move_items_urllib_parse[ParseResult] PASSED [ 38%] test_six.py::test_move_items_urllib_parse[SplitResult] PASSED [ 38%] test_six.py::test_move_items_urllib_parse[parse_qs] PASSED [ 39%] test_six.py::test_move_items_urllib_parse[parse_qsl] PASSED [ 39%] test_six.py::test_move_items_urllib_parse[urldefrag] PASSED [ 40%] test_six.py::test_move_items_urllib_parse[urljoin] PASSED [ 40%] test_six.py::test_move_items_urllib_parse[urlparse] PASSED [ 41%] test_six.py::test_move_items_urllib_parse[urlsplit] PASSED [ 41%] test_six.py::test_move_items_urllib_parse[urlunparse] PASSED [ 42%] test_six.py::test_move_items_urllib_parse[urlunsplit] PASSED [ 42%] test_six.py::test_move_items_urllib_parse[quote] PASSED [ 43%] test_six.py::test_move_items_urllib_parse[quote_plus] PASSED [ 43%] test_six.py::test_move_items_urllib_parse[unquote] PASSED [ 44%] test_six.py::test_move_items_urllib_parse[unquote_plus] PASSED [ 44%] test_six.py::test_move_items_urllib_parse[unquote_to_bytes] PASSED [ 45%] test_six.py::test_move_items_urllib_parse[urlencode] PASSED [ 45%] test_six.py::test_move_items_urllib_parse[splitquery] PASSED [ 46%] test_six.py::test_move_items_urllib_parse[splittag] PASSED [ 46%] test_six.py::test_move_items_urllib_parse[splituser] PASSED [ 47%] test_six.py::test_move_items_urllib_parse[splitvalue] PASSED [ 47%] test_six.py::test_move_items_urllib_parse[uses_fragment] PASSED [ 48%] test_six.py::test_move_items_urllib_parse[uses_netloc] PASSED [ 48%] test_six.py::test_move_items_urllib_parse[uses_params] PASSED [ 49%] test_six.py::test_move_items_urllib_parse[uses_query] PASSED [ 49%] test_six.py::test_move_items_urllib_parse[uses_relative] PASSED [ 50%] test_six.py::test_move_items_urllib_error[URLError] PASSED [ 50%] test_six.py::test_move_items_urllib_error[HTTPError] PASSED [ 51%] test_six.py::test_move_items_urllib_error[ContentTooShortError] PASSED [ 51%] test_six.py::test_move_items_urllib_request[urlopen] PASSED [ 52%] test_six.py::test_move_items_urllib_request[install_opener] PASSED [ 52%] test_six.py::test_move_items_urllib_request[build_opener] PASSED [ 53%] test_six.py::test_move_items_urllib_request[pathname2url] PASSED [ 53%] test_six.py::test_move_items_urllib_request[url2pathname] PASSED [ 54%] test_six.py::test_move_items_urllib_request[getproxies] PASSED [ 54%] test_six.py::test_move_items_urllib_request[Request] PASSED [ 55%] test_six.py::test_move_items_urllib_request[OpenerDirector] PASSED [ 55%] test_six.py::test_move_items_urllib_request[HTTPDefaultErrorHandler] PASSED [ 56%] test_six.py::test_move_items_urllib_request[HTTPRedirectHandler] PASSED [ 56%] test_six.py::test_move_items_urllib_request[HTTPCookieProcessor] PASSED [ 57%] test_six.py::test_move_items_urllib_request[ProxyHandler] PASSED [ 57%] test_six.py::test_move_items_urllib_request[BaseHandler] PASSED [ 58%] test_six.py::test_move_items_urllib_request[HTTPPasswordMgr] PASSED [ 58%] test_six.py::test_move_items_urllib_request[HTTPPasswordMgrWithDefaultRealm] PASSED [ 59%] test_six.py::test_move_items_urllib_request[AbstractBasicAuthHandler] PASSED [ 59%] test_six.py::test_move_items_urllib_request[HTTPBasicAuthHandler] PASSED [ 60%] test_six.py::test_move_items_urllib_request[ProxyBasicAuthHandler] PASSED [ 60%] test_six.py::test_move_items_urllib_request[AbstractDigestAuthHandler] PASSED [ 61%] test_six.py::test_move_items_urllib_request[HTTPDigestAuthHandler] PASSED [ 61%] test_six.py::test_move_items_urllib_request[ProxyDigestAuthHandler] PASSED [ 62%] test_six.py::test_move_items_urllib_request[HTTPHandler] PASSED [ 62%] test_six.py::test_move_items_urllib_request[HTTPSHandler] PASSED [ 63%] test_six.py::test_move_items_urllib_request[FileHandler] PASSED [ 63%] test_six.py::test_move_items_urllib_request[FTPHandler] PASSED [ 64%] test_six.py::test_move_items_urllib_request[CacheFTPHandler] PASSED [ 64%] test_six.py::test_move_items_urllib_request[UnknownHandler] PASSED [ 65%] test_six.py::test_move_items_urllib_request[HTTPErrorProcessor] PASSED [ 65%] test_six.py::test_move_items_urllib_request[urlretrieve] PASSED [ 66%] test_six.py::test_move_items_urllib_request[urlcleanup] PASSED [ 66%] test_six.py::test_move_items_urllib_request[URLopener] PASSED [ 67%] test_six.py::test_move_items_urllib_request[FancyURLopener] PASSED [ 67%] test_six.py::test_move_items_urllib_request[proxy_bypass] PASSED [ 68%] test_six.py::test_move_items_urllib_request[parse_http_list] PASSED [ 68%] test_six.py::test_move_items_urllib_request[parse_keqv_list] PASSED [ 69%] test_six.py::test_move_items_urllib_response[addbase] PASSED [ 69%] test_six.py::test_move_items_urllib_response[addclosehook] PASSED [ 70%] test_six.py::test_move_items_urllib_response[addinfo] PASSED [ 70%] test_six.py::test_move_items_urllib_response[addinfourl] PASSED [ 71%] test_six.py::test_move_items_urllib_robotparser[RobotFileParser] PASSED [ 71%] test_six.py::test_import_moves_error_1 PASSED [ 72%] test_six.py::test_import_moves_error_2 PASSED [ 72%] test_six.py::test_import_moves_error_3 PASSED [ 73%] test_six.py::test_from_imports PASSED [ 73%] test_six.py::test_filter PASSED [ 74%] test_six.py::test_filter_false PASSED [ 74%] test_six.py::test_map PASSED [ 75%] test_six.py::test_getoutput PASSED [ 75%] test_six.py::test_zip PASSED [ 76%] test_six.py::test_zip_longest PASSED [ 76%] test_six.py::TestCustomizedMoves::test_moved_attribute PASSED [ 77%] test_six.py::TestCustomizedMoves::test_moved_module PASSED [ 77%] test_six.py::TestCustomizedMoves::test_custom_move_module PASSED [ 78%] test_six.py::TestCustomizedMoves::test_custom_move_attribute PASSED [ 78%] test_six.py::TestCustomizedMoves::test_empty_remove PASSED [ 79%] test_six.py::test_get_unbound_function PASSED [ 79%] test_six.py::test_get_method_self PASSED [ 80%] test_six.py::test_get_method_function PASSED [ 80%] test_six.py::test_get_function_closure PASSED [ 81%] test_six.py::test_get_function_code PASSED [ 81%] test_six.py::test_get_function_defaults PASSED [ 82%] test_six.py::test_get_function_globals PASSED [ 82%] test_six.py::test_dictionary_iterators PASSED [ 83%] test_six.py::test_dictionary_views PASSED [ 83%] test_six.py::test_advance_iterator PASSED [ 84%] test_six.py::test_iterator PASSED [ 84%] test_six.py::test_callable PASSED [ 85%] test_six.py::test_create_bound_method PASSED [ 85%] test_six.py::test_create_unbound_method PASSED [ 86%] test_six.py::test_b PASSED [ 86%] test_six.py::test_u PASSED [ 87%] test_six.py::test_u_escapes PASSED [ 87%] test_six.py::test_unichr PASSED [ 88%] test_six.py::test_int2byte PASSED [ 88%] test_six.py::test_byte2int PASSED [ 89%] test_six.py::test_bytesindex PASSED [ 89%] test_six.py::test_bytesiter PASSED [ 90%] test_six.py::test_StringIO PASSED [ 90%] test_six.py::test_BytesIO PASSED [ 91%] test_six.py::test_exec_ PASSED [ 91%] test_six.py::test_reraise PASSED [ 92%] test_six.py::test_raise_from PASSED [ 92%] test_six.py::test_print_ PASSED [ 93%] test_six.py::test_print_exceptions PASSED [ 93%] test_six.py::test_with_metaclass PASSED [ 94%] test_six.py::test_with_metaclass_typing PASSED [ 94%] test_six.py::test_with_metaclass_pep_560 SKIPPED [ 95%] test_six.py::test_with_metaclass_prepare PASSED [ 95%] test_six.py::test_wraps PASSED [ 96%] test_six.py::test_wraps_raises_on_missing_updated_field_on_wrapper PASSED [ 96%] test_six.py::test_add_metaclass PASSED [ 97%] test_six.py::test_add_metaclass_nested PASSED [ 97%] test_six.py::test_assertCountEqual PASSED [ 98%] test_six.py::test_assertRegex PASSED [ 98%] test_six.py::test_assertNotRegex PASSED [ 99%] test_six.py::test_assertRaisesRegex PASSED [ 99%] test_six.py::test_python_2_unicode_compatible PASSED [100%] =============================================================================================== FAILURES ================================================================================================ _______________________________________________________________________________________ test_move_items[dbm_ndbm] _______________________________________________________________________________________ item_name = 'dbm_ndbm' @pytest.mark.parametrize("item_name", [item.name for item in six._moved_attributes]) def test_move_items(item_name): """Ensure that everything loads correctly.""" try: > item = getattr(six.moves, item_name) test_six.py:121: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../six-1.14.0-pypy3/lib/six.py:92: in __get__ result = self._resolve() ../six-1.14.0-pypy3/lib/six.py:115: in _resolve return _import_module(self.mod) ../six-1.14.0-pypy3/lib/six.py:82: in _import_module __import__(name) /usr/lib/pypy3.6/lib-python/3/dbm/ndbm.py:3: in from _dbm import * _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ import os import sys import ctypes.util from ctypes import Structure, c_char, c_char_p, c_int, c_void_p, CDLL, POINTER class error(IOError): def __init__(self, msg): self.msg = msg def __str__(self): return self.msg class datum(Structure): _fields_ = [ ('dptr', POINTER(c_char)), ('dsize', c_int), ] def __init__(self, text): if isinstance(text, str): text = text.encode(sys.getdefaultencoding()) elif not isinstance(text, bytes): msg = "dbm mapping keys must be a string or bytes object, not {!r}" raise TypeError(msg.format(type(text).__name__)) Structure.__init__(self, text, len(text)) class dbm(object): def __init__(self, dbmobj): self._aobj = dbmobj def close(self): if not self._aobj: raise error('DBM object has already been closed') getattr(lib, funcs['close'])(self._aobj) self._aobj = None def __del__(self): if self._aobj: self.close() def keys(self): if not self._aobj: raise error('DBM object has already been closed') allkeys = [] k = getattr(lib, funcs['firstkey'])(self._aobj) while k.dptr: allkeys.append(k.dptr[:k.dsize]) k = getattr(lib, funcs['nextkey'])(self._aobj) return allkeys def get(self, key, default=None): if not self._aobj: raise error('DBM object has already been closed') dat = datum(key) k = getattr(lib, funcs['fetch'])(self._aobj, dat) if k.dptr: return k.dptr[:k.dsize] if getattr(lib, funcs['error'])(self._aobj): getattr(lib, funcs['clearerr'])(self._aobj) raise error("") return default def __len__(self): return len(self.keys()) def __getitem__(self, key): value = self.get(key) if value is None: raise KeyError(key) return value def __setitem__(self, key, value): if not self._aobj: raise error('DBM object has already been closed') dat = datum(key) data = datum(value) status = getattr(lib, funcs['store'])(self._aobj, dat, data, lib.DBM_REPLACE) if getattr(lib, funcs['error'])(self._aobj): getattr(lib, funcs['clearerr'])(self._aobj) raise error("") return status def setdefault(self, key, default=''): if not self._aobj: raise error('DBM object has already been closed') dat = datum(key) k = getattr(lib, funcs['fetch'])(self._aobj, dat) if k.dptr: return k.dptr[:k.dsize] data = datum(default) status = getattr(lib, funcs['store'])(self._aobj, dat, data, lib.DBM_INSERT) if status < 0: getattr(lib, funcs['clearerr'])(self._aobj) raise error("cannot add item to database") return default def __contains__(self, key): if not self._aobj: raise error('DBM object has already been closed') dat = datum(key) k = getattr(lib, funcs['fetch'])(self._aobj, dat) if k.dptr: return True return False has_key = __contains__ def __delitem__(self, key): if not self._aobj: raise error('DBM object has already been closed') dat = datum(key) status = getattr(lib, funcs['delete'])(self._aobj, dat) if status < 0: raise KeyError(key) def __enter__(self): return self def __exit__(self, *exc_info): self.close() ### initialization: Berkeley DB versus normal DB def _init_func(name, argtypes=None, restype=None): try: func = getattr(lib, '__db_ndbm_' + name) funcs[name] = '__db_ndbm_' + name except AttributeError: func = getattr(lib, 'dbm_' + name) funcs[name] = 'dbm_' + name if argtypes is not None: func.argtypes = argtypes if restype is not None: func.restype = restype if sys.platform != 'darwin': libpath = ctypes.util.find_library('db') if not libpath: # XXX this is hopeless... for c in ['5.3', '5.2', '5.1', '5.0', '4.9', '4.8', '4.7', '4.6', '4.5']: libpath = ctypes.util.find_library('db-%s' % c) if libpath: break else: > raise ImportError("Cannot find dbm library") E ImportError: Cannot find dbm library /usr/lib/pypy3.6/lib_pypy/_dbm.py:145: ImportError =========================================================================== 1 failed, 183 passed, 16 skipped in 5.07 seconds ============================================================================ * ERROR: dev-python/six-1.14.0::gentoo failed (test phase): * Tests fail with pypy3 * * Call stack: * ebuild.sh, line 125: Called src_test * environment, line 4164: Called distutils-r1_src_test * environment, line 2468: Called _distutils-r1_run_foreach_impl 'python_test' * environment, line 1664: Called python_foreach_impl 'distutils-r1_run_phase' 'python_test' * environment, line 3761: Called multibuild_foreach_variant '_python_multibuild_wrapper' 'distutils-r1_run_phase' 'python_test' * environment, line 3250: Called _multibuild_run '_python_multibuild_wrapper' 'distutils-r1_run_phase' 'python_test' * environment, line 3248: Called _python_multibuild_wrapper 'distutils-r1_run_phase' 'python_test' * environment, line 2056: Called distutils-r1_run_phase 'python_test' * environment, line 2405: Called python_test * environment, line 4106: Called die * The specific snippet of code: * pytest -vv || die "Tests fail with ${EPYTHON}" * * If you need support, post the output of `emerge --info '=dev-python/six-1.14.0::gentoo'`, * the complete build log and the output of `emerge -pqv '=dev-python/six-1.14.0::gentoo'`. * The complete build log is located at '/var/log/portage/dev-python:six-1.14.0:20200619-124731.log'. * For convenience, a symlink to the build log is located at '/var/tmp/portage/dev-python/six-1.14.0/temp/build.log'. * The ebuild environment file is located at '/var/tmp/portage/dev-python/six-1.14.0/temp/environment'. * Working directory: '/var/tmp/portage/dev-python/six-1.14.0/work/six-1.14.0' * S: '/var/tmp/portage/dev-python/six-1.14.0/work/six-1.14.0'