Skip to content

py3-aiohttp/3.12.0 package update #54257

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

octo-sts[bot]
Copy link
Contributor

@octo-sts octo-sts bot commented May 24, 2025

@octo-sts octo-sts bot added request-version-update request for a newer version of a package automated pr labels May 24, 2025
Copy link
Contributor Author

octo-sts bot commented May 24, 2025

🩹 Build Failed: Patch Application Failed

Patch application failed with 'Hunk #1 FAILED at 33. 1 out of 1 hunk FAILED -- saving rejects to file setup.py.rej'

Build Details

Category Details
Build System Python package build
Failure Point patching setup.py

Root Cause Analysis 🔍

The build is trying to apply a patch to unbundle llhttp dependency, but the patch cannot be applied cleanly to the source code. The patch for aiohttp/_cparser.pxd was detected as reversed or previously applied, and the patch for setup.py failed completely.


🔍 Build failure fix suggestions

Found similar build failures that have been fixed in the past and analyzed them to suggest a fix:

Suggested Changes

File: unbundle-llhttp.patch

  • replace (Create a new patch file based on the current source code)
    Original:
The entire current patch file

Replacement:

Create a new patch file for aiohttp 3.12.0 that correctly unbundles llhttp

Content:

To create a new patch, you should:

1. Extract the source code: `git clone https://github.com/aio-libs/aiohttp/ && cd aiohttp && git checkout v3.12.0`

2. Make the necessary changes to unbundle llhttp (likely in setup.py and aiohttp/_cparser.pxd)

3. Generate a new patch file: `git diff > unbundle-llhttp.patch`

File: setup.py

  • modify (Around line 33)
    Content:
Look for llhttp bundling in setup.py and modify it to use the system llhttp library instead. This likely involves changing the extension setup to look for system headers and libraries instead of bundled ones.

File: aiohttp/_cparser.pxd

  • modify (Include directives section)
    Content:
Update the include paths to reference system llhttp headers instead of bundled ones, for example:
Change from: `cdef extern from "../vendor/llhttp/include/llhttp.h" nogil:`
To: `cdef extern from "llhttp.h" nogil:`
Click to expand fix analysis

Analysis

The build failure is occurring because a patch named "unbundle-llhttp.patch" is failing to apply cleanly to the source code. The specific error indicates:

  1. The patch for aiohttp/_cparser.pxd was detected as reversed or previously applied
  2. The patch for setup.py failed completely with "Hunk Add binutils-2.39 configuration #1 FAILED at 33. 1 out of 1 hunk FAILED"

This suggests that the patch file was created for a previous version of aiohttp, but the package has been updated to version 3.12.0 where the file structure or content has changed. From the upstream changelog, we can see that in version 3.12.0, one of the changes was "Upgraded to LLHTTP 9.3.0", which is directly related to the unbundling effort in the patch.

Click to expand fix explanation

Explanation

The patch failure is occurring because the aiohttp package has been updated to version 3.12.0 with significant changes to how it integrates with llhttp. The patch that was previously used to unbundle llhttp is no longer compatible with the new source code structure.

The changelog specifically mentions "Upgraded to LLHTTP 9.3.0" which indicates changes in the llhttp integration. Additionally, there's a packaging update that says "Added support for building against system llhttp library" which directly relates to what the unbundle-llhttp.patch is trying to accomplish.

The most effective solution is to create a new patch file based on the current source code. Since aiohttp now officially supports building against system llhttp (via the AIOHTTP_USE_SYSTEM_DEPS environment variable mentioned in the changelog), the new patch should leverage this functionality rather than trying to manually modify the code in ways that might conflict with upstream changes.

The new patch should:

  1. Modify setup.py to always use the system llhttp instead of the bundled version
  2. Update any include paths in _cparser.pxd to reference system headers
  3. Remove any bundled llhttp code if necessary

This approach aligns with Wolfi's principle of building packages from source while keeping them up to date with upstream releases.

Click to expand alternative approaches

Alternative Approaches

  • Instead of patching the source, modify the Melange build to set the AIOHTTP_USE_SYSTEM_DEPS environment variable before building. This would take advantage of the new upstream support for system llhttp mentioned in the changelog.
  • Review the package's CMake or build system configuration to see if there's a flag or option that can be passed to disable bundled libraries without needing a patch file.
  • Consider backporting to an earlier version of aiohttp if the unbundling patch is critical and easier to maintain on older versions. However, this goes against Wolfi's principle of keeping packages up to date.

Was this comment helpful? Please use 👍 or 👎 reactions on this comment.

@octo-sts octo-sts bot added the ai/skip-comment Stop AI from commenting on PR label May 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ai/skip-comment Stop AI from commenting on PR automated pr request-version-update request for a newer version of a package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant