diff --git a/000-async.patch b/000-async.patch new file mode 100644 index 0000000..588a92c --- /dev/null +++ b/000-async.patch @@ -0,0 +1,41 @@ +diff -ru apache-libcloud-2.2.1/libcloud/compute/drivers/azure.py apache-libcloud-2.2.1_patched/libcloud/compute/drivers/azure.py +--- apache-libcloud-2.2.1/libcloud/compute/drivers/azure.py 2017-09-05 17:30:14.000000000 +0200 ++++ apache-libcloud-2.2.1_patched/libcloud/compute/drivers/azure.py 2018-07-16 14:43:35.384935707 +0200 +@@ -1435,7 +1435,7 @@ + + return response + +- def _perform_post(self, path, body, response_type=None, async=False): ++ def _perform_post(self, path, body, response_type=None, **kwargs): + request = AzureHTTPRequest() + request.method = 'POST' + request.host = AZURE_SERVICE_MANAGEMENT_HOST +@@ -1447,7 +1447,7 @@ + + return response + +- def _perform_put(self, path, body, response_type=None, async=False): ++ def _perform_put(self, path, body, response_type=None, **kwargs): + request = AzureHTTPRequest() + request.method = 'PUT' + request.host = AZURE_SERVICE_MANAGEMENT_HOST +@@ -1459,7 +1459,8 @@ + + return response + +- def _perform_delete(self, path, async=False): ++ def _perform_delete(self, path, **kwargs): ++ asynch = kwargs.get("async", False) + request = AzureHTTPRequest() + request.method = 'DELETE' + request.host = AZURE_SERVICE_MANAGEMENT_HOST +@@ -1470,7 +1471,7 @@ + + self.raise_for_response(response, 202) + +- if async: ++ if asynch: + return self._parse_response_for_async_op(response) + + def _perform_request(self, request): +Only in apache-libcloud-2.2.1_patched/libcloud/compute/drivers: .azure.py.swp diff --git a/python-libcloud.spec b/python-libcloud.spec index 46ccdba..9486f86 100644 --- a/python-libcloud.spec +++ b/python-libcloud.spec @@ -12,7 +12,7 @@ any of the services that it supports. Name: python-libcloud Version: 2.2.1 -Release: 7%{?dist} +Release: 8%{?dist} Summary: A Python library to address multiple cloud provider APIs Group: Development/Languages @@ -41,11 +41,13 @@ BuildRequires: python%{python3_pkgversion}-setuptools BuildRequires: python%{python3_pkgversion}-pytest-runner %{?python_provide:%python_provide python%{python3_pkgversion}-%{srcname}} +Patch0: 000-async.patch + %description -n python%{python3_pkgversion}-%{srcname} %{_description} Python 3 version. %prep -%autosetup -n %{tarball_name}-%{version} +%autosetup -p1 -n %{tarball_name}-%{version} # Delete shebang lines in the demos sed -i '1d' demos/gce_demo.py demos/compute_demo.py @@ -79,6 +81,9 @@ rm -r $RPM_BUILD_ROOT%{python3_sitelib}/%{srcname}/test %{python3_sitelib}/%{eggname}-*.egg-info/ %changelog +* Mon Jul 16 2018 Marcel Plch - 2.2.1-8 +- Patch for Python 3.7 + * Sat Jul 14 2018 Fedora Release Engineering - 2.2.1-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild