#1 New upstream release 2.0.2
Merged 3 years ago by carlwgeorge. Opened 3 years ago by defolos.
rpms/ defolos/python-anyio update_to_2.0.2  into  rawhide

@@ -0,0 +1,34 @@ 

+ From 6d0b3c458dbfcfbcb5f8f3ea5817633733d95d8f Mon Sep 17 00:00:00 2001

+ From: =?UTF-8?q?Dan=20=C4=8Cerm=C3=A1k?= <dan.cermak@cgc-instruments.com>

+ Date: Thu, 28 Jan 2021 21:41:31 +0100

+ Subject: [PATCH 1/3] Moved pytest and coverage configurations to

+  pyproject.toml

+ 

+ (cherry picked from commit 141e7d1048d187888194ddfbf8f38a46b41e364e)

+ ---

+  pyproject.toml | 12 ++++++++++++

+  1 file changed, 12 insertions(+)

+ 

+ diff --git a/pyproject.toml b/pyproject.toml

+ index 532ca89..ca5de6a 100644

+ --- a/pyproject.toml

+ +++ b/pyproject.toml

+ @@ -18,3 +18,15 @@ multi_line_output = 4

+  

+  [tool.autopep8]

+  max_line_length = 99

+ +

+ +[tool.pytest]

+ +addopts = "-rsx --tb=short"

+ +testpaths = ["tests"]

+ +filterwarnings = "always"

+ +

+ +[tool.coverage.run]

+ +source = ["anyio"]

+ +relative_files = true

+ +

+ +[tool.coverage.report]

+ +show_missing = true

+ -- 

+ 2.29.2

+ 

@@ -0,0 +1,28 @@ 

+ From ae2dfbac625714eef7e220cf51b0a6e9f1dbe96f Mon Sep 17 00:00:00 2001

+ From: =?UTF-8?q?Alex=20Gr=C3=B6nholm?= <alex.gronholm@nextday.fi>

+ Date: Mon, 12 Oct 2020 00:00:47 +0300

+ Subject: [PATCH 2/3] Fixed pytest configuration in pyproject.toml

+ 

+ Fixes #164.

+ 

+ (cherry picked from commit 5299c048db71b5cefa32fd4881bf19ad7a69b57d)

+ ---

+  pyproject.toml | 2 +-

+  1 file changed, 1 insertion(+), 1 deletion(-)

+ 

+ diff --git a/pyproject.toml b/pyproject.toml

+ index ca5de6a..f4718d2 100644

+ --- a/pyproject.toml

+ +++ b/pyproject.toml

+ @@ -19,7 +19,7 @@ multi_line_output = 4

+  [tool.autopep8]

+  max_line_length = 99

+  

+ -[tool.pytest]

+ +[tool.pytest.ini_options]

+  addopts = "-rsx --tb=short"

+  testpaths = ["tests"]

+  filterwarnings = "always"

+ -- 

+ 2.29.2

+ 

@@ -0,0 +1,44 @@ 

+ From d38ac714e4e1ab9a4a8fdf324fbe24c53b90120a Mon Sep 17 00:00:00 2001

+ From: =?UTF-8?q?Dan=20=C4=8Cerm=C3=A1k?= <dan.cermak@cgc-instruments.com>

+ Date: Thu, 28 Jan 2021 21:17:29 +0100

+ Subject: [PATCH 3/3] Add network mark to getaddrinfo test

+ 

+ Calling getaddrinfo in a builder without network access results in an error as

+ it cannot contact a DNS server. The network marker is used by convention to mark

+ such tests and allows this test to be skipped.

+ 

+ (cherry picked from commit fc60d9172aa838cecc9dcb97ce60dbfe86e4b8c5)

+ ---

+  pyproject.toml        | 3 +++

+  tests/test_sockets.py | 1 +

+  2 files changed, 4 insertions(+)

+ 

+ diff --git a/pyproject.toml b/pyproject.toml

+ index f4718d2..6ad27a0 100644

+ --- a/pyproject.toml

+ +++ b/pyproject.toml

+ @@ -23,6 +23,9 @@ max_line_length = 99

+  addopts = "-rsx --tb=short"

+  testpaths = ["tests"]

+  filterwarnings = "always"

+ +markers = [

+ +    "network",

+ +]

+  

+  [tool.coverage.run]

+  source = ["anyio"]

+ diff --git a/tests/test_sockets.py b/tests/test_sockets.py

+ index 24e59b7..058812a 100644

+ --- a/tests/test_sockets.py

+ +++ b/tests/test_sockets.py

+ @@ -807,6 +807,7 @@ class TestConnectedUDPSocket:

+              await udp.send(b'foo')

+  

+  

+ +@pytest.mark.network

+  async def test_getaddrinfo():

