#1 Fix SystemError thrown with Python 3.10
Merged 2 years ago by rcritten. Opened 2 years ago by churchyard.
rpms/ churchyard/python-kerberos PY_SSIZE_T_CLEAN  into  rawhide

@@ -0,0 +1,23 @@ 

+ --- a/src/kerberos.c

+ +++ b/src/kerberos.c

+ @@ -14,6 +14,7 @@

+   * limitations under the License.

+   **/

+ 

+ +#define PY_SSIZE_T_CLEAN

+  #include <Python.h>

+ 

+  #include "kerberosbasic.h"

+ @@ -244,9 +245,9 @@

+      char *initiator_address = NULL;

+      char *acceptor_address = NULL;

+      char *application_data = NULL;

+ -    int initiator_length = 0;

+ -    int acceptor_length = 0;

+ -    int application_length = 0;

+ +    Py_ssize_t initiator_length = 0;

+ +    Py_ssize_t acceptor_length = 0;

+ +    Py_ssize_t application_length = 0;

+ 

+      PyObject *pychan_bindings = NULL;

+      struct gss_channel_bindings_struct *input_chan_bindings;

file modified
+16 -2
@@ -3,7 +3,7 @@ 

  

  Name:           python-%{srcname}

  Version:        1.3.0

- Release:        13%{?dist}

+ Release:        14%{?dist}

  Summary:        %{sum}

  

  License:        ASL 2.0
@@ -12,8 +12,14 @@ 

  Source0:        https://pypi.python.org/packages/source/k/%{srcname}/%{srcname}-%{version}.tar.gz

  Source1:        LICENSE

  

+ # SystemError thrown with Python 3.10

+ # https://github.com/apple/ccs-pykerberos/issues/88

+ # https://bugzilla.redhat.com/2008899

+ Patch1:         PY_SSIZE_T_CLEAN.patch

+ 

  BuildRequires:  python3-devel

  BuildRequires:  python3-setuptools

+ BuildRequires:  python3-requests

  BuildRequires:  krb5-devel

  BuildRequires:  gcc

  
@@ -35,7 +41,7 @@ 

  %{desc}

  

  %prep

- %setup -q -n %{srcname}-%{version}

+ %autosetup -p1 -n %{srcname}-%{version}

  

  %build

  %{py3_build}
@@ -44,6 +50,11 @@ 

  install -m 644 $RPM_SOURCE_DIR/LICENSE LICENSE 

  %{py3_install}

  

+ %check

+ # Regression test for https://bugzilla.redhat.com/2008899

+ export PYTHONPATH=%{buildroot}%{python3_sitearch}

+ %{python3} -c 'import kerberos; kerberos.channelBindings(application_data=b"")'

+ 

  %files -n python3-%{srcname}

  %license LICENSE

  %doc README.rst
@@ -51,6 +62,9 @@ 

  

  

  %changelog

+ * Wed Sep 29 2021 Miro Hrončok <mhroncok@redhat.com> - 1.3.0-14

+ - Fix SystemError thrown with Python 3.10

+ 

  * Tue Jul 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.0-13

  - Second attempt - Rebuilt for

    https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild

no initial comment

Metadata Update from @rcritten:
- Request assigned

2 years ago

Thanks for the patch, LGTM.

Pull-Request has been merged by rcritten

2 years ago

I see you've already built the f36 one in https://koji.fedoraproject.org/koji/taskinfo?taskID=76467414 -- koji gave me no hint.

Would you like to handle the f35 bodhi yourself?