pyogrio 0.7.2__cp310-cp310-win_amd64.whl → 0.9.0__cp310-cp310-win_amd64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of pyogrio might be problematic. Click here for more details.

Files changed (83) hide show
  1. pyogrio/__init__.py +7 -3
  2. pyogrio/_compat.py +6 -1
  3. pyogrio/_err.c +855 -321
  4. pyogrio/_err.cp310-win_amd64.pyd +0 -0
  5. pyogrio/_err.pyx +7 -3
  6. pyogrio/_geometry.c +134 -75
  7. pyogrio/_geometry.cp310-win_amd64.pyd +0 -0
  8. pyogrio/_io.c +28462 -22659
  9. pyogrio/_io.cp310-win_amd64.pyd +0 -0
  10. pyogrio/_io.pyx +904 -242
  11. pyogrio/_ogr.c +1317 -1640
  12. pyogrio/_ogr.cp310-win_amd64.pyd +0 -0
  13. pyogrio/_ogr.pxd +69 -13
  14. pyogrio/_ogr.pyx +8 -24
  15. pyogrio/_version.py +3 -3
  16. pyogrio/_vsi.c +6815 -0
  17. pyogrio/_vsi.cp310-win_amd64.pyd +0 -0
  18. pyogrio/_vsi.pxd +4 -0
  19. pyogrio/_vsi.pyx +140 -0
  20. pyogrio/core.py +43 -44
  21. pyogrio/gdal_data/GDAL-targets-release.cmake +1 -1
  22. pyogrio/gdal_data/GDAL-targets.cmake +10 -6
  23. pyogrio/gdal_data/GDALConfigVersion.cmake +3 -3
  24. pyogrio/gdal_data/gdalinfo_output.schema.json +2 -0
  25. pyogrio/gdal_data/gdalvrt.xsd +163 -0
  26. pyogrio/gdal_data/ogrinfo_output.schema.json +12 -1
  27. pyogrio/gdal_data/vcpkg.spdx.json +23 -23
  28. pyogrio/gdal_data/vcpkg_abi_info.txt +29 -28
  29. pyogrio/geopandas.py +140 -34
  30. pyogrio/proj_data/ITRF2008 +2 -2
  31. pyogrio/proj_data/proj-config-version.cmake +2 -2
  32. pyogrio/proj_data/proj-config.cmake +2 -1
  33. pyogrio/proj_data/proj-targets-release.cmake +0 -1
  34. pyogrio/proj_data/proj-targets.cmake +10 -6
  35. pyogrio/proj_data/proj.db +0 -0
  36. pyogrio/proj_data/proj4-targets-release.cmake +0 -1
  37. pyogrio/proj_data/proj4-targets.cmake +10 -6
  38. pyogrio/proj_data/vcpkg.spdx.json +21 -43
  39. pyogrio/proj_data/vcpkg_abi_info.txt +16 -17
  40. pyogrio/raw.py +438 -116
  41. pyogrio/tests/conftest.py +75 -6
  42. pyogrio/tests/fixtures/poly_not_enough_points.shp.zip +0 -0
  43. pyogrio/tests/test_arrow.py +841 -7
  44. pyogrio/tests/test_core.py +99 -7
  45. pyogrio/tests/test_geopandas_io.py +827 -121
  46. pyogrio/tests/test_path.py +23 -3
  47. pyogrio/tests/test_raw_io.py +276 -50
  48. pyogrio/util.py +39 -19
  49. pyogrio-0.9.0.dist-info/DELVEWHEEL +2 -0
  50. {pyogrio-0.7.2.dist-info → pyogrio-0.9.0.dist-info}/METADATA +2 -2
  51. {pyogrio-0.7.2.dist-info → pyogrio-0.9.0.dist-info}/RECORD +72 -67
  52. {pyogrio-0.7.2.dist-info → pyogrio-0.9.0.dist-info}/WHEEL +1 -1
  53. pyogrio.libs/Lerc-5e4d8cbeeabca06f95e2270792304dc3.dll +0 -0
  54. pyogrio.libs/{gdal-c3b1d8f66682071d0cd26d86e4182013.dll → gdal-b434963605a006e01c486c0df6dea4e0.dll} +0 -0
  55. pyogrio.libs/geos-f0622d0794b81c937a851b2e6fa9b712.dll +0 -0
  56. pyogrio.libs/geos_c-0e16bf70612fc3301d077b9d863a3fdb.dll +0 -0
  57. pyogrio.libs/{geotiff-e43cdab688866b59f8800cfcde836d16.dll → geotiff-772e7c705fb15ddf91b432adb4eb1f6c.dll} +0 -0
  58. pyogrio.libs/iconv-2-8fcc23ddc6f096c45871011b6e008b44.dll +0 -0
  59. pyogrio.libs/{jpeg62-567ab743ac805dfb57fe3867ba5788a4.dll → jpeg62-2f9b7af22d78338e8f0be0058503dc35.dll} +0 -0
  60. pyogrio.libs/json-c-e52a077545e4057de42beb4948289b41.dll +0 -0
  61. pyogrio.libs/libcurl-bc81cd8afe15b10c0821b181b6af8bd0.dll +0 -0
  62. pyogrio.libs/libexpat-fbe03ca8917dfda776562d4338b289b8.dll +0 -0
  63. pyogrio.libs/{liblzma-de7f4770d4e3715acd031ca93883f10c.dll → liblzma-6b36f24d54d3dd45f274a2aebef81085.dll} +0 -0
  64. pyogrio.libs/libpng16-13928571ad910705eae8d7dd8eef8b11.dll +0 -0
  65. pyogrio.libs/{msvcp140-83b6a1a2fa8b1735a358b2fe13cabe4e.dll → msvcp140-46db46e967c8db2cb7a20fc75872a57e.dll} +0 -0
  66. pyogrio.libs/proj-8a30239ef2dfc3b9dd2bb48e8abb330f.dll +0 -0
  67. pyogrio.libs/{qhull_r-99ae8a526357acc44b162cb4df2c3bb6.dll → qhull_r-c45abde5d0c92faf723cc2942138af77.dll} +0 -0
  68. pyogrio.libs/sqlite3-df30c3cf230727e23c43c40126a530f7.dll +0 -0
  69. pyogrio.libs/{tiff-7c2d4b204ec2db46c81f6a597895c2f7.dll → tiff-43630f30487a9015213475ae86ed3fa3.dll} +0 -0
  70. pyogrio.libs/{zlib1-824de9299616f0908aeeb9441a084848.dll → zlib1-e1272810861a13dd8d6cff3beac47f17.dll} +0 -0
  71. pyogrio/tests/win32.py +0 -86
  72. pyogrio-0.7.2.dist-info/DELVEWHEEL +0 -2
  73. pyogrio.libs/Lerc-d5afc4101deffe7de21241ccd4d562f6.dll +0 -0
  74. pyogrio.libs/geos-1c764a1384537a0ad2995e83d23e8642.dll +0 -0
  75. pyogrio.libs/geos_c-0d7dfdcee49efa8df585e2fb993157aa.dll +0 -0
  76. pyogrio.libs/json-c-36c91e30c4410d41c22b2010c31183e3.dll +0 -0
  77. pyogrio.libs/libcurl-ebcc8c18195071a90e59f818902e10c6.dll +0 -0
  78. pyogrio.libs/libexpat-345379c9c11632130d8c383cbacde1a6.dll +0 -0
  79. pyogrio.libs/libpng16-2c30e6846653c47ef2ff9d7dec3338ba.dll +0 -0
  80. pyogrio.libs/proj-98758c96a6cb682b5cec7e8dc5e29a50.dll +0 -0
  81. pyogrio.libs/sqlite3-327ed7b38bfd91fb4a17544960e055e9.dll +0 -0
  82. {pyogrio-0.7.2.dist-info → pyogrio-0.9.0.dist-info}/LICENSE +0 -0
  83. {pyogrio-0.7.2.dist-info → pyogrio-0.9.0.dist-info}/top_level.txt +0 -0
