community/py3-matrix-nio: upgrade to 0.15.2

This commit is contained in:
Newbyte 2020-12-08 13:25:42 +01:00 committed by Leo
parent 9eb96a761d
commit a7903cb18a
2 changed files with 129 additions and 4 deletions

View File

@ -0,0 +1,119 @@
Newbyte's note: This patch has been modified to not drop setup.py
Reason it is included because in the latest release of matrix-nio
the tests expect an older version of aioresponses. This patch makes them
support the most recent release of aioresponses, and should probably be
dropped with the next release of matrix-nio.
From 1662375abba8ebe9d513da24b938f1381d96416a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Damir=20Jeli=C4=87?= <poljar@termina.org.uk>
Date: Sat, 7 Nov 2020 16:36:23 +0100
Subject: [PATCH] CI: Fix our tox setup for github CI.
---
pyproject.toml | 8 +++----
test-requirements.txt | 8 +++----
tests/async_client_test.py | 6 ++---
tox.ini | 16 +++++---------
4 files changed, 16 insertions(+), 25 deletions(-)
diff --git a/pyproject.toml b/pyproject.toml
index 557943c..786d0f2 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,3 +1,7 @@
+[build-system]
+requires = ["poetry_core>=1.0.0"]
+build-backend = "poetry.core.masonry.api"
+
[tool.poetry]
name = "matrix-nio"
version = "0.15.2"
@@ -41,7 +45,3 @@ hpack = "^3.0.0"
faker = "^4.0.2"
mypy = "^0.770"
pytest-aiohttp = "^0.3.0"
-
-[build-system]
-requires = ["poetry>=0.12"]
-build-backend = "poetry.masonry.api"
diff --git a/test-requirements.txt b/test-requirements.txt
index 3984633..d085901 100644
--- a/test-requirements.txt
+++ b/test-requirements.txt
@@ -8,10 +8,10 @@ hypothesis
hpack
faker
mypy
-mypy_extensions>=0.4.3,<0.5.0
-aiohttp; python_version >= '3.5'
-pytest-aiohttp; python_version >= '3.5'
-aioresponses <= 0.6.1; python_version >= '3.5'
+mypy_extensions
+aiohttp
+pytest-aiohttp
+aioresponses
python-olm >= '3.1.0'
peewee >= '3.9.5'
atomicwrites
diff --git a/tests/async_client_test.py b/tests/async_client_test.py
index 407f41e..7e54060 100644
--- a/tests/async_client_test.py
+++ b/tests/async_client_test.py
@@ -735,7 +735,7 @@ class TestClass:
# Test with filter ID
aioresponse.get(
- re.compile(fr"{url}&filter=test_id&since=.*"),
+ re.compile(fr"{url}&filter=test_id&since=[\w\d_]*"),
status=200,
payload=self.sync_response
)
@@ -745,7 +745,7 @@ class TestClass:
# Test with filter dict
aioresponse.get(
- re.compile(url + r"&filter=" + quote("{}") + "&since=.*"),
+ re.compile(fr"{url}&filter=[\w\d%]*&since=[\w\d_]*"),
status=200,
payload=self.sync_response,
)
@@ -1793,7 +1793,7 @@ class TestClass:
session = ClientSession()
context = Context()
- params = TraceRequestChunkSentParams(chunk=b"x")
+ params = TraceRequestChunkSentParams(method="POST", url="test", chunk=b"x")
await on_request_chunk_sent(session, context, params)
assert monitor.transferred == 1
diff --git a/tox.ini b/tox.ini
index c33bb60..8f5862b 100644
--- a/tox.ini
+++ b/tox.ini
@@ -1,18 +1,12 @@
-# content of: tox.ini , put in same dir as setup.py
[tox]
-envlist = py36,py37,py38,coverage,mypy
-[testenv]
-basepython =
- py36: python3.6
- py37: python3.7
- py38: python3.8
+envlist = coverage,mypy
+isolated_build = True
-deps = -rtest-requirements.txt
-install_command = pip install {opts} {packages}
+[testenv]
+deps = -r test-requirements.txt
-passenv = TOXENV CI TRAVIS TRAVIS_*
+passenv = TOXENV CI
commands = pytest --benchmark-disable
-usedevelop = True
[testenv:mypy]
basepython = python3.8
--
2.26.2

View File

@ -1,7 +1,7 @@
# Contributor: Antoine Fontaine <antoine.fontaine@epfl.ch>
# Maintainer: Antoine Fontaine <antoine.fontaine@epfl.ch>
pkgname=py3-matrix-nio
pkgver=0.15.1
pkgver=0.15.2
pkgrel=0
pkgdesc="Python interface to DBus notifications"
url="https://github.com/poljar/matrix-nio"
@ -36,8 +36,13 @@ checkdepends="
py3-pytest-cov
py3-pytest-isort
"
makedepends="py3-setuptools"
source="matrix-nio-$pkgver.tar.gz::https://github.com/poljar/matrix-nio/archive/$pkgver.tar.gz"
makedepends="
py3-setuptools
"
source="
matrix-nio-$pkgver.tar.gz::https://github.com/poljar/matrix-nio/archive/$pkgver.tar.gz
0001-CI-Fix-our-tox-setup-for-github-CI.patch
"
builddir="$srcdir/matrix-nio-$pkgver"
options="net" # the testsuite uses example.org's fake matrix server
@ -53,4 +58,5 @@ package() {
python3 setup.py install --prefix=/usr --root="$pkgdir"
}
sha512sums="0bcc0321e1e679e02257062ae3390a677bf5d23bf8b8ddb967037aea4120c80ed5ea37060b574e7d830b467f2b581864331db393ff4977df6fc865863f8dbd67 matrix-nio-0.15.1.tar.gz"
sha512sums="2805ac328425b5686320da969838d865d6ab17ede59b372ff9c04923ac246aa86a552e480b305c4769524f599393d6cc4a7ff75bae250d3cfebff8b8b9ed710e matrix-nio-0.15.2.tar.gz
6f339ccccefda38fac0c21b195eaf84d18a03d42a5fc635213d4e786e4501a5535281bc244180797b3280b9440f6ab67fd764bdd2e522eb9da9a098502067f23 0001-CI-Fix-our-tox-setup-for-github-CI.patch"