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

Drop more py37 (CI check) #2

Draft
wants to merge 57 commits into
base: master
Choose a base branch
from
Draft

Drop more py37 (CI check) #2

wants to merge 57 commits into from

Conversation

akx
Copy link
Owner

@akx akx commented Sep 4, 2023

No description provided.

dvora-h and others added 7 commits September 11, 2023 09:32
* Properly close sockets for the cwe_404 proxy

* release connections in tests

fix

* Fix mock signature to prevent resource warning for async method
Co-authored-by: dvora-h <67596500+dvora-h@users.noreply.github.com>
It was removed in redis#2849.

Co-authored-by: dvora-h <67596500+dvora-h@users.noreply.github.com>
@codecov-commenter
Copy link

Welcome to Codecov 🎉

Once merged to your default branch, Codecov will compare your coverage reports and display the results in this comment.

Thanks for integrating Codecov - We've got you covered ☂️

meiravgri and others added 20 commits September 14, 2023 14:34
* Support query timeout = 0

In RediSearch query timeout = 0 means unlimited timeout.
In the current implementation, the query timeout is only updated `if timeout` which in case of 0, translates to false.
Since the default timeout of the `query` class is None, replacing the condition with `if self._timeout is not None` will also work for 0.
If the parameter is not a positive integer, redis server will raise an exception.

related issue: redis#2928 redis#2839

* added a test to quety.timeout(0)

* raise an exception if query TIMEOUT is a non negative integer

* fixed the query test to catach AttributeError

* Moved validating timeout to timeout()

Raise the exception when the timeout is set instead of when the query is performed

* updates test to catch the exception when query.timeout() is called

* Update redis/commands/search/query.py

Co-authored-by: GuyAv46 <47632673+GuyAv46@users.noreply.github.com>

* Revert "Update redis/commands/search/query.py"

This reverts commit fb2b710.

* Revert "updates test to catch the exception when query.timeout() is called"

This reverts commit 6590130.

* Revert "Moved validating timeout to timeout()"

This reverts commit 7a020bd.

* Revert "fixed the query test to catach AttributeError"

This reverts commit 25d4ddf.

* Revert "raise an exception if query TIMEOUT is a non negative integer"

This reverts commit 3fb2c68.

---------

Co-authored-by: GuyAv46 <47632673+GuyAv46@users.noreply.github.com>
* Fix resource missing awaits in test_cwe_404

* Unpatch mocked client after use

* Fix sync unix connect test
…x. (redis#2911)

* Remove process-id checks from asyncio.  Asyncio and fork() does not mix.

* Remove mention of threads from the async connection code

* Require connections to land in the correct pool

* Remove redundant async locking from the ConnectionPool class

* Simplify `BlockingConnectionPool`

* Ensure connection creation can be subclassed via `make_connection()`

* Fix resource missing awaits in test_cwe_404

* Unpatch mocked client after use
This won't meaningfully affect most users, so I won't feel bad if this
is closed :-)

It's often important for performance to control when garbage collection
runs and to reduce the need to run garbage collection in the first
place.

During AbstractionConnection.on_connect, it's common to raise and catch
ResponseError, since e.g. CLIENT SETINFO is very new. However, because
response is in a local, it creates ref cycles that keep all locals in
all calling stack frames alive.

The use of a local to store the exception is unfortunate, since
exceptions hold references to their tracebacks, which hold references to
the relevant frames, which holds a reference to the local exception.
See https://peps.python.org/pep-0344/#open-issue-garbage-collection
and https://peps.python.org/pep-3110/#rationale

This breaks the cycle by deleting the local when we raise, so frames are
destroyed by the normal reference counting mechanism.
The judgment of the name is all uppercase, for example:
    L970: if command in ("EVAL", "EVALSHA"):
