Skip to content
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

Consolidate updates to dependencies #597

Merged
merged 41 commits into from
Mar 26, 2024
Merged

Consolidate updates to dependencies #597

merged 41 commits into from
Mar 26, 2024

Conversation

gaby
Copy link
Contributor

@gaby gaby commented Mar 7, 2024

  • Consolidates updates to several python and github-actions dependencies.
  • Updated docs to use docker compose instead of docker-compose
  • Added py3.12 and pypy-3.10 to CI workflow
  • Formatted code base with black
  • highest supported pydantic is 2.4.x. Anything higher than this fails to run with mypy errors.
  • Updating mypy fails.

Closes #577 #588 #548 #567 #556 #554 #564 #563 #560 #495 #518

Tests fail with: #497
Related to #596

image

gaby and others added 30 commits March 6, 2024 21:42
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]>
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]>
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]>
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]>
…up-python-5

Bump actions/setup-python from 4 to 5
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]>
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]>
…ckout-4

Bump actions/checkout from 3 to 4
…pellcheck-github-actions-0.36.0

Bump rojopolis/spellcheck-github-actions from 0.33.1 to 0.36.0
…ql-action-3

Bump github/codeql-action from 2 to 3
Update pytest-asyncio requirement from ^0.20.3 to ^0.23.5
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 pytest requirement from ^7.1.3 to ^8.0.2
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]>
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]>
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]>
…t-6.0.0

Update redis requirement from >=3.5.3,<5.0.0 to >=3.5.3,<6.0.0
…4-and-lt-11.0

Update more-itertools requirement from >=8.14,<10.0 to >=8.14,<11.0
Update black requirement from ^23.1 to ^24.2
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]>
…d-lt-2.7.0

Update pydantic requirement from >=1.10.2,<2.1.0 to >=1.10.2,<2.5.0
dependabot bot and others added 7 commits March 7, 2024 05:50
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]>
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]>
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]>
…decov-action-4

Bump codecov/codecov-action from 3 to 4
…after/release-drafter-6

Bump release-drafter/release-drafter from 5 to 6
Update tox requirement from ^3.26.0 to ^4.14.1
@banker banker requested review from uglide and slorello89 March 22, 2024 17:07
@banker banker self-assigned this Mar 22, 2024
@codecov-commenter
Copy link

codecov-commenter commented Mar 22, 2024

Codecov Report

Attention: Patch coverage is 75.00000% with 2 lines in your changes are missing coverage. Please review.

Project coverage is 77.89%. Comparing base (1213ca7) to head (ea59eea).

Files Patch % Lines
aredis_om/model/query_resolver.py 0.00% 2 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #597      +/-   ##
==========================================
+ Coverage   77.87%   77.89%   +0.01%     
==========================================
  Files          15       15              
  Lines        1279     1280       +1     
==========================================
+ Hits          996      997       +1     
  Misses        283      283              
Flag Coverage Δ
unit 77.89% <75.00%> (+0.01%) ⬆️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@slorello89
Copy link
Member

There's something very odd going on in the sync versions for python 3.12, looks like it's improperly escaping whitespace & punctuation:

"FT.SEARCH" "redis-om:testing:0.05308182803634398:member:index" "@first_name:{'Andrew\\\\,\\\\ the\\\\ Michael'} " "LIMIT" "0" "1"

@slorello89
Copy link
Member

Looks like the issue was caused by some updates to fstrings in python 3.12, to match the redis tag syntax, we naturally needed to escape braces in interpolated strings, see an example here, this is all well and good, and it still works in python 3.12, however we regenerate model.py using unasync, and the std_tokenizer changed in 3.12 so that f"@{field_name}:{{{value}}}" is yielded as a series of tokens @, {, field_name, }, :{, {, value, }, }, which from a code-interpretion perspective, is correct, however when the tokens are being reorganized they come out as `f"@{field_name}:{ {value}}", notice the space and missing braces.

It does not appear that there is a way to work around this with the code as-is, and changing those f-strings to the non-condensed format methods seems to resolve the tokenization issues:

so:

result += f"@{field_name}:{{{value}}}"

becomes:

result += "@{field_name}:{{{value}}}".format(
  field_name=field_name, value=value
)

This is a bit of hack, but it gets the job done and is the shortest and simplest way to the result we're looking for here, thoughts @banker, @gaby, @uglide?

slorello89
slorello89 previously approved these changes Mar 25, 2024
Copy link
Member

@slorello89 slorello89 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving, should get the OK from either @banker or @uglide regarding #597 (comment)

@slorello89
Copy link
Member

Spoke with @banker we're good to go (when version update tests pass!)

@slorello89 slorello89 merged commit dabd0fc into redis:main Mar 26, 2024
12 checks passed
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.

4 participants