Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] python3-jaraco.text: update to 3.9.1.
@ 2022-08-30 19:08 icp1994
  2022-09-02 19:50 ` classabbyamp
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: icp1994 @ 2022-08-30 19:08 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 572 bytes --]

There is a new pull request by icp1994 against master on the void-packages repository

https://github.com/icp1994/void-packages python3-jaraco.text
https://github.com/void-linux/void-packages/pull/38991

python3-jaraco.text: update to 3.9.1.
#### Testing the changes
- I tested the changes in this PR: **briefly**

#### Local build testing
- I built this PR locally for my native architecture, x86_64

#### Rev dev checks
- [x] python3-jaraco.collections
- [x] python3-irc

A patch file from https://github.com/void-linux/void-packages/pull/38991.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-python3-jaraco.text-38991.patch --]
[-- Type: text/x-diff, Size: 13993 bytes --]

From 13d1b4bae3aefb4000d3d05b12b776f57bca0902 Mon Sep 17 00:00:00 2001
From: icp <pangolin@vivaldi.net>
Date: Wed, 31 Aug 2022 00:13:08 +0530
Subject: [PATCH 1/4] New package: python3-pydantic-1.10.0

---
 srcpkgs/python3-pydantic/template | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
 create mode 100644 srcpkgs/python3-pydantic/template

diff --git a/srcpkgs/python3-pydantic/template b/srcpkgs/python3-pydantic/template
new file mode 100644
index 000000000000..62036cc51138
--- /dev/null
+++ b/srcpkgs/python3-pydantic/template
@@ -0,0 +1,20 @@
+# Template file for 'python3-pydantic'
+pkgname=python3-pydantic
+version=1.10.0
+revision=1
+wrksrc=pydantic-${version}
+build_style=python3-module
+hostmakedepends="python3-setuptools"
+depends="python3-typing_extensions"
+checkdepends="${depends} python3-hypothesis python3-pytest-mock"
+short_desc="Data validation and settings management using python type hints"
+maintainer="icp <pangolin@vivaldi.net>"
+license="MIT"
+homepage="https://github.com/pydantic/pydantic"
+changelog="https://raw.githubusercontent.com/pydantic/pydantic/main/HISTORY.md"
+distfiles="${PYPI_SITE}/p/pydantic/pydantic-${version}.tar.gz"
+checksum=e13788fcad1baf5eb3236856b2a9a74f7dac6b3ea7ca1f60a4ad8bad4239cf4c
+
+post_install() {
+	vlicense LICENSE
+}

From d144cf39c296b1ee5047d4bcead45b754020042b Mon Sep 17 00:00:00 2001
From: icp <pangolin@vivaldi.net>
Date: Wed, 31 Aug 2022 00:13:14 +0530
Subject: [PATCH 2/4] New package: python3-inflect-6.0.0

---
 srcpkgs/python3-inflect/template | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
 create mode 100644 srcpkgs/python3-inflect/template

diff --git a/srcpkgs/python3-inflect/template b/srcpkgs/python3-inflect/template
new file mode 100644
index 000000000000..d8cb62fa1204
--- /dev/null
+++ b/srcpkgs/python3-inflect/template
@@ -0,0 +1,20 @@
+# Template file for 'python3-inflect'
+pkgname=python3-inflect
+version=6.0.0
+revision=1
+wrksrc=inflect-${version}
+build_style=python3-pep517
+hostmakedepends="python3-wheel python3-setuptools_scm"
+depends="python3-pydantic"
+checkdepends="${depends} python3-pytest-xdist"
+short_desc="Correctly generate plurals, ordinals; convert numbers to words"
+maintainer="icp <pangolin@vivaldi.net>"
+license="MIT"
+homepage="https://github.com/jaraco/inflect"
+changelog="https://raw.githubusercontent.com/jaraco/inflect/main/CHANGES.rst"
+distfiles="${PYPI_SITE}/i/inflect/inflect-${version}.tar.gz"
+checksum=0bc1516ec2725e2d8221707a612245093cb6f1cea209cfd8cbd4fc5e96fa6365
+
+post_install() {
+	vlicense LICENSE
+}

From 7b5ef5507a71b7115ccdfbe7d6b8b746f433a7e6 Mon Sep 17 00:00:00 2001
From: icp <pangolin@vivaldi.net>
Date: Wed, 31 Aug 2022 00:13:21 +0530
Subject: [PATCH 3/4] New package: python3-autocommand-2.2.1

---
 .../patches/fix-out-of-date-patterns.patch    | 285 ++++++++++++++++++
 srcpkgs/python3-autocommand/template          |  15 +
 2 files changed, 300 insertions(+)
 create mode 100644 srcpkgs/python3-autocommand/patches/fix-out-of-date-patterns.patch
 create mode 100644 srcpkgs/python3-autocommand/template

diff --git a/srcpkgs/python3-autocommand/patches/fix-out-of-date-patterns.patch b/srcpkgs/python3-autocommand/patches/fix-out-of-date-patterns.patch
new file mode 100644
index 000000000000..54593a9e94b1
--- /dev/null
+++ b/srcpkgs/python3-autocommand/patches/fix-out-of-date-patterns.patch
@@ -0,0 +1,285 @@
+From 031c9750c74e3313b954b09e3027aaa6595649bb Mon Sep 17 00:00:00 2001
+From: Nathan West <Lucretiel@gmail.com>
+Date: Thu, 18 Nov 2021 14:06:30 -0500
+Subject: [PATCH] Fix out of date patterns in autocommand
+
+- Use async def instead of asyncio.coroutine
+- Use create_task instead of asyncio.async
+- Use pytest.fixture instead of pytest.yield_fixture
+---
+ src/autocommand/autoasync.py |  6 +--
+ test/test_autoasync.py       | 95 ++++++++++++++++--------------------
+ test/test_autocommand.py     |  6 +--
+ 3 files changed, 49 insertions(+), 58 deletions(-)
+
+diff --git a/src/autocommand/autoasync.py b/src/autocommand/autoasync.py
+index 3c8ebdc..2e6e28a 100644
+--- a/src/autocommand/autoasync.py
++++ b/src/autocommand/autoasync.py
+@@ -20,7 +20,7 @@
+ from inspect import signature
+ 
+ 
+-def _launch_forever_coro(coro, args, kwargs, loop):
++async def _run_forever_coro(coro, args, kwargs, loop):
+     '''
+     This helper function launches an async main function that was tagged with
+     forever=True. There are two possibilities:
+@@ -48,7 +48,7 @@ def _launch_forever_coro(coro, args, kwargs, loop):
+     # forever=True feature from autoasync at some point in the future.
+     thing = coro(*args, **kwargs)
+     if iscoroutine(thing):
+-        loop.create_task(thing)
++        await thing
+ 
+ 
+ def autoasync(coro=None, *, loop=None, forever=False, pass_loop=False):
+@@ -127,7 +127,7 @@ def autoasync_wrapper(*args, **kwargs):
+             args, kwargs = bound_args.args, bound_args.kwargs
+ 
+         if forever:
+-            _launch_forever_coro(coro, args, kwargs, local_loop)
++            local_loop.create_task(_run_forever_coro(coro, args, kwargs, local_loop))
+             local_loop.run_forever()
+         else:
+             return local_loop.run_until_complete(coro(*args, **kwargs))
+diff --git a/test/test_autoasync.py b/test/test_autoasync.py
+index 6ffb782..dfeb019 100644
+--- a/test/test_autoasync.py
++++ b/test/test_autoasync.py
+@@ -20,6 +20,10 @@
+ asyncio = pytest.importorskip('asyncio')
+ autoasync = pytest.importorskip('autocommand.autoasync').autoasync
+ 
++class YieldOnce:
++    def __await__(self):
++        yield
++
+ 
+ @contextmanager
+ def temporary_context_loop(loop):
+@@ -35,7 +39,7 @@ def temporary_context_loop(loop):
+         asyncio.set_event_loop(old_loop)
+ 
+ 
+-@pytest.yield_fixture
++@pytest.fixture
+ def new_loop():
+     '''
+     Get a new event loop. The loop is closed afterwards
+@@ -44,7 +48,7 @@ def new_loop():
+         yield loop
+ 
+ 
+-@pytest.yield_fixture
++@pytest.fixture
+ def context_loop():
+     '''
+     Create a new event loop and set it as the current context event loop.
+@@ -63,29 +67,27 @@ def context_loop():
+ def test_basic_autoasync(context_loop):
+     data = set()
+ 
+-    @asyncio.coroutine
+-    def coro_1():
++    async def coro_1():
+         data.add(1)
+-        yield
++        await YieldOnce()
+         data.add(2)
+ 
+         return 1
+ 
+-    @asyncio.coroutine
+-    def coro_2():
++    async def coro_2():
+         data.add(3)
+-        yield
++        await YieldOnce()
+         data.add(4)
+ 
+         return 2
+ 
+     @autoasync
+-    def async_main():
+-        task1 = asyncio.async(coro_1())
+-        task2 = asyncio.async(coro_2())
++    async def async_main():
++        task1 = asyncio.create_task(coro_1())
++        task2 = asyncio.create_task(coro_2())
+ 
+-        result1 = yield from task1
+-        result2 = yield from task2
++        result1 = await task1
++        result2 = await task2
+ 
+         assert result1 == 1
+         assert result2 == 2
+@@ -99,19 +101,19 @@ def async_main():
+ def test_custom_loop(context_loop, new_loop):
+     did_bad_coro_run = False
+ 
+-    @asyncio.coroutine
+-    def bad_coro():
++    async def bad_coro():
+         nonlocal did_bad_coro_run
+         did_bad_coro_run = True
+-        yield
++        await YieldOnce()
+ 
+-    asyncio.async(bad_coro())
++    # TODO: this fires a "task wasn't awaited" warning; figure out how to
++    # supress
++    context_loop.create_task(bad_coro())
+ 
+     @autoasync(loop=new_loop)
+-    @asyncio.coroutine
+-    def async_main():
+-        yield
+-        yield
++    async def async_main():
++        await YieldOnce()
++        await YieldOnce()
+         return 3
+ 
+     assert async_main() == 3
+@@ -120,9 +122,7 @@ def async_main():
+ 
+ def test_pass_loop(context_loop):
+     @autoasync(pass_loop=True)
+-    @asyncio.coroutine
+-    def async_main(loop):
+-        yield
++    async def async_main(loop):
+         return loop
+ 
+     assert async_main() is asyncio.get_event_loop()
+@@ -134,9 +134,7 @@ def test_pass_loop_prior_argument(context_loop):
+     still passed correctly
+     '''
+     @autoasync(pass_loop=True)
+-    @asyncio.coroutine
+-    def async_main(loop, argument):
+-        yield
++    async def async_main(loop, argument):
+         return loop, argument
+ 
+     loop, value = async_main(10)
+@@ -146,9 +144,8 @@ def async_main(loop, argument):
+ 
+ def test_pass_loop_kwarg_only(context_loop):
+     @autoasync(pass_loop=True)
+-    @asyncio.coroutine
+-    def async_main(*, loop, argument):
+-        yield
++    async def async_main(*, loop, argument):
++        await YieldOnce()
+         return loop, argument
+ 
+     loop, value = async_main(argument=10)
+@@ -157,48 +154,43 @@ def async_main(*, loop, argument):
+ 
+ 
+ def test_run_forever(context_loop):
+-    @asyncio.coroutine
+-    def stop_loop_after(t):
+-        yield from asyncio.sleep(t)
++    async def stop_loop_after(t):
++        await asyncio.sleep(t)
+         context_loop.stop()
+ 
+     retrieved_value = False
+ 
+-    @asyncio.coroutine
+-    def set_value_after(t):
++    async def set_value_after(t):
+         nonlocal retrieved_value
+-        yield from asyncio.sleep(t)
++        await asyncio.sleep(t)
+         retrieved_value = True
+ 
+     @autoasync(forever=True)
+-    @asyncio.coroutine
+-    def async_main():
+-        asyncio.async(set_value_after(0.1))
+-        asyncio.async(stop_loop_after(0.2))
+-        yield
++    async def async_main():
++        asyncio.create_task(set_value_after(0.1))
++        asyncio.create_task(stop_loop_after(0.2))
++        await YieldOnce()
+ 
+     async_main()
+     assert retrieved_value
+ 
+ 
+ def test_run_forever_func(context_loop):
+-    @asyncio.coroutine
+-    def stop_loop_after(t):
+-        yield from asyncio.sleep(t)
++    async def stop_loop_after(t):
++        await asyncio.sleep(t)
+         context_loop.stop()
+ 
+     retrieved_value = False
+ 
+-    @asyncio.coroutine
+-    def set_value_after(t):
++    async def set_value_after(t):
+         nonlocal retrieved_value
+-        yield from asyncio.sleep(t)
++        await  asyncio.sleep(t)
+         retrieved_value = True
+ 
+     @autoasync(forever=True)
+     def main_func():
+-        asyncio.async(set_value_after(0.1))
+-        asyncio.async(stop_loop_after(0.2))
++        asyncio.create_task(set_value_after(0.1))
++        asyncio.create_task(stop_loop_after(0.2))
+ 
+     main_func()
+     assert retrieved_value
+@@ -212,9 +204,8 @@ def test_defered_loop(context_loop, new_loop):
+     called.
+     '''
+     @autoasync(pass_loop=True)
+-    @asyncio.coroutine
+-    def async_main(loop):
+-        yield
++    async def async_main(loop):
++        await YieldOnce()
+         return loop
+ 
+     with temporary_context_loop(new_loop):
+diff --git a/test/test_autocommand.py b/test/test_autocommand.py
+index 6531146..791e1cc 100644
+--- a/test/test_autocommand.py
++++ b/test/test_autocommand.py
+@@ -41,7 +41,7 @@ def _asyncio_unavailable():
+     reason="async tests require asyncio (python3.4+)")
+ 
+ 
+-@pytest.yield_fixture
++@pytest.fixture
+ def patched_autoparse():
+     with patch.object(
+             autocommand_module,
+@@ -50,7 +50,7 @@ def patched_autoparse():
+         yield autoparse
+ 
+ 
+-@pytest.yield_fixture
++@pytest.fixture
+ def patched_autoasync():
+     with patch.object(
+             autocommand_module,
+@@ -62,7 +62,7 @@ def patched_autoasync():
+         yield autoasync
+ 
+ 
+-@pytest.yield_fixture
++@pytest.fixture
+ def patched_automain():
+     with patch.object(
+             autocommand_module,
diff --git a/srcpkgs/python3-autocommand/template b/srcpkgs/python3-autocommand/template
new file mode 100644
index 000000000000..099b1970a92b
--- /dev/null
+++ b/srcpkgs/python3-autocommand/template
@@ -0,0 +1,15 @@
+# Template file for 'python3-autocommand'
+pkgname=python3-autocommand
+version=2.2.1
+revision=1
+wrksrc=autocommand-${version}
+build_style=python3-module
+hostmakedepends="python3-setuptools"
+depends="python3"
+checkdepends="python3-pytest-xdist"
+short_desc="Python library to create a command-line program from a function"
+maintainer="icp <pangolin@vivaldi.net>"
+license="LGPL-3.0-only"
+homepage="https://github.com/Lucretiel/autocommand"
+distfiles="${PYPI_SITE}/a/autocommand/autocommand-${version}.tar.gz"
+checksum=fed420e9d02745821a782971b583c6970259ee0b229be2a0a401e1467a4f170f

From 397f8406202fe30fc42063be3c77717bf0089ea6 Mon Sep 17 00:00:00 2001
From: icp <pangolin@vivaldi.net>
Date: Wed, 31 Aug 2022 00:13:27 +0530
Subject: [PATCH 4/4] python3-jaraco.text: update to 3.9.1.

---
 srcpkgs/python3-jaraco.text/template | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/python3-jaraco.text/template b/srcpkgs/python3-jaraco.text/template
index cba91bbe6237..f63d4e0a8459 100644
--- a/srcpkgs/python3-jaraco.text/template
+++ b/srcpkgs/python3-jaraco.text/template
@@ -1,11 +1,12 @@
 # Template file for 'python3-jaraco.text'
 pkgname=python3-jaraco.text
-version=3.7.0
+version=3.9.1
 revision=1
 wrksrc="jaraco.text-${version}"
 build_style=python3-pep517
 hostmakedepends="python3-wheel python3-setuptools_scm"
-depends="python3-jaraco.functools python3-six python3-jaraco.context"
+depends="python3-jaraco.functools python3-jaraco.context python3-autocommand
+ python3-inflect python3-more-itertools"
 checkdepends="$depends python3-pytest"
 short_desc="Module for text manipulation (Python3)"
 maintainer="bra1nwave <bra1nwave@protonmail.com>"
@@ -13,7 +14,7 @@ license="MIT"
 homepage="https://github.com/jaraco/jaraco.text"
 changelog="https://raw.githubusercontent.com/jaraco/jaraco.text/master/CHANGES.rst"
 distfiles="${PYPI_SITE}/j/jaraco.text/jaraco.text-${version}.tar.gz"
-checksum=a7f9cc1b44a5f3096a216cbd130b650c7a6b2c9f8005b000ae97f329239a7c00
+checksum=d57cd4448a588020318425e04194e897f96fc23b92b82ff9308a24d5cbf2b3fb
 
 post_install() {
 	vlicense LICENSE

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: python3-jaraco.text: update to 3.9.1.
  2022-08-30 19:08 [PR PATCH] python3-jaraco.text: update to 3.9.1 icp1994
@ 2022-09-02 19:50 ` classabbyamp
  2022-09-02 19:59 ` [PR PATCH] [Updated] " icp1994
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: classabbyamp @ 2022-09-02 19:50 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 207 bytes --]

New comment by classabbyamp on void-packages repository

https://github.com/void-linux/void-packages/pull/38991#issuecomment-1235846274

Comment:
heh looks like someone beat you to pydantic. can you rebase?

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PR PATCH] [Updated] python3-jaraco.text: update to 3.9.1.
  2022-08-30 19:08 [PR PATCH] python3-jaraco.text: update to 3.9.1 icp1994
  2022-09-02 19:50 ` classabbyamp
