#1 Drop dependency on future
Merged 7 days ago by maha. Opened 9 months ago by lbalhar.
rpms/ lbalhar/python-onionbalance rawhide  into  rawhide

@@ -0,0 +1,54 @@ 

+ From 7303a4e926b01dae89082f55891cd2240874c26e Mon Sep 17 00:00:00 2001

+ From: Lumir Balhar <lbalhar@redhat.com>

+ Date: Tue, 29 Aug 2023 19:12:48 +0200

+ Subject: [PATCH] Drop dependency on future

+ 

+ ---

+  onionbalance/common/intro_point_set.py | 3 +--

+  requirements.txt                       | 2 --

+  setup.py                               | 1 -

+  3 files changed, 1 insertion(+), 5 deletions(-)

+ 

+ diff --git a/onionbalance/common/intro_point_set.py b/onionbalance/common/intro_point_set.py

+ index 701bce8..345b354 100644

+ --- a/onionbalance/common/intro_point_set.py

+ +++ b/onionbalance/common/intro_point_set.py

+ @@ -1,4 +1,3 @@

+ -from future.moves.itertools import zip_longest

+  import random

+  import itertools

+  

+ @@ -53,7 +52,7 @@ class IntroductionPointSet(object):

+          """

+  

+          # Combine intro points from across the backend instances and flatten

+ -        intro_points = zip_longest(*self.intro_points)

+ +        intro_points = itertools.zip_longest(*self.intro_points)

+          flat_intro_points = itertools.chain.from_iterable(intro_points)

+          for intro_point in itertools.cycle(flat_intro_points):

+              if intro_point:

+ diff --git a/requirements.txt b/requirements.txt

+ index f9c7683..906aba1 100644

+ --- a/requirements.txt

+ +++ b/requirements.txt

+ @@ -4,5 +4,3 @@ stem>=1.8

+  pyyaml>=4.2b1

+  cryptography>=2.5

+  pycryptodomex

+ -

+ -future>=0.14.3

+ diff --git a/setup.py b/setup.py

+ index 7ee17ef..d1a7f5d 100644

+ --- a/setup.py

+ +++ b/setup.py

+ @@ -47,7 +47,6 @@ setup(

+          'stem>=1.8',

+          'PyYAML>=4.2b1',

+          'pycryptodomex',

+ -        'future>=0.14.0',

+          'setproctitle',

+          'cryptography>=2.5',

+          ],

+ -- 

+ 2.41.0

+ 

file modified
+4 -3
@@ -19,6 +19,9 @@ 

  Source6:        README.fedora

  

  Patch0:         python-onionbalance-fix-versioneer.patch

+ # Drop dependency on future

+ # Proposed upstream: https://github.com/torproject/onionbalance/pull/50

+ Patch1:         drop-dependency-on-future.patch

  

  BuildArch: noarch

  
@@ -30,7 +33,6 @@ 

  BuildRequires:  python3-PyYAML >= 4.2b1

  BuildRequires:  python3-cryptography >= 2.5

  BuildRequires:  python3-pycryptodomex

- BuildRequires:  python3-future >= 0.14.3

  BuildRequires:  python3-setproctitle >= 1.1.9

  

  BuildRequires: systemd
@@ -50,7 +52,6 @@ 

  Requires:  python3-PyYAML >= 4.2b1

  Requires:  python3-cryptography >= 2.5

  Requires:  python3-pycryptodomex

- Requires:  python3-future >= 0.14.3

  Requires:  python3-setproctitle >= 1.1.9

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

  Requires: tor
@@ -63,7 +64,7 @@ 

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

  

  %prep

- %autosetup -n %{pypi_name}-%{version}

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

  

  %build

  %py3_build

Pull-Request has been merged by maha

7 days ago