forked from gusdan/django-elasticache
-
Notifications
You must be signed in to change notification settings - Fork 6
Support connection pooling (thread safe) & auto discovery #239
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
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
daad37d
Copy from github/gitignore
Surgo 1814624
Migrate project to uv
Surgo c5eb5f8
Re-write backend & client (HashClient based)
Surgo 70d60ad
Fix lint bugs & enable CI
Surgo 50ce232
Log exceptions
Surgo 20e47be
Install dev packages
Surgo 2fda862
Use pooling & safer close
Surgo f10f31a
Fix wrap & dd-trace bugs
Surgo 37571bc
Fix wrong format
Surgo 3240df3
Use uv
Surgo 5536573
Add comments
Surgo ea2b1ad
Add GitHub Actions to publish
Surgo b24813d
Limit branches
Surgo 049e2f2
Add client import tests
Surgo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,10 +1,11 @@ | ||
| --- | ||
| version: 2 | ||
| updates: | ||
| - package-ecosystem: pip | ||
| - package-ecosystem: uv | ||
| directory: "/" | ||
| schedule: | ||
| interval: daily | ||
| time: '09:00' | ||
| time: "09:00" | ||
| timezone: Asia/Tokyo | ||
| open-pull-requests-limit: 10 | ||
| target-branch: main |
This file was deleted.
Oops, something went wrong.
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| --- | ||
| name: "Publish" | ||
|
|
||
| "on": | ||
| release: | ||
| types: | ||
| - published | ||
|
|
||
| jobs: | ||
| publish: | ||
| name: Publish to PyPi | ||
| runs-on: ubuntu-latest | ||
| environment: | ||
| name: pypi | ||
| permissions: | ||
| id-token: write | ||
| contents: read | ||
| steps: | ||
| - name: Set up Python | ||
| uses: actions/setup-python@v6 | ||
| with: | ||
| python-version-file: ".python-version" | ||
| - name: Set up uv | ||
| uses: astral-sh/setup-uv@v7 | ||
| - name: Build | ||
| run: uv build | ||
| - name: Smoke test (wheel) | ||
| run: uv run --isolated --no-project --with $(ls dist/*.whl) tests/smoke_test.py | ||
| - name: Smoke test (source distribution) | ||
| run: uv run --isolated --no-project --with $(ls dist/*.tar.gz) tests/smoke_test.py | ||
| - name: Publish | ||
| run: uv publish | ||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,60 @@ | ||
| --- | ||
| name: Test | ||
|
|
||
| "on": | ||
| push: | ||
| branches: | ||
| - main | ||
| pull_request: | ||
| branches: | ||
| - main | ||
|
|
||
| jobs: | ||
| lint: | ||
| name: Lint Typechecking | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v5 | ||
| - name: Set up Python | ||
| uses: actions/setup-python@v6 | ||
| with: | ||
| python-version-file: ".python-version" | ||
| - name: Set up uv | ||
| uses: astral-sh/setup-uv@v7 | ||
| with: | ||
| enable-cache: true | ||
| - name: Install dependencies | ||
| run: uv sync --extra dev | ||
| - name: Lint (ruff format --check) | ||
| run: uv run ruff format --check | ||
| - name: Lint (ruff check) | ||
| run: uv run ruff check | ||
| - name: Type check (mypy) | ||
| run: uv run mypy | ||
|
|
||
| test: | ||
| name: Python ${{ matrix.python-version }} / Django ${{ matrix.django-version }} | ||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"] | ||
| django-version: ["4.2", "5.1", "5.2"] | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v5 | ||
| - name: Set up Python ${{ matrix.python-version }} | ||
| uses: actions/setup-python@v6 | ||
| with: | ||
| python-version: ${{ matrix.python-version }} | ||
| - name: Set up uv | ||
| uses: astral-sh/setup-uv@v7 | ||
| with: | ||
| enable-cache: true | ||
| - name: Install dependencies | ||
| run: | | ||
| uv sync --extra dev | ||
| uv pip install "django~=${{ matrix.django-version }}" | ||
| - name: Test (pytest) | ||
| run: uv run pytest -v |
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| 3.10 |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| include LICENSE | ||
| include README.rst | ||
| include README.md | ||
|
|
||
| exclude requirements.txt | ||
| exclude tox.ini | ||
|
|
||
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📝 Adding a Trusted Publisher to an Existing PyPI Project - PyPI Docs