Skip to content

Commit 5ba5274

Browse files
committed
Merge branch '20-release-v0-6-0' into 'dev'
Resolve "Release v0.6.0" See merge request objectbox/objectbox-python!14
2 parents 629c330 + d9a3d3a commit 5ba5274

File tree

11 files changed

+41
-12
lines changed

11 files changed

+41
-12
lines changed

.github/workflows/test.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
fail-fast: false # To see all versions that fail.
1111
matrix:
1212
os: ["ubuntu", "windows", "macos"]
13-
python: ["3.7", "3.8", "3.9", "3.10"] # https://devguide.python.org/versions/#versions
13+
python: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"] # https://devguide.python.org/versions/#versions
1414

1515
runs-on: ${{ matrix.os }}-latest
1616

.gitlab-ci.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ test:linux:x64:
4646
matrix:
4747
# Note: Docker images will have an arbitrary minor version due to "if-not-present" pull policy.
4848
# If this becomes a problem, we could e.g. specify a minor version explicitly.
49-
- PYTHON_VERSION: [ '3.7', '3.8', '3.9', '3.10', '3.11']
49+
- PYTHON_VERSION: [ '3.7', '3.8', '3.9', '3.10', '3.11', '3.12']
5050

5151
test:linux:armv7hf:
5252
extends: .test

README.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@ Some features
121121
* Linux x86-64 (64-bit)
122122
* Linux ARMv6hf (e.g. Raspberry PI Zero)
123123
* Linux ARMv7hf (e.g. Raspberry PI 3; available only on request)
124+
* Linux ARMv8 (e.g. Raspberry PI 4)
124125
* MacOS x86-64 and arm64 (Intel 64-bit and Apple Silicon)
125126
* Windows x86-64 (64-bit)
126127

@@ -151,7 +152,7 @@ License
151152
-------
152153

153154
```text
154-
Copyright 2019-2023 ObjectBox Ltd. All rights reserved.
155+
Copyright 2019-2024 ObjectBox Ltd. All rights reserved.
155156
156157
Licensed under the Apache License, Version 2.0 (the "License");
157158
you may not use this file except in compliance with the License.

download-c-lib.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# Script used to download objectbox-c shared libraries for all supported platforms. Execute by running `make get-lib`
77
# on first checkout of this repo and any time after changing the objectbox-c lib version.
88

9-
version = "v0.18.1" # see objectbox/c.py required_version
9+
version = "v0.21.0" # see objectbox/c.py required_version
1010
variant = 'objectbox' # or 'objectbox-sync'
1111

1212
base_url = "https://github.com/objectbox/objectbox-c/releases/download/"

objectbox/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
]
3232

3333
# Python binding version
34-
version = Version(0, 5, 0)
34+
version = Version(0, 6, 0)
3535

3636

3737
def version_info():

objectbox/c.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
# Version of the library used by the binding. This version is checked at runtime to ensure binary compatibility.
2626
# Don't forget to update download-c-lib.py when upgrading to a newer version.
27-
required_version = "0.18.1"
27+
required_version = "0.21.0"
2828

2929

3030
def shlib_name(library: str) -> str:

requirements.txt

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
pip
2+
setuptools
23
wheel
34
flatbuffers==23.5.26
45
pytest>=4.4.1

setup.py

+1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
"Programming Language :: Python :: 3.9",
3131
"Programming Language :: Python :: 3.10",
3232
"Programming Language :: Python :: 3.11",
33+
"Programming Language :: Python :: 3.12",
3334
"Programming Language :: C",
3435
"Programming Language :: C++",
3536

tests/common.py

+1-4
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,14 @@ def autocleanup():
2121
remove_test_dir()
2222

2323

24-
def load_empty_test_objectbox(name: str = "") -> objectbox.ObjectBox:
24+
def load_empty_test_objectbox(db_name: str = test_dir) -> objectbox.ObjectBox:
2525
model = objectbox.Model()
2626
from objectbox.model import IdUid
2727
model.entity(TestEntity, last_property_id=IdUid(27, 1027))
2828
model.last_entity_id = IdUid(2, 2)
2929

30-
db_name = test_dir if len(name) == 0 else test_dir + "/" + name
31-
3230
return objectbox.Builder().model(model).directory(db_name).build()
3331

34-
3532
def load_empty_test_datetime(name: str = "") -> objectbox.ObjectBox:
3633
model = objectbox.Model()
3734
from objectbox.model import IdUid

tests/test_basics.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@
1717

1818
def test_version():
1919
assert objectbox.version.major == 0 # update for major version changes
20-
assert objectbox.version.minor >= 5
20+
assert objectbox.version.minor >= 6
2121

2222
assert objectbox.version_core.major == 0 # update for major version changes
23-
assert objectbox.version_core.minor >= 18
23+
assert objectbox.version_core.minor >= 21
2424

2525
info = objectbox.version_info()
2626
print("\nVersion found:", info)

tests/test_inmemory.py

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
import objectbox
2+
from tests.common import load_empty_test_objectbox
3+
from tests.model import TestEntity
4+
import os.path
5+
import shutil
6+
7+
def test_inmemory():
8+
# Expect path for persistent store
9+
db_name = "testdata_persistent"
10+
ob = load_empty_test_objectbox(db_name)
11+
box = objectbox.Box(ob, TestEntity)
12+
object = TestEntity()
13+
id = box.put(object)
14+
assert id == 1
15+
assert id == object.id
16+
assert os.path.exists(db_name)
17+
del box
18+
ob.close()
19+
shutil.rmtree(db_name)
20+
21+
# Expect no path for in-memory store
22+
db_name = "memory:testdata"
23+
ob = load_empty_test_objectbox(db_name)
24+
box = objectbox.Box(ob, TestEntity)
25+
object = TestEntity()
26+
id = box.put(object)
27+
assert id == 1
28+
assert id == object.id
29+
assert not os.path.exists(db_name)

0 commit comments

Comments
 (0)