@ 2022-09-02 19:59 ` icp1994
  2022-09-02 20:07 ` icp1994
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: icp1994 @ 2022-09-02 19:59 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 577 bytes --]

There is an updated pull request by icp1994 against master on the void-packages repository

https://github.com/icp1994/void-packages python3-jaraco.text
https://github.com/void-linux/void-packages/pull/38991

python3-jaraco.text: update to 3.9.1.
#### Testing the changes
- I tested the changes in this PR: **briefly**

#### Local build testing
- I built this PR locally for my native architecture, x86_64

#### Rev dev checks
- [x] python3-jaraco.collections
- [x] python3-irc

A patch file from https://github.com/void-linux/void-packages/pull/38991.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-python3-jaraco.text-38991.patch --]
[-- Type: text/x-diff, Size: 12693 bytes --]

From 6d91afc51d217327bcf6f77043a287c45e06df27 Mon Sep 17 00:00:00 2001
From: icp <pangolin@vivaldi.net>
Date: Wed, 31 Aug 2022 00:13:14 +0530
Subject: [PATCH 1/3] New package: python3-inflect-6.0.0

---
 srcpkgs/python3-inflect/template | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
 create mode 100644 srcpkgs/python3-inflect/template

diff --git a/srcpkgs/python3-inflect/template b/srcpkgs/python3-inflect/template
new file mode 100644
index 000000000000..d8cb62fa1204
--- /dev/null
+++ b/srcpkgs/python3-inflect/template
@@ -0,0 +1,20 @@
+# Template file for 'python3-inflect'
+pkgname=python3-inflect
+version=6.0.0
+revision=1
+wrksrc=inflect-${version}
+build_style=python3-pep517
+hostmakedepends="python3-wheel python3-setuptools_scm"
+depends="python3-pydantic"
+checkdepends="${depends} python3-pytest-xdist"
+short_desc="Correctly generate plurals, ordinals; convert numbers to words"
+maintainer="icp <pangolin@vivaldi.net>"
+license="MIT"
+homepage="https://github.com/jaraco/inflect"
+changelog="https://raw.githubusercontent.com/jaraco/inflect/main/CHANGES.rst"
+distfiles="${PYPI_SITE}/i/inflect/inflect-${version}.tar.gz"
+checksum=0bc1516ec2725e2d8221707a612245093cb6f1cea209cfd8cbd4fc5e96fa6365
+
+post_install() {
+	vlicense LICENSE
+}

From 71b4262c9597e277b402dc5b68d5715766aceadf Mon Sep 17 00:00:00 2001
From: icp <pangolin@vivaldi.net>
Date: Wed, 31 Aug 2022 00:13:21 +0530
Subject: [PATCH 2/3] New package: python3-autocommand-2.2.1

---
 .../patches/fix-out-of-date-patterns.patch    | 285 ++++++++++++++++++
 srcpkgs/python3-autocommand/template          |  15 +
 2 files changed, 300 insertions(+)
 create mode 100644 srcpkgs/python3-autocommand/patches/fix-out-of-date-patterns.patch
 create mode 100644 srcpkgs/python3-autocommand/template

diff --git a/srcpkgs/python3-autocommand/patches/fix-out-of-date-patterns.patch b/srcpkgs/python3-autocommand/patches/fix-out-of-date-patterns.patch
new file mode 100644
index 000000000000..54593a9e94b1
--- /dev/null
+++ b/srcpkgs/python3-autocommand/patches/fix-out-of-date-patterns.patch
@@ -0,0 +1,285 @@
+From 031c9750c74e3313b954b09e3027aaa6595649bb Mon Sep 17 00:00:00 2001
+From: Nathan West <Lucretiel@gmail.com>
+Date: Thu, 18 Nov 2021 14:06:30 -0500
+Subject: [PATCH] Fix out of date patterns in autocommand
+
+- Use async def instead of asyncio.coroutine
+- Use create_task instead of asyncio.async
+- Use pytest.fixture instead of pytest.yield_fixture
+---
+ src/autocommand/autoasync.py |  6 +--
+ test/test_autoasync.py       | 95 ++++++++++++++++--------------------
+ test/test_autocommand.py     |  6 +--
+ 3 files changed, 49 insertions(+), 58 deletions(-)
+
+diff --git a/src/autocommand/autoasync.py b/src/autocommand/autoasync.py
+index 3c8ebdc..2e6e28a 100644
+--- a/src/autocommand/autoasync.py
++++ b/src/autocommand/autoasync.py
+@@ -20,7 +20,7 @@
+ from inspect import signature
+ 
+ 
+-def _launch_forever_coro(coro, args, kwargs, loop):
++async def _run_forever_coro(coro, args, kwargs, loop):
+     '''
+     This helper function launches an async main function that was tagged with
+     forever=True. There are two possibilities:
+@@ -48,7 +48,7 @@ def _launch_forever_coro(coro, args, kwargs, loop):
+     # forever=True feature from autoasync at some point in the future.
+     thing = coro(*args, **kwargs)
+     if iscoroutine(thing):
+-        loop.create_task(thing)
++        await thing
+ 
+ 
+ def autoasync(coro=None, *, loop=None, forever=False, pass_loop=False):
+@@ -127,7 +127,7 @@ def autoasync_wrapper(*args, **kwargs):
+             args, kwargs = bound_args.args, bound_args.kwargs
+ 
+         if forever:
+-            _launch_forever_coro(coro, args, kwargs, local_loop)
++            local_loop.create_task(_run_forever_coro(coro, args, kwargs, local_loop))
+             local_loop.run_forever()
+         else:
+             return local_loop.run_until_complete(coro(*args, **kwargs))
+diff --git a/test/test_autoasync.py b/test/test_autoasync.py
+index 6ffb782..dfeb019 100644
+--- a/test/test_autoasync.py
++++ b/test/test_autoasync.py
+@@ -20,6 +20,10 @@
+ asyncio = pytest.importorskip('asyncio')
+ autoasync = pytest.importorskip('autocommand.autoasync').autoasync
+ 
++class YieldOnce:
++    def __await__(self):
++        yield
++
+ 
+ @contextmanager
+ def temporary_context_loop(loop):
+@@ -35,7 +39,7 @@ def temporary_context_loop(loop):
+         asyncio.set_event_loop(old_loop)
+ 
+ 
+-@pytest.yield_fixture
++@pytest.fixture
+ def new_loop():
+     '''
+     Get a new event loop. The loop is closed afterwards
+@@ -44,7 +48,7 @@ def new_loop():
+         yield loop
+ 
+ 
+-@pytest.yield_fixture
++@pytest.fixture
+ def context_loop():
+     '''
+     Create a new event loop and set it as the current context event loop.
+@@ -63,29 +67,27 @@ def context_loop():
+ def test_basic_autoasync(context_loop):
+     data = set()
+ 
+-    @asyncio.coroutine
+-    def coro_1():
++    async def coro_1():
+         data.add(1)
+-        yield
++        await YieldOnce()
+         data.add(2)
+ 
+         return 1
+ 
+-    @asyncio.coroutine
+-    def coro_2():
++    async def coro_2():
+         data.add(3)
+-        yield
++        await YieldOnce()
+         data.add(4)
+ 
+         return 2
+ 
+     @autoasync
+-    def async_main():
+-        task1 = asyncio.async(coro_1())
+-        task2 = asyncio.async(coro_2())
++    async def async_main():
++        task1 = asyncio.create_task(coro_1())
++        task2 = asyncio.create_task(coro_2())
+ 
+-        result1 = yield from task1
+-        result2 = yield from task2
++        result1 = await task1
++        result2 = await task2
+ 
+         assert result1 == 1
+         assert result2 == 2
+@@ -99,19 +101,19 @@ def async_main():
+ def test_custom_loop(context_loop, new_loop):
+     did_bad_coro_run = False
+ 
+-    @asyncio.coroutine
+-    def bad_coro():
++    async def bad_coro():
+         nonlocal did_bad_coro_run
+         did_bad_coro_run = True
+-        yield
++        await YieldOnce()
+ 
+-    asyncio.async(bad_coro())
++    # TODO: this fires a "task wasn't awaited" warning; figure out how to
++    # supress
++    context_loop.create_task(bad_coro())
+ 
+     @autoasync(loop=new_loop)
+-    @asyncio.coroutine
+-    def async_main():
+-        yield
+-        yield
++    async def async_main():
++        await YieldOnce()
++        await YieldOnce()
+         return 3
+ 
+     assert async_main() == 3
+@@ -120,9 +122,7 @@ def async_main():
+ 
+ def test_pass_loop(context_loop):
+     @autoasync(pass_loop=True)
+-    @asyncio.coroutine
+-    def async_main(loop):
+-        yield
++    async def async_main(loop):
+         return loop
+ 
+     assert async_main() is asyncio.get_event_loop()
+@@ -134,9 +134,7 @@ def test_pass_loop_prior_argument(context_loop):
+     still passed correctly
+     '''
+     @autoasync(pass_loop=True)
+-    @asyncio.coroutine
+-    def async_main(loop, argument):
+-        yield
++    async def async_main(loop, argument):
+         return loop, argument
+ 
+     loop, value = async_main(10)
+@@ -146,9 +144,8 @@ def async_main(loop, argument):
+ 
+ def test_pass_loop_kwarg_only(context_loop):
+     @autoasync(pass_loop=True)
+-    @asyncio.coroutine
+-    def async_main(*, loop, argument):
+-        yield
++    async def async_main(*, loop, argument):
++        await YieldOnce()
+         return loop, argument
+ 
+     loop, value = async_main(argument=10)
+@@ -157,48 +154,43 @@ def async_main(*, loop, argument):
+ 
+ 
+ def test_run_forever(context_loop):
+-    @asyncio.coroutine
+-    def stop_loop_after(t):
+-        yield from asyncio.sleep(t)
++    async def stop_loop_after(t):
++        await asyncio.sleep(t)
+         context_loop.stop()
+ 
+     retrieved_value = False
+ 
+-    @asyncio.coroutine
+-    def set_value_after(t):
++    async def set_value_after(t):
+         nonlocal retrieved_value
+-        yield from asyncio.sleep(t)
++        await asyncio.sleep(t)
+         retrieved_value = True
+ 
+     @autoasync(forever=True)
+-    @asyncio.coroutine
+-    def async_main():
+-        asyncio.async(set_value_after(0.1))
+-        asyncio.async(stop_loop_after(0.2))
+-        yield
++    async def async_main():
++        asyncio.create_task(set_value_after(0.1))
++        asyncio.create_task(stop_loop_after(0.2))
++        await YieldOnce()
+ 
+     async_main()
+     assert retrieved_value
+ 
+ 
+ def test_run_forever_func(context_loop):
+-    @asyncio.coroutine
+-    def stop_loop_after(t):
+-        yield from asyncio.sleep(t)
++    async def stop_loop_after(t):
++        await asyncio.sleep(t)
+         context_loop.stop()
+ 
+     retrieved_value = False
+ 
+-    @asyncio.coroutine
+-    def set_value_after(t):
++    async def set_value_after(t):
+         nonlocal retrieved_value
+-        yield from asyncio.sleep(t)
++        await  asyncio.sleep(t)
+         retrieved_value = True
+ 
+     @autoasync(forever=True)
+     def main_func():
+-        asyncio.async(set_value_after(0.1))
+-        asyncio.async(stop_loop_after(0.2))
++        asyncio.create_task(set_value_after(0.1))
++        asyncio.create_task(stop_loop_after(0.2))
+ 
+     main_func()
+     assert retrieved_value
+@@ -212,9 +204,8 @@ def test_defered_loop(context_loop, new_loop):
+     called.
+     '''
+     @autoasync(pass_loop=True)
+-    @asyncio.coroutine
+-    def async_main(loop):
+-        yield
++    async def async_main(loop):
++        await YieldOnce()
+         return loop
+ 
+     with temporary_context_loop(new_loop):
+diff --git a/test/test_autocommand.py b/test/test_autocommand.py
+index 6531146..791e1cc 100644
+--- a/test/test_autocommand.py
++++ b/test/test_autocommand.py
+@@ -41,7 +41,7 @@ def _asyncio_unavailable():
+     reason="async tests require asyncio (python3.4+)")
+ 
+ 
+-@pytest.yield_fixture
++@pytest.fixture
+ def patched_autoparse():
+     with patch.object(
+             autocommand_module,
+@@ -50,7 +50,7 @@ def patched_autoparse():
+         yield autoparse
+ 
+ 
+-@pytest.yield_fixture
++@pytest.fixture
+ def patched_autoasync():
+     with patch.object(
+             autocommand_module,
+@@ -62,7 +62,7 @@ def patched_autoasync():
+         yield autoasync
+ 
+ 
+-@pytest.yield_fixture
++@pytest.fixture
+ def patched_automain():
+     with patch.object(
+             autocommand_module,
diff --git a/srcpkgs/python3-autocommand/template b/srcpkgs/python3-autocommand/template
new file mode 100644
index 000000000000..099b1970a92b
--- /dev/null
+++ b/srcpkgs/python3-autocommand/template
@@ -0,0 +1,15 @@
+# Template file for 'python3-autocommand'
+pkgname=python3-autocommand
+version=2.2.1
+revision=1
+wrksrc=autocommand-${version}
+build_style=python3-module
+hostmakedepends="python3-setuptools"
+depends="python3"
+checkdepends="python3-pytest-xdist"
+short_desc="Python library to create a command-line program from a function"
+maintainer="icp <pangolin@vivaldi.net>"
+license="LGPL-3.0-only"
+homepage="https://github.com/Lucretiel/autocommand"
+distfiles="${PYPI_SITE}/a/autocommand/autocommand-${version}.tar.gz"
+checksum=fed420e9d02745821a782971b583c6970259ee0b229be2a0a401e1467a4f170f

From f25ab3c56c6534830a214387ac836e67191dbdd9 Mon Sep 17 00:00:00 2001
From: icp <pangolin@vivaldi.net>
Date: Wed, 31 Aug 2022 00:13:27 +0530
Subject: [PATCH 3/3] python3-jaraco.text: update to 3.9.1.

---
 srcpkgs/python3-jaraco.text/template | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/python3-jaraco.text/template b/srcpkgs/python3-jaraco.text/template
index cba91bbe6237..f63d4e0a8459 100644
--- a/srcpkgs/python3-jaraco.text/template
+++ b/srcpkgs/python3-jaraco.text/template
@@ -1,11 +1,12 @@
 # Template file for 'python3-jaraco.text'
 pkgname=python3-jaraco.text
-version=3.7.0
+version=3.9.1
 revision=1
 wrksrc="jaraco.text-${version}"
 build_style=python3-pep517
 hostmakedepends="python3-wheel python3-setuptools_scm"
-depends="python3-jaraco.functools python3-six python3-jaraco.context"
+depends="python3-jaraco.functools python3-jaraco.context python3-autocommand
+ python3-inflect python3-more-itertools"
 checkdepends="$depends python3-pytest"
 short_desc="Module for text manipulation (Python3)"
 maintainer="bra1nwave <bra1nwave@protonmail.com>"
@@ -13,7 +14,7 @@ license="MIT"
 homepage="https://github.com/jaraco/jaraco.text"
 changelog="https://raw.githubusercontent.com/jaraco/jaraco.text/master/CHANGES.rst"
 distfiles="${PYPI_SITE}/j/jaraco.text/jaraco.text-${version}.tar.gz"
-checksum=a7f9cc1b44a5f3096a216cbd130b650c7a6b2c9f8005b000ae97f329239a7c00
+checksum=d57cd4448a588020318425e04194e897f96fc23b92b82ff9308a24d5cbf2b3fb
 
 post_install() {
 	vlicense LICENSE

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: python3-jaraco.text: update to 3.9.1.
  2022-08-30 19:08 [PR PATCH] python3-jaraco.text: update to 3.9.1 icp1994
  2022-09-02 19:50 ` classabbyamp
  2022-09-02 19:59 ` [PR PATCH] [Updated] " icp1994
@ 2022-09-02 20:07 ` icp1994
  2022-09-03  4:57 ` classabbyamp
  2022-09-03  5:01 ` [PR PATCH] [Merged]: " classabbyamp
  4 siblings, 0 replies; 6+ messages in thread
From: icp1994 @ 2022-09-02 20:07 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 277 bytes --]

New comment by icp1994 on void-packages repository

https://github.com/void-linux/void-packages/pull/38991#issuecomment-1235858461

Comment:
I dropped that commit with a local rebase and then pulled from upstream. Don't know why it would fail the CI while it worked last time.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: python3-jaraco.text: update to 3.9.1.
  2022-08-30 19:08 [PR PATCH] python3-jaraco.text: update to 3.9.1 icp1994
                   ` (2 preceding siblings ...)
  2022-09-02 20:07 ` icp1994
@ 2022-09-03  4:57 ` classabbyamp
  2022-09-03  5:01 ` [PR PATCH] [Merged]: " classabbyamp
  4 siblings, 0 replies; 6+ messages in thread
From: classabbyamp @ 2022-09-03  4:57 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 166 bytes --]

New comment by classabbyamp on void-packages repository

https://github.com/void-linux/void-packages/pull/38991#issuecomment-1236049160

Comment:
it's not your fault

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PR PATCH] [Merged]: python3-jaraco.text: update to 3.9.1.
  2022-08-30 19:08 [PR PATCH] python3-jaraco.text: update to 3.9.1 icp1994
                   ` (3 preceding siblings ...)
  2022-09-03  4:57 ` classabbyamp
@ 2022-09-03  5:01 ` classabbyamp
  4 siblings, 0 replies; 6+ messages in thread
From: classabbyamp @ 2022-09-03  5:01 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 409 bytes --]

There's a merged pull request on the void-packages repository

python3-jaraco.text: update to 3.9.1.
https://github.com/void-linux/void-packages/pull/38991

Description:
#### Testing the changes
- I tested the changes in this PR: **briefly**

#### Local build testing
- I built this PR locally for my native architecture, x86_64

#### Rev dev checks
- [x] python3-jaraco.collections
- [x] python3-irc

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-09-03  5:01 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-30 19:08 [PR PATCH] python3-jaraco.text: update to 3.9.1 icp1994
2022-09-02 19:50 ` classabbyamp
2022-09-02 19:59 ` [PR PATCH] [Updated] " icp1994
2022-09-02 20:07 ` icp1994
2022-09-03  4:57 ` classabbyamp
2022-09-03  5:01 ` [PR PATCH] [Merged]: " classabbyamp

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).