Binary file
pyogrio/_err.pyx CHANGED
@@ -153,9 +153,13 @@ cdef inline object exc_check():
153
153
  else:
154
154
  # Reformat messages.
155
155
  msg_b = err_msg
156
- msg = msg_b.decode('utf-8')
157
- msg = msg.replace("`", "'")
158
- msg = msg.replace("\n", " ")
156
+
157
+ try:
158
+ msg = msg_b.decode('utf-8')
159
+ msg = msg.replace("`", "'")
160
+ msg = msg.replace("\n", " ")
161
+ except UnicodeDecodeError as exc:
162
+ msg = f"Could not decode error message to UTF-8. Raw error: {msg_b}"
159
163
 
160
164
  if err_type == 3:
161
165
  CPLErrorReset()
pyogrio/_geometry.c CHANGED
@@ -1,4 +1,4 @@
1
- /* Generated by Cython 3.0.4 */
1
+ /* Generated by Cython 3.0.10 */
2
2
 
3
3
  /* BEGIN: Cython Metadata
4
4
  {
@@ -57,10 +57,10 @@ END: Cython Metadata */
57
57
  #else
58
58
  #define __PYX_EXTRA_ABI_MODULE_NAME ""
59
59
  #endif
60
- #define CYTHON_ABI "3_0_4" __PYX_EXTRA_ABI_MODULE_NAME
60
+ #define CYTHON_ABI "3_0_10" __PYX_EXTRA_ABI_MODULE_NAME
61
61
  #define __PYX_ABI_MODULE_NAME "_cython_" CYTHON_ABI
62
62
  #define __PYX_TYPE_MODULE_PREFIX __PYX_ABI_MODULE_NAME "."
63
- #define CYTHON_HEX_VERSION 0x030004F0
63
+ #define CYTHON_HEX_VERSION 0x03000AF0
64
64
  #define CYTHON_FUTURE_DIVISION 1
65
65
  #include <stddef.h>
66
66
  #ifndef offsetof
@@ -152,6 +152,8 @@ END: Cython Metadata */
152
152
  #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
153
153
  #define CYTHON_UPDATE_DESCRIPTOR_DOC 0
154
154
  #endif
155
+ #undef CYTHON_USE_FREELISTS
156
+ #define CYTHON_USE_FREELISTS 0
155
157
  #elif defined(PYPY_VERSION)
156
158
  #define CYTHON_COMPILING_IN_PYPY 1
157
159
  #define CYTHON_COMPILING_IN_CPYTHON 0
@@ -213,6 +215,8 @@ END: Cython Metadata */
213
215
  #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
214
216
  #define CYTHON_UPDATE_DESCRIPTOR_DOC 0
215
217
  #endif
218
+ #undef CYTHON_USE_FREELISTS
219
+ #define CYTHON_USE_FREELISTS 0
216
220
  #elif defined(CYTHON_LIMITED_API)
217
221
  #ifdef Py_LIMITED_API
218
222
  #undef __PYX_LIMITED_VERSION_HEX
@@ -274,7 +278,9 @@ END: Cython Metadata */
274
278
  #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
275
279
  #define CYTHON_UPDATE_DESCRIPTOR_DOC 0
276
280
  #endif