+      # IDNA 2003 gets this wrong

+      correct = await getaddrinfo('faß.de', 0)

+ -- 

+ 2.29.2

+ 

file modified
+39 -35
@@ -11,16 +11,20 @@ 

  AnyIO is a asynchronous compatibility API that allows applications and

  libraries written against it to run unmodified on asyncio, curio and trio.}

  

- %bcond_without  tests

- 

- 

  Name:           python-%{pkgname}

- Version:        1.3.1

- Release:        3%{?dist}

+ Version:        2.0.2

+ Release:        1%{?dist}

  Summary:        Compatibility layer for multiple asynchronous event loop implementations

  License:        MIT

- URL:            https://github.com/agronholm/anyio

+ URL:            https://github.com/agronholm/%{srcname}

  Source0:        %pypi_source

+ # cherry picked from master

+ Patch0:         0001-Moved-pytest-and-coverage-configurations-to-pyprojec.patch

+ # cherry picked from master

+ Patch1:         0002-Fixed-pytest-configuration-in-pyproject.toml.patch

+ # https://github.com/agronholm/anyio/pull/188

+ Patch2:         0003-Add-network-mark-to-getaddrinfo-test.patch

+ 

  BuildArch:      noarch

  

  
@@ -29,56 +33,56 @@ 

  

  %package -n python3-%{pkgname}

  Summary:        %{summary}

- BuildRequires:  python3-devel

- BuildRequires:  python3-setuptools

- BuildRequires:  python3-setuptools_scm

- %if %{with tests}

- BuildRequires:  python3-coverage >= 4.5

- BuildRequires:  python3-hypothesis >= 4.0

- BuildRequires:  python3-pytest >= 3.7.2

- BuildRequires:  python3-uvloop

- BuildRequires:  python3-trio >= 0.12

- BuildRequires:  python3-curio >= 0.9

- BuildRequires:  python3-async-generator

- BuildRequires:  python3-sniffio >= 1.1

- %endif

- Requires:       python3-async-generator

- Requires:       python3-sniffio >= 1.1

- %{?python_provide:%python_provide python3-%{pkgname}}

+ BuildRequires:  pyproject-rpm-macros

+ BuildRequires:  python3dist(sphinx)

+ BuildRequires:  python3dist(curio)

+ BuildRequires:  python3dist(trio)

  

+ %generate_buildrequires

+ %pyproject_buildrequires -x test,doc

  

  %description -n python3-%{pkgname} %{common_description}

  

  

+ %package -n python-%{srcname}-doc

+ Summary:        anyio documentation

+ %description -n python-%{srcname}-doc

+ Documentation for anyio

+ 

+ 

  %prep

- %autosetup -n %{srcname}-%{version}

+ %autosetup -n %{srcname}-%{version} -p1

  rm -rf %{eggname}.egg-info

  

- 

  %build

- %py3_build

- 

+ %pyproject_wheel

+ # generate html docs

+ PYTHONPATH=${PWD} sphinx-build-3 docs html

+ # remove the sphinx-build leftovers

+ rm -rf html/.{doctrees,buildinfo}

  

  %install

- %py3_install

+ %pyproject_install

+ %pyproject_save_files anyio

  

  

- %if %{with tests}

  %check

- export PYTHONPATH=%{buildroot}%{python3_sitelib}

- export PYTHONDONTWRITEBYTECODE=1

- py.test-%{python3_version} --verbose tests

- %endif

+ %pytest -m "not network"

  

  

- %files -n python3-%{pkgname}

+ %files -n python3-%{pkgname} -f %{pyproject_files}

  %license LICENSE

  %doc README.rst

- %{python3_sitelib}/%{libname}

- %{python3_sitelib}/%{eggname}-%{version}-py%{python3_version}.egg-info

+ 

+ %files -n python-%{srcname}-doc

+ %doc html

+ %license LICENSE

  

  

  %changelog

+ * Thu Jan 28 2021 Dan Čermák <dan.cermak@cgc-instruments.com> - 2.0.2-1

+ - New upstream release 2.0.2

+ 

  * Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.1-3

  - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild

  

file modified
+1 -1
@@ -1,1 +1,1 @@ 

- SHA512 (anyio-1.3.1.tar.gz) = 766d2d74ad8a0a80641e2f94cbe956424f7dc802c105f1768a52fee4422827451b74b5774c59987d7956c852e77bb13b16047a83c97aa20f99d7e6cbe45cdcb3

+ SHA512 (anyio-2.0.2.tar.gz) = 5ce46e6cf167b2ee526e92642e65d1e715f443750b4c8b12d0c449ad460afd0280be920bcde0653f478eb52ab9db035a35ccb6908460bf425e85d7d0aa3f1799