From 74fcda963613239290c96666c2ed85f1e9e7a833 Mon Sep 17 00:00:00 2001 From: Thomas Sarboni Date: Mon, 7 Dec 2020 16:09:38 +0100 Subject: [PATCH 1/4] Rename package and fix configuration files --- README.rst | 40 ++++++++++++++++++++-------------------- mode/__init__.py | 2 +- setup.cfg | 2 +- setup.py | 13 ++++++++----- 4 files changed, 30 insertions(+), 27 deletions(-) diff --git a/README.rst b/README.rst index 57645c29..800cf4cc 100644 --- a/README.rst +++ b/README.rst @@ -5,9 +5,9 @@ |build-status| |coverage| |license| |wheel| |pyversion| |pyimp| :Version: 4.3.2 -:Web: http://mode.readthedocs.org/ -:Download: http://pypi.org/project/mode -:Source: http://github.com/ask/mode +:Web: http://mode-streaming.readthedocs.org/ +:Download: http://pypi.org/project/mode-streaming +:Source: http://github.com/faust-streaming/mode :Keywords: async, service, framework, actors, bootsteps, graph What is Mode? @@ -239,7 +239,7 @@ or from source. To install using `pip`:: - $ pip install -U mode + $ pip install -U mode-streaming .. _installing-from-source: @@ -247,11 +247,11 @@ Downloading and installing from source -------------------------------------- Download the latest version of Mode from -http://pypi.org/project/mode +http://pypi.org/project/mode-streaming You can install it by doing the following:: - $ tar xvfz mode-0.0.0.tar.gz + $ tar xvfz mode-streaming-0.0.0.tar.gz $ cd mode-0.0.0 $ python setup.py build # python setup.py install @@ -270,7 +270,7 @@ With pip You can install the latest snapshot of Mode using the following pip command:: - $ pip install https://github.com/ask/mode/zipball/master#egg=mode + $ pip install https://github.com/faust-streaming/mode/zipball/master#egg=mode-streaming FAQ === @@ -290,7 +290,7 @@ and you can install this as a bundle with Mode: .. sourcecode:: console - $ pip install -U mode[gevent] + $ pip install -U mode-streaming[gevent] Then to actually use gevent as the event loop you have to execute the following in your entrypoint module (usually where you @@ -315,7 +315,7 @@ and you can install this as a bundle with Mode: .. sourcecode:: console - $ pip install -U mode[eventlet] + $ pip install -U mode-streaming[eventlet] Then to actually use eventlet as the event loop you have to execute the following in your entrypoint module (usually where you @@ -447,26 +447,26 @@ reported by opening an issue or contacting one or more of the project maintainer This Code of Conduct is adapted from the Contributor Covenant, version 1.2.0 available at http://contributor-covenant.org/version/1/2/0/. -.. |build-status| image:: https://secure.travis-ci.org/ask/mode.png?branch=master +.. |build-status| image:: https://secure.travis-ci.org/faust-streaming/mode.png?branch=master :alt: Build status - :target: https://travis-ci.org/ask/mode + :target: https://travis-ci.org/faust-streaming/mode -.. |coverage| image:: https://codecov.io/github/ask/mode/coverage.svg?branch=master - :target: https://codecov.io/github/ask/mode?branch=master +.. |coverage| image:: https://codecov.io/github/faust-streaming/mode/coverage.svg?branch=master + :target: https://codecov.io/github/faust-streaming/mode?branch=master -.. |license| image:: https://img.shields.io/pypi/l/mode.svg +.. |license| image:: https://img.shields.io/pypi/l/mode-streaming.svg :alt: BSD License :target: https://opensource.org/licenses/BSD-3-Clause -.. |wheel| image:: https://img.shields.io/pypi/wheel/mode.svg +.. |wheel| image:: https://img.shields.io/pypi/wheel/mode-streaming.svg :alt: Mode can be installed via wheel - :target: http://pypi.org/project/mode/ + :target: http://pypi.org/project/mode-streaming/ -.. |pyversion| image:: https://img.shields.io/pypi/pyversions/mode.svg +.. |pyversion| image:: https://img.shields.io/pypi/pyversions/mode-streaming.svg :alt: Supported Python versions. - :target: http://pypi.org/project/mode/ + :target: http://pypi.org/project/mode-streaming/ -.. |pyimp| image:: https://img.shields.io/pypi/implementation/mode.svg +.. |pyimp| image:: https://img.shields.io/pypi/implementation/mode-streaming.svg :alt: Supported Python implementations. - :target: http://pypi.org/project/mode/ + :target: http://pypi.org/project/mode-streaming/ diff --git a/mode/__init__.py b/mode/__init__.py index 69167874..17c6f3b1 100644 --- a/mode/__init__.py +++ b/mode/__init__.py @@ -11,7 +11,7 @@ __version__ = '4.3.2' __author__ = 'Robinhood Markets' __contact__ = 'opensource@robinhood.com' -__homepage__ = 'https://github.com/ask/mode' +__homepage__ = 'https://github.com/faust-streaming/mode' __docformat__ = 'restructuredtext' # -eof meta- diff --git a/setup.cfg b/setup.cfg index c661bf05..a1f655ce 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [metadata] -name = mode +name = mode-streaming version = attr: mode.__version__ author = attr: mode.__author__ author_email = attr: mode.__contact__ diff --git a/setup.py b/setup.py index 6ea73134..5747c5ee 100644 --- a/setup.py +++ b/setup.py @@ -11,7 +11,7 @@ def _pyimp(): return 'Python' from setuptools import find_packages, setup -NAME = 'mode' +NAME = 'mode-streaming' EXTENSIONS = {'eventlet', 'gevent', 'uvloop'} E_UNSUPPORTED_PYTHON = '%s 1.0 requires %%s %%s or later!' % (NAME,) @@ -60,7 +60,7 @@ def add_doc(m): pats = {re_meta: add_default, re_doc: add_doc} here = Path(__file__).parent.absolute() -with open(here / NAME / '__init__.py') as meta_fh: +with open(here / 'mode' / '__init__.py') as meta_fh: meta = {} for line in meta_fh: if line.strip() == '# -eof meta-': @@ -73,8 +73,8 @@ def add_doc(m): # -*- Installation Requires -*- -def strip_comments(l): - return l.split('#', 1)[0].strip() +def strip_comments(line): + return line.split('#', 1)[0].strip() def _pip_requirement(req): @@ -86,7 +86,10 @@ def _pip_requirement(req): def _reqs(*f): path = (Path.cwd() / 'requirements').joinpath(*f) - reqs = (strip_comments(l) for l in path.open().readlines()) + reqs = ( + strip_comments(line) + for line in path.open().readlines() + ) return [_pip_requirement(r) for r in reqs if r] From aa22dde72ea82d12b592c8dd72397188f9d17cec Mon Sep 17 00:00:00 2001 From: Thomas Sarboni Date: Tue, 15 Dec 2020 16:11:56 +0100 Subject: [PATCH 2/4] Fix typechecks --- requirements/typecheck.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements/typecheck.txt b/requirements/typecheck.txt index 9728708c..d2f32d16 100644 --- a/requirements/typecheck.txt +++ b/requirements/typecheck.txt @@ -1,2 +1,2 @@ -mypy>=0.750 +mypy==0.782 yarl From 148ed7481a2c91aacdbfe645d2be3d10c10718c4 Mon Sep 17 00:00:00 2001 From: Thomas Sarboni Date: Tue, 15 Dec 2020 16:22:42 +0100 Subject: [PATCH 3/4] Fix apicheck --- requirements/docs.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/requirements/docs.txt b/requirements/docs.txt index c0733508..435f583f 100644 --- a/requirements/docs.txt +++ b/requirements/docs.txt @@ -1,3 +1,4 @@ +six sphinx>=2.2,<3.0 sphinx_celery>=1.4.8 sphinx-autodoc-annotation From f6a73fc683088688d8c29286402f9836762cf834 Mon Sep 17 00:00:00 2001 From: Thomas Sarboni Date: Wed, 16 Dec 2020 10:44:00 +0100 Subject: [PATCH 4/4] Fix unit tests --- t/unit/test_worker.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/t/unit/test_worker.py b/t/unit/test_worker.py index 8e730534..6c879f5e 100644 --- a/t/unit/test_worker.py +++ b/t/unit/test_worker.py @@ -254,7 +254,7 @@ def test_execute_from_commandline(self, worker): worker.execute_from_commandline() assert excinfo.value.code == 0 assert worker._starting_fut is ensure_future.return_value - ensure_future.assert_called_once_with(worker.start.return_value, worker.loop) + ensure_future.assert_called_once_with(worker.start.return_value, loop=worker.loop) worker.stop_and_shutdown.assert_called_once_with() def test_execute_from_commandline__MemoryError(self, worker):