Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use sqlalchemy 1.3.x for mautrix-telegram #127486

Merged
merged 2 commits into from Jun 20, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 45 additions & 0 deletions pkgs/development/python-modules/sqlalchemy/1.3.nix
Original file line number Diff line number Diff line change
@@ -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;
};
}
10 changes: 7 additions & 3 deletions pkgs/servers/mautrix-telegram/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 3 additions & 1 deletion pkgs/top-level/python-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8121,7 +8121,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;
Comment on lines +8125 to +8126
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
sqlalchemy_1_4 = callPackage ../development/python-modules/sqlalchemy/1.4.nix { };
sqlalchemy = self.sqlalchemy_1_4;
sqlalchemy = callPackage ../development/python-modules/sqlalchemy { };

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sqlalchemy/default.nix doesn't exist anymore, so this would break evaluation.


sqlalchemy-citext = callPackage ../development/python-modules/sqlalchemy-citext { };

Expand Down