Skip to content

Regression from #3954 #3957

@Cornelicorn

Description

@Cornelicorn

I found a regression with #3954. When using a unix domain socket via a URL scheme (specifcially unix:///run/redis/redis.sock?db=0), there is an excpetion raised, since there is no port for unix socket connections.

   File "/opt/netbox/venv/lib/python3.13/site-packages/redis/commands/core.py", line 2069, in get
     return self.execute_command("GET", name, keys=[name])
            ~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^
   File "/opt/netbox/venv/lib/python3.13/site-packages/redis/client.py", line 716, in execute_command
     return self._execute_command(*args, **options)
            ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^
   File "/opt/netbox/venv/lib/python3.13/site-packages/redis/client.py", line 755, in _execute_command
     server_port=conn.port,
                 ^^^^^^^^^
 AttributeError: 'UnixDomainSocketConnection' object has no attribute 'port'

This was discovered when using django-redis for caching in netbox.
Downgrading to 7.1.1 solves this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions