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

Remove support for PyPy #6029

Merged
merged 1 commit into from
Mar 31, 2022
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
2 changes: 0 additions & 2 deletions distributed/compatibility.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
from __future__ import annotations

import logging
import platform
import sys

logging_names: dict[str | int, int | str] = {}
logging_names.update(logging._levelToName) # type: ignore
logging_names.update(logging._nameToLevel) # type: ignore

PYPY = platform.python_implementation().lower() == "pypy"
LINUX = sys.platform == "linux"
MACOS = sys.platform == "darwin"
WINDOWS = sys.platform.startswith("win")
Expand Down
2 changes: 0 additions & 2 deletions distributed/tests/test_spill.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
from __future__ import annotations

import gc
import logging
import os
import uuid
Expand Down Expand Up @@ -338,7 +337,6 @@ def test_weakref_cache(tmpdir, cls, expect_cached, size):
# the same id as a deleted one
id_x = x.id
del x
gc.collect() # Only needed on pypy

if size < 100:
buf["y"]
Expand Down
9 changes: 0 additions & 9 deletions distributed/utils_perf.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

from dask.utils import format_bytes

from distributed.compatibility import PYPY
from distributed.metrics import thread_time

logger = _logger = logging.getLogger(__name__)
Expand Down Expand Up @@ -144,8 +143,6 @@ def __init__(self, warn_over_frac=0.1, info_over_rss_win=10 * 1e6):
self._enabled = False

def enable(self):
if PYPY:
return
assert not self._enabled
self._fractional_timer = FractionalTimer(n_samples=self.N_SAMPLES)
try:
Expand All @@ -162,8 +159,6 @@ def enable(self):
self._enabled = True

def disable(self):
if PYPY:
return
assert self._enabled
gc.callbacks.remove(self._gc_callback)
self._enabled = False
Expand Down Expand Up @@ -229,8 +224,6 @@ def enable_gc_diagnosis():
"""
Ask to enable global GC diagnosis.
"""
if PYPY:
return
global _gc_diagnosis_users
with _gc_diagnosis_lock:
if _gc_diagnosis_users == 0:
Expand All @@ -244,8 +237,6 @@ def disable_gc_diagnosis(force=False):
"""
Ask to disable global GC diagnosis.
"""
if PYPY:
return
global _gc_diagnosis_users
with _gc_diagnosis_lock:
if _gc_diagnosis_users > 0:
Expand Down
6 changes: 2 additions & 4 deletions docs/source/protocol.rst
Original file line number Diff line number Diff line change
Expand Up @@ -135,13 +135,11 @@ the scheduler may differ.**
This has a few advantages:

1. The Scheduler is protected from unpickling unsafe code
2. The Scheduler can be run under ``pypy`` for improved performance. This is
only useful for larger clusters.
3. We could conceivably implement workers and clients for other languages
2. We could conceivably implement workers and clients for other languages
(like R or Julia) and reuse the Python scheduler. The worker and client
code is fairly simple and much easier to reimplement than the scheduler,
which is complex.
4. The scheduler might some day be rewritten in more heavily optimized C or Go
3. The scheduler might some day be rewritten in more heavily optimized C or Go

Compression
-----------
Expand Down