277
- #elif defined(PY_NOGIL)
281
+ #undef CYTHON_USE_FREELISTS
282
+ #define CYTHON_USE_FREELISTS 0
283
+ #elif defined(Py_GIL_DISABLED) || defined(Py_NOGIL)
278
284
  #define CYTHON_COMPILING_IN_PYPY 0
279
285
  #define CYTHON_COMPILING_IN_CPYTHON 0
280
286
  #define CYTHON_COMPILING_IN_LIMITED_API 0
@@ -283,11 +289,17 @@ END: Cython Metadata */
283
289
  #ifndef CYTHON_USE_TYPE_SLOTS
284
290
  #define CYTHON_USE_TYPE_SLOTS 1
285
291
  #endif
292
+ #ifndef CYTHON_USE_TYPE_SPECS
293
+ #define CYTHON_USE_TYPE_SPECS 0
294
+ #endif
286
295
  #undef CYTHON_USE_PYTYPE_LOOKUP
287
296
  #define CYTHON_USE_PYTYPE_LOOKUP 0
288
297
  #ifndef CYTHON_USE_ASYNC_SLOTS
289
298
  #define CYTHON_USE_ASYNC_SLOTS 1
290
299
  #endif
300
+ #ifndef CYTHON_USE_PYLONG_INTERNALS
301
+ #define CYTHON_USE_PYLONG_INTERNALS 0
302
+ #endif
291
303
  #undef CYTHON_USE_PYLIST_INTERNALS
292
304
  #define CYTHON_USE_PYLIST_INTERNALS 0
293
305
  #ifndef CYTHON_USE_UNICODE_INTERNALS
@@ -295,8 +307,6 @@ END: Cython Metadata */
295
307
  #endif
296
308
  #undef CYTHON_USE_UNICODE_WRITER
297
309
  #define CYTHON_USE_UNICODE_WRITER 0
298
- #undef CYTHON_USE_PYLONG_INTERNALS
299
- #define CYTHON_USE_PYLONG_INTERNALS 0
300
310
  #ifndef CYTHON_AVOID_BORROWED_REFS
301
311
  #define CYTHON_AVOID_BORROWED_REFS 0
302
312
  #endif
@@ -308,11 +318,22 @@ END: Cython Metadata */
308
318
  #endif
309
319
  #undef CYTHON_FAST_THREAD_STATE
310
320
  #define CYTHON_FAST_THREAD_STATE 0
321
+ #undef CYTHON_FAST_GIL
322
+ #define CYTHON_FAST_GIL 0
323
+ #ifndef CYTHON_METH_FASTCALL
324
+ #define CYTHON_METH_FASTCALL 1
325
+ #endif
311
326
  #undef CYTHON_FAST_PYCALL
312
327
  #define CYTHON_FAST_PYCALL 0
328
+ #ifndef CYTHON_PEP487_INIT_SUBCLASS
329
+ #define CYTHON_PEP487_INIT_SUBCLASS 1
330
+ #endif
313
331
  #ifndef CYTHON_PEP489_MULTI_PHASE_INIT
314
332
  #define CYTHON_PEP489_MULTI_PHASE_INIT 1
315
333
  #endif
334
+ #ifndef CYTHON_USE_MODULE_STATE
335
+ #define CYTHON_USE_MODULE_STATE 0
336
+ #endif
316
337
  #ifndef CYTHON_USE_TP_FINALIZE
317
338
  #define CYTHON_USE_TP_FINALIZE 1
318
339
  #endif
@@ -320,6 +341,12 @@ END: Cython Metadata */
320
341
  #define CYTHON_USE_DICT_VERSIONS 0
321
342
  #undef CYTHON_USE_EXC_INFO_STACK
322
343
  #define CYTHON_USE_EXC_INFO_STACK 0
344
+ #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
345
+ #define CYTHON_UPDATE_DESCRIPTOR_DOC 1
346
+ #endif
347
+ #ifndef CYTHON_USE_FREELISTS
348
+ #define CYTHON_USE_FREELISTS 0
349
+ #endif
323
350
  #else
324
351
  #define CYTHON_COMPILING_IN_PYPY 0
325
352
  #define CYTHON_COMPILING_IN_CPYTHON 1
@@ -410,6 +437,9 @@ END: Cython Metadata */
410
437
  #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
411
438
  #define CYTHON_UPDATE_DESCRIPTOR_DOC 1
412
439
  #endif
440
+ #ifndef CYTHON_USE_FREELISTS
441
+ #define CYTHON_USE_FREELISTS 1
442
+ #endif
413
443
  #endif
414
444
  #if !defined(CYTHON_FAST_PYCCALL)
415
445
  #define CYTHON_FAST_PYCCALL (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1)
@@ -602,18 +632,19 @@ END: Cython Metadata */
602
632
  PyObject *exception_table = NULL;
603
633
  PyObject *types_module=NULL, *code_type=NULL, *result=NULL;
604
634
  #if __PYX_LIMITED_VERSION_HEX < 0x030B0000
605
- PyObject *version_info; // borrowed
606
- #endif
635
+ PyObject *version_info;
607
636
  PyObject *py_minor_version = NULL;
637
+ #endif
608
638
  long minor_version = 0;
609
639
  PyObject *type, *value, *traceback;
610
640
  PyErr_Fetch(&type, &value, &traceback);
611
641
  #if __PYX_LIMITED_VERSION_HEX >= 0x030B0000
612
- minor_version = 11; // we don't yet need to distinguish between versions > 11
642
+ minor_version = 11;
613
643
  #else
614
644
  if (!(version_info = PySys_GetObject("version_info"))) goto end;
615
645
  if (!(py_minor_version = PySequence_GetItem(version_info, 1))) goto end;
