Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Redundant async-timeout dependency in Redis 5.0.2 #3174

Closed
Zaczero opened this issue Mar 3, 2024 · 6 comments
Closed

Redundant async-timeout dependency in Redis 5.0.2 #3174

Zaczero opened this issue Mar 3, 2024 · 6 comments

Comments

@Zaczero
Copy link
Contributor

Zaczero commented Mar 3, 2024

The async-timeout dependency was originally removed in #2602 due to its redundancy in modern Python.

It was re-added in Redis 5.0.2 (#3109) and appears to still be redundant for Python versions >= 3.11.3 (or 3.11).

The #3109 PR is the result of issue #3105.

The error message in #3105 (ModuleNotFoundError: No module named 'async-timeout') contains module name with a dash, instead of typical underscore. Hinting, that the error was thrown during the package installation and not runtime (otherwise it would be async_timeout).

It would be helpful if the original reporter of issue #3105 could provide more context from the error stack trace, instead of just the error message itself.

@Zaczero
Copy link
Contributor Author

Zaczero commented Mar 3, 2024

Attaching log from updating redis 5.0.1 to 5.0.2 on Python 3.12.2.

Updating dependencies
Resolving dependencies... (11.4s)

Package operations: 1 install, 4 updates, 0 removals

  • Updating python-dateutil (2.8.2 -> 2.9.0.post0)
  • Installing async-timeout (4.0.3)
  • Updating pydantic (2.6.2 -> 2.6.3)
  • Updating email-validator (2.1.0.post1 -> 2.1.1)
  • Updating redis (5.0.1 -> 5.0.2)

Writing lock file

@dvora-h
Copy link
Collaborator

dvora-h commented Mar 7, 2024

@Zaczero Thanks for reporting this. I think you are right but I got a bit confused.
How do you think it need to be now? Do you want to open a PR to fix it?

@Zaczero
Copy link
Contributor Author

Zaczero commented Mar 7, 2024

Basically, as shown in this code search result, the async-timeout library is not imported on Python versions < 3.11.3.

As per my findings, I believe the #3105 had an installation issue and not runtime issue.
(because of module name with a dash)

Meaning, that this PR should be corrected:
The async-timeout>=4.0.3 should be replaced with async-timeout>=4.0.3; python_full_version<"3.11.3".

I hope this clears things a bit 🙂!

@dvora-h
Copy link
Collaborator

dvora-h commented Mar 7, 2024

Yes, totally make sense, thank you!

Do you want to fix it or want me to do it?

@Zaczero
Copy link
Contributor Author

Zaczero commented Mar 7, 2024

I usually avoid doing such small PRs but suree #3177. Heads up, I did not complete the checklist.

dvora-h added a commit that referenced this issue Mar 10, 2024
* Fix lock error (#3176)

* Remove redundant async-timeout dependency in modern Python (#3177)

#3174

* Bump rojopolis/spellcheck-github-actions from 0.35.0 to 0.36.0 (#3172)

Bumps [rojopolis/spellcheck-github-actions](https://github.com/rojopolis/spellcheck-github-actions) from 0.35.0 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.35.0...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] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump release-drafter/release-drafter from 5 to 6 (#3171)

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] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Kamil Monicz <kamil@monicz.dev>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
@Zaczero
Copy link
Contributor Author

Zaczero commented Mar 11, 2024

Resolved

Package operations: 0 installs, 3 updates, 1 removal

  • Removing async-timeout (4.0.3)
  • Updating packaging (23.2 -> 24.0)
  • Updating redis (5.0.2 -> 5.0.3)
  • Updating uvicorn (0.27.1 -> 0.28.0)

Writing lock file

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants