Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Allow celery to spawn rather than fork in concurrency (Addresses #6036)#9810

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Draft
rbehal wants to merge6 commits intocelery:main
base:main
Choose a base branch
Loading
fromrbehal:main

Conversation

@rbehal
Copy link
Contributor

@rbehalrbehal commentedJul 9, 2025
edited
Loading

Description

Addresses this issue:

#6036

Allows for a separate concurrency multi-processing method other thanprefork which isspawn. Usesspawn under the hood rather thanfork.

This is pretty much necessary to use scalable concurrent celery worker processes in many cases when using external libraries and SDKs that have their own specific behaviour for threading. We ran into issues a lot withgcloud andgRPC for example when using fork, which spawn completely fixes.

petrprikryl and ThomasRobertFr reacted with thumbs up emoji
* Add spawn worker pool* Fix tests* Fix lint issues* Add spawn to zsh completion
@codecov
Copy link

codecovbot commentedJul 9, 2025
edited
Loading

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.63%. Comparing base(bf1c98b) to head(87b6b53).

Additional details and impacted files
@@            Coverage Diff             @@##             main    #9810      +/-   ##==========================================+ Coverage   78.62%   78.63%   +0.01%==========================================  Files         153      154       +1       Lines       19199    19209      +10       Branches     2547     2547              ==========================================+ Hits        15095    15105      +10+ Misses       3811     3809       -2- Partials      293      295       +2
FlagCoverage Δ
unittests78.61% <100.00%> (+0.01%)⬆️

Flags with carried forward coverage won't be shown.Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report?Share it here.

@kdassharma
Copy link

+1 Huge fix

rbehal, max-agenthub, marcelo-cm, stuaxo, petrprikryl, and ThomasRobertFr reacted with thumbs up emojirbehal, max-agenthub, and marcelo-cm reacted with laugh emojirbehal, marcelo-cm, and max-agenthub reacted with hooray emojirbehal, marcelo-cm, and max-agenthub reacted with heart emojirbehal, marcelo-cm, max-agenthub, tetterl, and petrprikryl reacted with rocket emoji

Copy link
Member

@auvipyauvipy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

interesting approach. did you also checked the previous attempt#7612 ? also it would be great if integration tests dont fail. may be additional integration tests will be very helpful in this case

@rbehal
Copy link
ContributorAuthor

interesting approach. did you also checked the previous attempt#7612 ? also it would be great if integration tests dont fail. may be additional integration tests will be very helpful in this case

Thanks, will check the integration tests -- a lot of them are just timing out, would that be an issue on my end still?

I checked that PR, I do not think ALWAYS using spawn is the best approach. They say fork is fundamentally broken, but I don't believe this to be true, I think it makes sense for many usecases.

What might make better sense though is for the DEFAULT concurrency approach to be using spawn rather than fork, since it's less likely to be broken in many cases.

@auvipy
Copy link
Member

time outs are network issues in general. I also checked the PR again. I quite agree with you. it would be great if you can add sufficient integration tests for this tests

@auvipyauvipy requested a review fromCopilotJuly 9, 2025 06:59

This comment was marked as outdated.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@auvipyauvipy added this to the5.7.0 milestoneJul 9, 2025
@rbehal
Copy link
ContributorAuthor

time outs are network issues in general. I also checked the PR again. I quite agree with you. it would be great if you can add sufficient integration tests for this tests

Thanks will work on the integration tests in the coming days and let you know if I have any questions. We also just made a fork of celery for internal use as we intend on pushing this to production in the next couple days to fix some critical issues for us -- so I'll let you know if anything issues comes up there, and would make changes appropriately.

@rbehal
Copy link
ContributorAuthor

rbehal commentedJul 9, 2025
edited
Loading

I added a basic integration test -- to be honest I was having quite some difficulty running the integration tests locally. Was getting build issues on the docker container related to the versions of gevent / greenlet with certain Python versions.

Will see how the CI handles it and goes from there.

Also, I believe the change applied by co-pilot is incorrect, and led to breaking the unit test.unittest.mock.patch passes the created mock objects to the test function in the reverse order of how the decorators appear on the code. From thedocs

Note When you nest patch decorators the mocks are passed in to the decorated function in the same order they applied (the normal Python order that decorators are applied). This means from the bottom up, so in the example above the mock for module.ClassName1 is passed in first.

max-agenthub reacted with eyes emoji

@auvipyauvipy requested a review fromCopilotJuly 10, 2025 04:50
Copy link
Contributor

CopilotAI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Pull Request Overview

This PR introduces a newspawn execution pool for Celery workers, allowing processes to be created with Python’sspawn start method instead offork. It adds the implementation, updates tests and shell completion, and extends documentation and CLI support.

  • Addspawn.TaskPool based onprefork.TaskPool withspawn start method
  • Update unit and integration tests to include and verifyspawn behavior
  • Extend CLI completions and documentation to list and describe thespawn pool

Reviewed Changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated no comments.

Show a summary per file
FileDescription
t/unit/concurrency/test_spawn.pyNew unit tests forspawn.TaskPool
t/unit/concurrency/test_concurrency.pyAddspawn to available pool names in existing tests
t/integration/test_spawn_pool.pyIntegration test fixture and basic task test for spawn
extra/zsh-completion/celery.zshAddspawn to CLI pool completion
docs/userguide/concurrency/spawn.rstNew userguide page for spawn start method
docs/userguide/concurrency/index.rstIncludespawn in concurrency overview
docs/internals/reference/index.rstRegistercelery.concurrency.spawn in reference
docs/internals/reference/celery.concurrency.spawn.rstStub reference module page forspawn
docs/internals/guide.rstListspawn among internal pool implementations
docs/history/whatsnew-5.5.rstDocumentspawn pool in changelog
docs/getting-started/introduction.rstMentionspawn in introduction concurrency list
celery/concurrency/spawn.pyImplementation of the spawn-based TaskPool
celery/concurrency/init.pyAdd'spawn' alias to concurrency registry
Comments suppressed due to low confidence (2)

t/unit/concurrency/test_spawn.py:66

  • Pytest will only discover test classes whose names start withTest. Rename this class toTestSpawnTaskPool (or similar) to ensure the test runs.
class test_spawn_TaskPool:

t/unit/concurrency/test_spawn.py:68

  • The test patchesbilliard.forking_enable but does not assert its behavior. Consider adding an assertion (e.g.,mock_forking_enable.assert_called_once_with(False) or similar) to verify that forking is disabled when using thespawn start method.
    @patch('billiard.forking_enable')

@rbehal
Copy link
ContributorAuthor

rbehal commentedJul 12, 2025
edited
Loading

On the last CI action, it looked like a few of the integration tests were timing out and a few of the smoke tests were failing for a reason I couldn't decipher.

I'm having a lot of trouble running this locally -- when i try to build with docker-compose (docker compose -f docker/docker-compose.yml build), I'm just getting this error:

0 10.28   Downloading pytest_github_actions_annotate_failures-0.3.0-py3-none-any.whl.metadata (3.3 kB)#0 10.29 Collecting python-memcached>=1.61 (from -r /home/developer/requirements/extras/pymemcache.txt (line 1))#0 10.31   Downloading python_memcached-1.62-py2.py3-none-any.whl.metadata (2.3 kB)#0 10.36 Collecting ephem==4.2 (from -r /home/developer/requirements/extras/solar.txt (line 1))#0 10.38   Downloading ephem-4.2-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.metadata (6.3 kB)#0 10.40 Collecting tblib>=1.5.0 (from -r /home/developer/requirements/extras/tblib.txt (line 1))#0 10.42   Downloading tblib-3.1.0-py3-none-any.whl.metadata (25 kB)#0 10.44 Collecting softlayer_messaging>=1.0.3 (from -r /home/developer/requirements/extras/slmq.txt (line 1))#0 10.46   Downloading softlayer_messaging-1.0.3.tar.gz (5.4 kB)#0 10.46   Preparing metadata (setup.py): started#0 10.57   Preparing metadata (setup.py): finished with status 'done'#0 10.59 Collecting pylibmc==1.6.3 (from -r /home/developer/requirements/extras/memcache.txt (line 1))#0 10.61   Downloading pylibmc-1.6.3.tar.gz (63 kB)#0 10.62   Preparing metadata (setup.py): started#0 10.73   Preparing metadata (setup.py): finished with status 'done'#0 10.83 Collecting gevent<22.0.0,>=1.5.0 (from -r /home/developer/requirements/extras/gevent.txt (line 1))#0 10.85   Downloading gevent-21.12.0.tar.gz (6.2 MB)#0 11.06      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 6.2/6.2 MB 32.9 MB/s eta 0:00:00#0 11.42   Installing build dependencies: started#0 13.55   Installing build dependencies: finished with status 'error'#0 13.56   error: subprocess-exited-with-error#0 13.56   #0 13.56   × pip subprocess to install build dependencies did not run successfully.#0 13.56   │ exit code: 1#0 13.56   ╰─> [222 lines of output]#0 13.56       Collecting setuptools>=40.8.0#0 13.56         Downloading setuptools-80.9.0-py3-none-any.whl.metadata (6.6 kB)#0 13.56       Collecting wheel#0 13.56         Downloading wheel-0.45.1-py3-none-any.whl.metadata (2.3 kB)#0 13.56       Collecting Cython>=3.0a9#0 13.56         Downloading cython-3.1.2-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.metadata (5.9 kB)#0 13.56       Collecting cffi>=1.12.3#0 13.56         Downloading cffi-1.17.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.metadata (1.5 kB)#0 13.56       Collecting greenlet<2.0,>=0.4.17#0 13.56         Downloading greenlet-1.1.3.post0.tar.gz (91 kB)#0 13.56         Preparing metadata (setup.py): started#0 13.56         Preparing metadata (setup.py): finished with status 'done'#0 13.56       Collecting pycparser (from cffi>=1.12.3)#0 13.56         Downloading pycparser-2.22-py3-none-any.whl.metadata (943 bytes)#0 13.56       Downloading setuptools-80.9.0-py3-none-any.whl (1.2 MB)#0 13.56          ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.2/1.2 MB 27.7 MB/s eta 0:00:00#0 13.56       Downloading wheel-0.45.1-py3-none-any.whl (72 kB)#0 13.56       Downloading cython-3.1.2-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (3.1 MB)#0 13.56          ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.1/3.1 MB 45.2 MB/s eta 0:00:00#0 13.56       Downloading cffi-1.17.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (478 kB)#0 13.56       Downloading pycparser-2.22-py3-none-any.whl (117 kB)#0 13.56       Building wheels for collected packages: greenlet#0 13.56         DEPRECATION: Building 'greenlet' using the legacy setup.py bdist_wheel mechanism, which will be removed in a future version. pip 25.3 will enforce this behaviour change. A possible replacement is to use the standardized build interface by setting the `--use-pep517` option, (possibly combined with `--no-build-isolation`), or adding a `pyproject.toml` file to the source tree of 'greenlet'. Discussion can be found at https://github.com/pypa/pip/issues/6334#0 13.56         Building wheel for greenlet (setup.py): started#0 13.56         Building wheel for greenlet (setup.py): finished with status 'error'#0 13.56         error: subprocess-exited-with-error#0 13.56       #0 13.56         × python setup.py bdist_wheel did not run successfully.#0 13.56         │ exit code: 1#0 13.56         ╰─> [185 lines of output]#0 13.56             /home/developer/.pyenv/versions/3.13.5/lib/python3.13/site-packages/setuptools/dist.py:759: SetuptoolsDeprecationWarning: License classifiers are deprecated.#0 13.56             !!#0 13.56       #0 13.56                     ********************************************************************************#0 13.56                     Please consider removing the following classifiers in favor of a SPDX license expression:#0 13.56       #0 13.56                     License :: OSI Approved :: MIT License#0 13.56       #0 13.56                     See https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license for details.#0 13.56                     ********************************************************************************#0 13.56       #0 13.56             !!#0 13.56               self._finalize_license_expression()#0 13.56             running bdist_wheel#0 13.56             running build#0 13.56             running build_py#0 13.56             creating build/lib.linux-aarch64-cpython-313/greenlet#0 13.56             copying src/greenlet/__init__.py -> build/lib.linux-aarch64-cpython-313/greenlet#0 13.56             creating build/lib.linux-aarch64-cpython-313/greenlet/tests#0 13.56             copying src/greenlet/tests/test_contextvars.py -> build/lib.linux-aarch64-cpython-313/greenlet/tests#0 13.56             copying src/greenlet/tests/test_gc.py -> build/lib.linux-aarch64-cpython-313/greenlet/tests#0 13.56             copying src/greenlet/tests/test_leaks.py -> build/lib.linux-aarch64-cpython-313/greenlet/tests#0 13.56             copying src/greenlet/tests/test_stack_saved.py -> build/lib.linux-aarch64-cpython-313/greenlet/tests#0 13.56             copying src/greenlet/tests/test_extension_interface.py -> build/lib.linux-aarch64-cpython-313/greenlet/tests#0 13.56             copying src/greenlet/tests/test_generator.py -> build/lib.linux-aarch64-cpython-313/greenlet/tests#0 13.56             copying src/greenlet/tests/test_throw.py -> build/lib.linux-aarch64-cpython-313/greenlet/tests#0 13.56             copying src/greenlet/tests/test_weakref.py -> build/lib.linux-aarch64-cpython-313/greenlet/tests#0 13.56             copying src/greenlet/tests/test_generator_nested.py -> build/lib.linux-aarch64-cpython-313/greenlet/tests#0 13.56             copying src/greenlet/tests/test_greenlet.py -> build/lib.linux-aarch64-cpython-313/greenlet/tests#0 13.56             copying src/greenlet/tests/__init__.py -> build/lib.linux-aarch64-cpython-313/greenlet/tests#0 13.56             copying src/greenlet/tests/test_version.py -> build/lib.linux-aarch64-cpython-313/greenlet/tests#0 13.56             copying src/greenlet/tests/test_tracing.py -> build/lib.linux-aarch64-cpython-313/greenlet/tests#0 13.56             copying src/greenlet/tests/test_cpp.py -> build/lib.linux-aarch64-cpython-313/greenlet/tests#0 13.56             creating build/lib.linux-aarch64-cpython-313/greenlet/platform#0 13.56             copying src/greenlet/platform/__init__.py -> build/lib.linux-aarch64-cpython-313/greenlet/platform#0 13.56             running egg_info#0 13.56             writing src/greenlet.egg-info/PKG-INFO#0 13.56             writing dependency_links to src/greenlet.egg-info/dependency_links.txt#0 13.56             writing requirements to src/greenlet.egg-info/requires.txt#0 13.56             writing top-level names to src/greenlet.egg-info/top_level.txt#0 13.56             reading manifest file 'src/greenlet.egg-info/SOURCES.txt'#0 13.56             reading manifest template 'MANIFEST.in'#0 13.56             no previously-included directories found matching 'docs/_build'#0 13.56             warning: no files found matching '*.py' under directory 'appveyor'#0 13.56             warning: no previously-included files matching '*.pyc' found anywhere in distribution#0 13.56             warning: no previously-included files matching '*.pyd' found anywhere in distribution#0 13.56             warning: no previously-included files matching '*.so' found anywhere in distribution#0 13.56             warning: no previously-included files matching '.coverage' found anywhere in distribution#0 13.56             adding license file 'LICENSE'#0 13.56             adding license file 'LICENSE.PSF'#0 13.56             adding license file 'AUTHORS'#0 13.56             writing manifest file 'src/greenlet.egg-info/SOURCES.txt'#0 13.56             copying src/greenlet/greenlet.c -> build/lib.linux-aarch64-cpython-313/greenlet#0 13.56             copying src/greenlet/greenlet.h -> build/lib.linux-aarch64-cpython-313/greenlet#0 13.56             copying src/greenlet/slp_platformselect.h -> build/lib.linux-aarch64-cpython-313/greenlet#0 13.56             copying src/greenlet/tests/_test_extension.c -> build/lib.linux-aarch64-cpython-313/greenlet/tests#0 13.56             copying src/greenlet/tests/_test_extension_cpp.cpp -> build/lib.linux-aarch64-cpython-313/greenlet/tests#0 13.56             copying src/greenlet/platform/setup_switch_x64_masm.cmd -> build/lib.linux-aarch64-cpython-313/greenlet/platform#0 13.56             copying src/greenlet/platform/switch_aarch64_gcc.h -> build/lib.linux-aarch64-cpython-313/greenlet/platform#0 13.56             copying src/greenlet/platform/switch_alpha_unix.h -> build/lib.linux-aarch64-cpython-313/greenlet/platform#0 13.56             copying src/greenlet/platform/switch_amd64_unix.h -> build/lib.linux-aarch64-cpython-313/greenlet/platform#0 13.56             copying src/greenlet/platform/switch_arm32_gcc.h -> build/lib.linux-aarch64-cpython-313/greenlet/platform#0 13.56             copying src/greenlet/platform/switch_arm32_ios.h -> build/lib.linux-aarch64-cpython-313/greenlet/platform#0 13.56             copying src/greenlet/platform/switch_csky_gcc.h -> build/lib.linux-aarch64-cpython-313/greenlet/platform#0 13.56             copying src/greenlet/platform/switch_m68k_gcc.h -> build/lib.linux-aarch64-cpython-313/greenlet/platform#0 13.56             copying src/greenlet/platform/switch_mips_unix.h -> build/lib.linux-aarch64-cpython-313/greenlet/platform#0 13.56             copying src/greenlet/platform/switch_ppc64_aix.h -> build/lib.linux-aarch64-cpython-313/greenlet/platform#0 13.56             copying src/greenlet/platform/switch_ppc64_linux.h -> build/lib.linux-aarch64-cpython-313/greenlet/platform#0 13.56             copying src/greenlet/platform/switch_ppc_aix.h -> build/lib.linux-aarch64-cpython-313/greenlet/platform#0 13.56             copying src/greenlet/platform/switch_ppc_linux.h -> build/lib.linux-aarch64-cpython-313/greenlet/platform#0 13.56             copying src/greenlet/platform/switch_ppc_macosx.h -> build/lib.linux-aarch64-cpython-313/greenlet/platform#0 13.56             copying src/greenlet/platform/switch_ppc_unix.h -> build/lib.linux-aarch64-cpython-313/greenlet/platform#0 13.56             copying src/greenlet/platform/switch_riscv_unix.h -> build/lib.linux-aarch64-cpython-313/greenlet/platform#0 13.56             copying src/greenlet/platform/switch_s390_unix.h -> build/lib.linux-aarch64-cpython-313/greenlet/platform#0 13.56             copying src/greenlet/platform/switch_sparc_sun_gcc.h -> build/lib.linux-aarch64-cpython-313/greenlet/platform#0 13.56             copying src/greenlet/platform/switch_x32_unix.h -> build/lib.linux-aarch64-cpython-313/greenlet/platform#0 13.56             copying src/greenlet/platform/switch_x64_masm.asm -> build/lib.linux-aarch64-cpython-313/greenlet/platform#0 13.56             copying src/greenlet/platform/switch_x64_masm.obj -> build/lib.linux-aarch64-cpython-313/greenlet/platform#0 13.56             copying src/greenlet/platform/switch_x64_msvc.h -> build/lib.linux-aarch64-cpython-313/greenlet/platform#0 13.56             copying src/greenlet/platform/switch_x86_msvc.h -> build/lib.linux-aarch64-cpython-313/greenlet/platform#0 13.56             copying src/greenlet/platform/switch_x86_unix.h -> build/lib.linux-aarch64-cpython-313/greenlet/platform#0 13.56             warning: build_py: byte-compiling is disabled, skipping.#0 13.56       #0 13.56             running build_ext#0 13.56             building 'greenlet._greenlet' extension#0 13.56             creating build/temp.linux-aarch64-cpython-313/src/greenlet#0 13.56             gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O3 -Wall -fPIC -I/home/developer/.pyenv/versions/3.13.5/include/python3.13 -c src/greenlet/greenlet.c -o build/temp.linux-aarch64-cpython-313/src/greenlet/greenlet.o#0 13.56             In file included from src/greenlet/greenlet.h:20,#0 13.56                              from src/greenlet/greenlet.c:11:#0 13.56             /home/developer/.pyenv/versions/3.13.5/include/python3.13/internal/pycore_frame.h:8:4: error: #error "this header requires Py_BUILD_CORE define"#0 13.56                 8 | #  error "this header requires Py_BUILD_CORE define"#0 13.56                   |    ^~~~~#0 13.56             In file included from /home/developer/.pyenv/versions/3.13.5/include/python3.13/internal/pycore_frame.h:13:#0 13.56             /home/developer/.pyenv/versions/3.13.5/include/python3.13/internal/pycore_code.h:8:4: error: #error "this header requires Py_BUILD_CORE define"#0 13.56                 8 | #  error "this header requires Py_BUILD_CORE define"#0 13.56                   |    ^~~~~#0 13.56             In file included from /home/developer/.pyenv/versions/3.13.5/include/python3.13/internal/pycore_code.h:11:#0 13.56             /home/developer/.pyenv/versions/3.13.5/include/python3.13/internal/pycore_lock.h:13:4: error: #error "this header requires Py_BUILD_CORE define"#0 13.56                13 | #  error "this header requires Py_BUILD_CORE define"#0 13.56                   |    ^~~~~#0 13.56             In file included from /home/developer/.pyenv/versions/3.13.5/include/python3.13/internal/pycore_code.h:12:#0 13.56             /home/developer/.pyenv/versions/3.13.5/include/python3.13/internal/pycore_backoff.h:9:4: error: #error "this header requires Py_BUILD_CORE define"#0 13.56                 9 | #  error "this header requires Py_BUILD_CORE define"#0 13.56                   |    ^~~~~#0 13.56             src/greenlet/greenlet.h:57:5: error: unknown type name ‘_PyCFrame’#0 13.56                57 |     _PyCFrame* cframe;#0 13.56                   |     ^~~~~~~~~#0 13.56             src/greenlet/greenlet.c: In function ‘g_switchstack’:#0 13.56             src/greenlet/greenlet.c:531:45: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘recursion_limit’; did you mean ‘py_recursion_limit’?#0 13.56               531 |         current->recursion_depth = (tstate->recursion_limit#0 13.56                   |                                             ^~~~~~~~~~~~~~~#0 13.56                   |                                             py_recursion_limit#0 13.56             src/greenlet/greenlet.c:532:47: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘recursion_remaining’; did you mean ‘c_recursion_remaining’?#0 13.56               532 |                                     - tstate->recursion_remaining);#0 13.56                   |                                               ^~~~~~~~~~~~~~~~~~~#0 13.56                   |                                               c_recursion_remaining#0 13.56             src/greenlet/greenlet.c:559:33: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘cframe’#0 13.56               559 |         current->cframe = tstate->cframe;#0 13.56                   |                                 ^~#0 13.56             src/greenlet/greenlet.c:560:47: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘cframe’#0 13.56               560 |         ts__g_switchstack_use_tracing = tstate->cframe->use_tracing;#0 13.56                   |                                               ^~#0 13.56             src/greenlet/greenlet.c:562:40: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘cframe’#0 13.56               562 |         current->current_frame = tstate->cframe->current_frame;#0 13.56                   |                                        ^~#0 13.56             src/greenlet/greenlet.c:614:15: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘cframe’#0 13.56               614 |         tstate->cframe = target->cframe;#0 13.56                   |               ^~#0 13.56             src/greenlet/greenlet.c:621:15: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘cframe’#0 13.56               621 |         tstate->cframe->use_tracing = ts__g_switchstack_use_tracing;#0 13.56                   |               ^~#0 13.56             src/greenlet/greenlet.c:624:17: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘recursion_remaining’; did you mean ‘c_recursion_remaining’?#0 13.56               624 |         tstate->recursion_remaining = (tstate->recursion_limit#0 13.56                   |                 ^~~~~~~~~~~~~~~~~~~#0 13.56                   |                 c_recursion_remaining#0 13.56             src/greenlet/greenlet.c:624:48: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘recursion_limit’; did you mean ‘py_recursion_limit’?#0 13.56               624 |         tstate->recursion_remaining = (tstate->recursion_limit#0 13.56                   |                                                ^~~~~~~~~~~~~~~#0 13.56                   |                                                py_recursion_limit#0 13.56             src/greenlet/greenlet.c:626:15: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘cframe’#0 13.56               626 |         tstate->cframe->current_frame = target->current_frame;#0 13.56                   |               ^~#0 13.56             src/greenlet/greenlet.c: In function ‘g_calltrace’:#0 13.56             src/greenlet/greenlet.c:105:43: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘cframe’#0 13.56               105 | #define TSTATE_USE_TRACING(tstate) (tstate->cframe->use_tracing)#0 13.56                   |                                           ^~#0 13.56             src/greenlet/greenlet.c:654:5: note: in expansion of macro ‘TSTATE_USE_TRACING’#0 13.56               654 |     TSTATE_USE_TRACING(tstate) = 0;#0 13.56                   |     ^~~~~~~~~~~~~~~~~~#0 13.56             src/greenlet/greenlet.c:105:43: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘cframe’#0 13.56               105 | #define TSTATE_USE_TRACING(tstate) (tstate->cframe->use_tracing)#0 13.56                   |                                           ^~#0 13.56             src/greenlet/greenlet.c:657:5: note: in expansion of macro ‘TSTATE_USE_TRACING’#0 13.56               657 |     TSTATE_USE_TRACING(tstate) =#0 13.56                   |     ^~~~~~~~~~~~~~~~~~#0 13.56             src/greenlet/greenlet.c: In function ‘g_initialstub’:#0 13.56             src/greenlet/greenlet.c:837:5: error: unknown type name ‘_PyCFrame’#0 13.56               837 |     _PyCFrame trace_info;#0 13.56                   |     ^~~~~~~~~#0 13.56             src/greenlet/greenlet.c:881:38: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘cframe’#0 13.56               881 |     trace_info = *PyThreadState_GET()->cframe;#0 13.56                   |                                      ^~#0 13.56             src/greenlet/greenlet.c:888:17: error: request for member ‘previous’ in something not a structure or union#0 13.56               888 |     self->cframe->previous = &PyThreadState_GET()->root_cframe;#0 13.56                   |                 ^~#0 13.56             src/greenlet/greenlet.c:888:50: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘root_cframe’#0 13.56               888 |     self->cframe->previous = &PyThreadState_GET()->root_cframe;#0 13.56                   |                                                  ^~#0 13.56             src/greenlet/greenlet.c:903:51: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘recursion_limit’; did you mean ‘py_recursion_limit’?#0 13.56               903 |     self->recursion_depth = (PyThreadState_GET()->recursion_limit#0 13.56                   |                                                   ^~~~~~~~~~~~~~~#0 13.56                   |                                                   py_recursion_limit#0 13.56             src/greenlet/greenlet.c:904:53: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘recursion_remaining’; did you mean ‘c_recursion_remaining’?#0 13.56               904 |                              - PyThreadState_GET()->recursion_remaining);#0 13.56                   |                                                     ^~~~~~~~~~~~~~~~~~~#0 13.56                   |                                                     c_recursion_remaining#0 13.56             src/greenlet/greenlet.c: In function ‘green_new’:#0 13.56             src/greenlet/greenlet.c:1047:56: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘root_cframe’#0 13.56              1047 |         ((PyGreenlet*)o)->cframe = &PyThreadState_GET()->root_cframe;#0 13.56                   |                                                        ^~#0 13.56             src/greenlet/greenlet.c: In function ‘PyGreenlet_New’:#0 13.56             src/greenlet/greenlet.c:1812:37: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘root_cframe’#0 13.56              1812 |     g->cframe = &PyThreadState_GET()->root_cframe;#0 13.56                   |                                     ^~#0 13.56             error: command '/usr/bin/gcc' failed with exit code 1#0 13.56             [end of output]#0 13.56       #0 13.56         note: This error originates from a subprocess, and is likely not a problem with pip.#0 13.56         ERROR: Failed building wheel for greenlet#0 13.56         Running setup.py clean for greenlet#0 13.56       Failed to build greenlet#0 13.56       ERROR: Failed to build installable wheels for some pyproject.toml based projects (greenlet)#0 13.56       [end of output]#0 13.56   #0 13.56   note: This error originates from a subprocess, and is likely not a problem with pip.#0 13.71 error: subprocess-exited-with-error#0 13.71 #0 13.71 × pip subprocess to install build dependencies did not run successfully.#0 13.71 │ exit code: 1#0 13.71 ╰─> See above for output.#0 13.71 #0 13.71 note: This error originates from a subprocess, and is likely not a problem with pip.------failed to solve: process "/bin/sh -c pyenv exec python3.13 -m pip install -r requirements/default.txt     -r requirements/dev.txt     -r requirements/docs.txt     -r requirements/pkgutils.txt     -r requirements/test-ci-base.txt     -r requirements/test-ci-default.txt     -r requirements/test-integration.txt     -r requirements/test-pypy3.txt     -r requirements/test.txt &&   pyenv exec python3.12 -m pip install -r requirements/default.txt   -r requirements/dev.txt   -r requirements/docs.txt   -r requirements/pkgutils.txt   -r requirements/test-ci-base.txt   -r requirements/test-ci-default.txt   -r requirements/test-integration.txt   -r requirements/test-pypy3.txt   -r requirements/test.txt &&   pyenv exec python3.11 -m pip install -r requirements/default.txt   -r requirements/dev.txt   -r requirements/docs.txt   -r requirements/pkgutils.txt   -r requirements/test-ci-base.txt   -r requirements/test-ci-default.txt   -r requirements/test-integration.txt   -r requirements/test-pypy3.txt   -r requirements/test.txt &&   pyenv exec python3.10 -m pip install -r requirements/default.txt   -r requirements/dev.txt   -r requirements/docs.txt   -r requirements/pkgutils.txt   -r requirements/test-ci-base.txt   -r requirements/test-ci-default.txt   -r requirements/test-integration.txt   -r requirements/test-pypy3.txt   -r requirements/test.txt &&   pyenv exec python3.9 -m pip install -r requirements/default.txt   -r requirements/dev.txt   -r requirements/docs.txt   -r requirements/pkgutils.txt   -r requirements/test-ci-base.txt   -r requirements/test-ci-default.txt   -r requirements/test-integration.txt   -r requirements/test-pypy3.txt   -r requirements/test.txt &&   pyenv exec python3.8 -m pip install -r requirements/default.txt   -r requirements/dev.txt   -r requirements/docs.txt   -r requirements/pkgutils.txt   -r requirements/test-ci-base.txt   -r requirements/test-ci-default.txt   -r requirements/test-integration.txt   -r requirements/test-pypy3.txt   -r requirements/test.txt &&   pyenv exec pypy3.10 -m pip install -r requirements/default.txt   -r requirements/dev.txt   -r requirements/docs.txt   -r requirements/pkgutils.txt   -r requirements/test-ci-base.txt   -r requirements/test-ci-default.txt   -r requirements/test-integration.txt   -r requirements/test-pypy3.txt   -r requirements/test.txt" did not complete successfully: exit code: 1

which seems unrelated to my changes, as I'm getting this from themain branch too. Unfortunately I don't have any more time to dedicate to debugging this -- so I'm not sure if it's possible for you to take it to the finish line from here, or if you can tell me how to resolve the above issue.

Greatly appreciate your time in any case.

@auvipy
Copy link
Member

the greenlet issue is unrelated. you can ignore that for a while. we need some time to come back to this after celery 5.6 release

rbehaland others added2 commitsJuly 17, 2025 12:40
* feat: add option to disable prefetch* Add CLI flag for disabling prefetch* fix disable-prefetch to respect autoscale max* Add unit tests
- Updated rabbitmq doc about using quorum queues with task routes (#9707)
- Add: Dumper Unit Test (#9711)
- Add unit test for event.group_from (#9709)
- Allow disabling of broker prefetch with the ``worker_disable_prefetch``
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

this is slated for 5.7 an unrelated to this PR

Copy link
Member

@auvipyauvipy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

you shouldnt have create two pr on same branch. specialy on the main branch. please switch to new branch for different PR

@auvipyauvipy self-assigned thisSep 1, 2025
@palmwi2010
Copy link

Tested this PR in my project and it works great. I was getting SIGABRT crashes with Aspose.Slides (C++ library) before, switching to--pool=spawn from this PR completely resolved the issue.

Would love to see this merged - thanks for the work on this!

rbehal reacted with heart emojiNusnus and petrprikryl reacted with eyes emoji

@NusnusNusnus self-requested a reviewOctober 26, 2025 20:21
@NusnusNusnus marked this pull request as draftNovember 1, 2025 21:51
@Nusnus
Copy link
Member

Is it possible to fix the conflicts?
I’d prefer to keep this PR as clean as we can; this is a very significant change.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

Copilot code reviewCopilotCopilot left review comments

@auvipyauvipyauvipy requested changes

@NusnusNusnusAwaiting requested review from Nusnus

+1 more reviewer

@kdassharmakdassharmakdassharma approved these changes

Reviewers whose approvals may not affect merge requirements

Requested changes must be addressed to merge this pull request.

Assignees

@auvipyauvipy

Labels

None yet

Projects

None yet

Milestone

5.7.0

Development

Successfully merging this pull request may close these issues.

5 participants

@rbehal@kdassharma@auvipy@palmwi2010@Nusnus

[8]ページ先頭

©2009-2025 Movatter.jp