I'm packaging your module as an rpm package so I'm using the typical PEP517 based build, install and test cycle used on building packages from non-root account.
python3 -sBm build -w --no-isolation
because I'm calling build with --no-isolation I'm using during all processes only locally installed modules
install .whl file in </install/prefix> using 'installer` module
run pytest with $PYTHONPATH pointing to sitearch and sitelib inside </install/prefix>
build is performed in env which is cut off from access to the public network (pytest is executed with -m "not network")
Here is pytest output:
```console
+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-greenlet-3.0.1-2.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-greenlet-3.0.1-2.fc35.x86_64/usr/lib/python3.8/site-packages
+ /usr/bin/pytest -ra -m 'not network' --import-mode=importlib
==================================================================================== test session starts ====================================================================================
platform linux -- Python 3.8.18, pytest-7.4.3, pluggy-1.3.0
rootdir: /home/tkloczko/rpmbuild/BUILD/greenlet-3.0.1
collected 137 items
src/greenlet/tests/test_contextvars.py .........s [ 7%]
src/greenlet/tests/test_cpp.py ..... [ 10%]
src/greenlet/tests/test_extension_interface.py ........... [ 18%]
src/greenlet/tests/test_gc.py .... [ 21%]
src/greenlet/tests/test_generator.py . [ 22%]
src/greenlet/tests/test_generator_nested.py ..... [ 26%]
src/greenlet/tests/test_greenlet.py ...F.............................................................. [ 74%]
src/greenlet/tests/test_greenlet_trash.py . [ 75%]
src/greenlet/tests/test_leaks.py ............ [ 83%]
src/greenlet/tests/test_stack_saved.py . [ 84%]
src/greenlet/tests/test_throw.py ....... [ 89%]
src/greenlet/tests/test_tracing.py .......... [ 97%]
src/greenlet/tests/test_version.py . [ 97%]
src/greenlet/tests/test_weakref.py ... [100%]
========================================================================================= FAILURES ==========================================================================================
________________________________________________________________ TestGreenlet.test_dealloc_catches_GreenletExit_throws_other ________________________________________________________________
self =
def test_dealloc_catches_GreenletExit_throws_other(self):
def run():
try:
greenlet.getcurrent().parent.switch()
except greenlet.GreenletExit:
raise SomeError from None
g = RawGreenlet(run)
g.switch()
# Destroying the only reference to the greenlet causes it
# to get GreenletExit; when it in turn raises, even though we're the parent
# we don't get the exception, it just gets printed.
# When we run on 3.8 only, we can use sys.unraisablehook
oldstderr = sys.stderr
try:
from cStringIO import StringIO
except ImportError:
from io import StringIO
stderr = sys.stderr = StringIO()
try:
del g
finally:
sys.stderr = oldstderr
v = stderr.getvalue()
> self.assertIn("Exception", v)
E AssertionError: 'Exception' not found in ''
src/greenlet/tests/test_greenlet.py:215: AssertionError
===================================================================================== warnings summary ======================================================================================
src/greenlet/tests/test_greenlet.py::TestGreenlet::test_dealloc_catches_GreenletExit_throws_other
/usr/lib/python3.8/site-packages/_pytest/unraisableexception.py:78: PytestUnraisableExceptionWarning: Exception ignored in:
Traceback (most recent call last):
File "/home/tkloczko/rpmbuild/BUILD/greenlet-3.0.1/src/greenlet/tests/test_greenlet.py", line 195, in run
raise SomeError from None
src.greenlet.tests.test_greenlet.SomeError
warnings.warn(pytest.PytestUnraisableExceptionWarning(msg))
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
================================================================================== short test summary info ==================================================================================
SKIPPED [1] src/greenlet/tests/test_contextvars.py:288: ContextVar supported
FAILED src/greenlet/tests/test_greenlet.py::TestGreenlet::test_dealloc_catches_GreenletExit_throws_other - AssertionError: 'Exception' not found in ''
=================================================================== 1 failed, 135 passed, 1 skipped, 1 warning in 56.60s ====================================================================
```
I'm packaging your module as an rpm package so I'm using the typical PEP517 based build, install and test cycle used on building packages from non-root account.
python3 -sBm build -w --no-isolation
build
with--no-isolation
I'm using during all processes only locally installed modulescut off from access to the public network
(pytest is executed with-m "not network"
)Here is pytest output:
Here is list of installed modules in build env