…ng a ConnectionPool (redis#2913)

* Add the `from_pool` argument to asyncio.Redis

* Add tests for the `from_pool` argument

* Add a "from_pool" argument for the sync client too

* Add automatic connection pool close for redis.sentinel

* use from_pool() class method instead

* re-add the auto_close_connection_pool arg to Connection.from_url()

* Deprecate the "auto_close_connection_pool" argument to Redis() and Redis.from_url()
…edis#2898)

* Define `aclose()` methods instead of `close()` for async Redis()

* update examples to use `aclose()`

* Update tests to use Redis.aclose()

* Add aclose() to asyncio.client.PubSub
close() and reset() retained as aliases

* Add aclose method to asyncio.RedisCluster

* Add aclose() to asyncio.client.Pipeline

* add `close()` method to sync Pipeline

* add `aclose()` to asyncio.connection.ConnectionPool

* Add `close()` method to redis.ConnectionPool

* Deprecate older functions.

* changes.txt

* fix unittest

* fix typo

* Update docs
* Use correct redis url if not default when creating Connection

* Make resource-warning __del__ code safer during shutdown

* Remove __del__ handler, fix pubsub weakref callback handling

* Clarify comment, since there is no __del__ on asyncio.connection.ConnectionPool

* Remove remaining __del__ from async parser.  They are not needed.

* make connect callback methods internal

* similarly make non-async connect callbacks internal, use same system as for async.

* Reformat __del__()
…isappearing (redis#2816)

* save a reference to created tasks, to avoid tasks disappearing mid-execution

* Ignore linter

* Ignore linter

---------

Co-authored-by: dvora-h <67596500+dvora-h@users.noreply.github.com>
* Some type hints

* fixed callable[T]

* con

* more connectios

* restoring dev reqs

* Update redis/commands/search/suggestion.py

Co-authored-by: dvora-h <67596500+dvora-h@users.noreply.github.com>

* Update redis/commands/core.py

Co-authored-by: dvora-h <67596500+dvora-h@users.noreply.github.com>

* Update redis/commands/search/suggestion.py

Co-authored-by: dvora-h <67596500+dvora-h@users.noreply.github.com>

* Update redis/commands/search/commands.py

Co-authored-by: dvora-h <67596500+dvora-h@users.noreply.github.com>

* Update redis/client.py

Co-authored-by: dvora-h <67596500+dvora-h@users.noreply.github.com>

* Update redis/commands/search/suggestion.py

Co-authored-by: dvora-h <67596500+dvora-h@users.noreply.github.com>

* Update redis/connection.py

Co-authored-by: dvora-h <67596500+dvora-h@users.noreply.github.com>

* Update redis/connection.py

Co-authored-by: dvora-h <67596500+dvora-h@users.noreply.github.com>

* Update redis/connection.py

Co-authored-by: dvora-h <67596500+dvora-h@users.noreply.github.com>

* Update redis/connection.py

Co-authored-by: dvora-h <67596500+dvora-h@users.noreply.github.com>

* Update redis/client.py

Co-authored-by: dvora-h <67596500+dvora-h@users.noreply.github.com>

* Update redis/client.py

Co-authored-by: dvora-h <67596500+dvora-h@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: dvora-h <67596500+dvora-h@users.noreply.github.com>

* linters

---------

Co-authored-by: dvora-h <67596500+dvora-h@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…#2970)

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: d184230 <dubkov.a@skbkontur.ru>
kristjanvalur and others added 10 commits October 16, 2023 13:36
* Close various objects created during asyncio tests

* Fix resource leake in test_cwe_404.py
Need to wait for individual handler tasks when shutting down server.
* first pass of geoshape index type

* first attempt at test, but demonstrates the initial commit is broken

* fix new field + fix tests

* work on linter

* more linter

* try to mark test with correct fixture

* fix linter
* Allow tracking/reporting and closing of "lost" connections.
ConnectionPool keeps a WeakSet of in_use connections, allowing lost ones to be collected.
Collection produces a warning and closes the underlying transport.

* Add tests for the __del__ handlers of async Redis and Connection objects

* capture expected warnings in the test

* lint
…2977)

Changed from 
`sleep_time: int = 0`
to
`sleep_time: float = 0.0`
To avoid Pylance complaining: 
`Argument of type "float" cannot be assigned to parameter "sleep_time" of type "int" in function "run_in_thread"
  "float" is incompatible with "int"`
dvora-h and others added 19 commits November 16, 2023 12:26
* CSC

* get keys from command

* fix review comments

* return respone in execute_command

* fix tests

* fix comments

* linters

---------

Co-authored-by: Chayim <chayim@users.noreply.github.com>
…#3060)

Bumps [rojopolis/spellcheck-github-actions](https://github.com/rojopolis/spellcheck-github-actions) from 0.34.0 to 0.35.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.34.0...0.35.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>
* Fix parsing of ft.profile result

* test
redis#3001)

* Update repr of important classes with module name and recommended "< ... >" syntax.

* update tests which examine repr

* formatting
…edis#3012)

Co-authored-by: dvora-h <67596500+dvora-h@users.noreply.github.com>
* Fix return types in JSONCommands class

* Update CHANGES
* cache invalidations

* isort

* deamon thread

* remove threads

* delete comment

* tests

* skip if hiredis available

* async

* review comments

* docstring

* decode test

* fix test

* fix decode response test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet