forked from pool/python-lmdb
Accepting request 1237708 from home:glaubitz:branches:devel:languages:python
- Update to 1.6.2 * CI-only fix. - from version 1.6.1 * CI-only fix. - from version 1.6.0 * Support for Python 3.13. Contributed by Miro Hrončok and Adam Williamson. * CI: Publish 3.13 binaries and Linux aarch64 wheels for multiple versions. - Drop py313-support.patch, merged upstream - Use Python 3.11 on SLE-15 by default OBS-URL: https://build.opensuse.org/request/show/1237708 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-lmdb?expand=0&rev=31
This commit is contained in:
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:717c255827d331e02f7242b44051aa06466c90f6d732ecb07b31edfb1e06c67a
|
||||
size 881246
|
||||
3
lmdb-1.6.2.tar.gz
Normal file
3
lmdb-1.6.2.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:d28e3fa59935ff688858760ec52f202ecb8c1089a3f68d1f162ea3078d151e73
|
||||
size 881434
|
||||
@@ -1,46 +0,0 @@
|
||||
From 206a3754466397baeb418e70be9d35b12cc4079f Mon Sep 17 00:00:00 2001
|
||||
From: Adam Williamson <awilliam@redhat.com>
|
||||
Date: Wed, 4 Sep 2024 19:09:04 +0200
|
||||
Subject: [PATCH] Fix build with Python 3.13+
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Avoid using PyObject_AsReadBuffer, do what PyObject_AsReadBuffer does.
|
||||
|
||||
Note that this is not safe, and it has never been safe,
|
||||
but the code does *exactly* what it used to do (at least on Python 3.8+).
|
||||
|
||||
Fixes https://github.com/jnwatson/py-lmdb/issues/362
|
||||
|
||||
Co-Authored-By: Miro Hrončok <miro@hroncok.cz>
|
||||
---
|
||||
lmdb/cpython.c | 12 ++++++++++++
|
||||
1 file changed, 12 insertions(+)
|
||||
|
||||
diff --git a/lmdb/cpython.c b/lmdb/cpython.c
|
||||
index 3030883..81fdb06 100644
|
||||
--- a/lmdb/cpython.c
|
||||
+++ b/lmdb/cpython.c
|
||||
@@ -545,9 +545,21 @@ val_from_buffer(MDB_val *val, PyObject *buf)
|
||||
type_error("Won't implicitly convert Unicode to bytes; use .encode()");
|
||||
return -1;
|
||||
}
|
||||
+#if PY_VERSION_HEX < 0x030d0000
|
||||
return PyObject_AsReadBuffer(buf,
|
||||
(const void **) &val->mv_data,
|
||||
(Py_ssize_t *) &val->mv_size);
|
||||
+#else
|
||||
+ Py_buffer view;
|
||||
+ int ret;
|
||||
+ ret = PyObject_GetBuffer(buf, &view, PyBUF_SIMPLE);
|
||||
+ if(ret == 0) {
|
||||
+ val->mv_data = view.buf;
|
||||
+ val->mv_size = view.len;
|
||||
+ PyBuffer_Release(&view);
|
||||
+ }
|
||||
+ return ret;
|
||||
+#endif
|
||||
}
|
||||
|
||||
/* ------------------- */
|
||||
@@ -1,3 +1,16 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Jan 14 10:22:57 UTC 2025 - John Paul Adrian Glaubitz <adrian.glaubitz@suse.com>
|
||||
|
||||
- Update to 1.6.2
|
||||
* CI-only fix.
|
||||
- from version 1.6.1
|
||||
* CI-only fix.
|
||||
- from version 1.6.0
|
||||
* Support for Python 3.13. Contributed by Miro Hrončok and Adam Williamson.
|
||||
* CI: Publish 3.13 binaries and Linux aarch64 wheels for multiple versions.
|
||||
- Drop py313-support.patch, merged upstream
|
||||
- Use Python 3.11 on SLE-15 by default
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Nov 20 16:01:02 UTC 2024 - Ben Greiner <code@bnavigator.de>
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package python-lmdb
|
||||
#
|
||||
# Copyright (c) 2024 SUSE LLC
|
||||
# Copyright (c) 2025 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@@ -16,15 +16,15 @@
|
||||
#
|
||||
|
||||
|
||||
%{?sle15_python_module_pythons}
|
||||
Name: python-lmdb
|
||||
Version: 1.5.1
|
||||
Version: 1.6.2
|
||||
Release: 0
|
||||
Summary: Universal Python binding for the LMDB 'Lightning' Database
|
||||
License: OLDAP-2.8
|
||||
Group: Development/Languages/Python
|
||||
URL: https://github.com/dw/py-lmdb/
|
||||
Source: https://files.pythonhosted.org/packages/source/l/lmdb/lmdb-%{version}.tar.gz
|
||||
Patch1: https://github.com/jnwatson/py-lmdb/pull/368/commits/206a3754466397baeb418e70be9d35b12cc4079f.patch#/py313-support.patch
|
||||
BuildRequires: %{python_module cffi}
|
||||
BuildRequires: %{python_module devel}
|
||||
BuildRequires: %{python_module pip}
|
||||
|
||||
Reference in New Issue
Block a user