rdbpython 0.2.1__tar.gz → 0.2.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. {rdbpython-0.2.1/src/rdbpython.egg-info → rdbpython-0.2.2}/PKG-INFO +1 -2
  2. {rdbpython-0.2.1 → rdbpython-0.2.2}/pyproject.toml +7 -4
  3. {rdbpython-0.2.1 → rdbpython-0.2.2}/scripts/build-rocksdb-linux.sh +1 -1
  4. {rdbpython-0.2.1 → rdbpython-0.2.2}/scripts/build-rocksdb-macos.sh +1 -1
  5. {rdbpython-0.2.1 → rdbpython-0.2.2}/src/rdbpy/lib_rocksdb.pyx +19 -9
  6. {rdbpython-0.2.1 → rdbpython-0.2.2/src/rdbpython.egg-info}/PKG-INFO +1 -2
  7. {rdbpython-0.2.1 → rdbpython-0.2.2}/src/rdbpython.egg-info/SOURCES.txt +5 -6
  8. {rdbpython-0.2.1 → rdbpython-0.2.2}/src/rdbpython.egg-info/requires.txt +0 -1
  9. rdbpython-0.2.1/tests/unit/rocksdb/__init__.py +0 -0
  10. {rdbpython-0.2.1 → rdbpython-0.2.2}/LICENSE.md +0 -0
  11. {rdbpython-0.2.1 → rdbpython-0.2.2}/MANIFEST.in +0 -0
  12. {rdbpython-0.2.1 → rdbpython-0.2.2}/README.md +0 -0
  13. {rdbpython-0.2.1 → rdbpython-0.2.2}/scripts/rocksdb-cstdint.patch +0 -0
  14. {rdbpython-0.2.1 → rdbpython-0.2.2}/setup.cfg +0 -0
  15. {rdbpython-0.2.1 → rdbpython-0.2.2}/setup.py +0 -0
  16. {rdbpython-0.2.1 → rdbpython-0.2.2}/src/rdbpy/__init__.py +0 -0
  17. {rdbpython-0.2.1 → rdbpython-0.2.2}/src/rdbpy/backup.pxd +0 -0
  18. {rdbpython-0.2.1 → rdbpython-0.2.2}/src/rdbpy/cache.pxd +0 -0
  19. {rdbpython-0.2.1 → rdbpython-0.2.2}/src/rdbpy/comparator.pxd +0 -0
  20. {rdbpython-0.2.1 → rdbpython-0.2.2}/src/rdbpy/db.pxd +0 -0
  21. {rdbpython-0.2.1 → rdbpython-0.2.2}/src/rdbpy/env.pxd +0 -0
  22. {rdbpython-0.2.1 → rdbpython-0.2.2}/src/rdbpy/errors.py +0 -0
  23. {rdbpython-0.2.1 → rdbpython-0.2.2}/src/rdbpy/filter_policy.pxd +0 -0
  24. {rdbpython-0.2.1 → rdbpython-0.2.2}/src/rdbpy/include/rdb_include/comparator_wrapper.hpp +0 -0
  25. {rdbpython-0.2.1 → rdbpython-0.2.2}/src/rdbpy/include/rdb_include/filter_policy_wrapper.hpp +0 -0
  26. {rdbpython-0.2.1 → rdbpython-0.2.2}/src/rdbpy/include/rdb_include/memtable_factories.hpp +0 -0
  27. {rdbpython-0.2.1 → rdbpython-0.2.2}/src/rdbpy/include/rdb_include/merge_operator_wrapper.hpp +0 -0
  28. {rdbpython-0.2.1 → rdbpython-0.2.2}/src/rdbpy/include/rdb_include/slice_transform_wrapper.hpp +0 -0
  29. {rdbpython-0.2.1 → rdbpython-0.2.2}/src/rdbpy/include/rdb_include/utils.hpp +0 -0
  30. {rdbpython-0.2.1 → rdbpython-0.2.2}/src/rdbpy/include/rdb_include/write_batch_iter_helper.hpp +0 -0
  31. {rdbpython-0.2.1 → rdbpython-0.2.2}/src/rdbpy/interfaces.py +0 -0
  32. {rdbpython-0.2.1 → rdbpython-0.2.2}/src/rdbpy/iterator.pxd +0 -0
  33. {rdbpython-0.2.1 → rdbpython-0.2.2}/src/rdbpy/lib_rocksdb.pxd +0 -0
  34. {rdbpython-0.2.1 → rdbpython-0.2.2}/src/rdbpy/lib_rocksdb.pyi +0 -0
  35. {rdbpython-0.2.1 → rdbpython-0.2.2}/src/rdbpy/lib_utils.py +0 -0
  36. {rdbpython-0.2.1 → rdbpython-0.2.2}/src/rdbpy/logger.pxd +0 -0
  37. {rdbpython-0.2.1 → rdbpython-0.2.2}/src/rdbpy/memtablerep.pxd +0 -0
  38. {rdbpython-0.2.1 → rdbpython-0.2.2}/src/rdbpy/merge_operator.pxd +0 -0
  39. {rdbpython-0.2.1 → rdbpython-0.2.2}/src/rdbpy/merge_operators.py +0 -0
  40. {rdbpython-0.2.1 → rdbpython-0.2.2}/src/rdbpy/options.pxd +0 -0
  41. {rdbpython-0.2.1 → rdbpython-0.2.2}/src/rdbpy/slice_.pxd +0 -0
  42. {rdbpython-0.2.1 → rdbpython-0.2.2}/src/rdbpy/slice_transform.pxd +0 -0
  43. {rdbpython-0.2.1 → rdbpython-0.2.2}/src/rdbpy/snapshot.pxd +0 -0
  44. {rdbpython-0.2.1 → rdbpython-0.2.2}/src/rdbpy/status.pxd +0 -0
  45. {rdbpython-0.2.1 → rdbpython-0.2.2}/src/rdbpy/std_memory.pxd +0 -0
  46. {rdbpython-0.2.1 → rdbpython-0.2.2}/src/rdbpy/table_factory.pxd +0 -0
  47. {rdbpython-0.2.1 → rdbpython-0.2.2}/src/rdbpy/transaction.pxd +0 -0
  48. {rdbpython-0.2.1 → rdbpython-0.2.2}/src/rdbpy/universal_compaction.pxd +0 -0
  49. {rdbpython-0.2.1 → rdbpython-0.2.2}/src/rdbpython.egg-info/dependency_links.txt +0 -0
  50. {rdbpython-0.2.1 → rdbpython-0.2.2}/src/rdbpython.egg-info/not-zip-safe +0 -0
  51. {rdbpython-0.2.1 → rdbpython-0.2.2}/src/rdbpython.egg-info/top_level.txt +0 -0
  52. {rdbpython-0.2.1 → rdbpython-0.2.2}/tests/conftest.py +0 -0
  53. {rdbpython-0.2.1/tests/performance/rocksdb → rdbpython-0.2.2/tests/functional}/__init__.py +0 -0
  54. {rdbpython-0.2.1/tests/unit/rocksdb → rdbpython-0.2.2/tests/functional}/test_db.py +0 -0
  55. {rdbpython-0.2.1/tests/unit/rocksdb → rdbpython-0.2.2/tests/functional}/test_memtable.py +0 -0
  56. {rdbpython-0.2.1/tests/unit/rocksdb → rdbpython-0.2.2/tests/functional}/test_options.py +0 -0
  57. {rdbpython-0.2.1/tests/unit/rocksdb → rdbpython-0.2.2/tests/functional}/test_transaction.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: rdbpython
