Skip to content

Commit 7231e72

Browse files
committed
remove datetime patches
1 parent 95f5c13 commit 7231e72

File tree

1 file changed

+2
-55
lines changed

1 file changed

+2
-55
lines changed

graalpython/lib-graalpython/patches/pybind11/pybind11-2.10.4.patch

Lines changed: 2 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,14 @@
1-
From df4bb6b9a55edb35701b3592d32f338d60ad2948 Mon Sep 17 00:00:00 2001
1+
From 8b3416e182ddbba1142dda53252f7f9254ed3a34 Mon Sep 17 00:00:00 2001
22
From: Mohaned Qunaibit <[email protected]>
33
Date: Thu, 22 Jun 2023 14:15:50 +0300
44
Subject: [PATCH] patch 2.10.4
55

66
---
77
include/pybind11/cast.h | 8 ++++----
8-
include/pybind11/chrono.h | 8 +++++---
98
include/pybind11/detail/class.h | 10 +++++-----
109
include/pybind11/detail/common.h | 6 +++---
1110
include/pybind11/detail/internals.h | 14 +++++++-------
1211
include/pybind11/detail/type_caster_base.h | 6 +++---
13-
include/pybind11/embed.h | 2 +-
1412
include/pybind11/eval.h | 2 +-
1513
include/pybind11/gil.h | 4 ++--
1614
include/pybind11/pybind11.h | 10 +++++-----
@@ -27,7 +25,7 @@ Subject: [PATCH] patch 2.10.4
2725
tests/test_iostream.py | 2 +-
2826
tests/test_pytypes.cpp | 2 +-
2927
tests/test_virtual_functions.py | 2 +-
30-
23 files changed, 60 insertions(+), 58 deletions(-)
28+
21 files changed, 54 insertions(+), 54 deletions(-)
3129

3230
diff --git a/include/pybind11/cast.h b/include/pybind11/cast.h
3331
index 3a40460..a602012 100644
@@ -69,44 +67,6 @@ index 3a40460..a602012 100644
6967
return UTF_N == 8 ? PyUnicode_DecodeUTF8(buffer, nbytes, nullptr)
7068
: UTF_N == 16 ? PyUnicode_DecodeUTF16(buffer, nbytes, nullptr, nullptr)
7169
: PyUnicode_DecodeUTF32(buffer, nbytes, nullptr, nullptr);
72-
diff --git a/include/pybind11/chrono.h b/include/pybind11/chrono.h
73-
index 167ea0e..5249c86 100644
74-
--- a/include/pybind11/chrono.h
75-
+++ b/include/pybind11/chrono.h
76-
@@ -42,13 +42,13 @@ public:
77-
return false;
78-
}
79-
// If invoked with datetime.delta object
80-
- if (PyDelta_Check(src.ptr())) {
81-
+ /*if (PyDelta_Check(src.ptr())) {
82-
value = type(duration_cast<duration<rep, period>>(
83-
days(PyDateTime_DELTA_GET_DAYS(src.ptr()))
84-
+ seconds(PyDateTime_DELTA_GET_SECONDS(src.ptr()))
85-
+ microseconds(PyDateTime_DELTA_GET_MICROSECONDS(src.ptr()))));
86-
return true;
87-
- }
88-
+ }*/
89-
// If invoked with a float we assume it is seconds and convert
90-
if (PyFloat_Check(src.ptr())) {
91-
value = type(duration_cast<duration<rep, period>>(
92-
@@ -135,6 +135,8 @@ public:
93-
std::tm cal;
94-
microseconds msecs;
95-
96-
+ return false;
97-
+ /*
98-
if (PyDateTime_Check(src.ptr())) {
99-
cal.tm_sec = PyDateTime_DATE_GET_SECOND(src.ptr());
100-
cal.tm_min = PyDateTime_DATE_GET_MINUTE(src.ptr());
101-
@@ -167,7 +169,7 @@ public:
102-
}
103-
104-
value = time_point_cast<Duration>(system_clock::from_time_t(std::mktime(&cal)) + msecs);
105-
- return true;
106-
+ return true;*/
107-
}
108-
109-
static handle cast(const std::chrono::time_point<std::chrono::system_clock, Duration> &src,
11070
diff --git a/include/pybind11/detail/class.h b/include/pybind11/detail/class.h
11171
index bc2b40c..19388e8 100644
11272
--- a/include/pybind11/detail/class.h
@@ -281,19 +241,6 @@ index 0b710d7..e0ccbf9 100644
281241
return PyThreadState_GET();
282242
#else
283243
return _PyThreadState_UncheckedGet();
284-
diff --git a/include/pybind11/embed.h b/include/pybind11/embed.h
285-
index 749c75b..e52a0f9 100644
286-
--- a/include/pybind11/embed.h
287-
+++ b/include/pybind11/embed.h
288-
@@ -15,7 +15,7 @@
289-
#include <memory>
290-
#include <vector>
291-
292-
-#if defined(PYPY_VERSION)
293-
+#if defined(PYPY_VERSION) || defined(GRAALVM_PYTHON)
294-
# error Embedding the interpreter is not supported with PyPy
295-
#endif
296-
297244
diff --git a/include/pybind11/eval.h b/include/pybind11/eval.h
298245
index bd5f981..c25f036 100644
299246
--- a/include/pybind11/eval.h

0 commit comments

Comments
 (0)