Skip to content

Commit 36f60e1

Browse files
apache-airflow: 2.7.3 -> 2.10.5 (NixOS#396544)
2 parents d15e523 + 87d364e commit 36f60e1

4 files changed

Lines changed: 1192 additions & 252 deletions

File tree

pkgs/by-name/ap/apache-airflow/package.nix

Lines changed: 189 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
fetchFromGitHub,
3+
fetchpatch,
34
fetchPypi,
45
python3,
56
}:
@@ -8,12 +9,12 @@ let
89
python = python3.override {
910
self = python;
1011
packageOverrides = pySelf: pySuper: {
11-
connexion = pySuper.connexion.overridePythonAttrs (o: rec {
12+
connexion = pySuper.connexion.overridePythonAttrs rec {
1213
version = "2.14.2";
1314
src = fetchFromGitHub {
1415
owner = "spec-first";
1516
repo = "connexion";
16-
rev = "refs/tags/${version}";
17+
tag = version;
1718
hash = "sha256-1v1xCHY3ZnZG/Vu9wN/it7rLKC/StoDefoMNs+hMjIs=";
1819
};
1920
nativeBuildInputs = with pySelf; [
@@ -40,15 +41,44 @@ let
4041
aiohttp-remotes
4142
decorator
4243
pytest-aiohttp
44+
pytest-tornasync
4345
pytestCheckHook
4446
testfixtures
4547
];
4648
disabledTests = [
49+
"test_aiohttp_simple_api"
4750
"test_app"
51+
"test_invalid_type" # https://github.com/spec-first/connexion/issues/1969
4852
"test_openapi_yaml_behind_proxy"
53+
"test_run_with_wsgi_containers"
4954
"test_swagger_ui"
5055
];
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+
};
5282
flask = pySuper.flask.overridePythonAttrs (o: rec {
5383
version = "2.2.5";
5484
src = fetchPypi {
@@ -59,43 +89,189 @@ let
5989
nativeBuildInputs = (o.nativeBuildInputs or [ ]) ++ [
6090
pySelf.setuptools
6191
];
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+
];
6298
});
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+
};
63138
# flask-appbuilder doesn't work with sqlalchemy 2.x, flask-appbuilder 3.x
64139
# https://github.com/dpgaspar/Flask-AppBuilder/issues/2038
65-
flask-appbuilder = pySuper.flask-appbuilder.overridePythonAttrs (o: {
140+
flask-appbuilder = pySuper.flask-appbuilder.overridePythonAttrs {
66141
meta.broken = false;
67-
});
142+
};
68143
# a knock-on effect from overriding the sqlalchemy version
69-
flask-sqlalchemy = pySuper.flask-sqlalchemy.overridePythonAttrs (o: {
144+
flask-sqlalchemy = pySuper.flask-sqlalchemy.overridePythonAttrs {
70145
src = fetchPypi {
71146
pname = "Flask-SQLAlchemy";
72147
version = "2.5.1";
73148
hash = "sha256-K9pEtD58rLFdTgX/PMH4vJeTbMRkYjQkECv8LDXpWRI=";
74149
};
75150
format = "setuptools";
76-
});
77-
httpcore = pySuper.httpcore.overridePythonAttrs (o: {
151+
};
152+
httpcore = pySuper.httpcore.overridePythonAttrs {
78153
# nullify upstream's pytest flags which cause
79154
# "TLS/SSL connection has been closed (EOF)"
80155
# with pytest-httpbin 1.x
81156
preCheck = ''
82157
substituteInPlace pyproject.toml \
83158
--replace '[tool.pytest.ini_options]' '[tool.notpytest.ini_options]'
84159
'';
85-
});
86-
pytest-httpbin = pySuper.pytest-httpbin.overridePythonAttrs (o: rec {
160+
};
161+
pytest-httpbin = pySuper.pytest-httpbin.overridePythonAttrs rec {
87162
version = "1.0.2";
88163
src = fetchFromGitHub {
89164
owner = "kevin1024";
90165
repo = "pytest-httpbin";
91-
rev = "refs/tags/v${version}";
166+
tag = "v${version}";
92167
hash = "sha256-S4ThQx4H3UlKhunJo35esPClZiEn7gX/Qwo4kE1QMTI=";
93168
};
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+
};
95194
# apache-airflow doesn't work with sqlalchemy 2.x
96195
# https://github.com/apache/airflow/issues/28723
97196
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+
};
99275
apache-airflow = pySelf.callPackage ./python-package.nix { };
100276
};
101277
};

0 commit comments

Comments
 (0)