diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c302766fad..afc612c301 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -27,7 +27,7 @@ jobs: extra_name: ', with Komodia LSP' - python: '3.8' arch: 'x64' - lsp: 'http://www.proxifier.com/download/ProxifierSetup.exe' + lsp: 'https://www.proxifier.com/download/legacy/ProxifierSetup342.exe' lsp_extract_file: '' extra_name: ', with IFS LSP' - python: '3.8' diff --git a/.travis.yml b/.travis.yml index 35f85357d9..911834d76d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,6 +9,8 @@ jobs: dist: bionic - language: generic env: PYPY_NIGHTLY_BRANCH=py3.6 + - language: generic + env: PYPY_NIGHTLY_BRANCH=py3.7 # Qemu tests are also slow # FreeBSD: - language: generic diff --git a/docs-requirements.txt b/docs-requirements.txt index 83b1270acc..d7cde4f916 100644 --- a/docs-requirements.txt +++ b/docs-requirements.txt @@ -20,9 +20,9 @@ jinja2==2.11.2 # via sphinx, towncrier markupsafe==1.1.1 # via jinja2 outcome==1.0.1 # via -r docs-requirements.in packaging==20.4 # via sphinx -pygments==2.7.1 # via sphinx +pygments==2.7.2 # via sphinx pyparsing==2.4.7 # via packaging -pytz==2020.1 # via babel +pytz==2020.4 # via babel requests==2.24.0 # via sphinx six==1.15.0 # via packaging sniffio==1.2.0 # via -r docs-requirements.in @@ -37,6 +37,6 @@ sphinxcontrib-jsmath==1.0.1 # via sphinx sphinxcontrib-qthelp==1.0.3 # via sphinx sphinxcontrib-serializinghtml==1.1.4 # via sphinx sphinxcontrib-trio==1.1.2 # via -r docs-requirements.in -toml==0.10.1 # via towncrier +toml==0.10.2 # via towncrier towncrier==19.2.0 # via -r docs-requirements.in -urllib3==1.25.10 # via requests +urllib3==1.25.11 # via requests diff --git a/docs/source/reference-core.rst b/docs/source/reference-core.rst index b67bf52e78..812b7d9b1a 100644 --- a/docs/source/reference-core.rst +++ b/docs/source/reference-core.rst @@ -1638,9 +1638,11 @@ an exception, where can that exception be reraised? If you have an async generator that wants to ``yield`` from within a nursery or cancel scope, your best bet is to refactor it to be a separate task -that communicates over memory channels. +that communicates over memory channels. The ``trio_util`` package offers a +`decorator that does this for you transparently +`__. -For more discussion and some experimental partial workarounds, see +For more discussion, see Trio issues `264 `__ (especially `this comment `__) diff --git a/newsfragments/1765.bugfix.rst b/newsfragments/1765.bugfix.rst new file mode 100644 index 0000000000..7d771c13e5 --- /dev/null +++ b/newsfragments/1765.bugfix.rst @@ -0,0 +1 @@ +Fix a crash in pypy-3.7 diff --git a/test-requirements.txt b/test-requirements.txt index c53a4201a1..cd0b8675ab 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -14,14 +14,14 @@ black==20.8b1 ; implementation_name == "cpython" # via -r test-requirements.in cffi==1.14.3 # via cryptography click==7.1.2 # via black coverage==5.3 # via pytest-cov -cryptography==3.1.1 # via pyopenssl, trustme +cryptography==3.2.1 # via pyopenssl, trustme decorator==4.4.2 # via ipython flake8==3.8.4 # via -r test-requirements.in idna==2.10 # via -r test-requirements.in, trustme immutables==0.14 # via -r test-requirements.in iniconfig==1.1.1 # via pytest ipython-genutils==0.2.0 # via traitlets -ipython==7.18.1 # via -r test-requirements.in +ipython==7.19.0 # via -r test-requirements.in isort==5.6.4 # via pylint jedi==0.17.2 # via -r test-requirements.in, ipython lazy-object-proxy==1.4.3 # via astroid @@ -41,17 +41,17 @@ py==1.9.0 # via pytest pycodestyle==2.6.0 # via flake8 pycparser==2.20 # via cffi pyflakes==2.2.0 # via flake8 -pygments==2.7.1 # via ipython +pygments==2.7.2 # via ipython pylint==2.6.0 # via -r test-requirements.in pyopenssl==19.1.0 # via -r test-requirements.in pyparsing==2.4.7 # via packaging pytest-cov==2.10.1 # via -r test-requirements.in -pytest==6.1.1 # via -r test-requirements.in, pytest-cov -regex==2020.10.23 # via black +pytest==6.1.2 # via -r test-requirements.in, pytest-cov +regex==2020.10.28 # via black six==1.15.0 # via astroid, cryptography, packaging, pyopenssl sniffio==1.2.0 # via -r test-requirements.in sortedcontainers==2.2.2 # via -r test-requirements.in -toml==0.10.1 # via black, pylint, pytest +toml==0.10.2 # via black, pylint, pytest traitlets==5.0.5 # via ipython trustme==0.6.0 # via -r test-requirements.in typed-ast==1.4.1 ; implementation_name == "cpython" # via -r test-requirements.in, black, mypy diff --git a/trio/_core/_wakeup_socketpair.py b/trio/_core/_wakeup_socketpair.py index 86eaeb6355..121cec584e 100644 --- a/trio/_core/_wakeup_socketpair.py +++ b/trio/_core/_wakeup_socketpair.py @@ -6,10 +6,23 @@ from .. import _core from .._util import is_main_thread -if sys.version_info >= (3, 7): - HAVE_WARN_ON_FULL_BUFFER = True -else: - HAVE_WARN_ON_FULL_BUFFER = False + +def _has_warn_on_full_buffer(): + if sys.version_info < (3, 7): + return False + + if "__pypy__" not in sys.builtin_module_names: + # CPython has warn_on_full_buffer. Don't need to inspect. + # Also, CPython doesn't support inspecting built-in functions. + return True + + import inspect + + args_spec = inspect.getfullargspec(signal.set_wakeup_fd) + return "warn_on_full_buffer" in args_spec.kwonlyargs + + +HAVE_WARN_ON_FULL_BUFFER = _has_warn_on_full_buffer() class WakeupSocketpair: diff --git a/trio/_core/tests/test_guest_mode.py b/trio/_core/tests/test_guest_mode.py index 381d966f81..c9701e7cdd 100644 --- a/trio/_core/tests/test_guest_mode.py +++ b/trio/_core/tests/test_guest_mode.py @@ -502,6 +502,10 @@ async def trio_main(in_host): @pytest.mark.skipif(buggy_pypy_asyncgens, reason="PyPy 7.2 is buggy") +@pytest.mark.xfail( + sys.implementation.name == "pypy" and sys.version_info >= (3, 7), + reason="async generator issue under investigation", +) def test_guest_mode_asyncgens(): import sniffio