Skip to content

Provide support for python 3.12+ #116

Open
@Spikhalskiy

Description

@Spikhalskiy

When installing pypcap==-1.3.0 on python 3.12 installation fails with

      pcap.c: In function ‘__Pyx_Raise’:
      pcap.c:24328:34: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘curexc_traceback’
      24328 |         PyObject* tmp_tb = tstate->curexc_traceback;
            |                                  ^~
      pcap.c:24331:19: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘curexc_traceback’
      24331 |             tstate->curexc_traceback = tb;
            |                   ^~
      pcap.c: In function ‘__Pyx_PyInt_NeObjC’:
      pcap.c:24958:51: error: ‘PyLongObject’ {aka ‘struct _longobject’} has no member named ‘ob_digit’
      24958 |         const digit* digits = ((PyLongObject*)op1)->ob_digit;
            |                                                   ^~
      pcap.c: In function ‘__Pyx_PyInt_AddObjC’:
      pcap.c:26462:51: error: ‘PyLongObject’ {aka ‘struct _longobject’} has no member named ‘ob_digit’
      26462 |         const digit* digits = ((PyLongObject*)op1)->ob_digit;
            |                                                   ^~
      pcap.c: In function ‘__Pyx_PyInt_As_int’:
      pcap.c:27409:53: error: ‘PyLongObject’ {aka ‘struct _longobject’} has no member named ‘ob_digit’
      27409 |             const digit* digits = ((PyLongObject*)x)->ob_digit;
            |                                                     ^~
      pcap.c:27464:53: error: ‘PyLongObject’ {aka ‘struct _longobject’} has no member named ‘ob_digit’
      27464 |             const digit* digits = ((PyLongObject*)x)->ob_digit;
            |                                                     ^~
      pcap.c: In function ‘__Pyx_PyInt_As_unsigned_int’:
      pcap.c:27605:53: error: ‘PyLongObject’ {aka ‘struct _longobject’} has no member named ‘ob_digit’
      27605 |             const digit* digits = ((PyLongObject*)x)->ob_digit;
            |                                                     ^~
      pcap.c:27660:53: error: ‘PyLongObject’ {aka ‘struct _longobject’} has no member named ‘ob_digit’
      27660 |             const digit* digits = ((PyLongObject*)x)->ob_digit;
            |                                                     ^~
      pcap.c: In function ‘__Pyx_PyInt_As_long’:
      pcap.c:27915:53: error: ‘PyLongObject’ {aka ‘struct _longobject’} has no member named ‘ob_digit’
      27915 |             const digit* digits = ((PyLongObject*)x)->ob_digit;
            |                                                     ^~
      pcap.c:27970:53: error: ‘PyLongObject’ {aka ‘struct _longobject’} has no member named ‘ob_digit’
      27970 |             const digit* digits = ((PyLongObject*)x)->ob_digit;
            |                                                     ^~
      pcap.c: In function ‘__Pyx_PyInt_As_char’:
      pcap.c:28111:53: error: ‘PyLongObject’ {aka ‘struct _longobject’} has no member named ‘ob_digit’
      28111 |             const digit* digits = ((PyLongObject*)x)->ob_digit;
            |                                                     ^~
      pcap.c:28166:53: error: ‘PyLongObject’ {aka ‘struct _longobject’} has no member named ‘ob_digit’
      28166 |             const digit* digits = ((PyLongObject*)x)->ob_digit;
            |                                                     ^~
      pcap.c: In function ‘__Pyx_PyIndex_AsSsize_t’:
      pcap.c:28517:45: error: ‘PyLongObject’ {aka ‘struct _longobject’} has no member named ‘ob_digit’
      28517 |     const digit* digits = ((PyLongObject*)b)->ob_digit;
            |                                             ^~
      error: command '/usr/bin/gcc' failed with exit code 1

Downgrading of python version to 3.7 solves the issue

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions