Skip to content

Commit dabd0fc

Browse files
gabydependabot[bot]slorello89
authored
Consolidate updates to dependencies (#597)
* Update dependabot.yml * Bump actions/setup-python from 4 to 5 Bumps [actions/setup-python](https://github.com/actions/setup-python) from 4 to 5. - [Release notes](https://github.com/actions/setup-python/releases) - [Commits](actions/setup-python@v4...v5) --- updated-dependencies: - dependency-name: actions/setup-python dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> * Bump actions/cache from 3 to 4 Bumps [actions/cache](https://github.com/actions/cache) from 3 to 4. - [Release notes](https://github.com/actions/cache/releases) - [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md) - [Commits](actions/cache@v3...v4) --- updated-dependencies: - dependency-name: actions/cache dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> * Bump github/codeql-action from 2 to 3 Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2 to 3. - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](github/codeql-action@v2...v3) --- updated-dependencies: - dependency-name: github/codeql-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> * Bump rojopolis/spellcheck-github-actions from 0.33.1 to 0.36.0 Bumps [rojopolis/spellcheck-github-actions](https://github.com/rojopolis/spellcheck-github-actions) from 0.33.1 to 0.36.0. - [Release notes](https://github.com/rojopolis/spellcheck-github-actions/releases) - [Changelog](https://github.com/rojopolis/spellcheck-github-actions/blob/master/CHANGELOG.md) - [Commits](rojopolis/spellcheck-github-actions@0.33.1...0.36.0) --- updated-dependencies: - dependency-name: rojopolis/spellcheck-github-actions dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> * Bump actions/checkout from 3 to 4 Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](actions/checkout@v3...v4) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> * Update pytest-asyncio requirement from ^0.20.3 to ^0.23.5 Updates the requirements on [pytest-asyncio](https://github.com/pytest-dev/pytest-asyncio) to permit the latest version. - [Release notes](https://github.com/pytest-dev/pytest-asyncio/releases) - [Commits](pytest-dev/pytest-asyncio@v0.20.3...v0.23.5) --- updated-dependencies: - dependency-name: pytest-asyncio dependency-type: direct:development ... Signed-off-by: dependabot[bot] <[email protected]> * Add py3.12 and pypy-3.10 * Update pytest requirement from ^7.1.3 to ^8.0.2 Updates the requirements on [pytest](https://github.com/pytest-dev/pytest) to permit the latest version. - [Release notes](https://github.com/pytest-dev/pytest/releases) - [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst) - [Commits](pytest-dev/pytest@7.1.3...8.0.2) --- updated-dependencies: - dependency-name: pytest dependency-type: direct:development ... Signed-off-by: dependabot[bot] <[email protected]> * Update more-itertools requirement from >=8.14,<10.0 to >=8.14,<11.0 Updates the requirements on [more-itertools](https://github.com/more-itertools/more-itertools) to permit the latest version. - [Release notes](https://github.com/more-itertools/more-itertools/releases) - [Commits](more-itertools/more-itertools@v8.14.0...v10.2.0) --- updated-dependencies: - dependency-name: more-itertools dependency-type: direct:production ... Signed-off-by: dependabot[bot] <[email protected]> * Update redis requirement from >=3.5.3,<5.0.0 to >=3.5.3,<6.0.0 Updates the requirements on [redis](https://github.com/redis/redis-py) to permit the latest version. - [Release notes](https://github.com/redis/redis-py/releases) - [Changelog](https://github.com/redis/redis-py/blob/master/CHANGES) - [Commits](redis/redis-py@3.5.3...v5.0.2) --- updated-dependencies: - dependency-name: redis dependency-type: direct:production ... Signed-off-by: dependabot[bot] <[email protected]> * Update black requirement from ^23.1 to ^24.2 Updates the requirements on [black](https://github.com/psf/black) to permit the latest version. - [Release notes](https://github.com/psf/black/releases) - [Changelog](https://github.com/psf/black/blob/main/CHANGES.md) - [Commits](psf/black@23.1.0...24.2.0) --- updated-dependencies: - dependency-name: black dependency-type: direct:development ... Signed-off-by: dependabot[bot] <[email protected]> * Update pydantic requirement from >=1.10.2,<2.1.0 to >=1.10.2,<2.7.0 Updates the requirements on [pydantic](https://github.com/pydantic/pydantic) to permit the latest version. - [Release notes](https://github.com/pydantic/pydantic/releases) - [Changelog](https://github.com/pydantic/pydantic/blob/main/HISTORY.md) - [Commits](pydantic/pydantic@v1.10.2...v2.6.3) --- updated-dependencies: - dependency-name: pydantic dependency-type: direct:production ... Signed-off-by: dependabot[bot] <[email protected]> * Update pyproject.toml * Update pyproject.toml * Update command for compose to v2 * Fix formatting issues with black * Fix several typing issues * Bump tox to latest v3 release * Update tox requirement from ^3.26.0 to ^4.14.1 Updates the requirements on [tox](https://github.com/tox-dev/tox) to permit the latest version. - [Release notes](https://github.com/tox-dev/tox/releases) - [Changelog](https://github.com/tox-dev/tox/blob/main/docs/changelog.rst) - [Commits](tox-dev/tox@3.26.0...4.14.1) --- updated-dependencies: - dependency-name: tox dependency-type: direct:development ... Signed-off-by: dependabot[bot] <[email protected]> * Add py3.12 to pyproject.toml * Bump codecov/codecov-action from 3 to 4 Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 3 to 4. - [Release notes](https://github.com/codecov/codecov-action/releases) - [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md) - [Commits](codecov/codecov-action@v3...v4) --- updated-dependencies: - dependency-name: codecov/codecov-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> * Bump release-drafter/release-drafter from 5 to 6 Bumps [release-drafter/release-drafter](https://github.com/release-drafter/release-drafter) from 5 to 6. - [Release notes](https://github.com/release-drafter/release-drafter/releases) - [Commits](release-drafter/release-drafter@v5...v6) --- updated-dependencies: - dependency-name: release-drafter/release-drafter dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> * setting up setuptools when python version >= 3.12 * moving escaped brace string interpolation into regular format methods to dodge PEP-701 tokenizer issue in unasync * fixing for linter * updating version --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: slorello89 <[email protected]>
1 parent 1213ca7 commit dabd0fc

16 files changed

+78
-57
lines changed

.github/workflows/ci.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ jobs:
2626
timeout-minutes: 5
2727
steps:
2828
- name: Checkout
29-
uses: actions/checkout@v3
29+
uses: actions/checkout@v4
3030
- name: Setup Python 3.9
31-
uses: actions/setup-python@v4
31+
uses: actions/setup-python@v5
3232
with:
3333
python-version: ${{env.pythonversion}}
3434
#----------------------------------------------
@@ -45,7 +45,7 @@ jobs:
4545
#----------------------------------------------
4646
- name: Load cached venv
4747
id: cached-poetry-dependencies
48-
uses: actions/cache@v3
48+
uses: actions/cache@v4
4949
with:
5050
path: .venv
5151
key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}
@@ -76,7 +76,7 @@ jobs:
7676
strategy:
7777
matrix:
7878
os: [ ubuntu-latest ]
79-
pyver: [ "3.8", "3.9", "3.10", "3.11", "pypy-3.8", "pypy-3.9" ]
79+
pyver: [ "3.8", "3.9", "3.10", "3.11", "3.12", "pypy-3.8", "pypy-3.9", "pypy-3.10" ]
8080
redisstack: [ "latest" ]
8181
fail-fast: false
8282
services:
@@ -98,9 +98,9 @@ jobs:
9898
INSTALL_DIR: ${{ github.workspace }}/redis
9999
steps:
100100
- name: Checkout
101-
uses: actions/checkout@v3
101+
uses: actions/checkout@v4
102102
- name: Setup Python ${{ matrix.pyver }}
103-
uses: actions/setup-python@v4
103+
uses: actions/setup-python@v5
104104
with:
105105
python-version: ${{ matrix.pyver }}
106106
#----------------------------------------------
@@ -117,7 +117,7 @@ jobs:
117117
#----------------------------------------------
118118
- name: Load cached venv
119119
id: cached-poetry-dependencies
120-
uses: actions/cache@v3
120+
uses: actions/cache@v4
121121
with:
122122
path: .venv
123123
key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}
@@ -144,7 +144,7 @@ jobs:
144144
make test
145145
poetry run coverage xml
146146
- name: Upload coverage
147-
uses: codecov/codecov-action@v3
147+
uses: codecov/codecov-action@v4
148148
with:
149149
file: ./coverage.xml
150150
flags: unit

.github/workflows/codeql.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,13 @@ jobs:
2525

2626
steps:
2727
- name: Checkout repository
28-
uses: actions/checkout@v3
28+
uses: actions/checkout@v4
2929

3030
# Initializes the CodeQL tools for scanning.
3131
- name: Initialize CodeQL
32-
uses: github/codeql-action/init@v2
32+
uses: github/codeql-action/init@v3
3333
with:
3434
languages: ${{ matrix.language }}
3535

3636
- name: Perform CodeQL Analysis
37-
uses: github/codeql-action/analyze@v2
37+
uses: github/codeql-action/analyze@v3

.github/workflows/pypi-publish.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,12 @@ jobs:
2727
value: "${{ steps.get_version.outputs.VERSION }}"
2828

2929
- name: Set up Python 3.9
30-
uses: actions/setup-python@v4.3.0
30+
uses: actions/setup-python@v5
3131
with:
3232
python-version: 3.9
3333

3434
- name: Cache Poetry virtualenv
35-
uses: actions/cache@v3.0.11
35+
uses: actions/cache@v4
3636
id: cache
3737
with:
3838
path: ~/.virtualenvs

.github/workflows/release-drafter.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
runs-on: ubuntu-latest
1212
steps:
1313
# Drafts your next Release notes as Pull Requests are merged into "master"
14-
- uses: release-drafter/release-drafter@v5
14+
- uses: release-drafter/release-drafter@v6
1515
with:
1616
# (Optional) specify config name to use, relative to .github/. Default: release-drafter.yml
1717
config-name: release-drafter-config.yml