3
- Version: 0.2.1
3
+ Version: 0.2.2
4
4
  Summary: Python bindings for RocksDB with Cython
5
5
  Author-email: Gor Arakelyan <gorarkln@gmail.com>
6
6
  Maintainer-email: Gor Arakelyan <gorarkln@gmail.com>
@@ -27,7 +27,6 @@ Classifier: Topic :: Database
27
27
  Requires-Python: >=3.9
28
28
  Description-Content-Type: text/markdown
29
29
  License-File: LICENSE.md
30
- Requires-Dist: attrs
31
30
  Provides-Extra: dev
32
31
  Requires-Dist: ruff>=0.1.0; extra == "dev"
33
32
  Requires-Dist: pre-commit>=3.0.0; extra == "dev"
@@ -10,7 +10,7 @@ build-backend = "setuptools.build_meta"
10
10
  # ============================================================================
11
11
  [project]
12
12
  name = "rdbpython"
13
- version = "0.2.1"
13
+ version = "0.2.2"
14
14
  description = "Python bindings for RocksDB with Cython"
15
15
  readme = "README.md"
16
16
  license = "MIT"
@@ -44,9 +44,7 @@ classifiers = [
44
44
  "Topic :: Database",
45
45
  ]
46
46
  requires-python = ">=3.9"
47
- dependencies = [
48
- "attrs",
49
- ]
47
+ dependencies = []
50
48
 
51
49
  [project.urls]
52
50
  Homepage = "https://github.com/everyabc/rdbpy"
@@ -288,6 +286,11 @@ convention = "google"
288
286
  "D", # docstrings not required in tests
289
287
  "ANN", # type annotations not required in tests
290
288
  ]
289
+ "bench/**/*.py" = [
290
+ "T20", # print allowed in benchmarks
291
+ "D", # docstrings not required in benchmarks
292
+ "ANN", # type annotations not required in benchmarks
293
+ ]
291
294
  "setup.py" = [
292
295
  "T20", # print allowed in setup
293
296
  "D", # docstrings not required in setup
@@ -54,7 +54,7 @@ export PREFIX="$RDBPY_DEP_DIR"
54
54
  # ==============================================================================
55
55
  echo "Building zlib..."
56
56
  ZLIB_VERSION="1.3.1"
57
- curl -L "https://www.zlib.net/zlib-${ZLIB_VERSION}.tar.gz" -o "zlib-${ZLIB_VERSION}.tar.gz"
57
+ curl -L "https://github.com/madler/zlib/releases/download/v${ZLIB_VERSION}/zlib-${ZLIB_VERSION}.tar.gz" -o "zlib-${ZLIB_VERSION}.tar.gz"
58
58
  tar xzf "zlib-${ZLIB_VERSION}.tar.gz"
59
59
  cd "zlib-${ZLIB_VERSION}"
60
60
  ./configure --prefix="$PREFIX"
@@ -60,7 +60,7 @@ rewrite_dep_rpath() {
60
60
  # zlib
61
61
  echo "Building zlib..."
62
62
  ZLIB_VERSION="1.3.1"
63
- curl -L "https://www.zlib.net/zlib-${ZLIB_VERSION}.tar.gz" -o "zlib-${ZLIB_VERSION}.tar.gz"
63
+ curl -L "https://github.com/madler/zlib/releases/download/v${ZLIB_VERSION}/zlib-${ZLIB_VERSION}.tar.gz" -o "zlib-${ZLIB_VERSION}.tar.gz"
64
64
  tar xzf "zlib-${ZLIB_VERSION}.tar.gz"
65
65
  cd "zlib-${ZLIB_VERSION}"
66
66
  ./configure --prefix="$PREFIX"
@@ -2662,7 +2662,8 @@ cdef class Transaction(object):
2662
2662
  cpdef void commit(self):
2663
2663
  self._ensure_open()
2664
2664
  cdef Status st
2665
- st = self.txn.Commit()
2665
+ with nogil:
2666
+ st = self.txn.Commit()
2666
2667
  self.closed = True
2667
2668
  self.txn = NULL # Pointer invalid after commit
2668
2669
  check_status(st)
@@ -2673,7 +2674,8 @@ cdef class Transaction(object):
2673
2674
  if self.txn == NULL:
2674
2675
  return
2675
2676
  cdef Status st
2676
- st = self.txn.Rollback()
2677
+ with nogil:
2678
+ st = self.txn.Rollback()
2677
2679
  self.closed = True
2678
2680
  self.txn = NULL # Pointer invalid after rollback
2679
2681
  check_status(st)
@@ -2746,9 +2748,11 @@ cdef class Transaction(object):
2746
2748
  cdef db.ColumnFamilyHandle* cf_handle
2747
2749
  if column_family is not None:
2748
2750
  cf_handle = column_family.get_handle()
2749
- st = self.txn.Put(cf_handle, c_key, c_value, assume_tracked)
2751
+ with nogil:
2752
+ st = self.txn.Put(cf_handle, c_key, c_value, assume_tracked)
2750
2753
  else:
2751
- st = self.txn.Put(c_key, c_value)
2754
+ with nogil:
2755
+ st = self.txn.Put(c_key, c_value)
2752
2756
  check_status(st)
2753
2757
 
2754
2758
  cpdef void merge(self, bytes key, bytes value, ColumnFamilyHandle column_family = None, cpp_bool assume_tracked = False):
@@ -2759,9 +2763,11 @@ cdef class Transaction(object):
2759
2763
  cdef db.ColumnFamilyHandle* cf_handle
2760
2764
  if column_family is not None:
2761
2765
  cf_handle = column_family.get_handle()
2762
- st = self.txn.Merge(cf_handle, c_key, c_value, assume_tracked)
2766
+ with nogil:
2767
+ st = self.txn.Merge(cf_handle, c_key, c_value, assume_tracked)
2763
2768
  else:
2764
- st = self.txn.Merge(c_key, c_value)
2769
+ with nogil:
2770
+ st = self.txn.Merge(c_key, c_value)
2765
2771
  check_status(st)
2766
2772
 
2767
2773
  cpdef void delete_single(self, bytes key, ColumnFamilyHandle column_family = None, cpp_bool assume_tracked = False):
@@ -2771,9 +2777,11 @@ cdef class Transaction(object):
2771
2777
  cdef db.ColumnFamilyHandle* cf_handle
2772
2778
  if column_family is not None:
2773
2779
  cf_handle = column_family.get_handle()
2774
- st = self.txn.Delete(cf_handle, c_key, assume_tracked)
2780
+ with nogil:
2781
+ st = self.txn.Delete(cf_handle, c_key, assume_tracked)
2775
2782
  else:
2776
- st = self.txn.Delete(c_key)
2783
+ with nogil:
2784
+ st = self.txn.Delete(c_key)
2777
2785
  check_status(st)
2778
2786
 
2779
2787
  cpdef get(self, bytes key, ColumnFamilyHandle column_family = None):
@@ -2781,10 +2789,12 @@ cdef class Transaction(object):
2781
2789
  cdef Status st
2782
2790
  cdef string res
2783
2791
  cdef options.ReadOptions opts
2792
+ cdef Slice c_key = bytes_to_slice(key)
2784
2793
  cdef db.ColumnFamilyHandle* cf_handle = self.db.db.DefaultColumnFamily()
2785
2794
  if column_family is not None:
2786
2795
  cf_handle = column_family.get_handle()
2787
- st = self.txn.Get(opts, cf_handle, bytes_to_slice(key), cython.address(res))
2796
+ with nogil:
2797
+ st = self.txn.Get(opts, cf_handle, c_key, cython.address(res))
2788
2798
 
2789
2799
  if st.ok():
2790
2800
  return string_to_bytes(res)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: rdbpython
3
- Version: 0.2.1
3
+ Version: 0.2.2
4
4
  Summary: Python bindings for RocksDB with Cython
5
5
  Author-email: Gor Arakelyan <gorarkln@gmail.com>
6
6
  Maintainer-email: Gor Arakelyan <gorarkln@gmail.com>
@@ -27,7 +27,6 @@ Classifier: Topic :: Database
27
27
  Requires-Python: >=3.9
28
28
  Description-Content-Type: text/markdown
29
29
  License-File: LICENSE.md
30
- Requires-Dist: attrs
31
30
  Provides-Extra: dev
32
31
  Requires-Dist: ruff>=0.1.0; extra == "dev"
33
32
  Requires-Dist: pre-commit>=3.0.0; extra == "dev"
@@ -47,9 +47,8 @@ src/rdbpython.egg-info/not-zip-safe
47
47
  src/rdbpython.egg-info/requires.txt
48
48
  src/rdbpython.egg-info/top_level.txt
49
49
  tests/conftest.py
50
- tests/performance/rocksdb/__init__.py
51
- tests/unit/rocksdb/__init__.py
52
- tests/unit/rocksdb/test_db.py
53
- tests/unit/rocksdb/test_memtable.py
54
- tests/unit/rocksdb/test_options.py
55
- tests/unit/rocksdb/test_transaction.py
50
+ tests/functional/__init__.py
51
+ tests/functional/test_db.py
52
+ tests/functional/test_memtable.py
53
+ tests/functional/test_options.py
54
+ tests/functional/test_transaction.py
@@ -1,4 +1,3 @@
1
- attrs
2
1
 
3
2
  [all]
4
3
  rdbpy[cython,dev,test]
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes