From e8de8345ac951bc3b04a49c5d74fc58ff8fb8964 Mon Sep 17 00:00:00 2001 From: Tomer Nosrati Date: Wed, 28 Feb 2024 17:18:52 +0200 Subject: [PATCH] Change: Removed "celery" extra --- .readthedocs.yaml | 2 +- docs/getting-started/introduction.rst | 6 +-- docs/includes/installation.txt | 9 ++-- examples/django/requirements.txt | 2 +- examples/myutils/requirements.txt | 2 +- examples/myworker/requirements.txt | 2 +- examples/rabbitmq_management/requirements.txt | 2 +- examples/range/requirements.txt | 2 +- poetry.lock | 45 +++++++++---------- pyproject.toml | 8 +--- tox.ini | 14 +++--- 11 files changed, 39 insertions(+), 55 deletions(-) diff --git a/.readthedocs.yaml b/.readthedocs.yaml index baa621c8..dee3c39e 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -17,7 +17,7 @@ build: # Tell poetry to not use a virtual environment - poetry config virtualenvs.create false post_install: - - poetry install -E "celery" --with docs + - poetry install --with docs # Build documentation in the "docs/" directory with Sphinx sphinx: diff --git a/docs/getting-started/introduction.rst b/docs/getting-started/introduction.rst index fcc7ee96..1d2cf3f7 100644 --- a/docs/getting-started/introduction.rst +++ b/docs/getting-started/introduction.rst @@ -37,11 +37,7 @@ What do I need? - Python ❨3.8, 3.9, 3.10, 3.11, 3.12❩ - Celery is required and may be installed separately or automatically using the `celery` extra. - When used with the `celery` extra, pytest-celery will install the latest version of Celery - and a predefined set of extras. - - Pytest Celery is Celery-agnostic, and should work with virtually any version of Celery. + The pytest-celery plugin is Celery-agnostic, and should work with virtually any version of Celery. .. warning:: Currently, due to limited resources, we are unable to officially support Microsoft Windows. diff --git a/docs/includes/installation.txt b/docs/includes/installation.txt index 722fb3ed..9b726178 100644 --- a/docs/includes/installation.txt +++ b/docs/includes/installation.txt @@ -3,7 +3,7 @@ Installation ============ -You can install Pytest Celery either via the Python Package Index (PyPI). +You can install Pytest Celery via the Python Package Index (PyPI). To install using :command:`pip`: @@ -11,11 +11,8 @@ To install using :command:`pip`: $ pip install -U pytest-celery -To include the latest celery package, install with the ``celery`` extra: - -.. code-block:: console - - $ pip install -U "pytest-celery[celery]" +The :pypi:`celery` package will be installed by default with the ``redis`` and ``pymemcache`` +`extras `_. With git ~~~~~~~~ diff --git a/examples/django/requirements.txt b/examples/django/requirements.txt index 01ecc625..a97a31b3 100644 --- a/examples/django/requirements.txt +++ b/examples/django/requirements.txt @@ -1,5 +1,5 @@ sqlalchemy>=1.2.18 django>=2.2.1 pytest-django>=4.7.0 -pytest-celery[celery]@git+https://github.com/celery/pytest-celery.git +git+https://github.com/celery/pytest-celery.git pytest-xdist>=3.5.0 diff --git a/examples/myutils/requirements.txt b/examples/myutils/requirements.txt index 40932365..a0c33720 100644 --- a/examples/myutils/requirements.txt +++ b/examples/myutils/requirements.txt @@ -1,3 +1,3 @@ pytest>=7.4.4 -pytest-celery[celery]@git+https://github.com/celery/pytest-celery.git +git+https://github.com/celery/pytest-celery.git pytest-xdist>=3.5.0 diff --git a/examples/myworker/requirements.txt b/examples/myworker/requirements.txt index 40932365..a0c33720 100644 --- a/examples/myworker/requirements.txt +++ b/examples/myworker/requirements.txt @@ -1,3 +1,3 @@ pytest>=7.4.4 -pytest-celery[celery]@git+https://github.com/celery/pytest-celery.git +git+https://github.com/celery/pytest-celery.git pytest-xdist>=3.5.0 diff --git a/examples/rabbitmq_management/requirements.txt b/examples/rabbitmq_management/requirements.txt index 40932365..a0c33720 100644 --- a/examples/rabbitmq_management/requirements.txt +++ b/examples/rabbitmq_management/requirements.txt @@ -1,3 +1,3 @@ pytest>=7.4.4 -pytest-celery[celery]@git+https://github.com/celery/pytest-celery.git +git+https://github.com/celery/pytest-celery.git pytest-xdist>=3.5.0 diff --git a/examples/range/requirements.txt b/examples/range/requirements.txt index f7291659..182bf0c5 100644 --- a/examples/range/requirements.txt +++ b/examples/range/requirements.txt @@ -1,4 +1,4 @@ pytest>=7.4.4 -pytest-celery[celery]@git+https://github.com/celery/pytest-celery.git +git+https://github.com/celery/pytest-celery.git pytest-xdist>=3.5.0 pytest-subtests>=0.11.0 diff --git a/poetry.lock b/poetry.lock index ddd18928..84f22b61 100644 --- a/poetry.lock +++ b/poetry.lock @@ -26,7 +26,7 @@ files = [ name = "amqp" version = "5.2.0" description = "Low-level AMQP client for Python (fork of amqplib)." -optional = true +optional = false python-versions = ">=3.6" files = [ {file = "amqp-5.2.0-py3-none-any.whl", hash = "sha256:827cb12fb0baa892aad844fd95258143bce4027fdac4fccddbc43330fd281637"}, @@ -54,7 +54,7 @@ typing-extensions = {version = ">=4.0.0", markers = "python_version < \"3.9\""} name = "async-timeout" version = "4.0.3" description = "Timeout context manager for asyncio programs" -optional = true +optional = false python-versions = ">=3.7" files = [ {file = "async-timeout-4.0.3.tar.gz", hash = "sha256:4640d96be84d82d02ed59ea2b7105a0f7b33abe8703703cd0ab0bf87c427522f"}, @@ -131,7 +131,7 @@ dev = ["freezegun (>=1.0,<2.0)", "pytest (>=6.0)", "pytest-cov"] name = "backports-zoneinfo" version = "0.2.1" description = "Backport of the standard library zoneinfo module" -optional = true +optional = false python-versions = ">=3.6" files = [ {file = "backports.zoneinfo-0.2.1-cp36-cp36m-macosx_10_14_x86_64.whl", hash = "sha256:da6013fd84a690242c310d77ddb8441a559e9cb3d3d59ebac9aca1a57b2e18bc"}, @@ -162,7 +162,7 @@ tzdata = ["tzdata"] name = "billiard" version = "4.2.0" description = "Python multiprocessing fork with improvements and bugfixes" -optional = true +optional = false python-versions = ">=3.7" files = [ {file = "billiard-4.2.0-py3-none-any.whl", hash = "sha256:07aa978b308f334ff8282bd4a746e681b3513db5c9a514cbdd810cbbdc19714d"}, @@ -275,7 +275,7 @@ files = [ name = "celery" version = "5.3.6" description = "Distributed Task Queue." -optional = true +optional = false python-versions = ">=3.8" files = [ {file = "celery-5.3.6-py3-none-any.whl", hash = "sha256:9da4ea0118d232ce97dff5ed4974587fb1c0ff5c10042eb15278487cdd27d1af"}, @@ -572,7 +572,7 @@ colorama = {version = "*", markers = "platform_system == \"Windows\""} name = "click-didyoumean" version = "0.3.0" description = "Enables git-like *did-you-mean* feature in click" -optional = true +optional = false python-versions = ">=3.6.2,<4.0.0" files = [ {file = "click-didyoumean-0.3.0.tar.gz", hash = "sha256:f184f0d851d96b6d29297354ed981b7dd71df7ff500d82fa6d11f0856bee8035"}, @@ -586,7 +586,7 @@ click = ">=7" name = "click-plugins" version = "1.1.1" description = "An extension module for click to enable registering CLI commands via setuptools entry-points." -optional = true +optional = false python-versions = "*" files = [ {file = "click-plugins-1.1.1.tar.gz", hash = "sha256:46ab999744a9d831159c3411bb0c79346d94a444df9a3a3742e9ed63645f264b"}, @@ -603,7 +603,7 @@ dev = ["coveralls", "pytest (>=3.6)", "pytest-cov", "wheel"] name = "click-repl" version = "0.3.0" description = "REPL plugin for Click" -optional = true +optional = false python-versions = ">=3.6" files = [ {file = "click-repl-0.3.0.tar.gz", hash = "sha256:17849c23dba3d667247dc4defe1757fff98694e90fe37474f3feebb69ced26a9"}, @@ -1178,7 +1178,7 @@ testing = ["pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-ena name = "kombu" version = "5.3.5" description = "Messaging library for Python." -optional = true +optional = false python-versions = ">=3.8" files = [ {file = "kombu-5.3.5-py3-none-any.whl", hash = "sha256:0eac1bbb464afe6fb0924b21bf79460416d25d8abc52546d4f16cad94f789488"}, @@ -1632,7 +1632,7 @@ virtualenv = ">=20.10.0" name = "prompt-toolkit" version = "3.0.43" description = "Library for building powerful interactive command lines in Python" -optional = true +optional = false python-versions = ">=3.7.0" files = [ {file = "prompt_toolkit-3.0.43-py3-none-any.whl", hash = "sha256:a11a29cb3bf0a28a387fe5122cdb649816a957cd9261dcedf8c9f1fef33eacf6"}, @@ -2033,7 +2033,7 @@ testing = ["filelock"] name = "python-dateutil" version = "2.8.2" description = "Extensions to the standard Python datetime module" -optional = true +optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,>=2.7" files = [ {file = "python-dateutil-2.8.2.tar.gz", hash = "sha256:0123cacc1627ae19ddf3c27a5de5bd67ee4586fbdd6440d9748f8abb483d3e86"}, @@ -2047,7 +2047,7 @@ six = ">=1.5" name = "python-memcached" version = "1.59" description = "Pure python memcached client" -optional = true +optional = false python-versions = "*" files = [ {file = "python-memcached-1.59.tar.gz", hash = "sha256:a2e28637be13ee0bf1a8b6843e7490f9456fd3f2a4cb60471733c7b5d5557e4f"}, @@ -2266,17 +2266,17 @@ full = ["numpy"] [[package]] name = "redis" -version = "5.0.1" +version = "5.0.2" description = "Python client for Redis database and key-value store" -optional = true +optional = false python-versions = ">=3.7" files = [ - {file = "redis-5.0.1-py3-none-any.whl", hash = "sha256:ed4802971884ae19d640775ba3b03aa2e7bd5e8fb8dfaed2decce4d0fc48391f"}, - {file = "redis-5.0.1.tar.gz", hash = "sha256:0dab495cd5753069d3bc650a0dde8a8f9edde16fc5691b689a566eda58100d0f"}, + {file = "redis-5.0.2-py3-none-any.whl", hash = "sha256:4caa8e1fcb6f3c0ef28dba99535101d80934b7d4cd541bbb47f4a3826ee472d1"}, + {file = "redis-5.0.2.tar.gz", hash = "sha256:3f82cc80d350e93042c8e6e7a5d0596e4dd68715babffba79492733e1f367037"}, ] [package.dependencies] -async-timeout = {version = ">=4.0.2", markers = "python_full_version <= \"3.11.2\""} +async-timeout = ">=4.0.3" [package.extras] hiredis = ["hiredis (>=1.0.0)"] @@ -2922,7 +2922,7 @@ files = [ name = "tzdata" version = "2024.1" description = "Provider of IANA time zone data" -optional = true +optional = false python-versions = ">=2" files = [ {file = "tzdata-2024.1-py2.py3-none-any.whl", hash = "sha256:9068bc196136463f5245e51efda838afa15aaeca9903f49050dfa2679db4d252"}, @@ -2950,7 +2950,7 @@ zstd = ["zstandard (>=0.18.0)"] name = "vine" version = "5.1.0" description = "Python promises." -optional = true +optional = false python-versions = ">=3.6" files = [ {file = "vine-5.1.0-py3-none-any.whl", hash = "sha256:40fdf3c48b2cfe1c38a49e9ae2da6fda88e4794c810050a728bd7413811fb1dc"}, @@ -2981,7 +2981,7 @@ test = ["covdefaults (>=2.3)", "coverage (>=7.2.7)", "coverage-enable-subprocess name = "wcwidth" version = "0.2.13" description = "Measures the displayed width of unicode strings in a terminal" -optional = true +optional = false python-versions = "*" files = [ {file = "wcwidth-0.2.13-py2.py3-none-any.whl", hash = "sha256:3da69048e4540d84af32131829ff948f1e022c1c6bdb8d6102117aac784f6859"}, @@ -3076,10 +3076,7 @@ files = [ docs = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (<7.2.5)", "sphinx (>=3.5)", "sphinx-lint"] testing = ["big-O", "jaraco.functools", "jaraco.itertools", "more-itertools", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-ignore-flaky", "pytest-mypy (>=0.9.1)", "pytest-ruff"] -[extras] -celery = ["celery"] - [metadata] lock-version = "2.0" python-versions = ">= 3.8,<4.0" -content-hash = "13433a70061b75ea9bd2250ead190cb61b1c8ce241ea9a89f7d9822d877b31f6" +content-hash = "3fada5411477ce7c77a50f589addba6655625c256d5e2b614706f45d59786b9c" diff --git a/pyproject.toml b/pyproject.toml index c3148673..92f90d41 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -72,20 +72,14 @@ search = ':Version: {current_version}' replace = ':Version: {new_version}' [tool.poetry.dependencies] +celery = { version = "^5.0.0", extras = ["redis", "pymemcache"] } python = ">= 3.8,<4.0" -celery = { version = "<6.0.0", extras = [ - "redis", - "pymemcache", -], optional = true } retry = "^0.9.2" pytest-docker-tools = "^3.1.3" docker = "^7.0.0" psutil = "^5.9.7" setuptools = "^69.1.0" -[tool.poetry.extras] -celery = ["celery"] - [tool.poetry.group.dev] [tool.poetry.group.dev.dependencies] diff --git a/tox.ini b/tox.ini index ed4b2748..c6a6b429 100644 --- a/tox.ini +++ b/tox.ini @@ -24,7 +24,7 @@ setenv = PYTHONUNBUFFERED = 1 PYTHONDONTWRITEBYTECODE = 1 commands_pre = - poetry install -E "celery" --with test + poetry install --with test commands = unit: poetry run pytest tests/unit/ --maxfail=3 {posargs} integration: poetry run pytest tests/integration/ --exitfirst --dist=loadscope {posargs} @@ -51,7 +51,7 @@ setenv = PYTHONUNBUFFERED = 1 PYTHONDONTWRITEBYTECODE = 1 commands_pre = - poetry install -E "celery" --with test + poetry install --with test commands = poetry run pytest tests --exitfirst \ -n auto --dist=loadscope \ @@ -64,7 +64,7 @@ setenv = PYTHONUNBUFFERED = 1 PYTHONDONTWRITEBYTECODE = 1 commands_pre = - poetry install -E "celery" --with test + poetry install --with test commands = tox -e py312-unit,py312-integration,py312-smoke -p auto -o -- --exitfirst \ -n auto --dist=loadscope \ @@ -83,7 +83,7 @@ commands = description = Run code+doc lint using {basepython} allowlist_externals = poetry, make commands_pre = - poetry install -E "celery" --with dev,docs + poetry install --with dev,docs commands = poetry run pre-commit {posargs:run --all-files --show-diff-on-failure} make -C ./docs apicheck @@ -107,7 +107,7 @@ commands = description = Build docs using {basepython} allowlist_externals = poetry, make commands_pre = - poetry install -E "celery" --with docs + poetry install --with docs commands = make -C ./docs html @@ -115,7 +115,7 @@ commands = description = Build docs using {basepython} and serve in http://0.0.0.0:7010 allowlist_externals = poetry, make commands_pre = - poetry install -E "celery" --with docs + poetry install --with docs commands = make -C ./docs livehtml @@ -123,6 +123,6 @@ commands = description = Regenerate API Reference doc section using {basepython} allowlist_externals = poetry, make commands_pre = - poetry install -E "celery" --with docs + poetry install --with docs commands = make -C ./docs apidoc