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

v3.0.0 #738

Draft
wants to merge 89 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
89 commits
Select commit Hold shift + click to select a range
8791efd
AMQP refactor [remove queue consumer] (#578)
mattbennett Oct 2, 2018
8ca95cf
Prerelease 3.0.0-rc0
mattbennett Oct 2, 2018
216848d
Add ClusterRpc DependencyProvider (#585)
mattbennett Nov 19, 2018
df449b1
Prerelease v3.0.0-rc1
mattbennett Nov 19, 2018
6fef717
retry decorator doesn't work on pytest.raises (#589)
mattbennett Nov 20, 2018
31a0481
Compat fixes (#592)
mattbennett Nov 22, 2018
f92c991
make sure gt gets scheduled and has chance to exit (#593)
mattbennett Nov 22, 2018
c8c806d
Prerelease v3.0.0-rc2
mattbennett Nov 22, 2018
a8e910a
Fix backwards compatibility name for RpcProxy (#594)
fobiols Nov 23, 2018
44d4dc4
Global nameko config (#520)
iky Jan 4, 2019
b0131f5
Release v3.0.0-rc3
mattbennett Jan 5, 2019
4118a8c
Set extra headers for outbound messaging as late as possible (#600)
iky Jan 11, 2019
53740e8
Release v3.0.0-rc4
mattbennett Jan 11, 2019
e7d3fb2
Better config helpers API (#602)
iky Jan 14, 2019
6f8cfe0
Release v3.0.0-rc5
mattbennett Jan 14, 2019
967e440
remove brittle assertions on error messages (#603)
mattbennett Jan 14, 2019
9e1350f
Minor change to add -c alternative to --config option
iky Jan 18, 2019
c168dbd
Merge pull request #605 from iky/short-config-option
iky Jan 18, 2019
81992bc
More nameko 2.X backward compatible fixtures
iky Feb 6, 2019
7fd6c99
Better standalone example with no config
iky Feb 6, 2019
1649fb8
No need for dummy entrypoints
iky Feb 7, 2019
40f82b5
Better tests for config patch test factory arg
iky Mar 14, 2019
35b3a8d
Deal with latest pyyaml 5.1 security changes
iky Mar 15, 2019
9f5a32a
Merge pull request #610 from nameko/global-config
iky Mar 15, 2019
f660a12
Merge branch 'master' into v3.0.0-rc
iky Mar 19, 2019
d5e0b71
Whoops, wrong import sorting
iky Mar 19, 2019
b2dc3bd
Merge pull request #616 from nameko/v3.0.0-rc-with-latest-master
iky Mar 19, 2019
ff7fc61
Bump up rc version
iky Mar 19, 2019
97499c3
Implement default AMQP_URI
iky Mar 20, 2019
cbff552
Replace unnecessary reply consumer extra arg with init mocking
iky Apr 13, 2019
d0e45b7
Merge pull request #619 from nameko/global-config
iky Apr 14, 2019
cd305b9
Cli by click (#620)
vlcinsky Apr 15, 2019
b2fdb1d
Reordered CI stages to deliver important failure soon see issue #630 …
vlcinsky May 25, 2019
1c9224a
https://bugs.python.org/issue35330 fixed a bug that (#639)
mattbennett Jun 11, 2019
1720454
mock.patch wraps changed behaviour
iky Jun 27, 2019
40d4b1f
Merge pull request #643 from nameko/v3.0.0-rc7
iky Jun 27, 2019
7c9bc87
Bump up version to v3.0.0-rc7
iky Jun 27, 2019
5816376
Skip ssl tests if certs are not available or ssl port is not open (#645)
daviskirk Jul 9, 2019
a5a7754
Click config fix (#651)
mattbennett Jul 26, 2019
abc8f97
Release v3.0.0-rc8
mattbennett Jul 26, 2019
a957a6f
CLI got --version option (#663)
vlcinsky Oct 24, 2019
ff4ed06
compat for newer werkzeug
mattbennett May 3, 2020
9e1f34d
bump docs deps a small amount
mattbennett May 3, 2020
0549d80
further bump and wordlist for spelling
mattbennett May 3, 2020
524caa6
Fix dependencies (3.0.0) (#698)
iky Aug 13, 2020
905748f
Add tests for python 3.7 (#644)
daviskirk Sep 11, 2020
b667ea5
Add timeout parameter to entrypoint_hook (#622)
Trojan295 Apr 4, 2019
244b4fb
Add security disclosure process
mattbennett Jun 10, 2019
d246273
Add FUNDING.yaml with Tidelift link
mattbennett Jun 10, 2019
178b46f
Fix Python 3.7 warning on collections.abc (#649)
adamchainz Jul 22, 2019
c25b4a4
Fix Pytest link (#654)
adamchainz Aug 16, 2019
aa1398b
Add Tidelift enterprise language (#678)
phated Apr 8, 2020
93e77fb
additional pragmas needed for py3 static checks
mattbennett Sep 11, 2020
837e2b8
exchange auto_delete has been deprecated
mattbennett Sep 14, 2020
a704bf8
we do not want to always show DeprecationWarnings
mattbennett Sep 14, 2020
c58dd9f
ignore DeprecationWarning in kombu.mixins since we can't avoid it
mattbennett Sep 14, 2020
ba0ca25
upgrade pytest for filterwarnings support
mattbennett Sep 14, 2020
ac31ff5
filter warnings we expect to be triggered by tests
mattbennett Sep 14, 2020
a1dbb1e
Merge pull request #705 from mattbennett/updates-from-2.x
mattbennett Sep 15, 2020
6db7a02
use a fake rather than the real service
mattbennett Sep 14, 2020
4765fee
Release v3.0.0-rc9
mattbennett Oct 9, 2020
35f34d9
GitHub actions v3 (#716)
mattbennett Apr 8, 2021
ae773d7
fix websockets in werkzeug 2x (#724)
mattbennett Sep 20, 2021
51b2577
Mark regex string literal as raw string. (#690)
zsiciarz Sep 29, 2021
0f02249
fix ReplyListener on standalone rpc with custom publisher_options (#718)
alfaro28 Sep 29, 2021
0f5fa62
formatting
mattbennett Sep 29, 2021
59a7c6c
check_for_lost_replies needs a retry policy
mattbennett Sep 29, 2021
484721c
Safe yaml v3 (#723)
mattbennett Sep 29, 2021
b15e291
py27 raises IOError instead
mattbennett Sep 29, 2021
2443cf9
cherry pick 0c73912
mattbennett Sep 30, 2021
c3f09c1
Disable auto monkeypatch v3 (#728)
mattbennett Oct 13, 2021
73bc655
Disable exchange declaration v3 (#731)
mattbennett Oct 13, 2021
4ea57f4
Add login method v3 (#734)
mattbennett Oct 18, 2021
bd39019
build on tags
mattbennett Oct 18, 2021
6cf5d99
install wheel
mattbennett Oct 19, 2021
627a358
v3 master merge (#736)
mattbennett Oct 21, 2021
5f01a18
pin down docutils (#739)
mattbennett Oct 29, 2021
ac984ac
fix master merge
mattbennett Oct 29, 2021
1908be2
upgrade pytest (#741)
mattbennett Nov 10, 2021
711b931
Python 3.10 support (v3 branch) (#749)
mattbennett Dec 4, 2021
71c631a
fix `nameko test` command (#750)
mattbennett Dec 4, 2021
6c7c959
Release v3.0.0-rc11
mattbennett Dec 5, 2021
03ce391
Fix ci (#767)
mattbennett Feb 9, 2023
7766cfd
Python 3.11 support (#769)
mattbennett Feb 22, 2023
73486a9
drop py2 support
stephenc-pace Oct 3, 2023
653b5ea
drop 27 from ci
stephenc-pace Oct 3, 2023
5e82205
drop 27 from ci
stephenc-pace Oct 3, 2023
7ed39c5
simplfiy requirements
stephenc-pace Nov 3, 2023
1865a13
Merge pull request #777 from stephenc-pace/fix/url-join-v3
iky Nov 3, 2023
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
36 changes: 17 additions & 19 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
- "v*"
pull_request:
branches:
- master
- "*"

schedule:
- cron: '0 * * * 0'
Expand All @@ -20,14 +20,13 @@ jobs:
matrix:
python-version:
- 3.9
- 2.7

steps:
- name: checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: setup python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

Expand All @@ -47,13 +46,12 @@ jobs:
matrix:
python-version:
- 3.9
- 2.7
steps:
- name: checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: setup python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

Expand All @@ -78,11 +76,11 @@ jobs:
strategy:
matrix:
python-version:
- "3.11"
- "3.10"
- 3.9
- 3.8
- 3.7
- 3.6
- 2.7
dependency-set:
- pinned
- latest
Expand All @@ -96,21 +94,21 @@ jobs:
# allow failure for a job but not fail the workflow
# see https://github.com/actions/toolkit/issues/399.
# include:
# - python-version: 3.6
# - python-version: 3.7
# dependency-set: latest
# command: test-mastereventlet
# experimental: true
# - python-version: 3.6
# - python-version: 3.7
# dependency-set: latest
# command: test-branchcoverage
# experimental: true

steps:
- name: checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: setup python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

Expand All @@ -137,15 +135,15 @@ jobs:
TOXENV: py${{ matrix.python-version }}-${{ matrix.dependency-set }}-${{ matrix.command }}

docs:
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
steps:
- name: checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: setup python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: 3.6
python-version: 3.7

- name: install libenchant
run: |
Expand All @@ -172,10 +170,10 @@ jobs:

steps:
- name: checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: setup python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: '3.8'

Expand Down
1 change: 1 addition & 0 deletions CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Here you can see the full list of changes between nameko versions. Versions
are in form of *headline.major.minor* numbers. Backwards-compatible changes
increment the minor version number only.


Version 2.14.0
--------------

Expand Down
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ pylint:
pylint --rcfile=pylintrc nameko -E

imports:
isort -rc $(autofix) nameko test
isort $(autofix) nameko test

test_lib:
BRANCH=$(ENABLE_BRANCH_COVERAGE) coverage run -m nameko test test -v --strict --timeout 30
BRANCH=$(ENABLE_BRANCH_COVERAGE) coverage run -m nameko test test -v --strict-markers --timeout 30
BRANCH=$(ENABLE_BRANCH_COVERAGE) coverage report

test_examples:
BRANCH=$(ENABLE_BRANCH_COVERAGE) nameko test docs/examples/test --strict --timeout 30 --cov=docs/examples --cov-config=$(CURDIR)/.coveragerc
BRANCH=$(ENABLE_BRANCH_COVERAGE) nameko test docs/examples/test --strict-markers --timeout 30 --cov=docs/examples --cov-config=$(CURDIR)/.coveragerc
nameko test docs/examples/testing

test_docs: docs spelling #linkcheck
Expand Down
1 change: 1 addition & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ Support

For help, comments or questions, please go to `<https://discourse.nameko.io/>`_.


For enterprise
---------------------

Expand Down
105 changes: 105 additions & 0 deletions docs/api.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
.. _api:

API
===

AMQP
----

.. automodule:: nameko.amqp.consume
:members:

.. automodule:: nameko.amqp.publish
:members:

RPC
^^^

.. automodule:: nameko.rpc
:members:

Events
^^^^^^

.. automodule:: nameko.events
:members:

Messaging
^^^^^^^^^

.. automodule:: nameko.messaging
:members:


Standalone
^^^^^^^^^^

.. automodule:: nameko.standalone
:members:

.. automodule:: nameko.standalone.rpc
:members:

.. automodule:: nameko.standalone.events
:members:

HTTP
----

.. automodule:: nameko.web
:members:

.. automodule:: nameko.web.handlers
:members:

.. automodule:: nameko.web.server
:members:

.. automodule:: nameko.web.websocket
:members:


Testing
-------

.. automodule:: nameko.testing
:members:

.. automodule:: nameko.testing.services
:members:

.. automodule:: nameko.testing.waiting
:members:

.. automodule:: nameko.testing.utils
:members:


Utils
-----

.. automodule:: nameko.utils
:members:

.. automodule:: nameko.utils.retry
:members:


Core
----


.. automodule:: nameko.containers
:members:

.. automodule:: nameko.extensions
:members:

.. automodule:: nameko.exceptions
:members:

.. automodule:: nameko.serialization
:members:

.. automodule:: nameko.runners
:members:
15 changes: 0 additions & 15 deletions docs/built_in_dependency_providers.rst

This file was deleted.

2 changes: 1 addition & 1 deletion docs/built_in_extensions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Nameko includes a number of built-in :ref:`extensions <extensions>`. This sectio
RPC
---

Nameko includes an implementation of RPC over AMQP. It comprises the ``@rpc`` entrypoint, a proxy for services to talk to other services, and a standalone proxy that non-Nameko clients can use to make RPC calls to a cluster:
Nameko includes an implementation of RPC over AMQP. It comprises the ``@rpc`` entrypoint, a client for services to talk to other services, and a standalone client that non-Nameko clients can use to make RPC calls to a cluster:

.. literalinclude:: examples/rpc.py

Expand Down
4 changes: 2 additions & 2 deletions docs/community_extensions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ Extensions
* `nameko-sendgrid <https://github.com/invictuscapital/nameko-sendgrid>`_

SendGrid dependency for nameko, for sending transactional and marketing emails.

* `nameko-cachetools <https://github.com/santiycr/nameko-cachetools>`_

Tools to cache RPC interactions between your nameko services.
Expand All @@ -71,7 +71,7 @@ Supplementary Libraries

* `nameko-proxy <https://github.com/fraglab/nameko-proxy>`_

Standalone async proxy to communicate with Nameko microservices.
Standalone async client to communicate with Nameko microservices.

Search PyPi for more `nameko packages <https://pypi.python.org/pypi?%3Aaction=search&term=nameko&submit=search>`_

Expand Down
5 changes: 3 additions & 2 deletions docs/examples/anatomy.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
from nameko.rpc import rpc, RpcProxy
from nameko.rpc import ServiceRpc, rpc


class Service:
name = "service"

# we depend on the RPC interface of "another_service"
other_rpc = RpcProxy("another_service")
other_rpc = ServiceRpc("another_service")

@rpc # `method` is exposed over RPC
def method(self):
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/async_rpc.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
with ClusterRpcProxy(config) as cluster_rpc:
with ClusterRpcClient() as cluster_rpc:
hello_res = cluster_rpc.service_x.remote_method.call_async("hello")
world_res = cluster_rpc.service_x.remote_method.call_async("world")
# do work while waiting
Expand Down
6 changes: 4 additions & 2 deletions docs/examples/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def authenticate(self, username, password):
'username': username,
'roles': self.users[username]['roles']
}
token = jwt.encode(payload, key=JWT_SECRET).decode('utf-8')
token = jwt.encode(payload, key=JWT_SECRET, algorithm="HS256")
self.worker_ctx.context_data['auth'] = token
return token

Expand All @@ -43,7 +43,9 @@ def has_role(self, role):
raise Unauthenticated()

try:
payload = jwt.decode(token, key=JWT_SECRET, verify=True)
payload = jwt.decode(
token, key=JWT_SECRET, verify=True, algorithms=["HS256"]
)
if role in payload['roles']:
return True
except Exception:
Expand Down
20 changes: 0 additions & 20 deletions docs/examples/config_dependency_provider.py

This file was deleted.

5 changes: 3 additions & 2 deletions docs/examples/rpc.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from nameko.rpc import rpc, RpcProxy
from nameko.rpc import ServiceRpc, rpc


class ServiceY:
name = "service_y"
Expand All @@ -11,7 +12,7 @@ def append_identifier(self, value):
class ServiceX:
name = "service_x"

y = RpcProxy("service_y")
y = ServiceRpc("service_y")

@rpc
def remote_method(self, value):
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/service_container.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ class Service:
name = "service"

# create a container
container = ServiceContainer(Service, config={})
container = ServiceContainer(Service)

# ``container.extensions`` exposes all extensions used by the service
service_extensions = list(container.extensions)
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/service_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class ServiceB:
name = "service_b"

# create a runner for ServiceA and ServiceB
runner = ServiceRunner(config={})
runner = ServiceRunner()
runner.add_service(ServiceA)
runner.add_service(ServiceB)

Expand Down
Loading