Merge pull request #127486 from petabyteboy/feature/fix-mautrix

use sqlalchemy 1.3.x for mautrix-telegram
This commit is contained in:
Maximilian Bosch 2021-06-20 19:16:52 +02:00 committed by GitHub
commit aa5c48152a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 55 additions and 4 deletions

View file

@ -0,0 +1,45 @@
{ stdenv, lib, fetchPypi, buildPythonPackage, isPy3k, isPy35, fetchpatch
, mock
, pysqlite ? null
, pytestCheckHook
, pytest_xdist
}:
buildPythonPackage rec {
pname = "SQLAlchemy";
version = "1.3.23";
src = fetchPypi {
inherit pname version;
sha256 = "6fca33672578666f657c131552c4ef8979c1606e494f78cd5199742dfb26918b";
};
patches = [
# fix test_pyodbc_extra_connect_azure test failure
(fetchpatch {
url = "https://github.com/sqlalchemy/sqlalchemy/commit/7293b3dc0e9eb3dae84ffd831494b85355df8e73.patch";
sha256 = "1z61lzxamz74771ddlqmbxba1dcr77f016vqfcmb44dxb228w2db";
})
];
checkInputs = [
pytestCheckHook
mock
] ++ lib.optional (!isPy3k) pysqlite;
postInstall = ''
sed -e 's:--max-worker-restart=5::g' -i setup.cfg
'';
dontUseSetuptoolsCheck = true;
# disable mem-usage tests on mac, has trouble serializing pickle files
disabledTests = lib.optionals isPy35 [ "exception_persistent_flush_py3k "]
++ lib.optionals stdenv.isDarwin [ "MemUsageWBackendTest" "MemUsageTest" ];
meta = with lib; {
homepage = "http://www.sqlalchemy.org/";
description = "A Python SQL toolkit and Object Relational Mapper";
license = licenses.mit;
};
}

View file

@ -29,13 +29,17 @@ in buildPythonPackage rec {
propagatedBuildInputs = [
Mako
aiohttp
mautrix
sqlalchemy
(mautrix.override {
sqlalchemy = sqlalchemy_1_3;
})
sqlalchemy_1_3
CommonMark
ruamel_yaml
python_magic
telethon
telethon-session-sqlalchemy
(telethon-session-sqlalchemy.override {
sqlalchemy = sqlalchemy_1_3;
})
pillow
lxml
setuptools

View file

@ -8135,7 +8135,9 @@ in {
spyder-kernels_0_5 = callPackage ../development/python-modules/spyder-kernels/0.x.nix { };
sqlalchemy = callPackage ../development/python-modules/sqlalchemy { };
sqlalchemy_1_3 = callPackage ../development/python-modules/sqlalchemy/1.3.nix { };
sqlalchemy_1_4 = callPackage ../development/python-modules/sqlalchemy/1.4.nix { };
sqlalchemy = self.sqlalchemy_1_4;
sqlalchemy-citext = callPackage ../development/python-modules/sqlalchemy-citext { };