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
Issue with imports with greenlet 2.0.1/2.0.2 and playwright #346
Comments
I don't use Windows, so my ability to help is limited to educated guessing and what I can see in the CI system. First, the CI system for gevent (which builds on top of greenlet) has no problem installing and using greenlet 2.0.2 on CPython 3.11 on Windows, using the wheel from PyPI. That strongly suggests it's something specific to your environment. Once we rule out a bad wheel on PyPI, that leaves us with the standard techniques for debugging Python import problems. Things like:
import 'site' # <_frozen_importlib_external.SourceFileLoader object at 0x103fb8f50>
Python 3.10.9 (main, Dec 17 2022, 09:30:16) [Clang 14.0.0 (clang-1400.0.29.202)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
# trying /$HOME/greenlet.cpython-310-darwin.so
# trying /$HOME/greenlet.abi3.so
# trying /$HOME/greenlet.so
# trying /$HOME/greenlet.py
# trying /$HOME/greenlet.pyc
# trying /$PYTHON/lib/python3.10/greenlet.cpython-310-darwin.so
# trying /$PYTHON/lib/python3.10/greenlet.abi3.so
# trying /$PYTHON/lib/python3.10/greenlet.so
# trying /$PYTHON/lib/python3.10/greenlet.py
# trying /$PYTHON/lib/python3.10/greenlet.pyc
# trying /$PYTHON/lib/python3.10/lib-dynload/greenlet.cpython-310-darwin.so
# trying /$PYTHON/lib/python3.10/lib-dynload/greenlet.abi3.so
# trying /$PYTHON/lib/python3.10/lib-dynload/greenlet.so
# trying /$PYTHON/lib/python3.10/lib-dynload/greenlet.py
# trying /$PYTHON/lib/python3.10/lib-dynload/greenlet.pyc
# trying /$HOME/$VENV/lib/python3.10/site-packages/greenlet.cpython-310-darwin.so
# trying /$HOME/$VENV/lib/python3.10/site-packages/greenlet.abi3.so
# trying /$HOME/$VENV/lib/python3.10/site-packages/greenlet.so
# trying /$HOME/$VENV/lib/python3.10/site-packages/greenlet.py
# trying /$HOME/$VENV/lib/python3.10/site-packages/greenlet.pyc
# possible namespace for /$HOME/$VENV/lib/python3.10/site-packages/greenlet
# trying /$HOME/$REPOS/$P1/src/greenlet.cpython-310-darwin.so
# trying /$HOME/$REPOS/$P1/src/greenlet.abi3.so
# trying /$HOME/$REPOS/$P1/src/greenlet.so
# trying /$HOME/$REPOS/$P1/src/greenlet.py
# trying /$HOME/$REPOS/$P1/src/greenlet.pyc
# trying /$HOME/$REPOS/$P2/src/greenlet.cpython-310-darwin.so
# trying /$HOME/$REPOS/$P2/src/greenlet.abi3.so
# trying /$HOME/$REPOS/$P2/src/greenlet.so
# trying /$HOME/$REPOS/$P2/src/greenlet.py
# trying /$HOME/$REPOS/$P2/src/greenlet.pyc
# trying /$HOME/$REPOS/$P3/src/greenlet.cpython-310-darwin.so
# trying /$HOME/$REPOS/$P3/src/greenlet.abi3.so
# trying /$HOME/$REPOS/$P3/src/greenlet.so
# trying /$HOME/$REPOS/$P3/src/greenlet.py
# trying /$HOME/$REPOS/$P3/src/greenlet.pyc
# trying /$HOME/$REPOS/$P4/src/greenlet.cpython-310-darwin.so
# trying /$HOME/$REPOS/$P4/src/greenlet.abi3.so
# trying /$HOME/$REPOS/$P4/src/greenlet.so
# trying /$HOME/$REPOS/$P4/src/greenlet.py
# trying /$HOME/$REPOS/$P4/src/greenlet.pyc
# trying /$HOME/$REPOS/$P5/src/greenlet.cpython-310-darwin.so
# trying /$HOME/$REPOS/$P5/src/greenlet.abi3.so
# trying /$HOME/$REPOS/$P5/src/greenlet.so
# trying /$HOME/$REPOS/$P5/src/greenlet.py
# trying /$HOME/$REPOS/$P5/src/greenlet.pyc
# code object from /$HOME/$SRC/greenlet/src/greenlet/__init__.py
# created '/$TMP/$HOME/$SRC/greenlet/src/greenlet/__init__.cpython-310.pyc'
# trying /$HOME/__future__.cpython-310-darwin.so
# trying /$HOME/__future__.abi3.so
# trying /$HOME/__future__.so
# trying /$HOME/__future__.py
# trying /$HOME/__future__.pyc
# trying /$PYTHON/lib/python3.10/__future__.cpython-310-darwin.so
# trying /$PYTHON/lib/python3.10/__future__.abi3.so
# trying /$PYTHON/lib/python3.10/__future__.so
# trying /$PYTHON/lib/python3.10/__future__.py
# /$TMP/$PYTHON/lib/python3.10/__future__.cpython-310.pyc matches /$PYTHON/lib/python3.10/__future__.py
# code object from '/$TMP/$PYTHON/lib/python3.10/__future__.cpython-310.pyc'
import '__future__' # <_frozen_importlib_external.SourceFileLoader object at 0x104328f50>
# trying /$HOME/$SRC/greenlet/src/greenlet/_greenlet.cpython-310-darwin.so
# trying /$PYTHON/lib/python3.10/encodings/ascii.cpython-310-darwin.so
# trying /$PYTHON/lib/python3.10/encodings/ascii.abi3.so
# trying /$PYTHON/lib/python3.10/encodings/ascii.so
# trying /$PYTHON/lib/python3.10/encodings/ascii.py
# /$TMP/$PYTHON/lib/python3.10/encodings/ascii.cpython-310.pyc matches /$PYTHON/lib/python3.10/encodings/ascii.py
# code object from '/$TMP/$PYTHON/lib/python3.10/encodings/ascii.cpython-310.pyc'
import 'encodings.ascii' # <_frozen_importlib_external.SourceFileLoader object at 0x10432b6b0>
# extension module 'greenlet._greenlet' loaded from '/$HOME/$SRC/greenlet/src/greenlet/_greenlet.cpython-310-darwin.so'
# extension module 'greenlet._greenlet' executed from '/$HOME/$SRC/greenlet/src/greenlet/_greenlet.cpython-310-darwin.so'
import 'greenlet._greenlet' # <_frozen_importlib_external.ExtensionFileLoader object at 0x10432a800>
import 'greenlet' # <_frozen_importlib_external.SourceFileLoader object at 0x104304be0> Hopefully that step makes it clear what's wrong. If not, try installing a fresh version, bypassing any local caches (perhaps your local cache is corrupt) using pip's If that still doesn't work, you can try building from source (of course you must have MSVC properly set up to be able to compile python extensions) with pip's Good luck! |
I'd also guess that this is an issue with the environment. The only weird thing is that v1.1.3 seems fine for him and v2 not. |
I solved this problem by installing Visual C++ Redistributable on my windows server. But |
@jfp1992 could you try to apply the proposed workaround to see if it helps? That would amazing to track down the issue which you are reporting, thanks! |
Greenlet 2.0.1 does seem to be fine now, I must have installed something that also installed the visual c++ redist. |
noting to do, just |
pip install msvc-runtime ,is noting to me you can trying install this package : https://learn.microsoft.com/en-US/cpp/windows/latest-supported-vc-redist?view=msvc-170 |
I've just released greenlet 3.0rc1 which may alleviate this issue (or it may make it worse 🤷 😄 ). Reports would be appreciated (once the wheels finish building). |
Bumps [greenlet](https://github.com/python-greenlet/greenlet) from 2.0.2 to 3.0.0. <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/python-greenlet/greenlet/blob/master/CHANGES.rst">greenlet's changelog</a>.</em></p> <blockquote> <h1>3.0.0 (2023-10-02)</h1> <ul> <li>No changes from 3.0rc3 aside from the version number.</li> </ul> <h1>3.0.0rc3 (2023-09-12)</h1> <ul> <li>Fix an intermittent error during process termination on some platforms (GCC/Linux/libstdc++).</li> </ul> <h1>3.0.0rc2 (2023-09-09)</h1> <ul> <li>Fix some potential bugs (assertion failures and memory leaks) in previously-untested error handling code. In some cases, this means that the process will execute a controlled <code>abort()</code> after severe trouble when previously the process might have continued for some time with a corrupt state. It is unlikely those errors occurred in practice.</li> <li>Fix some assertion errors and potential bugs with re-entrant switches.</li> <li>Fix a potential crash when certain compilers compile greenlet with high levels of optimization. The symptom would be that switching to a greenlet for the first time immediately crashes.</li> <li>Fix a potential crash when the callable object passed to the greenlet constructor (or set as the <code>greenlet.run</code> attribute) has a destructor attached to it that switches. Typically, triggering this issue would require an unlikely subclass of <code>greenlet.greenlet</code>.</li> <li>Python 3.11+: Fix rare switching errors that could occur when a garbage collection was triggered during the middle of a switch, and Python-level code in <code>__del__</code> or weakref callbacks switched to a different greenlet and ultimately switched back to the original greenlet. This often manifested as a <code>SystemError</code>: "switch returned NULL without an exception set."</li> </ul> <p>For context on the fixes, see <code>gevent issue [#1985](https://github.com/python-greenlet/greenlet/issues/1985) <https://github.com/gevent/gevent/issues/1985></code>_.</p> <h1>3.0.0rc1 (2023-09-01)</h1> <ul> <li>Windows wheels are linked statically to the C runtime in an effort to prevent import errors on systems without the correct C runtime installed. It's not clear if this will make the situation better or worse, so please share your experiences in <code>issue 346 <https://github.com/python-greenlet/greenlet/issues/346></code>_.</li> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/python-greenlet/greenlet/commit/ef510e4b1a862800e77bc8e290769d688f691b9e"><code>ef510e4</code></a> Preparing release 3.0.0</li> <li><a href="https://github.com/python-greenlet/greenlet/commit/8b24b4d2122c101efbe98a1d08dc02ffd3899826"><code>8b24b4d</code></a> Updating change log.</li> <li><a href="https://github.com/python-greenlet/greenlet/commit/79f63518ae53488c0acc19e9a1bfd740fc47149e"><code>79f6351</code></a> Back to development: 3.0.0rc4</li> <li><a href="https://github.com/python-greenlet/greenlet/commit/715128a4df7f93b247ce03a202e6d892a288e9b2"><code>715128a</code></a> Preparing release 3.0.0rc3</li> <li><a href="https://github.com/python-greenlet/greenlet/commit/f2ecf0c01a2f9524198be1f3220985de8eb5f0ff"><code>f2ecf0c</code></a> D'oh, tstate is used under Py 3.11+. UNUSED breaks compilation on windows.</li> <li><a href="https://github.com/python-greenlet/greenlet/commit/745181099a6d62bec05d443bae14c7b4dcd0a56a"><code>7451810</code></a> Finish refactoring to separate files.</li> <li><a href="https://github.com/python-greenlet/greenlet/commit/748a9e064f42a04e208c7c32e1316b44ced18db9"><code>748a9e0</code></a> Fix an intermittent error during process termination on GCC/Linux/libstdc++.</li> <li><a href="https://github.com/python-greenlet/greenlet/commit/cec93b106247e16ef6003175a15f113baf1d4285"><code>cec93b1</code></a> Move BrokenGreenlet to its own file.</li> <li><a href="https://github.com/python-greenlet/greenlet/commit/0b108b39224093ccfbad7f948532167afbd55ff8"><code>0b108b3</code></a> Move UserGreenlet code to its own file.</li> <li><a href="https://github.com/python-greenlet/greenlet/commit/215d0c98dcbefd68357c90e86c526b00026171c8"><code>215d0c9</code></a> Moving Greenlet, module globals and thread state destruction to their own files.</li> <li>Additional commits viewable in <a href="https://github.com/python-greenlet/greenlet/compare/2.0.2...3.0.0">compare view</a></li> </ul> </details> <br /> [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=greenlet&package-manager=pip&previous-version=2.0.2&new-version=3.0.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details>
Bumps [greenlet](https://github.com/python-greenlet/greenlet) from 2.0.2 to 3.0.0. <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/python-greenlet/greenlet/blob/master/CHANGES.rst">greenlet's changelog</a>.</em></p> <blockquote> <h1>3.0.0 (2023-10-02)</h1> <ul> <li>No changes from 3.0rc3 aside from the version number.</li> </ul> <h1>3.0.0rc3 (2023-09-12)</h1> <ul> <li>Fix an intermittent error during process termination on some platforms (GCC/Linux/libstdc++).</li> </ul> <h1>3.0.0rc2 (2023-09-09)</h1> <ul> <li>Fix some potential bugs (assertion failures and memory leaks) in previously-untested error handling code. In some cases, this means that the process will execute a controlled <code>abort()</code> after severe trouble when previously the process might have continued for some time with a corrupt state. It is unlikely those errors occurred in practice.</li> <li>Fix some assertion errors and potential bugs with re-entrant switches.</li> <li>Fix a potential crash when certain compilers compile greenlet with high levels of optimization. The symptom would be that switching to a greenlet for the first time immediately crashes.</li> <li>Fix a potential crash when the callable object passed to the greenlet constructor (or set as the <code>greenlet.run</code> attribute) has a destructor attached to it that switches. Typically, triggering this issue would require an unlikely subclass of <code>greenlet.greenlet</code>.</li> <li>Python 3.11+: Fix rare switching errors that could occur when a garbage collection was triggered during the middle of a switch, and Python-level code in <code>__del__</code> or weakref callbacks switched to a different greenlet and ultimately switched back to the original greenlet. This often manifested as a <code>SystemError</code>: "switch returned NULL without an exception set."</li> </ul> <p>For context on the fixes, see <code>gevent issue [#1985](https://github.com/python-greenlet/greenlet/issues/1985) <https://github.com/gevent/gevent/issues/1985></code>_.</p> <h1>3.0.0rc1 (2023-09-01)</h1> <ul> <li>Windows wheels are linked statically to the C runtime in an effort to prevent import errors on systems without the correct C runtime installed. It's not clear if this will make the situation better or worse, so please share your experiences in <code>issue 346 <https://github.com/python-greenlet/greenlet/issues/346></code>_.</li> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/python-greenlet/greenlet/commit/ef510e4b1a862800e77bc8e290769d688f691b9e"><code>ef510e4</code></a> Preparing release 3.0.0</li> <li><a href="https://github.com/python-greenlet/greenlet/commit/8b24b4d2122c101efbe98a1d08dc02ffd3899826"><code>8b24b4d</code></a> Updating change log.</li> <li><a href="https://github.com/python-greenlet/greenlet/commit/79f63518ae53488c0acc19e9a1bfd740fc47149e"><code>79f6351</code></a> Back to development: 3.0.0rc4</li> <li><a href="https://github.com/python-greenlet/greenlet/commit/715128a4df7f93b247ce03a202e6d892a288e9b2"><code>715128a</code></a> Preparing release 3.0.0rc3</li> <li><a href="https://github.com/python-greenlet/greenlet/commit/f2ecf0c01a2f9524198be1f3220985de8eb5f0ff"><code>f2ecf0c</code></a> D'oh, tstate is used under Py 3.11+. UNUSED breaks compilation on windows.</li> <li><a href="https://github.com/python-greenlet/greenlet/commit/745181099a6d62bec05d443bae14c7b4dcd0a56a"><code>7451810</code></a> Finish refactoring to separate files.</li> <li><a href="https://github.com/python-greenlet/greenlet/commit/748a9e064f42a04e208c7c32e1316b44ced18db9"><code>748a9e0</code></a> Fix an intermittent error during process termination on GCC/Linux/libstdc++.</li> <li><a href="https://github.com/python-greenlet/greenlet/commit/cec93b106247e16ef6003175a15f113baf1d4285"><code>cec93b1</code></a> Move BrokenGreenlet to its own file.</li> <li><a href="https://github.com/python-greenlet/greenlet/commit/0b108b39224093ccfbad7f948532167afbd55ff8"><code>0b108b3</code></a> Move UserGreenlet code to its own file.</li> <li><a href="https://github.com/python-greenlet/greenlet/commit/215d0c98dcbefd68357c90e86c526b00026171c8"><code>215d0c9</code></a> Moving Greenlet, module globals and thread state destruction to their own files.</li> <li>Additional commits viewable in <a href="https://github.com/python-greenlet/greenlet/compare/2.0.2...3.0.0">compare view</a></li> </ul> </details> <br /> [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=greenlet&package-manager=pip&previous-version=2.0.2&new-version=3.0.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Greetings & sorry to bug! After running Error Log
Building wheels for collected packages: greenlet
Building wheel for greenlet (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [177 lines of output]
running bdist_wheel
running build
running build_py
creating build
creating build/lib.macosx-10.9-universal2-cpython-312
creating build/lib.macosx-10.9-universal2-cpython-312/greenlet
copying src/greenlet/__init__.py -> build/lib.macosx-10.9-universal2-cpython-312/greenlet
creating build/lib.macosx-10.9-universal2-cpython-312/greenlet/platform
copying src/greenlet/platform/__init__.py -> build/lib.macosx-10.9-universal2-cpython-312/greenlet/platform
creating build/lib.macosx-10.9-universal2-cpython-312/greenlet/tests
copying src/greenlet/tests/test_version.py -> build/lib.macosx-10.9-universal2-cpython-312/greenlet/tests
copying src/greenlet/tests/test_weakref.py -> build/lib.macosx-10.9-universal2-cpython-312/greenlet/tests
copying src/greenlet/tests/test_gc.py -> build/lib.macosx-10.9-universal2-cpython-312/greenlet/tests
copying src/greenlet/tests/leakcheck.py -> build/lib.macosx-10.9-universal2-cpython-312/greenlet/tests
copying src/greenlet/tests/test_generator.py -> build/lib.macosx-10.9-universal2-cpython-312/greenlet/tests
copying src/greenlet/tests/test_greenlet_trash.py -> build/lib.macosx-10.9-universal2-cpython-312/greenlet/tests
copying src/greenlet/tests/test_throw.py -> build/lib.macosx-10.9-universal2-cpython-312/greenlet/tests
copying src/greenlet/tests/test_tracing.py -> build/lib.macosx-10.9-universal2-cpython-312/greenlet/tests
copying src/greenlet/tests/test_cpp.py -> build/lib.macosx-10.9-universal2-cpython-312/greenlet/tests
copying src/greenlet/tests/test_contextvars.py -> build/lib.macosx-10.9-universal2-cpython-312/greenlet/tests
copying src/greenlet/tests/test_greenlet.py -> build/lib.macosx-10.9-universal2-cpython-312/greenlet/tests
copying src/greenlet/tests/test_extension_interface.py -> build/lib.macosx-10.9-universal2-cpython-312/greenlet/tests
copying src/greenlet/tests/__init__.py -> build/lib.macosx-10.9-universal2-cpython-312/greenlet/tests
copying src/greenlet/tests/test_generator_nested.py -> build/lib.macosx-10.9-universal2-cpython-312/greenlet/tests
copying src/greenlet/tests/test_stack_saved.py -> build/lib.macosx-10.9-universal2-cpython-312/greenlet/tests
copying src/greenlet/tests/test_leaks.py -> build/lib.macosx-10.9-universal2-cpython-312/greenlet/tests
running egg_info
writing src/greenlet.egg-info/PKG-INFO
writing dependency_links to src/greenlet.egg-info/dependency_links.txt
writing requirements to src/greenlet.egg-info/requires.txt
writing top-level names to src/greenlet.egg-info/top_level.txt
reading manifest file 'src/greenlet.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no previously-included files found matching 'benchmarks/*.json'
no previously-included directories found matching 'docs/_build'
warning: no files found matching '*.py' under directory 'appveyor'
warning: no previously-included files matching '*.pyc' found anywhere in distribution
warning: no previously-included files matching '*.pyd' found anywhere in distribution
warning: no previously-included files matching '*.so' found anywhere in distribution
warning: no previously-included files matching '.coverage' found anywhere in distribution
adding license file 'LICENSE'
adding license file 'LICENSE.PSF'
adding license file 'AUTHORS'
writing manifest file 'src/greenlet.egg-info/SOURCES.txt'
copying src/greenlet/greenlet.cpp -> build/lib.macosx-10.9-universal2-cpython-312/greenlet
copying src/greenlet/greenlet.h -> build/lib.macosx-10.9-universal2-cpython-312/greenlet
copying src/greenlet/greenlet_allocator.hpp -> build/lib.macosx-10.9-universal2-cpython-312/greenlet
copying src/greenlet/greenlet_compiler_compat.hpp -> build/lib.macosx-10.9-universal2-cpython-312/greenlet
copying src/greenlet/greenlet_cpython_compat.hpp -> build/lib.macosx-10.9-universal2-cpython-312/greenlet
copying src/greenlet/greenlet_exceptions.hpp -> build/lib.macosx-10.9-universal2-cpython-312/greenlet
copying src/greenlet/greenlet_greenlet.hpp -> build/lib.macosx-10.9-universal2-cpython-312/greenlet
copying src/greenlet/greenlet_internal.hpp -> build/lib.macosx-10.9-universal2-cpython-312/greenlet
copying src/greenlet/greenlet_refs.hpp -> build/lib.macosx-10.9-universal2-cpython-312/greenlet
copying src/greenlet/greenlet_slp_switch.hpp -> build/lib.macosx-10.9-universal2-cpython-312/greenlet
copying src/greenlet/greenlet_thread_state.hpp -> build/lib.macosx-10.9-universal2-cpython-312/greenlet
copying src/greenlet/greenlet_thread_state_dict_cleanup.hpp -> build/lib.macosx-10.9-universal2-cpython-312/greenlet
copying src/greenlet/greenlet_thread_support.hpp -> build/lib.macosx-10.9-universal2-cpython-312/greenlet
copying src/greenlet/slp_platformselect.h -> build/lib.macosx-10.9-universal2-cpython-312/greenlet
copying src/greenlet/platform/setup_switch_x64_masm.cmd -> build/lib.macosx-10.9-universal2-cpython-312/greenlet/platform
copying src/greenlet/platform/switch_aarch64_gcc.h -> build/lib.macosx-10.9-universal2-cpython-312/greenlet/platform
copying src/greenlet/platform/switch_alpha_unix.h -> build/lib.macosx-10.9-universal2-cpython-312/greenlet/platform
copying src/greenlet/platform/switch_amd64_unix.h -> build/lib.macosx-10.9-universal2-cpython-312/greenlet/platform
copying src/greenlet/platform/switch_arm32_gcc.h -> build/lib.macosx-10.9-universal2-cpython-312/greenlet/platform
copying src/greenlet/platform/switch_arm32_ios.h -> build/lib.macosx-10.9-universal2-cpython-312/greenlet/platform
copying src/greenlet/platform/switch_arm64_masm.asm -> build/lib.macosx-10.9-universal2-cpython-312/greenlet/platform
copying src/greenlet/platform/switch_arm64_masm.obj -> build/lib.macosx-10.9-universal2-cpython-312/greenlet/platform
copying src/greenlet/platform/switch_arm64_msvc.h -> build/lib.macosx-10.9-universal2-cpython-312/greenlet/platform
copying src/greenlet/platform/switch_csky_gcc.h -> build/lib.macosx-10.9-universal2-cpython-312/greenlet/platform
copying src/greenlet/platform/switch_m68k_gcc.h -> build/lib.macosx-10.9-universal2-cpython-312/greenlet/platform
copying src/greenlet/platform/switch_mips_unix.h -> build/lib.macosx-10.9-universal2-cpython-312/greenlet/platform
copying src/greenlet/platform/switch_ppc64_aix.h -> build/lib.macosx-10.9-universal2-cpython-312/greenlet/platform
copying src/greenlet/platform/switch_ppc64_linux.h -> build/lib.macosx-10.9-universal2-cpython-312/greenlet/platform
copying src/greenlet/platform/switch_ppc_aix.h -> build/lib.macosx-10.9-universal2-cpython-312/greenlet/platform
copying src/greenlet/platform/switch_ppc_linux.h -> build/lib.macosx-10.9-universal2-cpython-312/greenlet/platform
copying src/greenlet/platform/switch_ppc_macosx.h -> build/lib.macosx-10.9-universal2-cpython-312/greenlet/platform
copying src/greenlet/platform/switch_ppc_unix.h -> build/lib.macosx-10.9-universal2-cpython-312/greenlet/platform
copying src/greenlet/platform/switch_riscv_unix.h -> build/lib.macosx-10.9-universal2-cpython-312/greenlet/platform
copying src/greenlet/platform/switch_s390_unix.h -> build/lib.macosx-10.9-universal2-cpython-312/greenlet/platform
copying src/greenlet/platform/switch_sparc_sun_gcc.h -> build/lib.macosx-10.9-universal2-cpython-312/greenlet/platform
copying src/greenlet/platform/switch_x32_unix.h -> build/lib.macosx-10.9-universal2-cpython-312/greenlet/platform
copying src/greenlet/platform/switch_x64_masm.asm -> build/lib.macosx-10.9-universal2-cpython-312/greenlet/platform
copying src/greenlet/platform/switch_x64_masm.obj -> build/lib.macosx-10.9-universal2-cpython-312/greenlet/platform
copying src/greenlet/platform/switch_x64_msvc.h -> build/lib.macosx-10.9-universal2-cpython-312/greenlet/platform
copying src/greenlet/platform/switch_x86_msvc.h -> build/lib.macosx-10.9-universal2-cpython-312/greenlet/platform
copying src/greenlet/platform/switch_x86_unix.h -> build/lib.macosx-10.9-universal2-cpython-312/greenlet/platform
copying src/greenlet/tests/_test_extension.c -> build/lib.macosx-10.9-universal2-cpython-312/greenlet/tests
copying src/greenlet/tests/_test_extension_cpp.cpp -> build/lib.macosx-10.9-universal2-cpython-312/greenlet/tests
running build_ext
building 'greenlet._greenlet' extension
creating build/temp.macosx-10.9-universal2-cpython-312
creating build/temp.macosx-10.9-universal2-cpython-312/src
creating build/temp.macosx-10.9-universal2-cpython-312/src/greenlet
clang -fno-strict-overflow -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -O3 -Wall -arch arm64 -arch x86_64 -g -I/Users/bobbyhutter/PycharmProjects/tau/venv/include -I/Library/Frameworks/Python.framework/Versions/3.12/include/python3.12 -c src/greenlet/greenlet.cpp -o build/temp.macosx-10.9-universal2-cpython-312/src/greenlet/greenlet.o --std=gnu++11
In file included from src/greenlet/greenlet.cpp:19:
In file included from src/greenlet/greenlet_internal.hpp:20:
src/greenlet/greenlet_greenlet.hpp:831:41: error: no member named 'use_tracing' in '_PyCFrame'
this->use_tracing = tstate->cframe->use_tracing;
~~~~~~~~~~~~~~ ^
src/greenlet/greenlet_greenlet.hpp:834:37: error: no member named 'recursion_limit' in '_ts'; did you mean 'py_recursion_limit'?
this->recursion_depth = tstate->recursion_limit - tstate->recursion_remaining;
^~~~~~~~~~~~~~~
py_recursion_limit
/Library/Frameworks/Python.framework/Versions/3.12/include/python3.12/cpython/pystate.h:148:9: note: 'py_recursion_limit' declared here
int py_recursion_limit;
^
In file included from src/greenlet/greenlet.cpp:19:
In file included from src/greenlet/greenlet_internal.hpp:20:
src/greenlet/greenlet_greenlet.hpp:834:63: error: no member named 'recursion_remaining' in '_ts'; did you mean 'c_recursion_remaining'?
this->recursion_depth = tstate->recursion_limit - tstate->recursion_remaining;
^~~~~~~~~~~~~~~~~~~
c_recursion_remaining
/Library/Frameworks/Python.framework/Versions/3.12/include/python3.12/cpython/pystate.h:150:9: note: 'c_recursion_remaining' declared here
int c_recursion_remaining;
^
In file included from src/greenlet/greenlet.cpp:19:
In file included from src/greenlet/greenlet_internal.hpp:20:
src/greenlet/greenlet_greenlet.hpp:848:42: error: no member named 'trash_delete_nesting' in '_ts'
this->trash_delete_nesting = tstate->trash_delete_nesting;
~~~~~~ ^
src/greenlet/greenlet_greenlet.hpp:867:21: error: no member named 'use_tracing' in '_PyCFrame'
tstate->cframe->use_tracing = this->use_tracing;
~~~~~~~~~~~~~~ ^
src/greenlet/greenlet_greenlet.hpp:870:13: error: no member named 'recursion_remaining' in '_ts'; did you mean 'c_recursion_remaining'?
tstate->recursion_remaining = tstate->recursion_limit - this->recursion_depth;
^~~~~~~~~~~~~~~~~~~
c_recursion_remaining
/Library/Frameworks/Python.framework/Versions/3.12/include/python3.12/cpython/pystate.h:150:9: note: 'c_recursion_remaining' declared here
int c_recursion_remaining;
^
In file included from src/greenlet/greenlet.cpp:19:
In file included from src/greenlet/greenlet_internal.hpp:20:
src/greenlet/greenlet_greenlet.hpp:870:43: error: no member named 'recursion_limit' in '_ts'; did you mean 'py_recursion_limit'?
tstate->recursion_remaining = tstate->recursion_limit - this->recursion_depth;
^~~~~~~~~~~~~~~
py_recursion_limit
/Library/Frameworks/Python.framework/Versions/3.12/include/python3.12/cpython/pystate.h:148:9: note: 'py_recursion_limit' declared here
int py_recursion_limit;
^
In file included from src/greenlet/greenlet.cpp:19:
In file included from src/greenlet/greenlet_internal.hpp:20:
src/greenlet/greenlet_greenlet.hpp:881:13: error: no member named 'trash_delete_nesting' in '_ts'
tstate->trash_delete_nesting = this->trash_delete_nesting;
~~~~~~ ^
src/greenlet/greenlet_greenlet.hpp:891:48: error: no member named 'use_tracing' in '_PyCFrame'
this->use_tracing = origin_tstate->cframe->use_tracing;
~~~~~~~~~~~~~~~~~~~~~ ^
src/greenlet/greenlet_greenlet.hpp:899:37: error: no member named 'recursion_limit' in '_ts'; did you mean 'py_recursion_limit'?
this->recursion_depth = tstate->recursion_limit - tstate->recursion_remaining;
^~~~~~~~~~~~~~~
py_recursion_limit
/Library/Frameworks/Python.framework/Versions/3.12/include/python3.12/cpython/pystate.h:148:9: note: 'py_recursion_limit' declared here
int py_recursion_limit;
^
In file included from src/greenlet/greenlet.cpp:19:
In file included from src/greenlet/greenlet_internal.hpp:20:
src/greenlet/greenlet_greenlet.hpp:899:63: error: no member named 'recursion_remaining' in '_ts'; did you mean 'c_recursion_remaining'?
this->recursion_depth = tstate->recursion_limit - tstate->recursion_remaining;
^~~~~~~~~~~~~~~~~~~
c_recursion_remaining
/Library/Frameworks/Python.framework/Versions/3.12/include/python3.12/cpython/pystate.h:150:9: note: 'c_recursion_remaining' declared here
int c_recursion_remaining;
^
In file included from src/greenlet/greenlet.cpp:21:
In file included from src/greenlet/greenlet_slp_switch.hpp:82:
In file included from src/greenlet/slp_platformselect.h:53:
src/greenlet/platform/switch_aarch64_gcc.h:71:51: warning: value size does not match register size specified by the constraint and modifier [-Wasm-operand-widths]
__asm__ volatile ("mov %0, #0" : "=r" (err));
^
src/greenlet/platform/switch_aarch64_gcc.h:71:35: note: use constraint modifier "w"
__asm__ volatile ("mov %0, #0" : "=r" (err));
^~
%w0
src/greenlet/greenlet.cpp:3095:36: error: no member named 'trash_delete_nesting' in '_ts'
return PyLong_FromLong(tstate->trash_delete_nesting);
~~~~~~ ^
1 warning and 12 errors generated.
error: command '/usr/bin/clang' failed with exit code 1
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for greenlet
Running setup.py clean for greenlet
Failed to build greenlet
ERROR: Could not build wheels for greenlet, which is required to install pyproject.toml-based projects
(venv) Bobbys-MacBook-Pro:tau-intro-to-pytest bobbyhutter$
What's odd to me is that, within the same env & directory in which the import attempt fails, I do get the desired output confirming it's presence &or installation when I run the aforementioned command: python -vv -c 'import greenlet._greenlet'
My most overhanded triage-method was to Grateful for anything I can learn on the way to hopefully resolving it. |
@Bobby-H You appear to be installing on Python 3.12. Playwright has greenlet pinned to a version that doesn't support Python 3.12 --- hence the compilation errors. |
@jamadden 💥nailed it. |
Switch to wheel.mk. 3.0.1 (2023-10-25) ================== - Fix a potential crash on Python 3.8 at interpreter shutdown time. This was a regression from earlier 3.0.x releases. Reported by Matt Wozniski in `issue 376 <https://github.com/python-greenlet/greenlet/issues/376>`_. 3.0.0 (2023-10-02) ================== - No changes from 3.0rc3 aside from the version number. 3.0.0rc3 (2023-09-12) ===================== - Fix an intermittent error during process termination on some platforms (GCC/Linux/libstdc++). 3.0.0rc2 (2023-09-09) ===================== - Fix some potential bugs (assertion failures and memory leaks) in previously-untested error handling code. In some cases, this means that the process will execute a controlled ``abort()`` after severe trouble when previously the process might have continued for some time with a corrupt state. It is unlikely those errors occurred in practice. - Fix some assertion errors and potential bugs with re-entrant switches. - Fix a potential crash when certain compilers compile greenlet with high levels of optimization. The symptom would be that switching to a greenlet for the first time immediately crashes. - Fix a potential crash when the callable object passed to the greenlet constructor (or set as the ``greenlet.run`` attribute) has a destructor attached to it that switches. Typically, triggering this issue would require an unlikely subclass of ``greenlet.greenlet``. - Python 3.11+: Fix rare switching errors that could occur when a garbage collection was triggered during the middle of a switch, and Python-level code in ``__del__`` or weakref callbacks switched to a different greenlet and ultimately switched back to the original greenlet. This often manifested as a ``SystemError``: "switch returned NULL without an exception set." For context on the fixes, see `gevent issue #1985 <https://github.com/gevent/gevent/issues/1985>`_. 3.0.0rc1 (2023-09-01) ===================== - Windows wheels are linked statically to the C runtime in an effort to prevent import errors on systems without the correct C runtime installed. It's not clear if this will make the situation better or worse, so please share your experiences in `issue 346 <https://github.com/python-greenlet/greenlet/issues/346>`_. Note that this only applies to the binary wheels found on PyPI. Building greenlet from source defaults to the shared library. Set the environment variable ``GREENLET_STATIC_RUNTIME=1`` at build time to change that. - Build binary wheels for Python 3.12 on macOS. - Fix compiling greenlet on a debug build of CPython 3.12. There is `one known issue <https://github.com/python-greenlet/greenlet/issues/368>`_ that leads to an interpreter crash on debug builds. - Python 3.12: Fix walking the frame stack of suspended greenlets. Previously accessing ``glet.gr_frame.f_back`` would crash due to `changes in CPython's undocumented internal frame handling <https://github.com/python/cpython/commit/1e197e63e21f77b102ff2601a549dda4b6439455>`_. Platforms --------- - Now, greenlet *may* compile and work on Windows ARM64 using llvm-mingw, but this is untested and unsupported. See `PR <https://github.com/python-greenlet/greenlet/pull/224>`_ by Adrian Vladu. - Now, greenlet *may* compile and work on LoongArch64 Linux systems, but this is untested and unsupported. See `PR 257 <https://github.com/python-greenlet/greenlet/pull/257/files>`_ by merore. Known Issues ------------ - There may be (very) subtle issues with tracing on Python 3.12, which has redesigned the entire tracing infrastructure. 3.0.0a1 (2023-06-21) ==================== - Build binary wheels for S390x Linux. See `PR 358 <https://github.com/python-greenlet/greenlet/pull/358>`_ from Steven Silvester. - Fix a rare crash on shutdown seen in uWSGI deployments. See `issue 330 <https://github.com/python-greenlet/greenlet/issues/330>`_ and `PR 356 <https://github.com/python-greenlet/greenlet/pull/356>`_ from Andrew Wason. - Make the platform-specific low-level C/assembly snippets stop using the ``register`` storage class. Newer versions of standards remove this storage class, and it has been generally ignored by many compilers for some time. See `PR 347 <https://github.com/python-greenlet/greenlet/pull/347>`_ from Khem Raj. - Add initial support for Python 3.12. See `issue <https://github.com/python-greenlet/greenlet/issues/323>`_ and `PR <https://github.com/python-greenlet/greenlet/pull/327>`_; thanks go to (at least) Michael Droettboom, Andreas Motl, Thomas A Caswell, raphaelauv, Hugo van Kemenade, Mark Shannon, and Petr Viktorin. - Remove support for end-of-life Python versions, including Python 2.7, Python 3.5 and Python 3.6. - Require a compiler that supports ``noinline`` directives. See `issue 271 <https://github.com/python-greenlet/greenlet/issues/266>`_. - Require a compiler that supports C++11.
I was asked by the playwright guys to create a ticket on this,
Here is the thread:
microsoft/playwright-python#1720
Essentially, we have this:
playwright 1.27.1 uses greenlet 1.1.3
playwright 1.28+ uses greenlet 2.0.1 (I also tried 2.0.2 same issue below)
I know you're going to think, well it's their problem, why are you posting here, but please take a look first
Simply on the first import we get this:
ImportError: DLL load failed while importing _greenlet: The specified module could not be found.
However if I manually uninstall greenlet 2.0.1/2 and install 1.1.3 ignoring the pip warning about 'compatibility' everything works
More details can be found in the thread link.
The text was updated successfully, but these errors were encountered: