Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
Reviewed by Cursor Bugbot for commit 615ff45. Configure here.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Description of change
An explicit zero port in a connection URL was treated as if the port had been omitted:
Both URL parsers now distinguish
0fromNone, so the pool preserves the supplied port instead of silently falling back to port 6379. Async cluster initialization also preserves integer zero when constructing startup nodes; previously rejected values such as an empty string remain invalid.Regression tests cover omitted, ordinary, and zero ports through synchronous and asyncio parsing and pool construction, as well as public async cluster construction and invalid direct-constructor values.
Validation:
pytest -q tests/test_connection.py tests/test_asyncio/test_connection.py -k parse_url— 14 passed.invoke linters— passed.Pull Request check-list
Note
Low Risk
Behavior change is limited to edge-case port parsing and async cluster startup validation, with targeted regression tests and no auth or data-path changes.
Overview
Fixes URL and cluster client handling so an explicit port
0is no longer dropped as “missing.”URL parsing (
parse_urlin sync and asyncioconnection.py) now setsportwhenparsed.port is not Noneinstead of truthiness checks, soredis://localhost:0keepsport=0rather than omitting it and falling back to 6379.Async
RedisClusterusesport_is_provided = bool(port) or type(port) is intfor startup-node validation and construction, sofrom_url("redis://localhost:0")builds a startup node with port 0 while still rejecting invalid falsy ports (None,"",False,0.0).Regression tests cover omitted, normal, and zero ports for
parse_url/ConnectionPool.from_url(both clients) and forRedisCluster.from_url/ constructor validation.Reviewed by Cursor Bugbot for commit e6af331. Bugbot is set up for automated code reviews on this repo. Configure here.