Skip to content

Revert fakeredis to dev dependencies for PyPI compatibility#180

Merged
chrisguidry merged 1 commit intomainfrom
revert-fakeredis-to-dev
Oct 31, 2025
Merged

Revert fakeredis to dev dependencies for PyPI compatibility#180
chrisguidry merged 1 commit intomainfrom
revert-fakeredis-to-dev

Conversation

@chrisguidry
Copy link
Owner

The previous change moved fakeredis to main dependencies, but PyPI doesn't allow git dependencies in published packages. We need to wait for an official release (version > 2.32.0, presumably 2.33.0) before we can use it as a main dependency.

Changes

  • Moved fakeredis back to dev dependencies
  • Still using the main repo (not Nate's fork) at the commit with the fix
  • Updated comment to explain we're waiting for a PyPI release
  • Once released, we can use fakeredis[lua]>=2.33.0 as a main dependency

Why This Matters

PyPI requires all dependencies to be proper versioned packages, not git references. While the fix we need is merged into the main repo, it hasn't been released to PyPI yet. Until then, we'll keep fakeredis as a dev dependency for testing purposes only.

Related: cunla/fakeredis-py#427

🤖 Generated with Claude Code

The previous change moved fakeredis to main dependencies, but PyPI
doesn't allow git dependencies in published packages. We need to wait
for an official release (version > 2.32.0, presumably 2.33.0) before
we can use it as a main dependency.

Changes:
- Moved fakeredis back to dev dependencies
- Still using the main repo (not Nate's fork) at the commit with the fix
- Updated comment to explain we're waiting for a PyPI release
- Once released, we can use "fakeredis[lua]>=2.33.0" as a main dependency

Related: cunla/fakeredis-py#427

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@claude
Copy link
Contributor

claude bot commented Oct 31, 2025

Claude finished @chrisguidry's task —— View job


Pull Request Review

Review Checklist

  • Read and analyze the PR changes
  • Verify fakeredis is only used in tests
  • Check PyPI compatibility
  • Review code quality and best practices
  • Assess potential bugs or issues
  • Check for security concerns
  • Evaluate test coverage impact

Review Summary

This PR correctly addresses the PyPI compatibility issue by moving fakeredis back to dev dependencies. The change is necessary and well-executed.

✅ Positive Aspects

  1. Correct Solution: Moving fakeredis to dev dependencies is the right approach since PyPI doesn't accept git dependencies in published packages.

  2. Clear Documentation: The comment in pyproject.toml (lines 43-46) clearly explains why this temporary solution is needed and what the future plan is.

  3. Maintains Functionality: The code still properly supports the memory:// URL feature for testing, with appropriate runtime checks and helpful error messages.

  4. No Breaking Changes: This change doesn't affect end users since fakeredis is only used for testing and development.

🔍 Key Findings

PyPI Compatibility ✅

The change correctly resolves the PyPI publishing issue. Git dependencies are only allowed in dev dependencies, not in main package dependencies.

Runtime Impact ✅

  • Fakeredis is optional at runtime: The code in src/docket/docket.py:188-208 properly handles the import with a try/except block
  • Clear error messaging: When memory:// URLs are used without fakeredis installed, users get a helpful error message
  • No production impact: Since fakeredis is only needed for memory:// URLs (testing), production deployments are unaffected

Test Coverage ✅

  • Test coverage remains unaffected since fakeredis is still available in the dev environment
  • The test_memory_backend.py file properly skips tests if fakeredis is not installed using pytest.importorskip()
  • No changes to test logic or coverage requirements

📝 Recommendations

  1. Consider adding an extras group: Once fakeredis 2.33.0+ is released, consider adding it as an optional extra:

    [project.optional-dependencies]
    memory = ["fakeredis[lua]>=2.33.0"]

    This would allow users to install with pip install pydocket[memory] if they want in-memory testing support.

  2. Track the upstream release: Consider creating a GitHub issue to track when fakeredis releases version 2.33.0 so you don't forget to update this dependency.

🔒 Security Considerations

No security concerns identified. The git commit hash is pinned to a specific, reviewed commit.

🐛 Potential Issues

None identified. The changes are minimal and focused solely on dependency organization.

⚡ Performance Considerations

No performance impact. This is purely a packaging change.

✅ Overall Assessment

APPROVED - This PR correctly addresses the PyPI compatibility issue without introducing any problems. The change is necessary, well-documented, and maintains all existing functionality.


@github-actions
Copy link

📚 Documentation has been built for this PR!

You can download the documentation directly here:
https://github.com/chrisguidry/docket/actions/runs/18982880346/artifacts/4433375153

@codecov-commenter
Copy link

codecov-commenter commented Oct 31, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (147daeb) to head (4cca176).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##              main      #180   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           34        34           
  Lines         5216      5216           
  Branches       265       265           
=========================================
  Hits          5216      5216           
Flag Coverage Δ
python-3.10 100.00% <ø> (ø)
python-3.11 98.79% <ø> (ø)
python-3.12 100.00% <ø> (ø)
python-3.13 100.00% <ø> (ø)
python-3.14 100.00% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@chrisguidry chrisguidry merged commit afb074d into main Oct 31, 2025
24 checks passed
@chrisguidry chrisguidry deleted the revert-fakeredis-to-dev branch October 31, 2025 19:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants