summaryrefslogtreecommitdiff
path: root/dev-python/pytest-trio
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-02-03 17:44:31 +0000
committerV3n3RiX <venerix@koprulu.sector>2024-02-03 17:44:31 +0000
commitc44123f79f40edf5fe3d4b0d211d6aa68542abd2 (patch)
tree838edea4b7f78b425eacf44f29775ffd0bc671e3 /dev-python/pytest-trio
parent79e5685b8db7602719212510574962664af2b036 (diff)
gentoo auto-resync : 03:02:2024 - 17:44:31
Diffstat (limited to 'dev-python/pytest-trio')
-rw-r--r--dev-python/pytest-trio/Manifest5
-rw-r--r--dev-python/pytest-trio/files/pytest-trio-0.8.0-test.patch52
-rw-r--r--dev-python/pytest-trio/metadata.xml4
-rw-r--r--dev-python/pytest-trio/pytest-trio-0.8.0-r1.ebuild (renamed from dev-python/pytest-trio/pytest-trio-0.8.0.ebuild)7
4 files changed, 65 insertions, 3 deletions
diff --git a/dev-python/pytest-trio/Manifest b/dev-python/pytest-trio/Manifest
index cee564600e3a..1318d7976ac3 100644
--- a/dev-python/pytest-trio/Manifest
+++ b/dev-python/pytest-trio/Manifest
@@ -1,3 +1,4 @@
+AUX pytest-trio-0.8.0-test.patch 1813 BLAKE2B 5c9feb01f75dbb302d4f4ab833affc5c02e9a2dde53e9c49425ac4acec25b25a8d9e5f7b68f00e00268841b6072c5aae9439ce2747c1d3cc7f9403d47631a5dd SHA512 bdd5457127949bb7d36e4427140ce99db3c914f26dcdea607ca12947f273487d3320206741a669e27f4fb34f8980f1842d87110a4b7cc460c6ffb5605a6f760f
DIST pytest-trio-0.8.0.tar.gz 46525 BLAKE2B 54660dc9b021af0ec18eace72f053223d16e89635c74d71329a005e5fee3bf6e2055cc29412d9de7443b2594ee53d68890d1e30ed7c94560c355d4342bb3d035 SHA512 79141021633b7b2d8a840d7eaf6a3447bccd59d1bd4909e7feba88a9ae8244376f281b64fde4333b5a575957e3f73028e389a9abf0d19a35417f15c47eeccd05
-EBUILD pytest-trio-0.8.0.ebuild 1325 BLAKE2B 9e8a99f764e1f79ad49b5bd02b57144186553e1710b31ba7835e3406af5981a859025b2cda68107e14e25b37bb56dfa30b8d7adce2f6599be595381277a19df5 SHA512 25972f7b6113cbacbf0cbd021bba28bf65fbc00f39f20baa898eb90270102bfb48c017ff17b56ebeba2ce814e85fabb245aeb2f33b2dd36525ec2e7a8eb43ce1
-MISC metadata.xml 420 BLAKE2B 42bae65fb9b23797c96bdc057faebc577f89f0c83f27031079176c2a122cb15e70eb5937a8cd52d09b3d7c5a7d16f62768452c87523fdb0fad876b63836c171d SHA512 5dd3d9e96df753347ccdf41428b5faa1df217985d7cfda1d7bd933fdf755f8f254fd9fa80e7cbeedff318327c4ff4257d8598a17def8ee6144d27aa89305cc3d
+EBUILD pytest-trio-0.8.0-r1.ebuild 1434 BLAKE2B 9f502cbcce71bcbf7e734b983a1743d0312837c017e88cebea10a2b55a117347a447af9f703cde84d593182c0f7c8c1c29e13ad3c42a7223bdf1538f36fa0d04 SHA512 eb05be9855a36311053a93ef510fe61280f374b21f44ebc63b7742077c67d10d88e944b51893a190eae90bde7c7405d6d39ce027115e5fa186d29169b1c061aa
+MISC metadata.xml 521 BLAKE2B 330ebeab4ff6df94e8c813af8dd789aeced74dd28e673ea9458a95a0855007738f81c37acce03cde17c599ac6168e853d583565ac1a3bfd8fea96eb353236ebb SHA512 b4f2f3152d0a7d40d2c21311b5d2efe3593ee69df35c4b2c5653ae2c2ca7eb46dc0885fc8b97d44ff934c7d86209898d027c9ebb51221729fe1f3d912ffd3ae4
diff --git a/dev-python/pytest-trio/files/pytest-trio-0.8.0-test.patch b/dev-python/pytest-trio/files/pytest-trio-0.8.0-test.patch
new file mode 100644
index 000000000000..a65fd2aee071
--- /dev/null
+++ b/dev-python/pytest-trio/files/pytest-trio-0.8.0-test.patch
@@ -0,0 +1,52 @@
+From 9cda20bbb966fe1e4ae51921d566c668654ee5e1 Mon Sep 17 00:00:00 2001
+From: Vincent Vanlaer <vincent.vanlaer@skynet.be>
+Date: Sun, 3 Sep 2023 00:00:54 +0200
+Subject: [PATCH 1/2] Remove trio.tests import causing warnings
+
+It is deprecated and the replacement is made private as trio._tests.
+While we could be using that, this commit copies over the one relevant
+function that is actually necessary. The other two imports just repeat
+tests that are already in trio and do not need repeating here.
+---
+ .../_tests/test_hypothesis_interaction.py | 21 ++++++++++++++-----
+ 1 file changed, 16 insertions(+), 5 deletions(-)
+
+diff --git a/pytest_trio/_tests/test_hypothesis_interaction.py b/pytest_trio/_tests/test_hypothesis_interaction.py
+index 75aa9f7..cb95a96 100644
+--- a/pytest_trio/_tests/test_hypothesis_interaction.py
++++ b/pytest_trio/_tests/test_hypothesis_interaction.py
+@@ -1,10 +1,5 @@
+ import pytest
+ import trio
+-from trio.tests.test_scheduler_determinism import (
+- scheduler_trace,
+- test_the_trio_scheduler_is_not_deterministic,
+- test_the_trio_scheduler_is_deterministic_if_seeded,
+-)
+ from hypothesis import given, settings, strategies as st
+
+ from pytest_trio.plugin import _trio_test_runner_factory
+@@ -38,6 +33,22 @@ async def test_mark_and_parametrize(x, y):
+ assert y in (1, 2)
+
+
++async def scheduler_trace():
++ """Returns a scheduler-dependent value we can use to check determinism."""
++ trace = []
++
++ async def tracer(name):
++ for i in range(10):
++ trace.append((name, i))
++ await trio.sleep(0)
++
++ async with trio.open_nursery() as nursery:
++ for i in range(5):
++ nursery.start_soon(tracer, i)
++
++ return tuple(trace)
++
++
+ def test_the_trio_scheduler_is_deterministic_under_hypothesis():
+ traces = []
+
+
diff --git a/dev-python/pytest-trio/metadata.xml b/dev-python/pytest-trio/metadata.xml
index 485f7038656c..a0206c25c87f 100644
--- a/dev-python/pytest-trio/metadata.xml
+++ b/dev-python/pytest-trio/metadata.xml
@@ -5,6 +5,10 @@
<email>andrewammerlaan@gentoo.org</email>
<name>Andrew Ammerlaan</name>
</maintainer>
+ <maintainer type="project">
+ <email>python@gentoo.org</email>
+ <name>Python</name>
+ </maintainer>
<stabilize-allarches/>
<upstream>
<remote-id type="github">python-trio/pytest-trio</remote-id>
diff --git a/dev-python/pytest-trio/pytest-trio-0.8.0.ebuild b/dev-python/pytest-trio/pytest-trio-0.8.0-r1.ebuild
index 4159233367eb..a73c87ac4e00 100644
--- a/dev-python/pytest-trio/pytest-trio-0.8.0.ebuild
+++ b/dev-python/pytest-trio/pytest-trio-0.8.0-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -37,6 +37,11 @@ distutils_enable_sphinx docs/source \
dev-python/sphinxcontrib-trio
python_prepare_all() {
+ local PATCHES=(
+ # https://github.com/python-trio/pytest-trio/pull/135
+ "${FILESDIR}/${P}-test.patch"
+ )
+
# Defining 'pytest_plugins' in a non-top-level conftest is no longer supported:
mv pytest_trio/_tests/conftest.py conftest.py || die
distutils-r1_python_prepare_all