Skip to content

Commit 35aca4a

Browse files
chore: fix session pool del before lock (#367)
* chore: fix session pool del before lock tests/test_session_pool.py::test_session_pool_multi_thread tests/test_session_pool.py::TestSessionPoolBasic::test_pool_init /home/runner/work/nebula-python/nebula-python/.venv/lib/python3.12/site-packages/_pytest/unraisableexception.py:78: PytestUnraisableExceptionWarning: Exception ignored in: <function SessionPool.__del__ at 0x7f7fff215760> Traceback (most recent call last): File "/home/runner/work/nebula-python/nebula-python/nebula3/gclient/net/SessionPool.py", line 73, in __del__ self.close() File "/home/runner/work/nebula-python/nebula-python/nebula3/gclient/net/SessionPool.py", line 329, in close with self._lock: ^^^^^^^^^^ AttributeError: 'SessionPool' object has no attribute '_lock' * ci: remove py37 pdm build path --------- Co-authored-by: 盐粒 Yanli <yanli.yu@vesoft.com>
1 parent 78cb18d commit 35aca4a

File tree

4 files changed

+5
-4
lines changed

4 files changed

+5
-4
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@ See [ScanVertexEdgeExample.py](example/ScanVertexEdgeExample.py) for more detail
370370

371371
| Nebula-Python Version | Compatible NebulaGraph Versions | Notes |
372372
| --------------------- | ------------------------------- | ---------------------------------------------------------- |
373-
| 3.8.2 | 3.x | Highly recommended. Latest release for NebulaGraph 3.x series. |
373+
| 3.8.3 | 3.x | Highly recommended. Latest release for NebulaGraph 3.x series. |
374374
| master | master | Includes recent changes. Not yet released. |
375375
| 3.0.0 ~ 3.5.1 | 3.x | Compatible with any released version within the NebulaGraph 3.x series. |
376376
| 2.6.0 | 2.6.0, 2.6.1 | |

nebula3/gclient/net/SessionPool.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,8 @@ def __init__(self, username, password, space_name, addresses):
7070
self._close = False
7171

7272
def __del__(self):
73-
self.close()
73+
if hasattr(self, '_lock'):
74+
self.close()
7475

7576
def init(
7677
self,

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "nebula3-python"
3-
version = "3.8.2"
3+
version = "3.8.3"
44
description = "Python client for NebulaGraph v3"
55
authors = [
66
{name = "vesoft-inc", email = "info@vesoft.com"},

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727
setup(
2828
name="nebula3-python",
29-
version="3.8.2",
29+
version="3.8.3",
3030
license="Apache 2.0",
3131
author="vesoft-inc",
3232
author_email="info@vesoft.com",

0 commit comments

Comments
 (0)