Skip to content

Python: Added SPOP command - #1261

Merged
GilboaAWS merged 22 commits into
valkey-io:mainfrom
GilboaAWS:spop_python
Apr 14, 2024
Merged

GilboaAWS merged 22 commits into
valkey-io:mainfrom
GilboaAWS:spop_python

Conversation

@GilboaAWS

Copy link
Copy Markdown
Collaborator

No description provided.

@GilboaAWS GilboaAWS added the python 🐍 Python wrapper label Apr 10, 2024
@GilboaAWS
GilboaAWS requested a review from a team as a code owner April 10, 2024 12:19
Comment thread python/python/glide/async_commands/core.py Outdated
Comment thread python/python/glide/async_commands/core.py Outdated
Comment thread python/python/glide/async_commands/core.py Outdated
Comment thread python/python/glide/async_commands/core.py Outdated
Comment thread python/python/glide/async_commands/core.py Outdated
Comment thread python/python/glide/async_commands/core.py Outdated
Comment thread python/python/glide/async_commands/core.py
Comment thread python/python/glide/async_commands/core.py Outdated
Comment thread python/python/glide/async_commands/transaction.py Outdated
Comment thread glide-core/src/client/value_conversion.rs
Comment thread glide-core/src/client/value_conversion.rs
Comment thread python/python/glide/async_commands/core.py Outdated
member3 = get_random_string(5)
assert await redis_client.sadd(key, [member, member2, member3]) == 3
assert await redis_client.spop_count(key, 4) == {member, member2, member3}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

check that nothing left in the set

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

+1

GilboaAWS and others added 6 commits April 11, 2024 11:37
Co-authored-by: Shoham Elias <116083498+shohamazon@users.noreply.github.com>
Co-authored-by: Shoham Elias <116083498+shohamazon@users.noreply.github.com>
Co-authored-by: Shoham Elias <116083498+shohamazon@users.noreply.github.com>
Co-authored-by: Shoham Elias <116083498+shohamazon@users.noreply.github.com>
Co-authored-by: Shoham Elias <116083498+shohamazon@users.noreply.github.com>
Co-authored-by: Shoham Elias <116083498+shohamazon@users.noreply.github.com>
Comment thread python/python/glide/async_commands/core.py
member3 = get_random_string(5)
assert await redis_client.sadd(key, [member, member2, member3]) == 3
assert await redis_client.spop_count(key, 4) == {member, member2, member3}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

+1

@GilboaAWS
GilboaAWS force-pushed the spop_python branch 4 times, most recently from 363c844 to 8c549fa Compare April 11, 2024 12:27
#[test]
fn test_convert_spop_to_set_for_spop_count() {
assert!(matches!(
expected_type_for_cmd(redis::cmd("SPOP").arg("key1").arg("count")),

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Suggested change
expected_type_for_cmd(redis::cmd("SPOP").arg("key1").arg("count")),
expected_type_for_cmd(redis::cmd("SPOP").arg("key1").arg("3")),

Comment thread python/python/glide/async_commands/core.py Outdated
Comment thread python/python/glide/async_commands/core.py Outdated
Comment thread python/python/glide/async_commands/core.py Outdated
Comment thread python/python/glide/async_commands/transaction.py Outdated
Comment thread python/python/glide/async_commands/transaction.py
Comment thread python/python/glide/async_commands/transaction.py Outdated
Comment thread python/python/glide/async_commands/transaction.py Outdated
Co-authored-by: Shoham Elias <116083498+shohamazon@users.noreply.github.com>
Comment thread python/python/glide/async_commands/transaction.py Outdated
Comment thread python/python/glide/async_commands/transaction.py Outdated
Comment thread python/python/glide/async_commands/transaction.py Outdated
Co-authored-by: Shoham Elias <116083498+shohamazon@users.noreply.github.com>
Comment thread python/python/glide/async_commands/core.py Outdated
GilboaAWS and others added 10 commits April 11, 2024 16:10
Co-authored-by: Shoham Elias <116083498+shohamazon@users.noreply.github.com>
Co-authored-by: Shoham Elias <116083498+shohamazon@users.noreply.github.com>
Co-authored-by: Shoham Elias <116083498+shohamazon@users.noreply.github.com>
Co-authored-by: Shoham Elias <116083498+shohamazon@users.noreply.github.com>
Co-authored-by: Shoham Elias <116083498+shohamazon@users.noreply.github.com>
Co-authored-by: Shoham Elias <116083498+shohamazon@users.noreply.github.com>
Co-authored-by: Shoham Elias <116083498+shohamazon@users.noreply.github.com>
Co-authored-by: Shoham Elias <116083498+shohamazon@users.noreply.github.com>
Co-authored-by: Shoham Elias <116083498+shohamazon@users.noreply.github.com>
Co-authored-by: Shoham Elias <116083498+shohamazon@users.noreply.github.com>
Comment thread python/python/glide/async_commands/transaction.py Outdated
Comment thread python/python/glide/async_commands/core.py Outdated
Comment thread python/python/glide/async_commands/core.py Outdated
Comment thread python/python/glide/async_commands/core.py Outdated
Comment thread python/python/glide/async_commands/transaction.py Outdated
Co-authored-by: Shoham Elias <116083498+shohamazon@users.noreply.github.com>
Comment thread python/python/glide/async_commands/core.py Outdated
Comment thread python/python/glide/async_commands/transaction.py Outdated
Comment thread python/python/glide/async_commands/transaction.py Outdated
@GilboaAWS
GilboaAWS merged commit f3abf24 into valkey-io:main Apr 14, 2024
@GilboaAWS
GilboaAWS deleted the spop_python branch April 14, 2024 14:07
cyip10 pushed a commit to Bit-Quill/valkey-glide that referenced this pull request Jun 24, 2024
Co-authored-by: Shoham Elias <shohame@amazon.com>
affonsov pushed a commit that referenced this pull request Aug 21, 2026
Co-authored-by: Shoham Elias <shohame@amazon.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

python 🐍 Python wrapper

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants