Skip to content

Commit f4495fe

Browse files
committed
[GR-60283] Update more patches
PullRequest: graalpython/3643
2 parents 2aa9a4b + 8186586 commit f4495fe

File tree

9 files changed

+646
-222
lines changed

9 files changed

+646
-222
lines changed

graalpython/lib-graalpython/patches/catboost-1.2.3.patch

Lines changed: 563 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
diff --git a/setup.py b/setup.py
2+
index b936372..158056a 100644
3+
--- a/setup.py
4+
+++ b/setup.py
5+
@@ -133,7 +133,7 @@ BUILD_OVERRIDE_BORING_SSL_ASM_PLATFORM = os.environ.get(
6+
# to have been generated by building first *with* Cython support. Even if this
7+
# is set to false, if the script detects that the generated `.c` file isn't
8+
# present, then it will still attempt to use Cython.
9+
-BUILD_WITH_CYTHON = _env_bool_value("GRPC_PYTHON_BUILD_WITH_CYTHON", "False")
10+
+BUILD_WITH_CYTHON = _env_bool_value("GRPC_PYTHON_BUILD_WITH_CYTHON", "True")
11+
12+
# Export this variable to use the system installation of openssl. You need to
13+
# have the header files installed (in /usr/include/openssl) and during
14+
diff --git a/src/python/grpcio/grpc/_server.py b/src/python/grpcio/grpc/_server.py
15+
index c8af57c..ef862a2 100644
16+
--- a/src/python/grpcio/grpc/_server.py
17+
+++ b/src/python/grpcio/grpc/_server.py
18+
@@ -1257,13 +1257,13 @@ def _process_event_and_continue(
19+
state: _ServerState, event: cygrpc.BaseEvent
20+
) -> bool:
21+
should_continue = True
22+
- if event.tag is _SHUTDOWN_TAG:
23+
+ if event.tag == _SHUTDOWN_TAG:
24+
with state.lock:
25+
state.due.remove(_SHUTDOWN_TAG)
26+
if _stop_serving(state):
27+
should_continue = False
28+
elif (
29+
- event.tag is _REQUEST_CALL_TAG
30+
+ event.tag == _REQUEST_CALL_TAG
31+
or event.tag in state.registered_method_handlers.keys()
32+
):
33+
registered_method_name = None

graalpython/lib-graalpython/patches/h5py-2.10.0.patch

Lines changed: 0 additions & 131 deletions
This file was deleted.

graalpython/lib-graalpython/patches/h5py-3.10.0.patch

Lines changed: 0 additions & 25 deletions
This file was deleted.

graalpython/lib-graalpython/patches/matplotlib-3.5.3.patch

Lines changed: 0 additions & 12 deletions
This file was deleted.

graalpython/lib-graalpython/patches/matplotlib-3.6.3.patch

Lines changed: 0 additions & 12 deletions
This file was deleted.

graalpython/lib-graalpython/patches/matplotlib-3.7.0.patch

Lines changed: 0 additions & 13 deletions
This file was deleted.

graalpython/lib-graalpython/patches/metadata.toml

Lines changed: 19 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@ license = 'Apache-2.0'
1919
patch = 'blosc2.patch'
2020
license = 'Apache-2.0'
2121

22+
[[catboost.rules]]
23+
version = '== 1.2.3'
24+
patch = 'catboost-1.2.3.patch'
25+
license = 'Apache-2.0'
26+
2227
[[catboost.rules]]
2328
version = '== 1.2.2'
2429
patch = 'catboost-1.2.2.patch'
@@ -34,7 +39,7 @@ patch = 'cffi-1.15.1.patch'
3439
license = 'MIT'
3540

3641
[[cffi.rules]]
37-
version = '== 1.16.0'
42+
version = '>= 1.16.0'
3843
patch = 'cffi-1.16.0.patch'
3944
license = 'MIT'
4045

@@ -144,20 +149,16 @@ version = '== 1.60.0'
144149
patch = 'grpcio-1.60.0.patch'
145150
license = 'Apache-2.0'
146151

152+
[[grpcio.rules]]
153+
# Force re-cythonize + other fixes
154+
version = '== 1.66.1'
155+
patch = 'grpcio-1.66.1.patch'
156+
license = 'Apache-2.0'
157+
147158
[[h2o.rules]]
148159
patch = 'h2o.patch'
149160
license = 'Apache-2.0'
150161

151-
[[h5py.rules]]
152-
version = '== 2.10.0'
153-
patch = 'h5py-2.10.0.patch'
154-
license = 'BSD-3-Clause'
155-
156-
[[h5py.rules]]
157-
version = '== 3.10.0'
158-
patch = 'h5py-3.10.0.patch'
159-
license = 'BSD-3-Clause'
160-
161162
[[hmmlearn.rules]]
162163
# Need to specify pybind11 build dependency, otherwise setuptools will install it unpatched
163164
patch = 'hmmlearn.patch'
@@ -190,7 +191,7 @@ patch = 'jiter.patch'
190191
license = 'MIT'
191192

192193
[[joblib.rules]]
193-
version = '==1.4.0'
194+
version = '==1.4.*'
194195
patch = 'joblib-1.4.0.patch'
195196
license = 'BSD-3-Clause'
196197

@@ -243,23 +244,6 @@ license = "BSD-3-Clause"
243244
install-priority = 0 # Don't make pip install prefer this version
244245
dist-type = "sdist"
245246

246-
[[matplotlib.rules]]
247-
version = '== 3.5.3'
248-
patch = 'matplotlib-3.5.3.patch'
249-
license = 'PSF-2.0'
250-
251-
[[matplotlib.rules]]
252-
version = '== 3.6.3'
253-
patch = 'matplotlib-3.6.3.patch'
254-
license = 'PSF-2.0'
255-
256-
[[matplotlib.rules]]
257-
# pin 3.7.0
258-
install-priority = 10
259-
version = '== 3.7.0'
260-
patch = 'matplotlib-3.7.0.patch'
261-
license = 'PSF-2.0'
262-
263247
[[meson-python.rules]]
264248
# Upstreamed
265249
version = '<= 0.16.0'
@@ -581,6 +565,12 @@ version = '== 0.3.3'
581565
patch = 'safetensors-0.3.3.patch'
582566
license = 'Apache-2.0'
583567

568+
[[scikit-learn.rules]]
569+
version = '== 1.5.2'
570+
patch = 'scikit-learn-1.5.2.patch'
571+
license = 'BSD-3-Clause'
572+
dist-type = 'sdist'
573+
584574
[[scikit-learn.rules]]
585575
version = '== 1.2.2'
586576
patch = 'scikit-learn-1.2.2.patch'
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
diff --git a/sklearn/_build_utils/__init__.py b/sklearn/_build_utils/__init__.py
2+
index ceb7244..0a0acc2 100644
3+
--- a/sklearn/_build_utils/__init__.py
4+
+++ b/sklearn/_build_utils/__init__.py
5+
@@ -59,10 +59,10 @@ def cythonize_extensions(extension):
6+
sklearn._OPENMP_SUPPORTED = check_openmp_support()
7+
8+
n_jobs = 1
9+
- with contextlib.suppress(ImportError):
10+
- import joblib
11+
+ # with contextlib.suppress(ImportError):
12+
+ # import joblib
13+
14+
- n_jobs = joblib.cpu_count()
15+
+ # n_jobs = joblib.cpu_count()
16+
17+
# Additional checks for Cython
18+
cython_enable_debug_directives = (
19+
diff --git a/sklearn/datasets/_svmlight_format_fast.pyx b/sklearn/datasets/_svmlight_format_fast.pyx
20+
index 103d43b..e2cc6da 100644
21+
--- a/sklearn/datasets/_svmlight_format_fast.pyx
22+
+++ b/sklearn/datasets/_svmlight_format_fast.pyx
23+
@@ -80,7 +80,7 @@ def _load_svmlight_file(f, dtype, bint multilabel, bint zero_based,
24+
if n_features and features[0].startswith(qid_prefix):
25+
_, value = features[0].split(COLON, 1)
26+
if query_id:
27+
- query.resize(len(query) + 1)
28+
+ query.resize(len(query) + 1, refcheck=False)
29+
query[len(query) - 1] = np.int64(value)
30+
features.pop(0)
31+
n_features -= 1

0 commit comments

Comments
 (0)