616
646
  minor_version = PyLong_AsLong(py_minor_version);
647
+ Py_DECREF(py_minor_version);
617
648
  if (minor_version == -1 && PyErr_Occurred()) goto end;
618
649
  #endif
619
650
  if (!(types_module = PyImport_ImportModule("types"))) goto end;
@@ -634,7 +665,6 @@ END: Cython Metadata */
634
665
  Py_XDECREF(code_type);
635
666
  Py_XDECREF(exception_table);
636
667
  Py_XDECREF(types_module);
637
- Py_XDECREF(py_minor_version);
638
668
  if (type) {
639
669
  PyErr_Restore(type, value, traceback);
640
670
  }
@@ -667,7 +697,7 @@ END: Cython Metadata */
667
697
  PyObject *fv, PyObject *cell, PyObject* fn,
668
698
  PyObject *name, int fline, PyObject *lnos) {
669
699
  PyCodeObject *result;
670
- PyObject *empty_bytes = PyBytes_FromStringAndSize("", 0); // we don't have access to __pyx_empty_bytes here
700
+ PyObject *empty_bytes = PyBytes_FromStringAndSize("", 0);
671
701
  if (!empty_bytes) return NULL;
672
702
  result =
673
703
  #if PY_VERSION_HEX >= 0x030C0000
@@ -753,8 +783,13 @@ END: Cython Metadata */
753
783
  typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args,
754
784
  Py_ssize_t nargs, PyObject *kwnames);
755
785
  #else
756
- #define __Pyx_PyCFunctionFast _PyCFunctionFast
757
- #define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords
786
+ #if PY_VERSION_HEX >= 0x030d00A4
787
+ # define __Pyx_PyCFunctionFast PyCFunctionFast
788
+ # define __Pyx_PyCFunctionFastWithKeywords PyCFunctionFastWithKeywords
789
+ #else
790
+ # define __Pyx_PyCFunctionFast _PyCFunctionFast
791
+ # define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords
792
+ #endif
758
793
  #endif
759
794
  #if CYTHON_METH_FASTCALL
760
795
  #define __Pyx_METH_FASTCALL METH_FASTCALL
@@ -829,6 +864,8 @@ static CYTHON_INLINE int __Pyx__IsSameCFunction(PyObject *func, void *cfunc) {
829
864
  #define __Pyx_PyThreadState_Current PyThreadState_Get()
830
865
  #elif !CYTHON_FAST_THREAD_STATE
831
866
  #define __Pyx_PyThreadState_Current PyThreadState_GET()
867
+ #elif PY_VERSION_HEX >= 0x030d00A1
868
+ #define __Pyx_PyThreadState_Current PyThreadState_GetUnchecked()
832
869
  #elif PY_VERSION_HEX >= 0x03060000
833
870
  #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet()
834
871
  #elif PY_VERSION_HEX >= 0x03000000
@@ -904,7 +941,7 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) {
904
941
  }
905
942
  #endif
906
943
  #endif
907
- #if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized)
944
+ #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030d0000 || defined(_PyDict_NewPresized)
908
945
  #define __Pyx_PyDict_NewPresized(n) ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n))
909
946
  #else
910
947
  #define __Pyx_PyDict_NewPresized(n) PyDict_New()
