Coder Social home page Coder Social logo

celery-pubsub's Introduction

Hi there ๐Ÿ‘‹

celery-pubsub's People

Contributors

mulugruntz avatar pitcons avatar pyup-bot avatar waydotnet avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

celery-pubsub's Issues

Modern type hints

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.

CI: mypy is not executed on Python 3.10, 3.11, and 3.12

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

Deprecate old Python versions

The goal of this ticket is to stop supporting the following versions:

  • CPython 2.7
  • CPython 3.4
  • CPython 3.5
  • CPython 3.6

https://endoflife.date/python

Also, for Pypy, only 3+ versions listed on their download pages will be officially supported: https://www.pypy.org/download.html

  • Pypy 2.7 will stop being supported
  • Pypy 3.6 will stop being supported
  • Pypy 3.8 will be supported
  • Pypy 3.9 will be supported

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.

Subscribe to a topic with a decorator

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?

failed installing package celery_pubsub==0.1.7

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)

Is it possible to use the library in a distributed system integrated with a message broker as redis or rabbitmq?

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

Better dependencies

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.

Github workflows: Improve badges

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.