Skip to content

_PyBytes_Join was not declared in this scope #163

@i-l-s-h-a-t

Description

@i-l-s-h-a-t

Dear

I have an issue during python wheel generation for my module on Linux, Python 3.13:

      ../numpy/_core/src/common/pythoncapi-compat/pythoncapi_compat.h: In function ‘PyObject* PyBytes_Join(PyObject*, PyObject*)’:
      ../numpy/_core/src/common/pythoncapi-compat/pythoncapi_compat.h:1607:12: error: ‘_PyBytes_Join’ was not declared in this scope; did you mean ‘PyBytes_Join’?

My code has numpy dependency and it uses pybind11 C++ library. I generate a wheel for it.

Could it be due to this renaming?
There is a check here but it checks only Python 3.14, and not 3.13:

Image

I see there is a backward compatibility was assumed

Image

As you can see it doesn't work in my case.

The whole log is here https://pastebin.com/Am07UcZg
I have this issue only for Python 3.13, only on Linux (docker image python:3.13). Just install numpy and that works there. Looks like for my wheel creation, it does something else which fails.
And there is no such an issue for other Python versions (3.12 or 3.14) and Windows (Python 3.10-3.14).

The error appears in gitlab CI/CD for my project. There are those images used:

Image

I could not trigger numpy compilation using one of that images and reproduce the issue locally. I don't know how to run two layered docker image locally, although gitlab manages to do that inside the runner.
I tried to compile numpy using Python 3.13 from conda on a Linux machine (not that docker image) and it succeeded.

I will appreciate you help.

Best,
ilshat

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions