# HG changeset patch # User Marcin Kuzminski # Date 2018-08-03 21:05:40 # Node ID 7774a1bbeb765e4d8c85e6da15648b9ee9fda4a4 # Parent 49e7d41f472687eb86048e33a88b5963ffcdb540 depdendencies: bumped pycurl to 7.43.0.2 diff --git a/pkgs/python-packages.nix b/pkgs/python-packages.nix --- a/pkgs/python-packages.nix +++ b/pkgs/python-packages.nix @@ -1251,11 +1251,11 @@ self: super: { }; }; "pycurl" = super.buildPythonPackage { - name = "pycurl-7.19.5"; + name = "pycurl-7.43.0.2"; doCheck = false; src = fetchurl { - url = "https://files.pythonhosted.org/packages/6c/48/13bad289ef6f4869b1d8fc11ae54de8cfb3cc4a2eb9f7419c506f763be46/pycurl-7.19.5.tar.gz"; - sha256 = "0hqsap82zklhi5fxhc69kxrwzb0g9566f7sdpz7f9gyxkmyam839"; + url = "https://files.pythonhosted.org/packages/e8/e4/0dbb8735407189f00b33d84122b9be52c790c7c3b25286826f4e1bdb7bde/pycurl-7.43.0.2.tar.gz"; + sha256 = "1915kb04k1j4y6k1dx1sgnbddxrl9r1n4q928if2lkrdm73xy30g"; }; meta = { license = [ pkgs.lib.licenses.mit { fullName = "LGPL/MIT"; } { fullName = "GNU Library or Lesser General Public License (LGPL)"; } ]; diff --git a/pkgs/shell-generate.nix b/pkgs/shell-generate.nix --- a/pkgs/shell-generate.nix +++ b/pkgs/shell-generate.nix @@ -48,5 +48,6 @@ pkgs.stdenv.mkDerivation { echo "Starting Generate Shell" # Custom prompt to distinguish from other dev envs. export PS1="\n\[\033[1;32m\][Generate-shell:\w]$\[\033[0m\] " + export PYCURL_SSL_LIBRARY=openssl ''; } diff --git a/requirements.txt b/requirements.txt --- a/requirements.txt +++ b/requirements.txt @@ -50,7 +50,7 @@ psutil==5.4.6 psycopg2==2.7.4 py-bcrypt==0.4 pycrypto==2.6.1 -pycurl==7.19.5 +pycurl==7.43.0.2 pyflakes==0.8.1 pygments-markdown-lexer==0.1.0.dev39 pygments==2.2.0 diff --git a/rhodecode/lib/vcs/geventcurl.py b/rhodecode/lib/vcs/geventcurl.py --- a/rhodecode/lib/vcs/geventcurl.py +++ b/rhodecode/lib/vcs/geventcurl.py @@ -139,7 +139,7 @@ class GeventCurlMulti(object): while True: try: ret, num_handles = self._curl_multi.socket_action(fd, action) - except pycurl.error, e: + except pycurl.error as e: ret = e.args[0] if ret != pycurl.E_CALL_MULTI_PERFORM: break @@ -156,7 +156,7 @@ class GeventCurlMulti(object): try: ret, num_handles = self._curl_multi.socket_action( pycurl.SOCKET_TIMEOUT, 0) - except pycurl.error, e: + except pycurl.error as e: ret = e.args[0] if ret != pycurl.E_CALL_MULTI_PERFORM: break @@ -233,12 +233,13 @@ class GeventCurl(object): waiter = self._curl.waiter = Waiter() try: self._multi.add_handle(self._curl) - response = waiter.get() + try: + return waiter.get() + finally: + self._multi.remove_handle(self._curl) finally: - self._multi.remove_handle(self._curl) del self._curl.waiter - return response # Curl is originally imported from pycurl. At this point we override it with # our custom implementation.