about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2019-09-28 15:30:15 +0000
committerAlyssa Ross <hi@alyssa.is>2019-09-28 22:14:42 +0000
commit80e4dc93ce4bb109cd00a98f0b39151f09de9d9b (patch)
tree64aa611a6a199dc0f40fc56d050d99e125e5c830 /nixpkgs/pkgs/development/python-modules
parentbfa679f5a8e9beff6008ea0e9d5eabfa68018e20 (diff)
parent2436c27541b2f52deea3a4c1691216a02152e729 (diff)
downloadnixlib-80e4dc93ce4bb109cd00a98f0b39151f09de9d9b.tar
nixlib-80e4dc93ce4bb109cd00a98f0b39151f09de9d9b.tar.gz
nixlib-80e4dc93ce4bb109cd00a98f0b39151f09de9d9b.tar.bz2
nixlib-80e4dc93ce4bb109cd00a98f0b39151f09de9d9b.tar.lz
nixlib-80e4dc93ce4bb109cd00a98f0b39151f09de9d9b.tar.xz
nixlib-80e4dc93ce4bb109cd00a98f0b39151f09de9d9b.tar.zst
nixlib-80e4dc93ce4bb109cd00a98f0b39151f09de9d9b.zip
Merge commit '2436c27541b2f52deea3a4c1691216a02152e729'
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules')
-rw-r--r--nixpkgs/pkgs/development/python-modules/Logbook/default.nix3
-rw-r--r--nixpkgs/pkgs/development/python-modules/algebraic-data-types/default.nix28
-rw-r--r--nixpkgs/pkgs/development/python-modules/astropy/default.nix3
-rw-r--r--nixpkgs/pkgs/development/python-modules/aws-adfs/default.nix10
-rw-r--r--nixpkgs/pkgs/development/python-modules/cairocffi/default.nix4
-rw-r--r--nixpkgs/pkgs/development/python-modules/cairocffi/dlopen-paths.patch73
-rw-r--r--nixpkgs/pkgs/development/python-modules/cheroot/default.nix3
-rw-r--r--nixpkgs/pkgs/development/python-modules/csvs-to-sqlite/default.nix8
-rw-r--r--nixpkgs/pkgs/development/python-modules/dependency-injector/default.nix4
-rw-r--r--nixpkgs/pkgs/development/python-modules/dotnetcore2/default.nix59
-rw-r--r--nixpkgs/pkgs/development/python-modules/dotnetcore2/runtime.patch19
-rw-r--r--nixpkgs/pkgs/development/python-modules/dynd/default.nix2
-rw-r--r--nixpkgs/pkgs/development/python-modules/flask-jwt-extended/default.nix8
-rw-r--r--nixpkgs/pkgs/development/python-modules/flask-oauthlib/default.nix29
-rw-r--r--nixpkgs/pkgs/development/python-modules/flask-sqlalchemy/default.nix8
-rw-r--r--nixpkgs/pkgs/development/python-modules/h11/default.nix3
-rw-r--r--nixpkgs/pkgs/development/python-modules/impacket/default.nix24
-rw-r--r--nixpkgs/pkgs/development/python-modules/ipykernel/default.nix3
-rw-r--r--nixpkgs/pkgs/development/python-modules/keyring/default.nix15
-rw-r--r--nixpkgs/pkgs/development/python-modules/ledgerblue/default.nix7
-rw-r--r--nixpkgs/pkgs/development/python-modules/license-expression/default.nix1
-rw-r--r--nixpkgs/pkgs/development/python-modules/lxml/default.nix2
-rw-r--r--nixpkgs/pkgs/development/python-modules/mypy/default.nix4
-rw-r--r--nixpkgs/pkgs/development/python-modules/nbconvert/default.nix3
-rw-r--r--nixpkgs/pkgs/development/python-modules/nbformat/default.nix3
-rw-r--r--nixpkgs/pkgs/development/python-modules/nbval/default.nix3
-rw-r--r--nixpkgs/pkgs/development/python-modules/ncclient/default.nix4
-rw-r--r--nixpkgs/pkgs/development/python-modules/notebook/default.nix3
-rw-r--r--nixpkgs/pkgs/development/python-modules/pdf2image/default.nix4
-rw-r--r--nixpkgs/pkgs/development/python-modules/picos/default.nix36
-rw-r--r--nixpkgs/pkgs/development/python-modules/portend/default.nix3
-rw-r--r--nixpkgs/pkgs/development/python-modules/pycurl2/default.nix14
-rw-r--r--nixpkgs/pkgs/development/python-modules/pytest-check/default.nix29
-rw-r--r--nixpkgs/pkgs/development/python-modules/python-engineio/default.nix26
-rw-r--r--nixpkgs/pkgs/development/python-modules/python-language-server/default.nix4
-rw-r--r--nixpkgs/pkgs/development/python-modules/pyzmq/default.nix3
-rw-r--r--nixpkgs/pkgs/development/python-modules/sentry-sdk/default.nix4
-rw-r--r--nixpkgs/pkgs/development/python-modules/trustme/default.nix3
-rw-r--r--nixpkgs/pkgs/development/python-modules/typed-ast/default.nix12
-rw-r--r--nixpkgs/pkgs/development/python-modules/uvicorn/default.nix24
-rw-r--r--nixpkgs/pkgs/development/python-modules/uvicorn/setup.patch13
-rw-r--r--nixpkgs/pkgs/development/python-modules/uvloop/darwin_sandbox.patch28
-rw-r--r--nixpkgs/pkgs/development/python-modules/uvloop/default.nix5
-rw-r--r--nixpkgs/pkgs/development/python-modules/websockets/default.nix20
44 files changed, 406 insertions, 158 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/Logbook/default.nix b/nixpkgs/pkgs/development/python-modules/Logbook/default.nix
index 866c04109294..503fefc0013c 100644
--- a/nixpkgs/pkgs/development/python-modules/Logbook/default.nix
+++ b/nixpkgs/pkgs/development/python-modules/Logbook/default.nix
@@ -18,6 +18,9 @@ buildPythonPackage rec {
     py.test tests
   '';
 
+  # Some of the tests use localhost networking.
+  __darwinAllowLocalNetworking = true;
+
   meta = {
     homepage = https://pythonhosted.org/Logbook/;
     description = "A logging replacement for Python";
diff --git a/nixpkgs/pkgs/development/python-modules/algebraic-data-types/default.nix b/nixpkgs/pkgs/development/python-modules/algebraic-data-types/default.nix
new file mode 100644
index 000000000000..4b4986795ce1
--- /dev/null
+++ b/nixpkgs/pkgs/development/python-modules/algebraic-data-types/default.nix
@@ -0,0 +1,28 @@
+{ lib, buildPythonPackage, fetchFromGitHub, pythonOlder, hypothesis, mypy }:
+
+buildPythonPackage rec {
+  pname = "algebraic-data-types";
+  version = "0.1.1";
+
+  src = fetchFromGitHub {
+    owner = "jspahrsummers";
+    repo = "adt";
+    rev = "v" + version;
+    sha256 = "1py94jsgh6wch59n9dxnwvk74psbpa1679zfmripa1qfc2218kqi";
+  };
+
+  disabled = pythonOlder "3.6";
+
+  checkInputs = [
+    hypothesis
+    mypy
+  ];
+
+  meta = with lib; {
+    description = "Algebraic data types for Python";
+    homepage = https://github.com/jspahrsummers/adt;
+    license = licenses.mit;
+    maintainers = with maintainers; [ uri-canva ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/python-modules/astropy/default.nix b/nixpkgs/pkgs/development/python-modules/astropy/default.nix
index f46ca274f2e1..35bb7b1aa59a 100644
--- a/nixpkgs/pkgs/development/python-modules/astropy/default.nix
+++ b/nixpkgs/pkgs/development/python-modules/astropy/default.nix
@@ -39,6 +39,9 @@ buildPythonPackage rec {
     pytest
   '';
 
+  # 368 failed, 10889 passed, 978 skipped, 69 xfailed in 196.24s
+  doCheck = false;
+
   meta = {
     description = "Astronomy/Astrophysics library for Python";
     homepage = https://www.astropy.org;
diff --git a/nixpkgs/pkgs/development/python-modules/aws-adfs/default.nix b/nixpkgs/pkgs/development/python-modules/aws-adfs/default.nix
index 9e761b3698d6..4912e8f99943 100644
--- a/nixpkgs/pkgs/development/python-modules/aws-adfs/default.nix
+++ b/nixpkgs/pkgs/development/python-modules/aws-adfs/default.nix
@@ -2,12 +2,12 @@
 , pytest, pytestrunner, pytestcov, mock, glibcLocales, lxml, boto3, requests, click, configparser }:
 
 buildPythonPackage rec {
-  version = "1.12.3";
   pname = "aws-adfs";
+  version = "1.17.0";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "b7df3fbe0572eb12294b2e072327ca97fd94d435b39cc10612e460cde914b831";
+    sha256 = "0wnsmwjpfhxilmvrqvwilcf3h9p5m5ixi5gn9bgkr3gwd2laxf54";
   };
 
   # Relax version constraint
@@ -24,10 +24,10 @@ buildPythonPackage rec {
   checkInputs = [ glibcLocales pytest pytestrunner pytestcov mock ];
   propagatedBuildInputs = [ lxml boto3 requests click configparser ];
 
-  meta = {
+  meta = with lib; {
     description = "Command line tool to ease aws cli authentication against ADFS";
     homepage = https://github.com/venth/aws-adfs;
-    license = lib.licenses.psfl;
-    maintainers = [ lib.maintainers.bhipple ];
+    license = licenses.psfl;
+    maintainers = [ maintainers.bhipple ];
   };
 }
diff --git a/nixpkgs/pkgs/development/python-modules/cairocffi/default.nix b/nixpkgs/pkgs/development/python-modules/cairocffi/default.nix
index f91b33d20102..574aeefa7fca 100644
--- a/nixpkgs/pkgs/development/python-modules/cairocffi/default.nix
+++ b/nixpkgs/pkgs/development/python-modules/cairocffi/default.nix
@@ -19,8 +19,8 @@
 }@args:
 
 import ./generic.nix ({
-  version = "1.0.2";
-  sha256 = "01ac51ae12c4324ca5809ce270f9dd1b67f5166fe63bd3e497e9ea3ca91946ff";
+  version = "1.1.0";
+  sha256 = "1nq53f5jipgy9jgyfxp43j40qfbmrhgn1cj8bp5rrb3liy3wbh7i";
   dlopen_patch = ./dlopen-paths.patch;
   disabled = pythonOlder "3.5";
   inherit withXcffib;
diff --git a/nixpkgs/pkgs/development/python-modules/cairocffi/dlopen-paths.patch b/nixpkgs/pkgs/development/python-modules/cairocffi/dlopen-paths.patch
index 10e2294981d4..6542b4367eb4 100644
--- a/nixpkgs/pkgs/development/python-modules/cairocffi/dlopen-paths.patch
+++ b/nixpkgs/pkgs/development/python-modules/cairocffi/dlopen-paths.patch
@@ -1,46 +1,61 @@
-commit 0435bc2577d4b18f54b78b2f5185abb2b2005982
-Author: Alexander V. Nikolaev <avn@avnik.info>
-Date:   Sat Feb 6 08:09:06 2016 +0200
+Patch dlopen() to allow direct paths to all required libs
 
-    Patch dlopen() to allow direct paths to all required libs
+This is an update of the patch submitted in
+https://github.com/NixOS/nixpkgs/commit/b13e44e094989d3a902f8c73b22e8d3c0cc7acf4
+by Alexander V. Nikolaev <avn@avnik.info>
 
-    This patch is NixOS specific
+---
+ cairocffi/__init__.py | 34 ++++++++++++++++------------------
+ 1 file changed, 16 insertions(+), 18 deletions(-)
 
 diff --git a/cairocffi/__init__.py b/cairocffi/__init__.py
-index 6061973..3538a58 100644
+index 307d58c..43c29e3 100644
 --- a/cairocffi/__init__.py
 +++ b/cairocffi/__init__.py
-@@ -21,19 +21,22 @@ VERSION = __version__ = (Path(__file__).parent / 'VERSION').read_text().strip()
- version = '1.16.0'
- version_info = (1, 16, 0)
+@@ -21,28 +21,26 @@ VERSION = __version__ = (Path(__file__).parent / 'VERSION').read_text().strip()
+ version = '1.17.2'
+ version_info = (1, 17, 2)
 
-+# Use hardcoded soname, because ctypes.util use gcc/objdump which shouldn't be required for runtime
++# Use hardcoded soname, because ctypes.util use gcc/objdump which shouldn't be
++# required for runtime
 +_LIBS = {
 +    'cairo': '@cairo@/lib/libcairo@ext@',
 +    'glib-2.0': '@glib@/lib/libglib-2.0@ext@',
 +    'gobject-2.0': '@glib@/lib/libgobject-2.0@ext@',
 +    'gdk_pixbuf-2.0': '@gdk_pixbuf@/lib/libgdk_pixbuf-2.0@ext@',
 +}
++
 
--def dlopen(ffi, *names):
-+def dlopen(ffi, name, *names):
+ def dlopen(ffi, library_names, filenames):
      """Try various names for the same library, for different platforms."""
--    for name in names:
--        for lib_name in (name, 'lib' + name):
--            try:
--                path = ctypes.util.find_library(lib_name)
--                lib = ffi.dlopen(path or lib_name)
--                if lib:
--                    return lib
--            except OSError:
--                pass
--    raise OSError("dlopen() failed to load a library: %s" % ' / '.join(names))
-+    path = _LIBS.get(name, None)
-+    if path:
-+        lib = ffi.dlopen(path)
-+        if lib:
-+            return lib
-+    raise OSError("dlopen() failed to load a library: %s as %s" % (name, path))
+-    exceptions = []
+-
+     for library_name in library_names:
+-        library_filename = find_library(library_name)
+-        if library_filename:
+-            filenames = (library_filename,) + filenames
+-        else:
+-            exceptions.append(
+-                'no library called "{}" was found'.format(library_name))
+-
+-    for filename in filenames:
+-        try:
+-            return ffi.dlopen(filename)
+-        except OSError as exception:  # pragma: no cover
+-            exceptions.append(exception)
+-
+-    error_message = '\n'.join(  # pragma: no cover
+-        str(exception) for exception in exceptions)
+-    raise OSError(error_message)  # pragma: no cover
++        path = _LIBS.get(library_name, None)
++        if path:
++            lib = ffi.dlopen(path)
++            if lib:
++                return lib
++
++    raise OSError("dlopen() failed to load a library: %s as %s" % (library_name, path))
 
 
- cairo = dlopen(ffi, 'cairo', 'cairo-2', 'cairo-gobject-2', 'cairo.so.2')
+ cairo = dlopen(
+--
+2.19.2
diff --git a/nixpkgs/pkgs/development/python-modules/cheroot/default.nix b/nixpkgs/pkgs/development/python-modules/cheroot/default.nix
index 591bb0fbe377..9b3050942a88 100644
--- a/nixpkgs/pkgs/development/python-modules/cheroot/default.nix
+++ b/nixpkgs/pkgs/development/python-modules/cheroot/default.nix
@@ -34,6 +34,9 @@ buildPythonPackage rec {
     pytest -k 'not tls' ${lib.optionalString stdenv.isDarwin "--deselect=cheroot/test/test_ssl.py::test_http_over_https_error --deselect=cheroot/test/test_server.py::test_bind_addr_unix"}
   '';
 
+  # Some of the tests use localhost networking.
+  __darwinAllowLocalNetworking = true;
+
   meta = with lib; {
     description = "High-performance, pure-Python HTTP";
     homepage = https://github.com/cherrypy/cheroot;
diff --git a/nixpkgs/pkgs/development/python-modules/csvs-to-sqlite/default.nix b/nixpkgs/pkgs/development/python-modules/csvs-to-sqlite/default.nix
index ab9ca9827186..0e5e902be2e3 100644
--- a/nixpkgs/pkgs/development/python-modules/csvs-to-sqlite/default.nix
+++ b/nixpkgs/pkgs/development/python-modules/csvs-to-sqlite/default.nix
@@ -1,6 +1,7 @@
 { lib
 , buildPythonPackage
 , fetchFromGitHub
+, isPy3k
 , pytestrunner
 , click
 , dateparser
@@ -12,17 +13,16 @@
 
 buildPythonPackage rec {
   pname = "csvs-to-sqlite";
-  version = "0.9";
+  version = "1.0";
+  disabled = !isPy3k;
 
   src = fetchFromGitHub {
     owner = "simonw";
     repo = pname;
     rev = version;
-    sha256 = "0js86m4kj70g9n9gagr8l6kgswqllg6hn1xa3yvxwv95i59ihpz5";
+    sha256 = "0n80y9a6qhbhhbz64jdpscx0nha9jn9nygp9nkgszmw04ri5j5hm";
   };
 
-  buildInputs = [ pytestrunner ];
-
   propagatedBuildInputs = [
     click
     dateparser
diff --git a/nixpkgs/pkgs/development/python-modules/dependency-injector/default.nix b/nixpkgs/pkgs/development/python-modules/dependency-injector/default.nix
index af2607bca146..e135d8c7bc6a 100644
--- a/nixpkgs/pkgs/development/python-modules/dependency-injector/default.nix
+++ b/nixpkgs/pkgs/development/python-modules/dependency-injector/default.nix
@@ -9,11 +9,11 @@ in
 
 buildPythonPackage rec {
   pname = "dependency-injector";
-  version = "3.14.6";
+  version = "3.14.10";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "2e1889a0981381f557b0d14cba900adf7476817c53c13bfb04e2a30b3db0f1d3";
+    sha256 = "1c475axh40f8s4n5dqm52qczx9g2g8b8wsy0qvghirk84ikpca5y";
   };
 
   propagatedBuildInputs = [ six ];
diff --git a/nixpkgs/pkgs/development/python-modules/dotnetcore2/default.nix b/nixpkgs/pkgs/development/python-modules/dotnetcore2/default.nix
new file mode 100644
index 000000000000..caafeb54740f
--- /dev/null
+++ b/nixpkgs/pkgs/development/python-modules/dotnetcore2/default.nix
@@ -0,0 +1,59 @@
+{ stdenv, lib, buildPythonPackage, fetchPypi, python, isPy27
+, dotnet-sdk
+, substituteAll
+, distro
+, unzip
+}:
+
+buildPythonPackage rec {
+  pname = "dotnetcore2";
+  version = "2.1.8.1";
+  format = "wheel";
+  disabled = isPy27;
+
+  src = fetchPypi {
+    inherit pname version format;
+    python = "py3";
+    platform = "manylinux1_x86_64";
+    sha256 = "13zrff5j767d3f8drl397sjhl28winsrfa8pa20svf00xfcsy34s";
+  };
+
+  nativeBuildInputs = [ unzip ];
+
+  propagatedBuildInputs = [ distro ];
+
+  # needed to apply patches
+  prePatch = ''
+    unzip dist/dotnet*
+  '';
+
+  patches = [
+    ( substituteAll {
+        src = ./runtime.patch;
+        dotnet = dotnet-sdk;
+      }
+    )
+  ];
+
+  # unfortunately the noraml pip install fails because the manylinux1 format check fails with NixOS
+  installPhase = ''
+    mkdir -p $out/${python.sitePackages}/${pname}
+    # copy metadata
+    cp -r dotnetcore2-2* $out/${python.sitePackages}
+    # copy non-dotnetcore related files
+    cp -r dotnetcore2/{__init__.py,runtime.py} $out/${python.sitePackages}/${pname}
+  '';
+
+  # no tests, ensure it's one useful function works
+  checkPhase = ''
+    ${python.interpreter} -c 'from dotnetcore2 import runtime; print(runtime.get_runtime_path())'
+  '';
+
+  meta = with lib; {
+    description = "DotNet Core runtime";
+    homepage = "https://github.com/dotnet/core";
+    license = licenses.mit;
+    platforms = [ "x86_64-linux" ];
+    maintainers = with maintainers; [ jonringer ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/python-modules/dotnetcore2/runtime.patch b/nixpkgs/pkgs/development/python-modules/dotnetcore2/runtime.patch
new file mode 100644
index 000000000000..54322087a780
--- /dev/null
+++ b/nixpkgs/pkgs/development/python-modules/dotnetcore2/runtime.patch
@@ -0,0 +1,19 @@
+diff a/dotnetcore2/runtime.py b/dotnetcore2/runtime.py
+--- a/dotnetcore2/runtime.py
++++ b/dotnetcore2/runtime.py
+@@ -39,13 +39,13 @@ def _get_bin_folder() -> str:
+ 
+ 
+ def get_runtime_path():
++    return "@dotnet@/dotnet"
+     search_string = os.path.join(_get_bin_folder(), 'dotnet*')
+     matches = [f for f in glob.glob(search_string, recursive=True)]
+     return matches[0]
+ 
+ def ensure_dependencies() -> Optional[str]:
+-    if dist is None:
+-        return None
++    return None
+ 
+     bin_folder = _get_bin_folder()
+     deps_path = os.path.join(bin_folder, 'deps')
diff --git a/nixpkgs/pkgs/development/python-modules/dynd/default.nix b/nixpkgs/pkgs/development/python-modules/dynd/default.nix
index d4cd0e711a0d..f3e4e0a8b732 100644
--- a/nixpkgs/pkgs/development/python-modules/dynd/default.nix
+++ b/nixpkgs/pkgs/development/python-modules/dynd/default.nix
@@ -26,6 +26,8 @@ buildPythonPackage rec {
     substituteInPlace setup.py --replace "'--always', '--match', 'v*']).decode('ascii').strip('\n')" ""
   '';
 
+  dontUseCmakeConfigure = true;
+
   # Python 3 works but has a broken import test that I couldn't
   # figure out.
   doCheck = !isPy3k;
diff --git a/nixpkgs/pkgs/development/python-modules/flask-jwt-extended/default.nix b/nixpkgs/pkgs/development/python-modules/flask-jwt-extended/default.nix
index d61f5a776004..693e733e73a8 100644
--- a/nixpkgs/pkgs/development/python-modules/flask-jwt-extended/default.nix
+++ b/nixpkgs/pkgs/development/python-modules/flask-jwt-extended/default.nix
@@ -1,15 +1,15 @@
-{ stdenv, buildPythonPackage, fetchPypi, flask, pyjwt, werkzeug, pytest }:
+{ stdenv, buildPythonPackage, fetchPypi, dateutil, flask, pyjwt, werkzeug, pytest }:
 
 buildPythonPackage rec {
   pname = "Flask-JWT-Extended";
-  version = "3.17.0";
+  version = "3.23.0";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "97c66f197b4b175173bf955b9a845d03d62e521e512e88f6abff707e6859e7c3";
+    sha256 = "05nf94dp80i68gs61pf67qj1y6i56jgdxmibqmns5wz6z33fi7wj";
   };
 
-  propagatedBuildInputs = [ flask pyjwt werkzeug ];
+  propagatedBuildInputs = [ dateutil flask pyjwt werkzeug ];
   checkInputs = [ pytest ];
 
   checkPhase = ''
diff --git a/nixpkgs/pkgs/development/python-modules/flask-oauthlib/default.nix b/nixpkgs/pkgs/development/python-modules/flask-oauthlib/default.nix
deleted file mode 100644
index 587057514156..000000000000
--- a/nixpkgs/pkgs/development/python-modules/flask-oauthlib/default.nix
+++ /dev/null
@@ -1,29 +0,0 @@
-{ stdenv, buildPythonPackage, fetchFromGitHub
-, flask, oauthlib, requests_oauthlib, flask_sqlalchemy
-, mock, nose}:
-buildPythonPackage rec {
-  pname = "Flask-OAuthlib";
-  version = "0.9.5";
-
-  src = fetchFromGitHub {
-    owner = "lepture";
-    repo = "flask-oauthlib";
-    rev = "v${version}";
-    sha256 = "1l82niwrpm7411xvwh65bj263si90kcbrbfg5fa52mpixhxcp40f";
-  };
-
-  buildInputs = [ mock nose ];
-  propagatedBuildInputs = [
-    flask flask_sqlalchemy oauthlib requests_oauthlib
-  ];
-
-  checkPhase = "nosetests -d";
-  doCheck = false; # request mocking fails
-
-  meta = with stdenv.lib; {
-    description = "OAuthlib implementation for Flask";
-    license = licenses.mit;
-    maintainers = [ maintainers.mic92 ];
-    homepage = https://github.com/lepture/flask-oauthlib;
-  };
-}
diff --git a/nixpkgs/pkgs/development/python-modules/flask-sqlalchemy/default.nix b/nixpkgs/pkgs/development/python-modules/flask-sqlalchemy/default.nix
index aa7b40675b89..2ff84f2531b0 100644
--- a/nixpkgs/pkgs/development/python-modules/flask-sqlalchemy/default.nix
+++ b/nixpkgs/pkgs/development/python-modules/flask-sqlalchemy/default.nix
@@ -1,16 +1,16 @@
-{ stdenv, buildPythonPackage, fetchPypi, flask, sqlalchemy, pytest }:
+{ stdenv, buildPythonPackage, fetchPypi, flask, mock, sqlalchemy, pytest }:
 
 buildPythonPackage rec {
   pname = "Flask-SQLAlchemy";
-  version = "2.3.2";
+  version = "2.4.0";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "0lvfynbk9y0whpkhqz7kf3hk342sfa3lwqyv25gnb22q5f2vjwar";
+    sha256 = "0nnllf0ddbh9jlhngnyjj98lbxgxr1csaplllx0caw98syq0k5hc";
   };
 
   propagatedBuildInputs = [ flask sqlalchemy ];
-  checkInputs = [ pytest ];
+  checkInputs = [ mock pytest ];
 
   checkPhase = ''
     pytest
diff --git a/nixpkgs/pkgs/development/python-modules/h11/default.nix b/nixpkgs/pkgs/development/python-modules/h11/default.nix
index f77c267d792c..361ac0c59d13 100644
--- a/nixpkgs/pkgs/development/python-modules/h11/default.nix
+++ b/nixpkgs/pkgs/development/python-modules/h11/default.nix
@@ -23,6 +23,9 @@ buildPythonPackage rec {
     py.test
   '';
 
+  # Some of the tests use localhost networking.
+  __darwinAllowLocalNetworking = true;
+
   meta = with lib; {
     description = "Pure-Python, bring-your-own-I/O implementation of HTTP/1.1";
     license = licenses.mit;
diff --git a/nixpkgs/pkgs/development/python-modules/impacket/default.nix b/nixpkgs/pkgs/development/python-modules/impacket/default.nix
new file mode 100644
index 000000000000..e4e14cf7bbf8
--- /dev/null
+++ b/nixpkgs/pkgs/development/python-modules/impacket/default.nix
@@ -0,0 +1,24 @@
+{ lib, buildPythonPackage, fetchPypi, isPy3k }:
+
+buildPythonPackage rec {
+  pname = "impacket";
+  version = "0.9.15";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "1sq1698g7wqj731h24f7gr4lc0fz0mxrqv6mm3j4hm2j6h3rrbr6";
+  };
+
+  disabled = isPy3k;
+
+  # no tests
+  doCheck = false;
+
+  meta = with lib; {
+    description = "Network protocols Constructors and Dissectors";
+    homepage = "https://github.com/CoreSecurity/impacket";
+    # Modified Apache Software License, Version 1.1
+    license = licenses.free;
+    maintainers = with maintainers; [ peterhoeg ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/python-modules/ipykernel/default.nix b/nixpkgs/pkgs/development/python-modules/ipykernel/default.nix
index 5203047b77fb..4bdd9011d1e8 100644
--- a/nixpkgs/pkgs/development/python-modules/ipykernel/default.nix
+++ b/nixpkgs/pkgs/development/python-modules/ipykernel/default.nix
@@ -37,6 +37,9 @@ buildPythonPackage rec {
     HOME=$(mktemp -d) pytest ipykernel -k "not (test_sys_path or test_sys_path_profile_dir or test_complete)"
   '';
 
+  # Some of the tests use localhost networking.
+  __darwinAllowLocalNetworking = true;
+
   meta = {
     description = "IPython Kernel for Jupyter";
     homepage = http://ipython.org/;
diff --git a/nixpkgs/pkgs/development/python-modules/keyring/default.nix b/nixpkgs/pkgs/development/python-modules/keyring/default.nix
index e54283735a86..cf1eeb5392c6 100644
--- a/nixpkgs/pkgs/development/python-modules/keyring/default.nix
+++ b/nixpkgs/pkgs/development/python-modules/keyring/default.nix
@@ -1,27 +1,24 @@
 { stdenv, buildPythonPackage, fetchPypi
-, setuptools_scm, entrypoints, secretstorage
+, dbus-python, setuptools_scm, entrypoints, secretstorage
 , pytest, pytest-flake8 }:
 
 buildPythonPackage rec {
   pname = "keyring";
-  version = "18.0.1";
+  version = "19.1.0";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "67d6cc0132bd77922725fae9f18366bb314fd8f95ff4d323a4df41890a96a838";
+    sha256 = "13frfmws03jdyz9wxb4ylkvk80qiyb6a3h3sn7wx3ry97bn5li3a";
   };
 
   nativeBuildInputs = [ setuptools_scm ];
 
   checkInputs = [ pytest pytest-flake8 ];
 
-  propagatedBuildInputs = [ entrypoints ] ++ stdenv.lib.optional stdenv.isLinux secretstorage;
+  propagatedBuildInputs = [ dbus-python entrypoints ] ++ stdenv.lib.optional stdenv.isLinux secretstorage;
 
-  doCheck = !stdenv.isDarwin;
-
-  checkPhase = ''
-    py.test
-  '';
+  # checks try to access a darwin path on linux
+  doCheck = false;
 
   meta = with stdenv.lib; {
     description = "Store and access your passwords safely";
diff --git a/nixpkgs/pkgs/development/python-modules/ledgerblue/default.nix b/nixpkgs/pkgs/development/python-modules/ledgerblue/default.nix
index 3f9f58b5203f..3e2c1f1356ac 100644
--- a/nixpkgs/pkgs/development/python-modules/ledgerblue/default.nix
+++ b/nixpkgs/pkgs/development/python-modules/ledgerblue/default.nix
@@ -1,18 +1,19 @@
 { stdenv, fetchPypi, buildPythonPackage, hidapi
 , pycrypto, pillow, protobuf, future, ecpy, python-u2flib-host, pycryptodomex
+, websocket_client
 }:
 
 buildPythonPackage rec {
   pname = "ledgerblue";
-  version = "0.1.24";
+  version = "0.1.28";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "fc111ed5db8da93f280928d966f9d87416b464f5f09cec80b60e88c4c1265026";
+    sha256 = "1jfh4gb3f16ga1ircwiyg7dldldmhn0a5slbpqsqr2g6mlqihpmd";
   };
 
   propagatedBuildInputs = [
-    hidapi pycrypto pillow protobuf future ecpy python-u2flib-host pycryptodomex
+    hidapi pycrypto pillow protobuf future ecpy python-u2flib-host pycryptodomex websocket_client
   ];
 
   # No tests
diff --git a/nixpkgs/pkgs/development/python-modules/license-expression/default.nix b/nixpkgs/pkgs/development/python-modules/license-expression/default.nix
index 6d52e5f5c1f5..2bf204a9a628 100644
--- a/nixpkgs/pkgs/development/python-modules/license-expression/default.nix
+++ b/nixpkgs/pkgs/development/python-modules/license-expression/default.nix
@@ -12,6 +12,7 @@ buildPythonPackage rec {
     rev = "v${version}";
     sha256 = "0q8sha38w7ajg7ar0rmbqrwv0n58l8yzyl96cqwcbvp578fn3ir0";
   };
+  postPatch = "patchShebangs ./configure";
 
   propagatedBuildInputs = [ boolean-py ];
 
diff --git a/nixpkgs/pkgs/development/python-modules/lxml/default.nix b/nixpkgs/pkgs/development/python-modules/lxml/default.nix
index 816b3a676828..fca4366e8a0e 100644
--- a/nixpkgs/pkgs/development/python-modules/lxml/default.nix
+++ b/nixpkgs/pkgs/development/python-modules/lxml/default.nix
@@ -15,7 +15,7 @@ buildPythonPackage rec {
   };
 
   nativeBuildInputs = [ libxml2.dev libxslt.dev ];
-  buildInputs = [ libxml2 libxslt ];
+  propagatedBuildInputs = [ libxml2 libxslt ];
 
   hardeningDisable = stdenv.lib.optional stdenv.isDarwin "format";
 
diff --git a/nixpkgs/pkgs/development/python-modules/mypy/default.nix b/nixpkgs/pkgs/development/python-modules/mypy/default.nix
index c5ca8e1f4b57..d4361baf903a 100644
--- a/nixpkgs/pkgs/development/python-modules/mypy/default.nix
+++ b/nixpkgs/pkgs/development/python-modules/mypy/default.nix
@@ -3,14 +3,14 @@
 
 buildPythonPackage rec {
   pname = "mypy";
-  version = "0.701";
+  version = "0.711";
 
   # Tests not included in pip package.
   doCheck = false;
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "05479r3gbq17r22hyhxjg49smx5q864pgx8ayy23rsdj4w6z2r2p";
+    sha256 = "0s1kwi1dhrv55v0c9w7c1g6mq5d2dpw7x1jj5mcnniw77mclmvdv";
   };
 
   disabled = !isPy3k;
diff --git a/nixpkgs/pkgs/development/python-modules/nbconvert/default.nix b/nixpkgs/pkgs/development/python-modules/nbconvert/default.nix
index 69828b2b18ff..2f0090b5967d 100644
--- a/nixpkgs/pkgs/development/python-modules/nbconvert/default.nix
+++ b/nixpkgs/pkgs/development/python-modules/nbconvert/default.nix
@@ -44,6 +44,9 @@ buildPythonPackage rec {
     HOME=$(mktemp -d) py.test -v --ignore="nbconvert/preprocessors/tests/test_execute.py"
   '';
 
+  # Some of the tests use localhost networking.
+  __darwinAllowLocalNetworking = true;
+
   meta = {
     description = "Converting Jupyter Notebooks";
     homepage = https://jupyter.org/;
diff --git a/nixpkgs/pkgs/development/python-modules/nbformat/default.nix b/nixpkgs/pkgs/development/python-modules/nbformat/default.nix
index 8b16ffb7e32b..fbc71202d286 100644
--- a/nixpkgs/pkgs/development/python-modules/nbformat/default.nix
+++ b/nixpkgs/pkgs/development/python-modules/nbformat/default.nix
@@ -29,6 +29,9 @@ buildPythonPackage rec {
     export HOME=tmp
   '';
 
+  # Some of the tests use localhost networking.
+  __darwinAllowLocalNetworking = true;
+
   meta = {
     description = "The Jupyter Notebook format";
     homepage = https://jupyter.org/;
diff --git a/nixpkgs/pkgs/development/python-modules/nbval/default.nix b/nixpkgs/pkgs/development/python-modules/nbval/default.nix
index 60aa4806e2fc..860142f1e94c 100644
--- a/nixpkgs/pkgs/development/python-modules/nbval/default.nix
+++ b/nixpkgs/pkgs/development/python-modules/nbval/default.nix
@@ -45,6 +45,9 @@ buildPythonPackage rec {
     pytest tests --ignore tests/test_timeouts.py
   '';
 
+  # Some of the tests use localhost networking.
+  __darwinAllowLocalNetworking = true;
+
   meta = with lib; {
     description = "A py.test plugin to validate Jupyter notebooks";
     homepage = https://github.com/computationalmodelling/nbval;
diff --git a/nixpkgs/pkgs/development/python-modules/ncclient/default.nix b/nixpkgs/pkgs/development/python-modules/ncclient/default.nix
index 10baadcab302..02e2a1b472a7 100644
--- a/nixpkgs/pkgs/development/python-modules/ncclient/default.nix
+++ b/nixpkgs/pkgs/development/python-modules/ncclient/default.nix
@@ -4,8 +4,6 @@
 , paramiko
 , selectors2
 , lxml
-, libxml2
-, libxslt
 , nose
 , rednose
 }:
@@ -22,7 +20,7 @@ buildPythonPackage rec {
   checkInputs = [ nose rednose ];
 
   propagatedBuildInputs = [
-    paramiko lxml libxml2 libxslt selectors2
+    paramiko lxml selectors2
   ];
 
   checkPhase = ''
diff --git a/nixpkgs/pkgs/development/python-modules/notebook/default.nix b/nixpkgs/pkgs/development/python-modules/notebook/default.nix
index 431d4bb4d563..d081a5a92fbe 100644
--- a/nixpkgs/pkgs/development/python-modules/notebook/default.nix
+++ b/nixpkgs/pkgs/development/python-modules/notebook/default.nix
@@ -64,6 +64,9 @@ buildPythonPackage rec {
     else ""}
   '';
 
+  # Some of the tests use localhost networking.
+  __darwinAllowLocalNetworking = true;
+
   meta = {
     description = "The Jupyter HTML notebook is a web-based notebook environment for interactive computing";
     homepage = https://jupyter.org/;
diff --git a/nixpkgs/pkgs/development/python-modules/pdf2image/default.nix b/nixpkgs/pkgs/development/python-modules/pdf2image/default.nix
index 6d0cafd5f803..1fbddca8cc4f 100644
--- a/nixpkgs/pkgs/development/python-modules/pdf2image/default.nix
+++ b/nixpkgs/pkgs/development/python-modules/pdf2image/default.nix
@@ -2,13 +2,13 @@
 
 buildPythonPackage rec {
   pname = "pdf2image";
-  version = "1.4.2";
+  version = "1.9.0";
 
   propagatedBuildInputs = [ pillow poppler_utils ];
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "694f8014f4c3722e5913f1c378c7056b1330db070ff7cb8196a80d24b80fa61e";
+    sha256 = "186g36dcfv83iranyd8gqw2zinhpcvmq86zd7sbsn237gcqk43rn";
   };
 
   meta = with stdenv.lib; {
diff --git a/nixpkgs/pkgs/development/python-modules/picos/default.nix b/nixpkgs/pkgs/development/python-modules/picos/default.nix
new file mode 100644
index 000000000000..57fbe099071d
--- /dev/null
+++ b/nixpkgs/pkgs/development/python-modules/picos/default.nix
@@ -0,0 +1,36 @@
+{ lib
+, buildPythonPackage
+, fetchFromGitLab
+, numpy
+, cvxopt
+, python
+}:
+
+buildPythonPackage rec {
+  pname = "picos";
+  version = "1.2.0";
+
+  src = fetchFromGitLab {
+    owner = "picos-api";
+    repo = "picos";
+    rev = "v${version}";
+    sha256 = "018xhc7cb2crkk27lhl63c7h77w5wa37fg41i7nqr4xclr43cs9z";
+  };
+
+  propagatedBuildInputs = [
+    numpy
+    cvxopt
+  ];
+
+  checkPhase = ''
+    ${python.interpreter} test.py
+  '';
+  
+  meta = with lib; {
+    description = "A Python interface to conic optimization solvers";
+    homepage = https://gitlab.com/picos-api/picos;
+    license = licenses.gpl3;
+    maintainers = with maintainers; [ tobiasBora ];
+  };
+}
+
diff --git a/nixpkgs/pkgs/development/python-modules/portend/default.nix b/nixpkgs/pkgs/development/python-modules/portend/default.nix
index 5da7a7941c0f..7aa66c2a3093 100644
--- a/nixpkgs/pkgs/development/python-modules/portend/default.nix
+++ b/nixpkgs/pkgs/development/python-modules/portend/default.nix
@@ -24,6 +24,9 @@ buildPythonPackage rec {
     py.test --deselect=test_portend.py::TestChecker::test_check_port_listening
   '';
 
+  # Some of the tests use localhost networking.
+  __darwinAllowLocalNetworking = true;
+
   meta = with stdenv.lib; {
     description = "Monitor TCP ports for bound or unbound states";
     homepage = https://github.com/jaraco/portend;
diff --git a/nixpkgs/pkgs/development/python-modules/pycurl2/default.nix b/nixpkgs/pkgs/development/python-modules/pycurl2/default.nix
index 01428d41b7d2..478f4451cf7a 100644
--- a/nixpkgs/pkgs/development/python-modules/pycurl2/default.nix
+++ b/nixpkgs/pkgs/development/python-modules/pycurl2/default.nix
@@ -1,6 +1,4 @@
-{ stdenv
-, buildPythonPackage
-, fetchgit
+{ lib, buildPythonPackage, fetchFromGitHub
 , isPy3k
 , simplejson
 , unittest2
@@ -13,8 +11,9 @@ buildPythonPackage {
   version = "7.20.0";
   disabled = isPy3k;
 
-  src = fetchgit {
-    url = "https://github.com/Lispython/pycurl.git";
+  src = fetchFromGitHub {
+    owner = "Lispython";
+    repo = "pycurl";
     rev = "0f00109950b883d680bd85dc6e8a9c731a7d0d13";
     sha256 = "1qmw3cm93kxj94s71a8db9lwv2cxmr2wjv7kp1r8zildwdzhaw7j";
   };
@@ -22,9 +21,10 @@ buildPythonPackage {
   # error: (6, "Couldn't resolve host 'h.wrttn.me'")
   doCheck = false;
 
-  buildInputs = [ pkgs.curl simplejson unittest2 nose ];
+  nativeBuildInputs = [ pkgs.curl.dev ];
+  buildInputs = [ simplejson unittest2 nose ];
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     homepage = https://pypi.python.org/pypi/pycurl2;
     description = "A fork from original PycURL library that no maintained from 7.19.0";
     license = licenses.mit;
diff --git a/nixpkgs/pkgs/development/python-modules/pytest-check/default.nix b/nixpkgs/pkgs/development/python-modules/pytest-check/default.nix
new file mode 100644
index 000000000000..f91b8191eb15
--- /dev/null
+++ b/nixpkgs/pkgs/development/python-modules/pytest-check/default.nix
@@ -0,0 +1,29 @@
+{ stdenv
+, buildPythonPackage
+, fetchFromGitHub
+, pytest
+, pytestCheckHook
+}:
+
+buildPythonPackage rec {
+  pname = "pytest-check";
+  version = "0.3.5";
+
+  src = fetchFromGitHub {
+    owner = "okken";
+    repo = "pytest-check";
+    rev = version;
+    sha256 = "11wb4f4sp4cr5mzqdakrbycwgfr2p1sx1l91fa6525wnfvgc0qy3";
+  };
+
+  buildInputs = [ pytest ];
+
+  checkInputs = [ pytest pytestCheckHook ];
+
+  meta = with stdenv.lib; {
+    description = "pytest plugin allowing multiple failures per test";
+    homepage = https://github.com/okken/pytest-check;
+    license = licenses.mit;
+    maintainers = [ maintainers.flokli ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/python-modules/python-engineio/default.nix b/nixpkgs/pkgs/development/python-modules/python-engineio/default.nix
index 93dd9fb654f9..bf6d4cd23817 100644
--- a/nixpkgs/pkgs/development/python-modules/python-engineio/default.nix
+++ b/nixpkgs/pkgs/development/python-modules/python-engineio/default.nix
@@ -1,27 +1,25 @@
-{ stdenv
-, buildPythonPackage
-, fetchFromGitHub
-, six
+{ stdenv, buildPythonPackage, fetchFromGitHub
+, aiohttp
 , eventlet
-, mock
 , iana-etc
 , libredirect
-, aiohttp
-, websockets
-, websocket_client
+, mock
 , requests
+, six
 , tornado
+, websocket_client
+, websockets
 }:
 
 buildPythonPackage rec {
   pname = "python-engineio";
-  version = "3.4.3";
+  version = "3.9.3";
 
   src = fetchFromGitHub {
     owner = "miguelgrinberg";
     repo = "python-engineio";
     rev = "v${version}";
-    sha256 = "0wk81rqigw47z087f5kc7b9iwqggypxc62q8q818qyzqwb93ysxf";
+    sha256 = "0rwlj12d37dpw6y3bdn6rxv68xnd9ykj4fr3ly0fa143xci35d9y";
   };
 
   propagatedBuildInputs = [
@@ -29,13 +27,13 @@ buildPythonPackage rec {
   ];
 
   checkInputs = [
+    aiohttp
     eventlet
     mock
-    aiohttp
-    websockets
-    websocket_client
-    tornado
     requests
+    tornado
+    websocket_client
+    websockets
   ];
 
   # make /etc/protocols accessible to fix socket.getprotobyname('tcp') in sandbox
diff --git a/nixpkgs/pkgs/development/python-modules/python-language-server/default.nix b/nixpkgs/pkgs/development/python-modules/python-language-server/default.nix
index 6b25ba93ef9b..76508d1ec96f 100644
--- a/nixpkgs/pkgs/development/python-modules/python-language-server/default.nix
+++ b/nixpkgs/pkgs/development/python-modules/python-language-server/default.nix
@@ -1,6 +1,6 @@
 { stdenv, buildPythonPackage, fetchFromGitHub, pythonOlder, isPy27
 , backports_functools_lru_cache, configparser, futures, future, jedi, pluggy, python-jsonrpc-server
-, pytest, mock, pytestcov, coverage
+, pytest, mock, pytestcov, coverage, setuptools
 , # Allow building a limited set of providers, e.g. ["pycodestyle"].
   providers ? ["*"]
   # The following packages are optional and
@@ -44,7 +44,7 @@ buildPythonPackage rec {
     HOME=$TEMPDIR pytest
   '';
 
-  propagatedBuildInputs = [ jedi pluggy future python-jsonrpc-server ]
+  propagatedBuildInputs = [ setuptools jedi pluggy future python-jsonrpc-server ]
     ++ stdenv.lib.optional (withProvider "autopep8") autopep8
     ++ stdenv.lib.optional (withProvider "mccabe") mccabe
     ++ stdenv.lib.optional (withProvider "pycodestyle") pycodestyle
diff --git a/nixpkgs/pkgs/development/python-modules/pyzmq/default.nix b/nixpkgs/pkgs/development/python-modules/pyzmq/default.nix
index dcab96d12a6a..40273cce8887 100644
--- a/nixpkgs/pkgs/development/python-modules/pyzmq/default.nix
+++ b/nixpkgs/pkgs/development/python-modules/pyzmq/default.nix
@@ -32,4 +32,7 @@ buildPythonPackage rec {
       and not test_on_recv_wake \
       and not test_monitor"
   '';
+
+  # Some of the tests use localhost networking.
+  __darwinAllowLocalNetworking = true;
 }
diff --git a/nixpkgs/pkgs/development/python-modules/sentry-sdk/default.nix b/nixpkgs/pkgs/development/python-modules/sentry-sdk/default.nix
index 503b899ec22d..c3cc1baaf43f 100644
--- a/nixpkgs/pkgs/development/python-modules/sentry-sdk/default.nix
+++ b/nixpkgs/pkgs/development/python-modules/sentry-sdk/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, buildPythonPackage, fetchPypi, urllib3, certifi }:
+{ stdenv, buildPythonPackage, fetchPypi, urllib3, certifi, django, flask, tornado, sanic, aiohttp, bottle, rq, falcon, pyramid, celery }:
 
 buildPythonPackage rec {
   pname = "sentry-sdk";
@@ -9,6 +9,8 @@ buildPythonPackage rec {
     sha256 = "f5819df450d7b0696be69a0c6d70a09e4890a3844ee8ccb7a461794135bd5965";
   };
 
+  checkInputs = [ django flask tornado sanic aiohttp bottle rq falcon pyramid celery ];
+
   propagatedBuildInputs = [ urllib3 certifi ];
 
   meta = with stdenv.lib; {
diff --git a/nixpkgs/pkgs/development/python-modules/trustme/default.nix b/nixpkgs/pkgs/development/python-modules/trustme/default.nix
index e2ba008d3a0b..601e49759fd0 100644
--- a/nixpkgs/pkgs/development/python-modules/trustme/default.nix
+++ b/nixpkgs/pkgs/development/python-modules/trustme/default.nix
@@ -36,6 +36,9 @@ buildPythonPackage rec {
     pytest
   '';
 
+  # Some of the tests use localhost networking.
+  __darwinAllowLocalNetworking = true;
+
   meta = {
     description = "High quality TLS certs while you wait, for the discerning tester";
     homepage = https://github.com/python-trio/trustme;
diff --git a/nixpkgs/pkgs/development/python-modules/typed-ast/default.nix b/nixpkgs/pkgs/development/python-modules/typed-ast/default.nix
index f540cf72877a..0514be0fb4d4 100644
--- a/nixpkgs/pkgs/development/python-modules/typed-ast/default.nix
+++ b/nixpkgs/pkgs/development/python-modules/typed-ast/default.nix
@@ -1,10 +1,12 @@
-{ buildPythonPackage, fetchPypi, lib, pythonOlder }:
+{ buildPythonPackage, fetchFromGitHub, lib, pythonOlder }:
 buildPythonPackage rec {
   pname = "typed-ast";
-  version = "1.3.5";
-  src = fetchPypi{
-    inherit pname version;
-    sha256 = "1m7pr6qpana3cvqwiw7mlvrgvmw27ch5mx1592572xhlki8g85ak";
+  version = "1.4.0";
+  src = fetchFromGitHub{
+    owner = "python";
+    repo = "typed_ast";
+    rev = version;
+    sha256 = "0l0hz809f7i356kmqkvfsaswiidb98j9hs9rrjnfawzqcbffzgyb";
   };
   # Only works with Python 3.3 and newer;
   disabled = pythonOlder "3.3";
diff --git a/nixpkgs/pkgs/development/python-modules/uvicorn/default.nix b/nixpkgs/pkgs/development/python-modules/uvicorn/default.nix
index 1bf0d1c54f06..9f7efef1e843 100644
--- a/nixpkgs/pkgs/development/python-modules/uvicorn/default.nix
+++ b/nixpkgs/pkgs/development/python-modules/uvicorn/default.nix
@@ -1,23 +1,27 @@
 { lib
 , buildPythonPackage
-, fetchPypi
+, fetchFromGitHub
 , click
 , h11
 , httptools
 , uvloop
 , websockets
 , wsproto
+, pytest
+, requests
 , isPy27
 }:
 
 buildPythonPackage rec {
   pname = "uvicorn";
-  version = "0.8.4";
+  version = "0.9.0";
   disabled = isPy27;
 
-  src = fetchPypi {
-    inherit pname version;
-    sha256 = "1l8rfm30inx9pma893i7sby9h7y910k58841zqaajksn563b882k";
+  src = fetchFromGitHub {
+    owner = "encode";
+    repo = pname;
+    rev = version;
+    sha256 = "0z4h04mbkzqgpk698bac6f50jxkf02ils6khzl7zbw7yvi6gkkc8";
   };
 
   propagatedBuildInputs = [
@@ -29,11 +33,15 @@ buildPythonPackage rec {
     wsproto
   ];
 
-  checkPhase = ''
-    $out/bin/uvicorn --help
+  postPatch = ''
+    substituteInPlace setup.py \
+      --replace "h11==0.8.*" "h11"
   '';
 
-  patches = [ ./setup.patch ];
+  checkInputs = [ pytest requests ];
+  checkPhase = ''
+    pytest
+  '';
 
   meta = with lib; {
     homepage = https://www.uvicorn.org/;
diff --git a/nixpkgs/pkgs/development/python-modules/uvicorn/setup.patch b/nixpkgs/pkgs/development/python-modules/uvicorn/setup.patch
deleted file mode 100644
index f1d974b42d93..000000000000
--- a/nixpkgs/pkgs/development/python-modules/uvicorn/setup.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/setup.py b/setup.py
-index 802cda4..561abf4 100755
---- a/setup.py
-+++ b/setup.py
-@@ -42,7 +42,7 @@ env_marker = (
- 
- requirements = [
-     "click==7.*",
--    "h11==0.8.*",
-+    "h11",
-     "websockets==7.*",
-     "httptools==0.0.13 ;" + env_marker,
-     "uvloop==0.12.* ;" + env_marker,
diff --git a/nixpkgs/pkgs/development/python-modules/uvloop/darwin_sandbox.patch b/nixpkgs/pkgs/development/python-modules/uvloop/darwin_sandbox.patch
new file mode 100644
index 000000000000..bd4e5e48b149
--- /dev/null
+++ b/nixpkgs/pkgs/development/python-modules/uvloop/darwin_sandbox.patch
@@ -0,0 +1,28 @@
+diff --git a/tests/test_pipes.py b/tests/test_pipes.py
+index d883abf..2e74d7a 100644
+--- a/tests/test_pipes.py
++++ b/tests/test_pipes.py
+@@ -2,6 +2,7 @@ import asyncio
+ import io
+ import os
+ import socket
++import unittest
+ 
+ from uvloop import _testbase as tb
+ 
+@@ -96,6 +97,7 @@ class _BasePipeTest:
+         # extra info is available
+         self.assertIsNotNone(proto.transport.get_extra_info('pipe'))
+ 
++    @unittest.skip("darwin sandbox")
+     def test_read_pty_output(self):
+         proto = MyReadPipeProto(loop=self.loop)
+ 
+@@ -198,6 +200,7 @@ class _BasePipeTest:
+         self.loop.run_until_complete(proto.done)
+         self.assertEqual('CLOSED', proto.state)
+ 
++    @unittest.skip("darwin sandbox")
+     def test_write_pty(self):
+         master, slave = os.openpty()
+         os.set_blocking(master, False)
diff --git a/nixpkgs/pkgs/development/python-modules/uvloop/default.nix b/nixpkgs/pkgs/development/python-modules/uvloop/default.nix
index 2093f4d7053c..171f6d6ed32f 100644
--- a/nixpkgs/pkgs/development/python-modules/uvloop/default.nix
+++ b/nixpkgs/pkgs/development/python-modules/uvloop/default.nix
@@ -20,6 +20,8 @@ buildPythonPackage rec {
     sha256 = "0blcnrd5vky2k1m1p1skx4516dr1jx76yyb0c6fi82si6mqd0b4l";
   };
 
+  patches = lib.optional stdenv.isDarwin ./darwin_sandbox.patch;
+
   buildInputs = [
     libuv
   ] ++ lib.optionals stdenv.isDarwin [ CoreServices ApplicationServices ];
@@ -31,6 +33,9 @@ buildPythonPackage rec {
 
   checkInputs = [ pyopenssl psutil ];
 
+  # Some of the tests use localhost networking.
+  __darwinAllowLocalNetworking = true;
+
   meta = with lib; {
     description = "Fast implementation of asyncio event loop on top of libuv";
     homepage = http://github.com/MagicStack/uvloop;
diff --git a/nixpkgs/pkgs/development/python-modules/websockets/default.nix b/nixpkgs/pkgs/development/python-modules/websockets/default.nix
index 2e0caae4b469..589a8089fcaa 100644
--- a/nixpkgs/pkgs/development/python-modules/websockets/default.nix
+++ b/nixpkgs/pkgs/development/python-modules/websockets/default.nix
@@ -1,24 +1,26 @@
 { lib
-, fetchPypi
+, fetchFromGitHub
 , buildPythonPackage
 , pythonOlder
+, pytest
 }:
 
 buildPythonPackage rec {
   pname = "websockets";
-  version = "7.0";
+  version = "8.0.2";
 
-  src = fetchPypi {
-    inherit pname version;
-    sha256 = "17vwr6sa1y3lb24wzfyyc98c5v03di4j8f24qkqa9vsvaghc7qq8";
+  src = fetchFromGitHub {
+    owner = "aaugustin";
+    repo = pname;
+    rev = version;
+    sha256 = "02fgb8gib4z5fqv30brz3mhxmblw9bw0978fhpjdrkj7wvqrz5h8";
   };
 
   disabled = pythonOlder "3.3";
-  doCheck = false; # protocol tests fail
 
-  meta = {
+  meta = with lib; {
     description = "WebSocket implementation in Python 3";
-    homepage = https://github.com/aaugustin/websockets;
-    license = lib.licenses.bsd3;
+    homepage = "https://github.com/aaugustin/websockets";
+    license = licenses.bsd3;
   };
 }