mulugruntz / celery-pubsub Goto Github PK
View Code? Open in Web Editor NEWPublish and Subscribe with Celery
License: MIT License
Publish and Subscribe with Celery
License: MIT License
This is a followup to #186.
See the conversation from #177 for extra context.
The goal of this ticket is to type hint directly the .py
files and drop the .pyi
files. This is possible only because we dropped support for Python 2.
As we only support Python 3.7+, it's possible to use from __future__ import annotations
to have cleaner type hints that are future-proof.
The culprit seems to be
- name: Check with mypy
if: ${{ !startsWith(matrix.python-version, 'pypy') && matrix.python-version >= '3.7' }}
run: mypy
The comparison is string to string. Therefore 3.10 < 3.7
(1<7).
The version comparison can be entirely removed, as we don't support < 3.7 anymore.
- name: Check with mypy
- if: ${{ !startsWith(matrix.python-version, 'pypy') && matrix.python-version >= '3.7' }}
+ if: ${{ !startsWith(matrix.python-version, 'pypy') }}
run: mypy
The goal of this ticket is to stop supporting the following versions:
Also, for Pypy, only 3+ versions listed on their download pages will be officially supported: https://www.pypy.org/download.html
Even though Pypy 2.7 will probably always be supported by Pypy, newer versions of celery-pubsub
should adopt modern syntax. And this can only be achieved by dropping official support for these old implementations.
A new version 2.0 will be released, to highlight the fact that some changes won't guarantee backward compatibility.
The long description does not get displayed on PyPI.
Hi @Mulugruntz , I found your package when I was trying to solve the very same issue in one of my projects. Looks all good but I have a small feature request: being able to subscribe to a topic using a decorator, ie:
import celery
import celery_pubsub
@celery_pubsub.subscribe("some.topic")
@celery.task
def my_task():
...
I can prepare a PR for that, the question is if you are open for such an addition to your project?
adr@ubuntu:~$ pip install celery_pubsub
Collecting celery_pubsub
Downloading celery-pubsub-0.1.7.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "", line 1, in
File "/tmp/pip-build-mLsH7V/celery-pubsub/setup.py", line 61, in
install_requires=install_requires(),
File "/tmp/pip-build-mLsH7V/celery-pubsub/setup.py", line 19, in install_requires
return [_strip_comments(req) for req in codecs.open('requirements.txt', 'r', 'utf-8').readlines() if req]
File "/usr/lib/python2.7/codecs.py", line 896, in open
file = builtin.open(filename, mode, buffering)
IOError: [Errno 2] No such file or directory: 'requirements.txt'
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-mLsH7V/celery-pubsub/
Can reproduce on a variety of environments (docker, ubuntu, windows)
I would like to run one or more celery instances (services) and publish event to subscribers that can have more than 1 instances e.g: the subscriber1 has two different services listening to the event, while the subscriber2 has three of them. Is it possible or the intent of library is to be used inside only 1 celery instance/service?
I've tried to implement the idea but got stuck: https://github.com/antunesleo/celery-pubsub-example
Would be great to use this library that way, it would spare a lot of time/work
This is a library and should have more flexible requirements.
Should give guarantees: if version is at least xxx, then it will work.
Because currently, the build is broken on several Python versions.
And remove pyup as well.
This is a followup of #184. A quick fix is needed in order to set the type of the long description.
The idea of this issue is to show at a quick glance which versions are supported and which versions are not.
Also, would be nice to migrate from rst
to md
.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.