@@ -916,7 +953,7 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) {
916
953
  #define __Pyx_PyNumber_Divide(x,y) PyNumber_Divide(x,y)
917
954
  #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceDivide(x,y)
918
955
  #endif
919
- #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX > 0x030600B4 && CYTHON_USE_UNICODE_INTERNALS
956
+ #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX > 0x030600B4 && PY_VERSION_HEX < 0x030d0000 && CYTHON_USE_UNICODE_INTERNALS
920
957
  #define __Pyx_PyDict_GetItemStrWithError(dict, name) _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash)
921
958
  static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStr(PyObject *dict, PyObject *name) {
922
959
  PyObject *res = __Pyx_PyDict_GetItemStrWithError(dict, name);
@@ -960,7 +997,7 @@ static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStrWithError(PyObject *dict,
960
997
  #endif
961
998
  #if CYTHON_USE_TYPE_SPECS && PY_VERSION_HEX >= 0x03080000
962
999
  #define __Pyx_PyHeapTypeObject_GC_Del(obj) {\
963
- PyTypeObject *type = Py_TYPE(obj);\
1000
+ PyTypeObject *type = Py_TYPE((PyObject*)obj);\
964
1001
  assert(__Pyx_PyType_HasFeature(type, Py_TPFLAGS_HEAPTYPE));\
965
1002
  PyObject_GC_Del(obj);\
966
1003
  Py_DECREF(type);\
@@ -1104,6 +1141,15 @@ static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStrWithError(PyObject *dict,
1104
1141
  #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_Size(o)
1105
1142
  #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_Size(o)
1106
1143
  #endif
1144
+ #if __PYX_LIMITED_VERSION_HEX >= 0x030d00A1
1145
+ #define __Pyx_PyImport_AddModuleRef(name) PyImport_AddModuleRef(name)
1146
+ #else
1147
+ static CYTHON_INLINE PyObject *__Pyx_PyImport_AddModuleRef(const char *name) {
1148
+ PyObject *module = PyImport_AddModule(name);
1149
+ Py_XINCREF(module);
1150
+ return module;
1151
+ }
1152
+ #endif
1107
1153
  #if PY_MAJOR_VERSION >= 3
1108
1154
  #define PyIntObject PyLongObject
1109
1155
  #define PyInt_Type PyLong_Type
@@ -1182,7 +1228,7 @@ static CYTHON_INLINE float __PYX_NAN() {
1182
1228
  #endif
1183
1229
 
1184
1230
  #define __PYX_MARK_ERR_POS(f_index, lineno) \
1185
- { __pyx_filename = __pyx_f[f_index]; (void)__pyx_filename; __pyx_lineno = lineno; (void)__pyx_lineno; __pyx_clineno = __LINE__; (void)__pyx_clineno; }
1231
+ { __pyx_filename = __pyx_f[f_index]; (void)__pyx_filename; __pyx_lineno = lineno; (void)__pyx_lineno; __pyx_clineno = __LINE__; (void)__pyx_clineno; }
1186
1232
  #define __PYX_ERR(f_index, lineno, Ln_error) \
1187
1233
  { __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; }
1188
1234
 
@@ -1297,24 +1343,7 @@ static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*);
1297
1343
  #define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s)
1298
1344
  #define __Pyx_PyStr_FromCString(s) __Pyx_PyStr_FromString((const char*)s)
1299
1345
  #define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s)
1300
- #if CYTHON_COMPILING_IN_LIMITED_API
1301
- static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const wchar_t *u)
1302
- {
1303
- const wchar_t *u_end = u;
1304
- while (*u_end++) ;
1305
- return (size_t)(u_end - u - 1);
1306
- }
1307
- #else
1308
- static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u)
1309
- {
1310
- const Py_UNICODE *u_end = u;
1311
- while (*u_end++) ;
1312
- return (size_t)(u_end - u - 1);
1313
- }
1314
- #endif
1315
1346
  #define __Pyx_PyUnicode_FromOrdinal(o) PyUnicode_FromOrdinal((int)o)
1316
- #define __Pyx_PyUnicode_FromUnicode(u) PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u))
1317
- #define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode
1318
1347
  #define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode
1319
1348
  #define __Pyx_NewRef(obj) (Py_INCREF(obj), obj)
1320
1349
  #define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None)
@@ -1364,7 +1393,7 @@ static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject*);
1364
1393
  #endif
1365
1394
  typedef Py_ssize_t __Pyx_compact_pylong;
1366
1395
  typedef size_t __Pyx_compact_upylong;
1367
- #else // Py < 3.12
1396
+ #else
1368
1397
  #define __Pyx_PyLong_IsNeg(x) (Py_SIZE(x) < 0)
1369
1398
  #define __Pyx_PyLong_IsNonNeg(x) (Py_SIZE(x) >= 0)
1370
1399
  #define __Pyx_PyLong_IsZero(x) (Py_SIZE(x) == 0)
@@ -1498,7 +1527,7 @@ static const char *__pyx_f[] = {
1498
1527
  /*--- Type declarations ---*/
1499
1528
  struct __pyx_opt_args_7pyogrio_4_ogr_get_string;
1500
1529
 
1501
- /* "pyogrio/_ogr.pxd":388
1530
+ /* "pyogrio/_ogr.pxd":444
1502
1531
  *
1503
1532
  *
1504
1533
  * cdef get_string(const char *c_str, str encoding=*) # <<<<<<<<<<<<<<
@@ -2024,7 +2053,7 @@ static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt
2024
2053
  static int __Pyx_ExportFunction(const char *name, void (*f)(void), const char *sig);
2025
2054
 
2026
2055
  /* FunctionImport.proto */
2027
- static int __Pyx_ImportFunction_3_0_4(PyObject *module, const char *funcname, void (**f)(void), const char *sig);
2056
+ static int __Pyx_ImportFunction_3_0_10(PyObject *module, const char *funcname, void (**f)(void), const char *sig);
2028
2057
 
2029
2058
  /* InitStrings.proto */
2030
2059
  static int __Pyx_InitStrings(__Pyx_StringTabEntry *t);
@@ -3430,7 +3459,7 @@ static int __Pyx_modinit_function_import_code(void) {
3430
3459
  /*--- Function import code ---*/
3431
3460
  __pyx_t_1 = PyImport_ImportModule("pyogrio._err"); if (!__pyx_t_1) __PYX_ERR(0, 1, __pyx_L1_error)
3432
3461
  __Pyx_GOTREF(__pyx_t_1);
3433
- if (__Pyx_ImportFunction_3_0_4(__pyx_t_1, "exc_wrap_pointer", (void (**)(void))&__pyx_f_7pyogrio_4_err_exc_wrap_pointer, "void *(void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
3462
+ if (__Pyx_ImportFunction_3_0_10(__pyx_t_1, "exc_wrap_pointer", (void (**)(void))&__pyx_f_7pyogrio_4_err_exc_wrap_pointer, "void *(void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
3434
3463
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
3435
3464
  __Pyx_RefNannyFinishContext();
3436
3465
  return 0;
@@ -3635,7 +3664,7 @@ static CYTHON_SMALL_CODE int __pyx_pymod_exec__geometry(PyObject *__pyx_pyinit_m
3635
3664
  __pyx_t_1 = PyModule_Create(&__pyx_moduledef); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error)
3636
3665
  {
3637
3666
  int add_module_result = PyState_AddModule(__pyx_t_1, &__pyx_moduledef);
3638
- __pyx_t_1 = 0; /* transfer ownership from __pyx_t_1 to _geometry pseudovariable */
3667
+ __pyx_t_1 = 0; /* transfer ownership from __pyx_t_1 to "_geometry" pseudovariable */
3639
3668
  if (unlikely((add_module_result < 0))) __PYX_ERR(0, 1, __pyx_L1_error)
3640
3669
  pystate_addmodule_run = 1;
3641
3670
  }
@@ -3647,10 +3676,8 @@ static CYTHON_SMALL_CODE int __pyx_pymod_exec__geometry(PyObject *__pyx_pyinit_m
3647
3676
  CYTHON_UNUSED_VAR(__pyx_t_1);
3648
3677
  __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error)
3649
3678
  Py_INCREF(__pyx_d);
3650
- __pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error)
3651
- Py_INCREF(__pyx_b);
3652
- __pyx_cython_runtime = PyImport_AddModule((char *) "cython_runtime"); if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error)
3653
- Py_INCREF(__pyx_cython_runtime);
3679
+ __pyx_b = __Pyx_PyImport_AddModuleRef(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error)
3680
+ __pyx_cython_runtime = __Pyx_PyImport_AddModuleRef((const char *) "cython_runtime"); if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error)
3654
3681
  if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
3655
3682
  #if CYTHON_REFNANNY
3656
3683
  __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny");
@@ -4660,14 +4687,20 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject
4660
4687
  #endif
4661
4688
 
4662
4689
  /* PyObjectGetAttrStrNoError */
4690
+ #if __PYX_LIMITED_VERSION_HEX < 0x030d00A1
4663
4691
  static void __Pyx_PyObject_GetAttrStr_ClearAttributeError(void) {
4664
4692
  __Pyx_PyThreadState_declare
4665
4693
  __Pyx_PyThreadState_assign
4666
4694
  if (likely(__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError)))
4667
4695
  __Pyx_PyErr_Clear();
4668
4696
  }
4697
+ #endif
4669
4698
  static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name) {
4670
4699
  PyObject *result;
4700
+ #if __PYX_LIMITED_VERSION_HEX >= 0x030d00A1
4701
+ (void) PyObject_GetOptionalAttr(obj, attr_name, &result);
4702
+ return result;
4703
+ #else
4671
4704
  #if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_TYPE_SLOTS && PY_VERSION_HEX >= 0x030700B1
4672
4705
  PyTypeObject* tp = Py_TYPE(obj);
4673
4706
  if (likely(tp->tp_getattro == PyObject_GenericGetAttr)) {
@@ -4679,6 +4712,7 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, P
4679
4712
  __Pyx_PyObject_GetAttrStr_ClearAttributeError();
4680
4713
  }
4681
4714
  return result;
4715
+ #endif
4682
4716
  }
4683
4717
 
4684
4718
  /* GetBuiltinName */
@@ -4730,7 +4764,7 @@ static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name)
4730
4764
  {
4731
4765
  PyObject *result;
4732
4766
  #if !CYTHON_AVOID_BORROWED_REFS
4733
- #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1
4767
+ #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 && PY_VERSION_HEX < 0x030d0000
4734
4768
  result = _PyDict_GetItem_KnownHash(__pyx_d, name, ((PyASCIIObject *) name)->hash);
4735
4769
  __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
4736
4770
  if (likely(result)) {
@@ -5020,9 +5054,15 @@ static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args,
5020
5054
  PyObject *result;
5021
5055
  assert(kwargs == NULL || PyDict_Check(kwargs));
5022
5056
  nk = kwargs ? PyDict_Size(kwargs) : 0;
5057
+ #if PY_MAJOR_VERSION < 3
5023
5058
  if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) {
5024
5059
  return NULL;
5025
5060
  }
5061
+ #else
5062
+ if (unlikely(Py_EnterRecursiveCall(" while calling a Python object"))) {
5063
+ return NULL;
5064
+ }
5065
+ #endif
5026
5066
  if (
5027
5067
  #if PY_MAJOR_VERSION >= 3
5028
5068
  co->co_kwonlyargcount == 0 &&
@@ -5099,8 +5139,13 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg
5099
5139
  ternaryfunc call = Py_TYPE(func)->tp_call;
5100
5140
  if (unlikely(!call))
5101
5141
  return PyObject_Call(func, arg, kw);
5142
+ #if PY_MAJOR_VERSION < 3
5102
5143
  if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
5103
5144
  return NULL;
5145
+ #else
5146
+ if (unlikely(Py_EnterRecursiveCall(" while calling a Python object")))
5147
+ return NULL;
5148
+ #endif
5104
5149
  result = (*call)(func, arg, kw);
5105
5150
  Py_LeaveRecursiveCall();
5106
5151
  if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
@@ -5119,8 +5164,13 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject
5119
5164
  PyCFunction cfunc;
5120
5165
  cfunc = __Pyx_CyOrPyCFunction_GET_FUNCTION(func);
5121
5166
  self = __Pyx_CyOrPyCFunction_GET_SELF(func);
5167
+ #if PY_MAJOR_VERSION < 3
5122
5168
  if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
5123
5169
  return NULL;
5170
+ #else
5171
+ if (unlikely(Py_EnterRecursiveCall(" while calling a Python object")))
5172
+ return NULL;
5173
+ #endif
5124
5174
  result = cfunc(self, arg);
5125
5175
  Py_LeaveRecursiveCall();
5126
5176
  if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
@@ -5185,7 +5235,7 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObj
5185
5235
  #endif
5186
5236
  if (kwargs == NULL) {
5187
5237
  #if CYTHON_VECTORCALL
5188
- #if Py_VERSION_HEX < 0x03090000
5238
+ #if PY_VERSION_HEX < 0x03090000
5189
5239
  vectorcallfunc f = _PyVectorcall_Function(func);
5190
5240
  #else
5191
5241
  vectorcallfunc f = PyVectorcall_Function(func);
@@ -5688,7 +5738,7 @@ static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i,
5688
5738
  }
5689
5739
  }
5690
5740
  #else
5691
- if (is_list || PySequence_Check(o)) {
5741
+ if (is_list || !PyMapping_Check(o)) {
5692
5742
  return PySequence_GetItem(o, i);
5693
5743
  }
5694
5744
  #endif
@@ -5723,7 +5773,9 @@ static PyObject *__Pyx_PyObject_GetItem_Slow(PyObject *obj, PyObject *key) {
5723
5773
  __Pyx_TypeName obj_type_name;
5724
5774
  if (likely(PyType_Check(obj))) {
5725
5775
  PyObject *meth = __Pyx_PyObject_GetAttrStrNoError(obj, __pyx_n_s_class_getitem);
5726
- if (meth) {
5776
+ if (!meth) {
5777
+ PyErr_Clear();
5778
+ } else {
5727
5779
  PyObject *result = __Pyx_PyObject_CallOneArg(meth, key);
5728
5780
  Py_DECREF(meth);
5729
5781
  return result;
@@ -5790,7 +5842,7 @@ static PyObject* __Pyx_PyUnicode_Join(PyObject* value_tuple, Py_ssize_t value_co
5790
5842
  if (!CYTHON_PEP393_ENABLED || ukind == result_ukind) {
5791
5843
  memcpy((char *)result_udata + (char_pos << kind_shift), udata, (size_t) (ulength << kind_shift));
5792
5844
  } else {
5793
- #if PY_VERSION_HEX >= 0x030D0000
5845
+ #if PY_VERSION_HEX >= 0x030d0000
5794
5846
  if (unlikely(PyUnicode_CopyCharacters(result_uval, char_pos, uval, 0, ulength) < 0)) goto bad;
5795
5847
  #elif CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030300F0 || defined(_PyUnicode_FastCopyCharacters)
5796
5848
  _PyUnicode_FastCopyCharacters(result_uval, char_pos, uval, 0, ulength);
@@ -6091,9 +6143,10 @@ static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) {
6091
6143
 
6092
6144
  /* IterFinish */
6093
6145
  static CYTHON_INLINE int __Pyx_IterFinish(void) {
6146
+ PyObject* exc_type;
6094
6147
  __Pyx_PyThreadState_declare
6095
6148
  __Pyx_PyThreadState_assign
6096
- PyObject* exc_type = __Pyx_PyErr_CurrentExceptionType();
6149
+ exc_type = __Pyx_PyErr_CurrentExceptionType();
6097
6150
  if (unlikely(exc_type)) {
6098
6151
  if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration)))
6099
6152
  return -1;
@@ -6581,8 +6634,8 @@ static PyObject *__Pyx_PyCode_Replace_For_AddTraceback(PyObject *code, PyObject
6581
6634
  Py_DECREF(replace);
6582
6635
  return result;
6583
6636
  }
6584
- #if __PYX_LIMITED_VERSION_HEX < 0x030780000
6585
6637
  PyErr_Clear();
6638
+ #if __PYX_LIMITED_VERSION_HEX < 0x030780000
6586
6639
  {
6587
6640
  PyObject *compiled = NULL, *result = NULL;
6588
6641
  if (unlikely(PyDict_SetItemString(scratch_dict, "code", code))) return NULL;
@@ -6602,6 +6655,8 @@ static PyObject *__Pyx_PyCode_Replace_For_AddTraceback(PyObject *code, PyObject
6602
6655
  if (result) Py_INCREF(result);
6603
6656
  return result;
6604
6657
  }
6658
+ #else
6659
+ return NULL;
6605
6660
  #endif
6606
6661
  }
6607
6662
  static void __Pyx_AddTraceback(const char *funcname, int c_line,
@@ -6699,7 +6754,7 @@ static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
6699
6754
  #else
6700
6755
  py_code = PyCode_NewEmpty(filename, funcname, py_line);
6701
6756
  #endif
6702
- Py_XDECREF(py_funcname); // XDECREF since it's only set on Py3 if cline
6757
+ Py_XDECREF(py_funcname);
6703
6758
  return py_code;
6704
6759
  bad:
6705
6760
  Py_XDECREF(py_funcname);
@@ -6803,13 +6858,13 @@ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_OGRwkbGeometryType(OGRwkbGeometr
6803
6858
  {
6804
6859
  int one = 1; int little = (int)*(unsigned char *)&one;
6805
6860
  unsigned char *bytes = (unsigned char *)&value;
6806
- #if !CYTHON_COMPILING_IN_LIMITED_API
6861
+ #if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
6807
6862
  return _PyLong_FromByteArray(bytes, sizeof(OGRwkbGeometryType),
6808
6863
  little, !is_unsigned);
6809
6864
  #else
6810
6865
  PyObject *from_bytes, *result = NULL;
6811
6866
  PyObject *py_bytes = NULL, *arg_tuple = NULL, *kwds = NULL, *order_str = NULL;
6812
- from_bytes = PyObject_GetAttrString((PyObject*)&PyInt_Type, "from_bytes");
6867
+ from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
6813
6868
  if (!from_bytes) return NULL;
6814
6869
  py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(OGRwkbGeometryType));
6815
6870
  if (!py_bytes) goto limited_bad;
@@ -6817,16 +6872,18 @@ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_OGRwkbGeometryType(OGRwkbGeometr
6817
6872
  if (!order_str) goto limited_bad;
6818
6873
  arg_tuple = PyTuple_Pack(2, py_bytes, order_str);
6819
6874
  if (!arg_tuple) goto limited_bad;
6820
- kwds = PyDict_New();
6821
- if (!kwds) goto limited_bad;
6822
- if (PyDict_SetItemString(kwds, "signed", __Pyx_NewRef(!is_unsigned ? Py_True : Py_False))) goto limited_bad;
6875
+ if (!is_unsigned) {
6876
+ kwds = PyDict_New();
6877
+ if (!kwds) goto limited_bad;
6878
+ if (PyDict_SetItemString(kwds, "signed", __Pyx_NewRef(Py_True))) goto limited_bad;
6879
+ }
6823
6880
  result = PyObject_Call(from_bytes, arg_tuple, kwds);
6824
6881
  limited_bad:
6825
- Py_XDECREF(from_bytes);
6826
- Py_XDECREF(py_bytes);
6827
- Py_XDECREF(order_str);
6828
- Py_XDECREF(arg_tuple);
6829
6882
  Py_XDECREF(kwds);
6883
+ Py_XDECREF(arg_tuple);
6884
+ Py_XDECREF(order_str);
6885
+ Py_XDECREF(py_bytes);
6886
+ Py_XDECREF(from_bytes);
6830
6887
  return result;
6831
6888
  #endif
6832
6889
  }
@@ -7060,13 +7117,13 @@ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) {
7060
7117
  {
7061
7118
  int one = 1; int little = (int)*(unsigned char *)&one;
7062
7119
  unsigned char *bytes = (unsigned char *)&value;
7063
- #if !CYTHON_COMPILING_IN_LIMITED_API
7120
+ #if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
7064
7121
  return _PyLong_FromByteArray(bytes, sizeof(long),
7065
7122
  little, !is_unsigned);
7066
7123
  #else
7067
7124
  PyObject *from_bytes, *result = NULL;
7068
7125
  PyObject *py_bytes = NULL, *arg_tuple = NULL, *kwds = NULL, *order_str = NULL;
7069
- from_bytes = PyObject_GetAttrString((PyObject*)&PyInt_Type, "from_bytes");
7126
+ from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
7070
7127
  if (!from_bytes) return NULL;
7071
7128
  py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(long));
7072
7129
  if (!py_bytes) goto limited_bad;
@@ -7074,16 +7131,18 @@ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) {
7074
7131
  if (!order_str) goto limited_bad;
7075
7132
  arg_tuple = PyTuple_Pack(2, py_bytes, order_str);
7076
7133
  if (!arg_tuple) goto limited_bad;
7077
- kwds = PyDict_New();
7078
- if (!kwds) goto limited_bad;
7079
- if (PyDict_SetItemString(kwds, "signed", __Pyx_NewRef(!is_unsigned ? Py_True : Py_False))) goto limited_bad;
7134
+ if (!is_unsigned) {
7135
+ kwds = PyDict_New();
7136
+ if (!kwds) goto limited_bad;
7137
+ if (PyDict_SetItemString(kwds, "signed", __Pyx_NewRef(Py_True))) goto limited_bad;
7138
+ }
7080
7139
  result = PyObject_Call(from_bytes, arg_tuple, kwds);
7081
7140
  limited_bad:
7082
- Py_XDECREF(from_bytes);
7083
- Py_XDECREF(py_bytes);
7084
- Py_XDECREF(order_str);
7085
- Py_XDECREF(arg_tuple);
7086
7141
  Py_XDECREF(kwds);
7142
+ Py_XDECREF(arg_tuple);
7143
+ Py_XDECREF(order_str);
7144
+ Py_XDECREF(py_bytes);
7145
+ Py_XDECREF(from_bytes);
7087
7146
  return result;
7088
7147
  #endif
7089
7148
  }
@@ -7259,7 +7318,7 @@ static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) {
7259
7318
  #endif
7260
7319
  if (likely(v)) {
7261
7320
  int ret = -1;
7262
- #if !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray)
7321
+ #if PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray)
7263
7322
  int one = 1; int is_little = (int)*(unsigned char *)&one;
7264
7323
  unsigned char *bytes = (unsigned char *)&val;
7265
7324
  ret = _PyLong_AsByteArray((PyLongObject *)v,
@@ -7532,7 +7591,7 @@ static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) {
7532
7591
  #endif
7533
7592
  if (likely(v)) {
7534
7593
  int ret = -1;
7535
- #if !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray)
7594
+ #if PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray)
7536
7595
  int one = 1; int is_little = (int)*(unsigned char *)&one;
7537
7596
  unsigned char *bytes = (unsigned char *)&val;
7538
7597
  ret = _PyLong_AsByteArray((PyLongObject *)v,
@@ -7636,7 +7695,7 @@ raise_neg_overflow:
7636
7695
  }
7637
7696
 
7638
7697
  /* CheckBinaryVersion */
7639
- static unsigned long __Pyx_get_runtime_version() {
7698
+ static unsigned long __Pyx_get_runtime_version(void) {
7640
7699
  #if __PYX_LIMITED_VERSION_HEX >= 0x030B00A4
7641
7700
  return Py_Version & ~0xFFUL;
7642
7701
  #else
@@ -7716,9 +7775,9 @@ bad:
7716
7775
  }
7717
7776
 
7718
7777
  /* FunctionImport */
7719
- #ifndef __PYX_HAVE_RT_ImportFunction_3_0_4
7720
- #define __PYX_HAVE_RT_ImportFunction_3_0_4
7721
- static int __Pyx_ImportFunction_3_0_4(PyObject *module, const char *funcname, void (**f)(void), const char *sig) {
7778
+ #ifndef __PYX_HAVE_RT_ImportFunction_3_0_10
7779
+ #define __PYX_HAVE_RT_ImportFunction_3_0_10
7780
+ static int __Pyx_ImportFunction_3_0_10(PyObject *module, const char *funcname, void (**f)(void), const char *sig) {
7722
7781
  PyObject *d = 0;
7723
7782
  PyObject *cobj = 0;
7724
7783
  union {
Binary file