Skip to content

Removing support for RedisGraph module. #3548

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

Merged
merged 2 commits into from
Mar 11, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
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
2 changes: 0 additions & 2 deletions .github/wordlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ ConnectionPool
CoreCommands
EVAL
EVALSHA
GraphCommands
Grokzen's
INCR
IOError
Expand All @@ -39,7 +38,6 @@ RedisCluster
RedisClusterCommands
RedisClusterException
RedisClusters
RedisGraph
RedisInstrumentor
RedisJSON
RedisTimeSeries
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/install_and_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ cd ${TESTDIR}
# install, run tests
pip install ${PKG}
# Redis tests
pytest -m 'not onlycluster and not graph'
pytest -m 'not onlycluster'
# RedisCluster tests
CLUSTER_URL="redis://localhost:16379/0"
CLUSTER_SSL_URL="rediss://localhost:27379/0"
pytest -m 'not onlynoncluster and not redismod and not ssl and not graph' \
pytest -m 'not onlynoncluster and not redismod and not ssl' \
--redis-url="${CLUSTER_URL}" --redis-ssl-url="${CLUSTER_SSL_URL}"
1 change: 1 addition & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
* Removing support for RedisGraph module. RedisGraph support is deprecated since Redis Stack 7.2 (https://redis.com/blog/redisgraph-eol/)
* Fix lock.extend() typedef to accept float TTL extension
* Update URL in the readme linking to Redis University
* Move doctests (doc code examples) to main branch
Expand Down
8 changes: 0 additions & 8 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,11 +105,3 @@ services:
- standalone
- all-stack
- all

redis-stack-graph:
image: redis/redis-stack-server:6.2.6-v15
container_name: redis-stack-graph
ports:
- 6480:6379
profiles:
- graph
33 changes: 0 additions & 33 deletions docs/redismodules.rst
Original file line number Diff line number Diff line change
Expand Up @@ -51,39 +51,6 @@ These are the commands for interacting with the `RedisBloom module <https://redi

------

RedisGraph Commands
*******************

These are the commands for interacting with the `RedisGraph module <https://redisgraph.io>`_. Below is a brief example, as well as documentation on the commands themselves.

**Create a graph, adding two nodes**

.. code-block:: python

import redis
from redis.graph.node import Node

john = Node(label="person", properties={"name": "John Doe", "age": 33}
jane = Node(label="person", properties={"name": "Jane Doe", "age": 34}

r = redis.Redis()
graph = r.graph()
graph.add_node(john)
graph.add_node(jane)
graph.add_node(pat)
graph.commit()

.. automodule:: redis.commands.graph.node
:members: Node

.. automodule:: redis.commands.graph.edge
:members: Edge

.. automodule:: redis.commands.graph.commands
:members: GraphCommands

------

RedisJSON Commands
******************

Expand Down
71 changes: 19 additions & 52 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,8 @@ description = "Python client for Redis database and key-value store"
readme = "README.md"
license = "MIT"
requires-python = ">=3.8"
authors = [
{ name = "Redis Inc.", email = "[email protected]" },
]
keywords = [
"Redis",
"database",
"key-value-store",
]
authors = [{ name = "Redis Inc.", email = "[email protected]" }]
keywords = ["Redis", "database", "key-value-store"]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Environment :: Console",
Expand All @@ -35,22 +29,12 @@ classifiers = [
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
]
dependencies = [
'async-timeout>=4.0.3; python_full_version<"3.11.3"',
]
dependencies = ['async-timeout>=4.0.3; python_full_version<"3.11.3"']

[project.optional-dependencies]
hiredis = [
"hiredis>=3.0.0",
]
ocsp = [
"cryptography>=36.0.1",
"pyopenssl==20.0.1",
"requests>=2.31.0",
]
jwt = [
"PyJWT~=2.9.0",
]
hiredis = ["hiredis>=3.0.0"]
ocsp = ["cryptography>=36.0.1", "pyopenssl==20.0.1", "requests>=2.31.0"]
jwt = ["PyJWT~=2.9.0"]

[project.urls]
Changes = "https://github.com/redis/redis-py/releases"
Expand All @@ -63,22 +47,15 @@ Homepage = "https://github.com/redis/redis-py"
path = "redis/__init__.py"

[tool.hatch.build.targets.sdist]
include = [
"/redis",
"/tests",
"dev_requirements.txt",
]
include = ["/redis", "/tests", "dev_requirements.txt"]

[tool.hatch.build.targets.wheel]
include = [
"/redis",
]
include = ["/redis"]

[tool.pytest.ini_options]
addopts = "-s"
markers = [
"redismod: run only the redis module tests",
"graph: run only the redisgraph tests",
"pipeline: pipeline tests",
"onlycluster: marks tests to be run only with cluster mode redis",
"onlynoncluster: marks tests to be run only with standalone redis",
Expand All @@ -93,7 +70,6 @@ asyncio_mode = "auto"
timeout = 30
filterwarnings = [
"always",
"ignore:RedisGraph support is deprecated as of Redis Stack 7.2:DeprecationWarning",
# Ignore a coverage warning when COVERAGE_CORE=sysmon for Pythons < 3.12.
"ignore:sys.monitoring isn't available:coverage.exceptions.CoverageWarning",
]
Expand All @@ -118,32 +94,23 @@ exclude = [

[tool.ruff.lint]
ignore = [
"E501", # line too long (taken care of with ruff format)
"E741", # ambiguous variable name
"N818", # Errors should have Error suffix
"E501", # line too long (taken care of with ruff format)
"E741", # ambiguous variable name
"N818", # Errors should have Error suffix
]

select = [
"E",
"F",
"FLY",
"I",
"N",
"W",
]
select = ["E", "F", "FLY", "I", "N", "W"]

[tool.ruff.lint.per-file-ignores]
"redis/commands/bf/*" = [
# the `bf` module uses star imports, so this is required there.
"F405", # name may be undefined, or defined from star imports
]
"redis/commands/{bf,timeseries,json,search}/*" = [
"N",
"F405", # name may be undefined, or defined from star imports
]
"redis/commands/{bf,timeseries,json,search}/*" = ["N"]
"tests/*" = [
"I", # TODO: could be enabled, plenty of changes
"N801", # class name should use CapWords convention
"N803", # argument name should be lowercase
"N802", # function name should be lowercase
"N806", # variable name should be lowercase
"I", # TODO: could be enabled, plenty of changes
"N801", # class name should use CapWords convention
"N803", # argument name should be lowercase
"N802", # function name should be lowercase
"N806", # variable name should be lowercase
]
1 change: 0 additions & 1 deletion redis/cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,6 @@ class AbstractRedisCluster:
"TFUNCTION LIST",
"TFCALL",
"TFCALLASYNC",
"GRAPH.CONFIG",
"LATENCY HISTORY",
"LATENCY LATEST",
"LATENCY RESET",
Expand Down
Loading
Loading