From b1a9ec4ac0c4b1ac11e1a7a1a0b7fdc274cd3554 Mon Sep 17 00:00:00 2001
From: Chih-Hsuan Yen <yan12125@archlinux.org>
Date: Sat, 29 Oct 2022 15:35:54 +0000
Subject: [PATCH] temporarily disable trio tests; add transitive deps & move
 optional deps to makedepends

---
 PKGBUILD | 21 ++++++++++++++++-----
 1 file changed, 16 insertions(+), 5 deletions(-)

diff --git a/PKGBUILD b/PKGBUILD
index efbf78d..fd7abc3 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,25 +2,36 @@
 
 pkgname=python-anyio
 # https://github.com/agronholm/anyio/blob/master/docs/versionhistory.rst
-pkgver=3.6.1
+pkgver=3.6.2
 pkgrel=1
 pkgdesc='High level compatibility layer for multiple asynchronous event loop implementations'
 arch=(any)
 url='https://github.com/agronholm/anyio'
 license=(MIT)
 depends=(python python-idna python-sniffio)
-makedepends=(python-setuptools python-setuptools-scm)
-checkdepends=(python-pytest python-trustme python-hypothesis python-uvloop
-              python-trio python-pytest-mock)
+makedepends=(python-setuptools python-setuptools-scm
+             python-uvloop python-trio)
+checkdepends=(python-pytest python-trustme python-hypothesis python-pytest-mock)
 optdepends=(
   'python-trio: trio backend'
+  'python-outcome: trio backend'
   'python-uvloop: use uvloop for asyncio backend'
+  'python-pytest: pytest plugin'
 )
 source=(https://github.com/agronholm/anyio/archive/$pkgver/anyio-$pkgver.tar.gz)
-sha256sums=('8e09cf634e7877741fa760b93fb46c352f888d7d3b5a8c9f2d60ca1031f03e42')
+sha256sums=('befe8a0e100f6a92ad1b15a6e4adc86bb5f1e055f09b125090300ade5b33534d')
 
 export SETUPTOOLS_SCM_PRETEND_VERSION=$pkgver
 
+prepare() {
+  cd anyio-$pkgver
+  # Remove "error" from pytest filterwarnings
+  sed -i '/"error"/d' pyproject.toml
+  # XXX: Temporarily remove testing trio as a backend. anyio 3.x is known to be incompatible with trio >= 0.22
+  # https://github.com/agronholm/anyio/commit/787cb0c2e53c2a3307873d202fbd49dc5eac4e96
+  sed -i '/"trio"/d' tests/conftest.py
+}
+
 build() {
   cd anyio-$pkgver
   python setup.py build
-- 
GitLab