.github/workflows/spellcheck.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ jobs:
66
runs-on: ubuntu-latest
77
steps:
88
- name: Checkout
9-
uses: actions/checkout@v3
9+
uses: actions/checkout@v4
1010
- name: Check Spelling
11-
uses: rojopolis/spellcheck-github-actions@0.33.1
11+
uses: rojopolis/spellcheck-github-actions@0.36.0
1212
with:
1313
config_path: .github/spellcheck-settings.yml
1414
task_name: Markdown

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ clean:
3838
rm -rf dist
3939
rm -rf redis_om
4040
rm -rf tests_sync
41-
docker-compose down
41+
docker compose down
4242

4343

4444
.PHONY: dist
@@ -65,7 +65,7 @@ format: $(INSTALL_STAMP) sync
6565
.PHONY: test
6666
test: $(INSTALL_STAMP) sync redis
6767
REDIS_OM_URL="$(REDIS_OM_URL)" $(POETRY) run pytest -n auto -vv ./tests/ ./tests_sync/ --cov-report term-missing --cov $(NAME) $(SYNC_NAME)
68-
docker-compose down
68+
docker compose down
6969

7070
.PHONY: test_oss
7171
test_oss: $(INSTALL_STAMP) sync redis
@@ -81,7 +81,7 @@ shell: $(INSTALL_STAMP)
8181

8282
.PHONY: redis
8383
redis:
84-
docker-compose up -d
84+
docker compose up -d
8585

8686
.PHONY: all
8787
all: lint format test

