1{ 2 lib, 3 buildPythonPackage, 4 fetchPypi, 5 flask, 6 mock, 7 flit-core, 8 pytestCheckHook, 9 pythonAtLeast, 10 pythonOlder, 11 sqlalchemy, 12}: 13 14buildPythonPackage rec { 15 pname = "flask-sqlalchemy"; 16 version = "3.1.1"; 17 format = "pyproject"; 18 19 disabled = pythonOlder "3.9"; 20 21 src = fetchPypi { 22 pname = "flask_sqlalchemy"; 23 inherit version; 24 hash = "sha256-5LaLuIGALdoafYeLL8hMBtHuV/tAuHTT3Jfav6NrgxI="; 25 }; 26 27 nativeBuildInputs = [ flit-core ]; 28 29 propagatedBuildInputs = [ 30 flask 31 sqlalchemy 32 ]; 33 34 nativeCheckInputs = [ 35 mock 36 pytestCheckHook 37 ]; 38 39 doCheck = pythonOlder "3.13"; # https://github.com/pallets-eco/flask-sqlalchemy/issues/1379 40 41 disabledTests = [ 42 # flaky 43 "test_session_scoping_changing" 44 # https://github.com/pallets-eco/flask-sqlalchemy/issues/1378 45 "test_explicit_table" 46 ]; 47 48 pytestFlags = lib.optionals (pythonAtLeast "3.12") [ 49 # datetime.datetime.utcnow() is deprecated and scheduled for removal in a future version. 50 "-Wignore::DeprecationWarning" 51 ]; 52 53 pythonImportsCheck = [ "flask_sqlalchemy" ]; 54 55 meta = with lib; { 56 description = "SQLAlchemy extension for Flask"; 57 homepage = "http://flask-sqlalchemy.pocoo.org/"; 58 changelog = "https://github.com/pallets-eco/flask-sqlalchemy/blob/${version}/CHANGES.rst"; 59 license = licenses.bsd3; 60 maintainers = with maintainers; [ gerschtli ]; 61 }; 62}