Skip to content

Commit

Permalink
Fix missing table_name attribute in hugedict.sqlite.SqliteDict
Browse files Browse the repository at this point in the history
  • Loading branch information
binh-vu committed May 22, 2024
1 parent 963052e commit 2c9ab68
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## [2.13.1] - 2024-05-21

### Fixed

- Fix missing `table_name` attribute in `hugedict.sqlite.SqliteDict`

## [2.13.0] - 2024-05-20

### Added
Expand Down
2 changes: 1 addition & 1 deletion hugedict/sqlite.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,9 @@ def __init__(
timeout: float = DEFAULT_TIMEOUT,
table_name: str = "data",
):
self.table_name = table_name
if isinstance(path, (str, Path)):
self.dbfile = Path(path)
self.table_name = table_name
need_init = not self.dbfile.exists()
self.db = sqlite3.connect(str(self.dbfile), timeout=timeout)
if need_init:
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "hugedict"
version = "2.13.0"
version = "2.13.1"
authors = [{ name = "Binh Vu", email = "binh@toan2.com" }]
description = "A dictionary-like object that is friendly with multiprocessing and uses key-value databases (e.g., RocksDB) as the underlying storage."
readme = "README.md"
Expand Down

0 comments on commit 2c9ab68

Please sign in to comment.