From 3537b57761c4c8dfa8ce8a33d8c995b20582bfa4 Mon Sep 17 00:00:00 2001 From: Michael Helmling Date: Wed, 26 Feb 2020 19:51:52 +0100 Subject: [PATCH] Release/v1.4.6 (#72) * Release v1.4.6 * update ci image * try a different ci image * ...and yet another --- .circleci/config.yml | 4 +-- .gitignore | 1 + CHANGELOG.md | 2 +- src/taglib.cpp | 84 +++++++++++++++++++++++++++++--------------- src/taglib.pyx | 2 +- tox.ini | 2 +- 6 files changed, 61 insertions(+), 34 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index dc70b0f..4f6cd55 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -8,7 +8,7 @@ workflows: jobs: tox: docker: - - image: python:3.7-stretch + - image: python:3.8-buster working_directory: ~/repo @@ -32,4 +32,4 @@ jobs: name: run tests command: | . venv/bin/activate - tox \ No newline at end of file + tox diff --git a/.gitignore b/.gitignore index 6a01dfd..86e7e40 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,7 @@ dist .settings .project .pydevproject +.tox .idea *.pyc *.so diff --git a/CHANGELOG.md b/CHANGELOG.md index f1e02f5..57a2a61 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,7 @@ Changelog ========= -NEXT (????/??/??) +pytaglib 1.4.6 (2020/02/26) ----------------- - fix #65: use tox for testing. Request re-cythonizing module with environment variable `PYTAGLIB_CYTHONIZE` instead of argument to `setup.py` now. - fix #63: python2 tests did not pass diff --git a/src/taglib.cpp b/src/taglib.cpp index 2c5a2b8..5695db7 100644 --- a/src/taglib.cpp +++ b/src/taglib.cpp @@ -1,4 +1,4 @@ -/* Generated by Cython 0.29.12 */ +/* Generated by Cython 0.29.15 */ /* BEGIN: Cython Metadata { @@ -24,8 +24,8 @@ END: Cython Metadata */ #elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000) #error Cython requires Python 2.6+ or Python 3.3+. #else -#define CYTHON_ABI "0_29_12" -#define CYTHON_HEX_VERSION 0x001D0CF0 +#define CYTHON_ABI "0_29_15" +#define CYTHON_HEX_VERSION 0x001D0FF0 #define CYTHON_FUTURE_DIVISION 1 #include #ifndef offsetof @@ -560,10 +560,10 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { #if PY_VERSION_HEX < 0x030200A4 typedef long Py_hash_t; #define __Pyx_PyInt_FromHash_t PyInt_FromLong - #define __Pyx_PyInt_AsHash_t PyInt_AsLong + #define __Pyx_PyInt_AsHash_t __Pyx_PyIndex_AsHash_t #else #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t - #define __Pyx_PyInt_AsHash_t PyInt_AsSsize_t + #define __Pyx_PyInt_AsHash_t __Pyx_PyIndex_AsSsize_t #endif #if PY_MAJOR_VERSION >= 3 #define __Pyx_PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : (Py_INCREF(func), func)) @@ -736,6 +736,7 @@ static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x); (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj)) static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*); static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t); +static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject*); #if CYTHON_ASSUME_SAFE_MACROS #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x)) #else @@ -1386,7 +1387,7 @@ static const char __pyx_k_name[] = "__name__"; static const char __pyx_k_path[] = "path"; static const char __pyx_k_test[] = "__test__"; static const char __pyx_k_utf8[] = "utf8"; -static const char __pyx_k_1_4_5[] = "1.4.5"; +static const char __pyx_k_1_4_6[] = "1.4.6"; static const char __pyx_k_UTF_8[] = "UTF-8"; static const char __pyx_k_items[] = "items"; static const char __pyx_k_upper[] = "upper"; @@ -1412,7 +1413,7 @@ static const char __pyx_k_I_O_operation_on_closed_file[] = "I/O operation on clo static const char __pyx_k_Unable_to_save_tags_Unknown_OS_e[] = "Unable to save tags: Unknown OS error"; static const char __pyx_k_Unable_to_save_tags_file_is_read[] = "Unable to save tags: file is read-only"; static const char __pyx_k_no_default___reduce___due_to_non[] = "no default __reduce__ due to non-trivial __cinit__"; -static PyObject *__pyx_kp_u_1_4_5; +static PyObject *__pyx_kp_u_1_4_6; static PyObject *__pyx_kp_u_Could_not_read_file; static PyObject *__pyx_kp_u_File; static PyObject *__pyx_n_s_File_2; @@ -1473,7 +1474,7 @@ static PyObject *__pyx_tuple__6; /* Late includes */ /* "taglib.pyx":15 - * version = '1.4.5' + * version = '1.4.6' * * cdef unicode toUnicode(ctypes.String s): # <<<<<<<<<<<<<< * """Converts TagLib::String to a unicode string (``str`` in Python 3, ``unicode`` else).""" @@ -1501,7 +1502,7 @@ static PyObject *__pyx_f_6taglib_toUnicode(TagLib::String __pyx_v_s) { goto __pyx_L0; /* "taglib.pyx":15 - * version = '1.4.5' + * version = '1.4.6' * * cdef unicode toUnicode(ctypes.String s): # <<<<<<<<<<<<<< * """Converts TagLib::String to a unicode string (``str`` in Python 3, ``unicode`` else).""" @@ -4206,7 +4207,12 @@ static PyTypeObject __pyx_type_6taglib_File = { sizeof(struct __pyx_obj_6taglib_File), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6taglib_File, /*tp_dealloc*/ + #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030800b4 + 0, /*tp_vectorcall_offset*/ + #endif 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 @@ -4259,6 +4265,9 @@ static PyTypeObject __pyx_type_6taglib_File = { #if PY_VERSION_HEX >= 0x030800b1 0, /*tp_vectorcall*/ #endif + #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 + 0, /*tp_print*/ + #endif }; static PyMethodDef __pyx_methods[] = { @@ -4307,7 +4316,7 @@ static struct PyModuleDef __pyx_moduledef = { #endif static __Pyx_StringTabEntry __pyx_string_tab[] = { - {&__pyx_kp_u_1_4_5, __pyx_k_1_4_5, sizeof(__pyx_k_1_4_5), 0, 1, 0, 0}, + {&__pyx_kp_u_1_4_6, __pyx_k_1_4_6, sizeof(__pyx_k_1_4_6), 0, 1, 0, 0}, {&__pyx_kp_u_Could_not_read_file, __pyx_k_Could_not_read_file, sizeof(__pyx_k_Could_not_read_file), 0, 1, 0, 0}, {&__pyx_kp_u_File, __pyx_k_File, sizeof(__pyx_k_File), 0, 1, 0, 0}, {&__pyx_n_s_File_2, __pyx_k_File_2, sizeof(__pyx_k_File_2), 0, 0, 1, 1}, @@ -4700,11 +4709,11 @@ if (!__Pyx_RefNanny) { /* "taglib.pyx":13 * cimport ctypes * - * version = '1.4.5' # <<<<<<<<<<<<<< + * version = '1.4.6' # <<<<<<<<<<<<<< * * cdef unicode toUnicode(ctypes.String s): */ - if (PyDict_SetItem(__pyx_d, __pyx_n_s_version, __pyx_kp_u_1_4_5) < 0) __PYX_ERR(0, 13, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_version, __pyx_kp_u_1_4_6) < 0) __PYX_ERR(0, 13, __pyx_L1_error) /* "taglib.pyx":1 * # -*- coding: utf-8 -*- # <<<<<<<<<<<<<< @@ -6026,43 +6035,43 @@ static int __Pyx_setup_reduce(PyObject* type_obj) { PyObject *setstate = NULL; PyObject *setstate_cython = NULL; #if CYTHON_USE_PYTYPE_LOOKUP - if (_PyType_Lookup((PyTypeObject*)type_obj, __pyx_n_s_getstate)) goto GOOD; + if (_PyType_Lookup((PyTypeObject*)type_obj, __pyx_n_s_getstate)) goto __PYX_GOOD; #else - if (PyObject_HasAttr(type_obj, __pyx_n_s_getstate)) goto GOOD; + if (PyObject_HasAttr(type_obj, __pyx_n_s_getstate)) goto __PYX_GOOD; #endif #if CYTHON_USE_PYTYPE_LOOKUP - object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto BAD; + object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD; #else - object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto BAD; + object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD; #endif - reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_ex); if (unlikely(!reduce_ex)) goto BAD; + reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_ex); if (unlikely(!reduce_ex)) goto __PYX_BAD; if (reduce_ex == object_reduce_ex) { #if CYTHON_USE_PYTYPE_LOOKUP - object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto BAD; + object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD; #else - object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto BAD; + object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD; #endif - reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce); if (unlikely(!reduce)) goto BAD; + reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce); if (unlikely(!reduce)) goto __PYX_BAD; if (reduce == object_reduce || __Pyx_setup_reduce_is_named(reduce, __pyx_n_s_reduce_cython)) { - reduce_cython = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_cython); if (unlikely(!reduce_cython)) goto BAD; - ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce, reduce_cython); if (unlikely(ret < 0)) goto BAD; - ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce_cython); if (unlikely(ret < 0)) goto BAD; + reduce_cython = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_cython); if (unlikely(!reduce_cython)) goto __PYX_BAD; + ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce, reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD; + ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD; setstate = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate); if (!setstate) PyErr_Clear(); if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_n_s_setstate_cython)) { - setstate_cython = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate_cython); if (unlikely(!setstate_cython)) goto BAD; - ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate, setstate_cython); if (unlikely(ret < 0)) goto BAD; - ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate_cython); if (unlikely(ret < 0)) goto BAD; + setstate_cython = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate_cython); if (unlikely(!setstate_cython)) goto __PYX_BAD; + ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate, setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD; + ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD; } PyType_Modified((PyTypeObject*)type_obj); } } - goto GOOD; -BAD: + goto __PYX_GOOD; +__PYX_BAD: if (!PyErr_Occurred()) PyErr_Format(PyExc_RuntimeError, "Unable to initialize pickling for %s", ((PyTypeObject*)type_obj)->tp_name); ret = -1; -GOOD: +__PYX_GOOD: #if !CYTHON_USE_PYTYPE_LOOKUP Py_XDECREF(object_reduce); Py_XDECREF(object_reduce_ex); @@ -7134,6 +7143,23 @@ static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) { Py_DECREF(x); return ival; } +static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject* o) { + if (sizeof(Py_hash_t) == sizeof(Py_ssize_t)) { + return __Pyx_PyIndex_AsSsize_t(o); +#if PY_MAJOR_VERSION < 3 + } else if (likely(PyInt_CheckExact(o))) { + return PyInt_AS_LONG(o); +#endif + } else { + Py_ssize_t ival; + PyObject *x; + x = PyNumber_Index(o); + if (!x) return -1; + ival = PyInt_AsLong(x); + Py_DECREF(x); + return ival; + } +} static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) { return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False); } diff --git a/src/taglib.pyx b/src/taglib.pyx index 366b681..87f4a2c 100644 --- a/src/taglib.pyx +++ b/src/taglib.pyx @@ -10,7 +10,7 @@ from libcpp.utility cimport pair cimport ctypes -version = '1.4.5' +version = '1.4.6' cdef unicode toUnicode(ctypes.String s): """Converts TagLib::String to a unicode string (``str`` in Python 3, ``unicode`` else).""" diff --git a/tox.ini b/tox.ini index 087845b..8d4b4c0 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py27,py37 +envlist = py27,py38 [testenv] deps =