aredis_om/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@
88
FindQuery,
99
HashModel,
1010
JsonModel,
11-
VectorFieldOptions,
1211
KNNExpression,
1312
NotFoundError,
1413
QueryNotSupportedError,
1514
QuerySyntaxError,
1615
RedisModel,
1716
RedisModelError,
17+
VectorFieldOptions,
1818
)

aredis_om/model/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
Field,
55
HashModel,
66
JsonModel,
7-
VectorFieldOptions,
87
KNNExpression,
98
NotFoundError,
109
RedisModel,
10+
VectorFieldOptions,
1111
)

aredis_om/model/model.py

Lines changed: 25 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -630,20 +630,30 @@ def resolve_value(
630630
values: filter = filter(None, value.split(separator_char))
631631
for value in values:
632632
value = escaper.escape(value)
633-
result += f"@{field_name}:{{{value}}}"
633+
result += "@{field_name}:{{{value}}}".format(
634+
field_name=field_name, value=value
635+
)
634636
else:
635637
value = escaper.escape(value)
636-
result += f"@{field_name}:{{{value}}}"
638+
result += "@{field_name}:{{{value}}}".format(
639+
field_name=field_name, value=value
640+
)
637641
elif op is Operators.NE:
638642
value = escaper.escape(value)
639-
result += f"-(@{field_name}:{{{value}}})"
643+
result += "-(@{field_name}:{{{value}}})".format(
644+
field_name=field_name, value=value
645+
)
640646
elif op is Operators.IN:
641647
expanded_value = cls.expand_tag_value(value)
642-
result += f"(@{field_name}:{{{expanded_value}}})"
648+
result += "(@{field_name}:{{{expanded_value}}})".format(
649+
field_name=field_name, expanded_value=expanded_value
650+
)
643651
elif op is Operators.NOT_IN:
644652
# TODO: Implement NOT_IN, test this...
645653
expanded_value = cls.expand_tag_value(value)
646-
result += f"-(@{field_name}:{{{expanded_value}}})"
654+
result += "-(@{field_name}):{{{expanded_value}}}".format(
655+
field_name=field_name, expanded_value=expanded_value
656+
)
647657

648658
return result
649659

@@ -1525,9 +1535,11 @@ async def all_pks(cls): # type: ignore
15251535
# TODO: We need to decide how we want to handle the lack of
15261536
# decode_responses=True...
15271537
return (
1528-
remove_prefix(key, key_prefix)
1529-
if isinstance(key, str)
1530-
else remove_prefix(key.decode(cls.Meta.encoding), key_prefix)
1538+
(
1539+
remove_prefix(key, key_prefix)
1540+
if isinstance(key, str)
1541+
else remove_prefix(key.decode(cls.Meta.encoding), key_prefix)
1542+
)
15311543
async for key in cls.db().scan_iter(f"{key_prefix}*", _type="HASH")
15321544
)
15331545

@@ -1698,9 +1710,11 @@ async def all_pks(cls): # type: ignore
16981710
# TODO: We need to decide how we want to handle the lack of
16991711
# decode_responses=True...
17001712
return (
1701-
remove_prefix(key, key_prefix)
1702-
if isinstance(key, str)
1703-
else remove_prefix(key.decode(cls.Meta.encoding), key_prefix)
1713+
(
1714+
remove_prefix(key, key_prefix)
1715+
if isinstance(key, str)
1716+
else remove_prefix(key.decode(cls.Meta.encoding), key_prefix)
1717+
)
17041718
async for key in cls.db().scan_iter(f"{key_prefix}*", _type="ReJSON-RL")
17051719
)
17061720

aredis_om/model/query_resolver.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from typing import List, Mapping
1+
from typing import List, Mapping, Optional
22

33
from aredis_om.model.model import Expression
44

@@ -100,5 +100,5 @@ class QueryResolver:
100100
def __init__(self, *expressions: Expression):
101101
self.expressions = expressions
102102

103-
def resolve(self) -> str:
103+
def resolve(self) -> Optional[str]:
104104
"""Resolve expressions to a RediSearch query string."""

0 commit comments

Comments
 (0)