|
1 | 1 | { |
2 | 2 | fetchFromGitHub, |
| 3 | + fetchpatch, |
3 | 4 | fetchPypi, |
4 | 5 | python3, |
5 | 6 | }: |
|
8 | 9 | python = python3.override { |
9 | 10 | self = python; |
10 | 11 | packageOverrides = pySelf: pySuper: { |
11 | | - connexion = pySuper.connexion.overridePythonAttrs (o: rec { |
| 12 | + connexion = pySuper.connexion.overridePythonAttrs rec { |
12 | 13 | version = "2.14.2"; |
13 | 14 | src = fetchFromGitHub { |
14 | 15 | owner = "spec-first"; |
15 | 16 | repo = "connexion"; |
16 | | - rev = "refs/tags/${version}"; |
| 17 | + tag = version; |
17 | 18 | hash = "sha256-1v1xCHY3ZnZG/Vu9wN/it7rLKC/StoDefoMNs+hMjIs="; |
18 | 19 | }; |
19 | 20 | nativeBuildInputs = with pySelf; [ |
|
40 | 41 | aiohttp-remotes |
41 | 42 | decorator |
42 | 43 | pytest-aiohttp |
| 44 | + pytest-tornasync |
43 | 45 | pytestCheckHook |
44 | 46 | testfixtures |
45 | 47 | ]; |
46 | 48 | disabledTests = [ |
| 49 | + "test_aiohttp_simple_api" |
47 | 50 | "test_app" |
| 51 | + "test_invalid_type" # https://github.com/spec-first/connexion/issues/1969 |
48 | 52 | "test_openapi_yaml_behind_proxy" |
| 53 | + "test_run_with_wsgi_containers" |
49 | 54 | "test_swagger_ui" |
50 | 55 | ]; |
51 | | - }); |
| 56 | + postPatch = '' |
| 57 | + substituteInPlace connexion/__init__.py \ |
| 58 | + --replace "2020.0.dev1" "${version}" |
| 59 | + ''; |
| 60 | + }; |
| 61 | + werkzeug = pySuper.werkzeug.overridePythonAttrs rec { |
| 62 | + version = "2.3.8"; |
| 63 | + src = fetchPypi { |
| 64 | + pname = "werkzeug"; |
| 65 | + inherit version; |
| 66 | + hash = "sha256-VUslfHS763oNJUFgpPj/4YUkP1KlIDUGC3Ycpi2XfwM="; |
| 67 | + }; |
| 68 | + nativeCheckInputs = with pySelf; [ |
| 69 | + pytest-xprocess |
| 70 | + ]; |
| 71 | + }; |
| 72 | + # flask's test-suite needs click 8.1.8 |
| 73 | + # TypeError: CliRunner.__init__() got an unexpected keyword argument 'mix_stderr' |
| 74 | + click = pySuper.click.overridePythonAttrs rec { |
| 75 | + version = "8.1.8"; |
| 76 | + src = fetchPypi { |
| 77 | + pname = "click"; |
| 78 | + inherit version; |
| 79 | + hash = "sha256-7VPJ2JkNg8Kifermjk7jN0c/YzDAQKMdQiXJV00WCWo="; |
| 80 | + }; |
| 81 | + }; |
52 | 82 | flask = pySuper.flask.overridePythonAttrs (o: rec { |
53 | 83 | version = "2.2.5"; |
54 | 84 | src = fetchPypi { |
|
59 | 89 | nativeBuildInputs = (o.nativeBuildInputs or [ ]) ++ [ |
60 | 90 | pySelf.setuptools |
61 | 91 | ]; |
| 92 | + pytestFlagsArray = [ |
| 93 | + # tests that are marked with filterwarnings fail with |
| 94 | + # DeprecationWarning: 'pkgutil.get_loader' is deprecated and slated for |
| 95 | + # removal in Python 3.14; use importlib.util.find_spec() instead |
| 96 | + "-W ignore::DeprecationWarning" |
| 97 | + ]; |
62 | 98 | }); |
| 99 | + flask-login = pySuper.flask-login.overridePythonAttrs rec { |
| 100 | + version = "0.6.3"; |
| 101 | + src = fetchFromGitHub { |
| 102 | + owner = "maxcountryman"; |
| 103 | + repo = "flask-login"; |
| 104 | + tag = version; |
| 105 | + hash = "sha256-Sn7Ond67P/3+OmKKFE/KfA6FE4IajhiRXVVrXKJtY3I="; |
| 106 | + }; |
| 107 | + nativeBuildInputs = with pySelf; [ setuptools ]; |
| 108 | + pytestFlagsArray = [ |
| 109 | + # DeprecationWarning: datetime.datetime.utcnow() is deprecated |
| 110 | + # and scheduled for removal in a future version. |
| 111 | + # Use timezone-aware objects to represent datetimes in UTC: |
| 112 | + # datetime.datetime.now(datetime.UTC). |
| 113 | + "-W ignore::DeprecationWarning" |
| 114 | + ]; |
| 115 | + }; |
| 116 | + flask-session = pySuper.flask-session.overridePythonAttrs rec { |
| 117 | + version = "0.5.0"; |
| 118 | + src = fetchFromGitHub { |
| 119 | + owner = "palletc-eco"; |
| 120 | + repo = "flask-session"; |
| 121 | + tag = version; |
| 122 | + hash = "sha256-t8w6ZS4gBDpnnKvL3DLtn+rRLQNJbrT2Hxm4f3+a3Xc="; |
| 123 | + }; |
| 124 | + nativeCheckInputs = with pySelf; [ pytestCheckHook ]; |
| 125 | + pytestFlagsArray = [ |
| 126 | + "-k" |
| 127 | + "'null_session or filesystem_session'" |
| 128 | + ]; |
| 129 | + dependencies = with pySelf; [ |
| 130 | + flask-sqlalchemy |
| 131 | + cachelib |
| 132 | + ]; |
| 133 | + disabledTests = [ ]; |
| 134 | + disabledTestPaths = [ ]; |
| 135 | + preCheck = ""; |
| 136 | + postCheck = ""; |
| 137 | + }; |
63 | 138 | # flask-appbuilder doesn't work with sqlalchemy 2.x, flask-appbuilder 3.x |
64 | 139 | # https://github.com/dpgaspar/Flask-AppBuilder/issues/2038 |
65 | | - flask-appbuilder = pySuper.flask-appbuilder.overridePythonAttrs (o: { |
| 140 | + flask-appbuilder = pySuper.flask-appbuilder.overridePythonAttrs { |
66 | 141 | meta.broken = false; |
67 | | - }); |
| 142 | + }; |
68 | 143 | # a knock-on effect from overriding the sqlalchemy version |
69 | | - flask-sqlalchemy = pySuper.flask-sqlalchemy.overridePythonAttrs (o: { |
| 144 | + flask-sqlalchemy = pySuper.flask-sqlalchemy.overridePythonAttrs { |
70 | 145 | src = fetchPypi { |
71 | 146 | pname = "Flask-SQLAlchemy"; |
72 | 147 | version = "2.5.1"; |
73 | 148 | hash = "sha256-K9pEtD58rLFdTgX/PMH4vJeTbMRkYjQkECv8LDXpWRI="; |
74 | 149 | }; |
75 | 150 | format = "setuptools"; |
76 | | - }); |
77 | | - httpcore = pySuper.httpcore.overridePythonAttrs (o: { |
| 151 | + }; |
| 152 | + httpcore = pySuper.httpcore.overridePythonAttrs { |
78 | 153 | # nullify upstream's pytest flags which cause |
79 | 154 | # "TLS/SSL connection has been closed (EOF)" |
80 | 155 | # with pytest-httpbin 1.x |
81 | 156 | preCheck = '' |
82 | 157 | substituteInPlace pyproject.toml \ |
83 | 158 | --replace '[tool.pytest.ini_options]' '[tool.notpytest.ini_options]' |
84 | 159 | ''; |
85 | | - }); |
86 | | - pytest-httpbin = pySuper.pytest-httpbin.overridePythonAttrs (o: rec { |
| 160 | + }; |
| 161 | + pytest-httpbin = pySuper.pytest-httpbin.overridePythonAttrs rec { |
87 | 162 | version = "1.0.2"; |
88 | 163 | src = fetchFromGitHub { |
89 | 164 | owner = "kevin1024"; |
90 | 165 | repo = "pytest-httpbin"; |
91 | | - rev = "refs/tags/v${version}"; |
| 166 | + tag = "v${version}"; |
92 | 167 | hash = "sha256-S4ThQx4H3UlKhunJo35esPClZiEn7gX/Qwo4kE1QMTI="; |
93 | 168 | }; |
94 | | - }); |
| 169 | + # Use unmerged PR #65 to fix older version: |
| 170 | + # https://github.com/kevin1024/pytest-httpbin/pull/65/ |
| 171 | + # It was closed in favour of another which isn't compatible with the overriden version. |
| 172 | + patches = [ |
| 173 | + (fetchpatch { |
| 174 | + url = "https://github.com/kevin1024/pytest-httpbin/commit/4e325f877ff8f77dec9f380bd8e53bb42976775c.patch"; |
| 175 | + hash = "sha256-a33XcdMupD+7ZzvUibePdldGImmPLDNU2sxRbwpveDA="; |
| 176 | + }) |
| 177 | + (fetchpatch { |
| 178 | + url = "https://github.com/kevin1024/pytest-httpbin/commit/463afb9b200563ac6fe7ae535f7a7a3c818b0418.patch"; |
| 179 | + hash = "sha256-HFmuLtAtEjnB6heSG1YNnqxtz2phXNkHbQaZyB5bLJs="; |
| 180 | + }) |
| 181 | + ]; |
| 182 | + disabledTests = [ |
| 183 | + "test_httpbin_secure_accepts_get_requests" |
| 184 | + "test_httpbin_secure_accepts_lots_of_get_requests" |
| 185 | + "test_httpbin_both[https]" |
| 186 | + "test_chunked_encoding[https]" |
| 187 | + "TestClassBassedTests::test_http_secure" |
| 188 | + "test_dont_crash_on_certificate_problems" |
| 189 | + "test_redirect_location_is_https_for_secure_server" |
| 190 | + "test_httpbin_secure_accepts_get_requests" |
| 191 | + "test_http_secure" |
| 192 | + ]; |
| 193 | + }; |
95 | 194 | # apache-airflow doesn't work with sqlalchemy 2.x |
96 | 195 | # https://github.com/apache/airflow/issues/28723 |
97 | 196 | sqlalchemy = pySuper.sqlalchemy_1_4; |
98 | | - |
| 197 | + gitpython = pySuper.gitpython.overridePythonAttrs rec { |
| 198 | + version = "3.1.44"; |
| 199 | + src = fetchFromGitHub { |
| 200 | + owner = "gitpython-developers"; |
| 201 | + repo = "gitpython"; |
| 202 | + rev = version; |
| 203 | + hash = "sha256-KnKaBv/tKk4wiGWUWCEgd1vgrTouwUhqxJ1/nMjRaWk="; |
| 204 | + }; |
| 205 | + }; |
| 206 | + # ValueError: Unknown classifier in field `project.classifiers`: Programming Language :: Python :: Free Threading :: 2 - Beta |
| 207 | + urllib3 = pySuper.urllib3.overridePythonAttrs rec { |
| 208 | + version = "2.5.0"; |
| 209 | + src = fetchPypi { |
| 210 | + pname = "urllib3"; |
| 211 | + inherit version; |
| 212 | + hash = "sha256-P8R3M8fkGdS8P2s9wrT4kLt0OQajDVa6Slv6S7/5J2A="; |
| 213 | + }; |
| 214 | + postPatch = '' |
| 215 | + substituteInPlace pyproject.toml \ |
| 216 | + --replace-fail ', "setuptools-scm>=8,<9"' "" |
| 217 | + ''; |
| 218 | + }; |
| 219 | + smmap = pySuper.smmap.overridePythonAttrs rec { |
| 220 | + version = "5.0.2"; |
| 221 | + src = fetchFromGitHub { |
| 222 | + owner = "gitpython-developers"; |
| 223 | + repo = "smmap"; |
| 224 | + rev = "refs/tags/v${version}"; |
| 225 | + hash = "sha256-0Y175kjv/8UJpSxtLpWH4/VT7JrcVPAq79Nf3rtHZZM="; |
| 226 | + }; |
| 227 | + }; |
| 228 | + trove-classifiers = pySuper.trove-classifiers.overridePythonAttrs rec { |
| 229 | + version = "2024.10.21.16"; |
| 230 | + src = fetchPypi { |
| 231 | + pname = "trove_classifiers"; |
| 232 | + inherit version; |
| 233 | + hash = "sha256-F8vQVdZ9Xp2d5jKTqHMpQ/q8IVdOTHt07fEStJKM9fM="; |
| 234 | + }; |
| 235 | + postPatch = ""; |
| 236 | + }; |
| 237 | + packaging = pySuper.packaging.overridePythonAttrs rec { |
| 238 | + version = "24.2"; |
| 239 | + src = fetchPypi { |
| 240 | + pname = "packaging"; |
| 241 | + inherit version; |
| 242 | + hash = "sha256-wiim3F6TLTRrxXOTeRCdSeiFPdgiNXHHxbVSYO3AuX8="; |
| 243 | + }; |
| 244 | + }; |
| 245 | + pluggy = pySuper.pluggy.overridePythonAttrs rec { |
| 246 | + version = "1.5.0"; |
| 247 | + src = fetchFromGitHub { |
| 248 | + owner = "pytest-dev"; |
| 249 | + repo = "pluggy"; |
| 250 | + tag = version; |
| 251 | + hash = "sha256-f0DxyZZk6RoYtOEXLACcsOn2B+Hot4U4g5Ogr/hKmOE="; |
| 252 | + }; |
| 253 | + }; |
| 254 | + pyproject-api = pySuper.pyproject-api.overridePythonAttrs rec { |
| 255 | + version = "1.8.0"; |
| 256 | + src = fetchPypi { |
| 257 | + pname = "pyproject_api"; |
| 258 | + inherit version; |
| 259 | + hash = "sha256-d7gEny/rXTPu/MIbV/HieWNid6isita1hxA3skN3hJY="; |
| 260 | + }; |
| 261 | + disabledTests = [ |
| 262 | + # AssertionError: assert ['magic>3', 'requests>2'] == ['magic >3', 'requests >2'] |
| 263 | + "test_frontend_setuptools" |
| 264 | + ]; |
| 265 | + }; |
| 266 | + tox = pySuper.tox.overridePythonAttrs rec { |
| 267 | + version = "4.27.0"; |
| 268 | + src = fetchFromGitHub { |
| 269 | + owner = "tox-dev"; |
| 270 | + repo = "tox"; |
| 271 | + tag = version; |
| 272 | + hash = "sha256-Z3qUK4w1ebPvdZD4ZuKgZXJPUu5lG0G41vn/pc9gC/0="; |
| 273 | + }; |
| 274 | + }; |
99 | 275 | apache-airflow = pySelf.callPackage ./python-package.nix { }; |
100 | 276 | }; |
101 | 277 | }; |
|
0 commit comments