question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

libyaml extension build fails on Python 3.11.0a7

See original GitHub issue

Trouble building in 3.11 (gcc 11.2.0 on Linux):

$ python setup.py --with-libyaml bdist_wheel
running bdist_wheel
running build
running build_py
warning: build_py: byte-compiling is disabled, skipping.

running build_ext
skipping 'yaml/_yaml.c' Cython extension (up-to-date)
building 'yaml._yaml' extension
gcc -pthread -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/home/wglenn/git/pyyaml/.venv/include -I/usr/local/include/python3.11 -c yaml/_yaml.c -o build/temp.linux-x86_64-cpython-311/yaml/_yaml.o
yaml/_yaml.c: In function ‘__Pyx_PyBytes_Equals’:
yaml/_yaml.c:25363:13: warning: ‘ob_shash’ is deprecated [-Wdeprecated-declarations]
25363 |             hash1 = ((PyBytesObject*)s1)->ob_shash;
      |             ^~~~~
In file included from /usr/local/include/python3.11/bytesobject.h:62,
                 from /usr/local/include/python3.11/Python.h:50,
                 from yaml/_yaml.c:6:
/usr/local/include/python3.11/cpython/bytesobject.h:7:35: note: declared here
    7 |     Py_DEPRECATED(3.11) Py_hash_t ob_shash;
      |                                   ^~~~~~~~
yaml/_yaml.c:25364:13: warning: ‘ob_shash’ is deprecated [-Wdeprecated-declarations]
25364 |             hash2 = ((PyBytesObject*)s2)->ob_shash;
      |             ^~~~~
In file included from /usr/local/include/python3.11/bytesobject.h:62,
                 from /usr/local/include/python3.11/Python.h:50,
                 from yaml/_yaml.c:6:
/usr/local/include/python3.11/cpython/bytesobject.h:7:35: note: declared here
    7 |     Py_DEPRECATED(3.11) Py_hash_t ob_shash;
      |                                   ^~~~~~~~
yaml/_yaml.c: In function ‘__Pyx_AddTraceback’:
yaml/_yaml.c:438:62: error: invalid use of incomplete typedef ‘PyFrameObject’ {aka ‘struct _frame’}
  438 |   #define __Pyx_PyFrame_SetLineNumber(frame, lineno)  (frame)->f_lineno = (lineno)
      |                                                              ^~
yaml/_yaml.c:26009:5: note: in expansion of macro ‘__Pyx_PyFrame_SetLineNumber’
26009 |     __Pyx_PyFrame_SetLineNumber(py_frame, py_line);
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~
error: command 'gcc' failed with exit code 1

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:2
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
bristeacommented, Aug 27, 2022

If pyyaml would have being a python application that is not listed as a dependency by any other package from pypi, we could easily argue that there is plenty of time. But given that in reality is one of the critical packages, I would say that this should make priority because otherwise those that depend on it will not have any chance of meeting the deadlines for the release.

Imagine what will happen if we discover that the compiled version crashes in some cases with py311 after python release? Without building it early enough in the process, we lose the ability to have one working (tested) version when new python is released.

0reactions
nitzmahonecommented, Sep 13, 2022

3.11 wheels for PyYAML 6.0 are up.

For future reference- we’ll probably never publish release wheels targeting a new major Python version before it hits rc1- we’ve gotten burned too many times by unstable ABI issues during the betas, and there’s no way to re-publish those on PyPI without doing a new release that bumps the version number. The RC windows are usually several months long, which is a good enough balance IMO between catching potential real-world issues not caught by the test suite and exposing ourselves to late-breaking ABI changes in RCs (which Python core team says should never happen).

Read more comments on GitHub >

github_iconTop Results From Across the Web

3. Configure Python — Python 3.11.1 documentation
Build the _decimal extension module using a thread-local context rather than a coroutine-local context (default), see the decimal module. See decimal.
Read more >
Python Release Python 3.11.0a7
Python 3.11.0a7. Release Date: April 5, 2022. This is an early developer preview of Python 3.11. Major new features of the 3.11 series, ......
Read more >
4. Building C and C++ Extensions — Python 3.11.1 ...
A C extension for CPython is a shared library (e.g. a.so file on Linux,.pyd on Windows), which exports an initialization function. To be...
Read more >
Python Release Python 3.11.0
Python 3.11.0 is the newest major release of the Python programming ... PEP 657 -- Include Fine-Grained Error Locations in Tracebacks ...
Read more >
poetry.lock · master · SKAO / ska-tango-examples - GitLab
This project demonstrates how to structure an SKA project that provides some simple Tango devices coded in PyTango.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found