quora / semidbm2 Goto Github PK
View Code? Open in Web Editor NEWCross platform (fast) DBM interface in pure Python
Home Page: https://pypi.org/project/semidbm2/
License: Other
Cross platform (fast) DBM interface in pure Python
Home Page: https://pypi.org/project/semidbm2/
License: Other
Running test_semidbm2.py
results in 0, 1, or 2 errors.
The errors are always OSError: can't rename file, error: 1175
I'm using the Official Build from python.org
. The semidbm2
version was from the master
branch today, 20210517.
FWIW, running under Cygwin on the same machine does not seem to fail, or at least the rate is much smaller :/, although the noisy warnings are pretty much the same.
Full capture:
(venv) λ python -VV
Python 3.9.2 (tags/v3.9.2:1a79785, Feb 19 2021, 13:44:55) [MSC v.1928 64 bit (AMD64)]
(venv) λ python test_semidbm2.py
.............C:\Users\chrifull\AppData\Local\Programs\Python\Python39\lib\traceback.py:220: ResourceWarning: unclosed file <_io.BufferedReader name='C:\\Users\\chrifull\\AppData\\Local\\Temp\\semidbm_utuvljr1u9\\myfile.db\\data'>
tb.tb_frame.clear()
ResourceWarning: Enable tracemalloc to get the object allocation traceback
..C:\Users\chrifull\dev\semidbm2\test_semidbm2.py:246: ResourceWarning: unclosed file <_io.TextIOWrapper name='C:\\Users\\chrifull\\AppData\\Local\\Temp\\semidbm_utc0z4darw\\myfile.db\\data' mode='r' encoding='cp1252'>
self.assertEqual(len(open(db._data_filename).read()), 8)
ResourceWarning: Enable tracemalloc to get the object allocation traceback
.......C:\Users\chrifull\AppData\Local\Programs\Python\Python39\lib\traceback.py:220: ResourceWarning: unclosed file <_io.BufferedReader name='C:\\Users\\chrifull\\AppData\\Local\\Temp\\semidbm_ut7als9tb_\\myfile.db\\data'>
tb.tb_frame.clear()
ResourceWarning: Enable tracemalloc to get the object allocation traceback
............C:\Users\chrifull\dev\semidbm2\test_semidbm2.py:301: DeprecationWarning: Please use assertEqual instead.
self.assertEquals(db2["foobar"], b"foobar")
.......C:\Users\chrifull\dev\semidbm2\test_semidbm2.py:246: ResourceWarning: unclosed file <_io.TextIOWrapper name='C:\\Users\\chrifull\\AppData\\Local\\Temp\\semidbm_uthr2ra6nk\\myfile.db\\data' mode='r' encoding='cp1252'>
self.assertEqual(len(open(db._data_filename).read()), 8)
ResourceWarning: Enable tracemalloc to get the object allocation traceback
........................C:\Users\chrifull\AppData\Local\Programs\Python\Python39\lib\traceback.py:220: ResourceWarning: unclosed file <_io.BufferedReader name='C:\\Users\\chrifull\\AppData\\Local\\Temp\\semidbm_utypsva8e4\\myfile.db\\data'>
tb.tb_frame.clear()
ResourceWarning: Enable tracemalloc to get the object allocation traceback
..C:\Users\chrifull\dev\semidbm2\test_semidbm2.py:246: ResourceWarning: unclosed file <_io.TextIOWrapper name='C:\\Users\\chrifull\\AppData\\Local\\Temp\\semidbm_ut_f1klsho\\myfile.db\\data' mode='r' encoding='cp1252'>
self.assertEqual(len(open(db._data_filename).read()), 8)
ResourceWarning: Enable tracemalloc to get the object allocation traceback
..E....C:\Users\chrifull\AppData\Local\Programs\Python\Python39\lib\traceback.py:220: ResourceWarning: unclosed file <_io.BufferedReader name='C:\\Users\\chrifull\\AppData\\Local\\Temp\\semidbm_utf8xj3s8b\\myfile.db\\data'>
tb.tb_frame.clear()
ResourceWarning: Enable tracemalloc to get the object allocation traceback
....................
======================================================================
ERROR: test_compaction_does_not_leave_behind_files (__main__.TestWithChecksumsOn)
----------------------------------------------------------------------
Traceback (most recent call last):
File "C:\Users\chrifull\dev\semidbm2\test_semidbm2.py", line 198, in test_compaction_does_not_leave_behind_files
db2.compact()
File "C:\Users\chrifull\dev\semidbm2\semidbm2\db.py", line 251, in compact
self._renamer(new_db._data_filename, self._data_filename)
File "C:\Users\chrifull\dev\semidbm2\semidbm2\db.py", line 325, in __call__
semidbm2.win32.rename(from_file, to_file)
File "C:\Users\chrifull\dev\semidbm2\semidbm2\win32.py", line 21, in rename
raise OSError("can't rename file, error: %s" % kernel32.GetLastError())
OSError: can't rename file, error: 1175
----------------------------------------------------------------------
Ran 94 tests in 1.144s
FAILED (errors=1)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.