Giter VIP home page Giter VIP logo

semidbm2's People

Contributors

benpankow avatar besfahbod avatar jamesls avatar jellezijlstra avatar movermeyer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

semidbm2's Issues

Inconsistent test validation on Win10

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.