Skip to content

Commit

Permalink
Deprecate support for eventlet and gevent
Browse files Browse the repository at this point in the history
  • Loading branch information
jodal committed Nov 26, 2020
1 parent b1ff28b commit 151df7d
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 0 deletions.
8 changes: 8 additions & 0 deletions docs/changes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@ Changes
v2.0.3 (UNRELEASED)
===================

- Mark eventlet and gevent support as deprecated. The support will be removed
in Pykka 3.0.

These where somewhat interesting ways to implement
concurrency in Python when Pykka was conceived in 2011. Today, it is
unclear it these libraries still have any mindshare or if keeping the
support for them just adds an unecessary burden to Pykka's maintenance.

- Include Python 3.9 in the test matrix. (PR: :issue:`98`)

- Add missing :class:`None` default value for the ``timeout`` keyword argument to
Expand Down
5 changes: 5 additions & 0 deletions docs/runtimes/eventlet.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
eventlet
========

.. deprecated:: 2.0.3

.. warning::
eventlet support is deprecated and will be removed in Pykka 3.0.


Installation
============
Expand Down
5 changes: 5 additions & 0 deletions docs/runtimes/gevent.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
gevent
======

.. deprecated:: 2.0.3

.. warning::
gevent support is deprecated and will be removed in Pykka 3.0.


Installation
============
Expand Down
7 changes: 7 additions & 0 deletions pykka/eventlet.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from __future__ import absolute_import

import sys
import warnings

import eventlet
import eventlet.event
Expand All @@ -12,6 +13,12 @@
__all__ = ['EventletActor', 'EventletEvent', 'EventletFuture']


warnings.warn(
"eventlet support is deprecated and will be removed in Pykka 3.0.",
DeprecationWarning,
)


class EventletEvent(eventlet.event.Event):
"""
:class:`EventletEvent` adapts :class:`eventlet.event.Event` to
Expand Down
7 changes: 7 additions & 0 deletions pykka/gevent.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from __future__ import absolute_import

import sys
import warnings

import gevent
import gevent.event
Expand All @@ -12,6 +13,12 @@
__all__ = ['GeventActor', 'GeventFuture']


warnings.warn(
"eventlet support is deprecated and will be removed in Pykka 3.0.",
DeprecationWarning,
)


class GeventFuture(Future):
"""
:class:`GeventFuture` implements :class:`pykka.Future` for use with
Expand Down

0 comments on commit 151df7d

Please sign in to comment.