You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using bundled or distribution-provided LMDB library?
Both
Distribution name and LMDB library version
Gentoo / v0.9.24
Describe Your Problem
Hi, I've noticed that one test fails with PyPy3:
======================================= test session starts ========================================
platform linux -- Python 3.6.9[pypy-7.3.2-final], pytest-6.1.0, py-1.9.0, pluggy-0.13.1 -- /usr/bin/pypy3
cachedir: .pytest_cache
hypothesis profile 'default' -> database=DirectoryBasedExampleDatabase('/tmp/py-lmdb/.hypothesis/examples')
rootdir: /tmp/py-lmdb
plugins: hypothesis-5.36.1, requests-mock-1.8.0
collected 1 item
tests/cursor_test.py::PreloadTest::test_preload FAILED [100%]
============================================= FAILURES =============================================
_____________________________________ PreloadTest.test_preload _____________________________________
self = <cursor_test.PreloadTest testMethod=test_preload>
@unittest.skipIf(sys.platform != 'linux', "test only works on Linux")
def test_preload(self):
"""
Test that reading just the key doesn't prefault the value contents, but
reading the data does.
"""
import resource
self.c.put(B('a'), B('a') * (256 * 1024 * 1024))
self.txn.commit()
self.env.close()
# Just reading the data is obviously going to fault the value in. The
# point is to fault it in while the GIL is unlocked. We use the buffers
# API so that we're not actually copying the data in. This doesn't
# actually show that we're prefaulting with the GIL unlocked, but it
# does prove we prefault at all, and in 2 correct places.
self.path, self.env = testlib.temp_env(path=self.path, writemap=True)
self.txn = self.env.begin(write=True, buffers=True)
self.c = self.txn.cursor()
> minflts_before = resource.getrusage(resource.RUSAGE_THREAD)[6]
E AttributeError: module 'resource' has no attribute 'RUSAGE_THREAD'
tests/cursor_test.py:267: AttributeError
===================================== short test summary info ======================================
FAILED tests/cursor_test.py::PreloadTest::test_preload - AttributeError: module 'resource' has no...
======================================== 1 failed in 0.54s =========================================
Apparently PyPy3's resource doesn't expose a RUSAGE_THREAD attribute. I checked your CI and the test gets skipped on PyPy2 because sys.platform is linux2 (otherwise it would fail there too because the attribute was added to Python 3.2).
The text was updated successfully, but these errors were encountered:
Affected Operating Systems
Affected py-lmdb Version
git master
py-lmdb Installation Method
setup.py build
Using bundled or distribution-provided LMDB library?
Both
Distribution name and LMDB library version
Gentoo / v0.9.24
Describe Your Problem
Hi, I've noticed that one test fails with PyPy3:
Apparently PyPy3's
resource
doesn't expose aRUSAGE_THREAD
attribute. I checked your CI and the test gets skipped on PyPy2 becausesys.platform
islinux2
(otherwise it would fail there too because the attribute was added to Python 3.2).The text was updated successfully, but these errors were encountered: