Skip to content

feat(sessions)!: Take a session ID in get_session() and options in add_session() - #2571

Open
Mantisus wants to merge 1 commit into
apify:v2from
Mantisus:session-pool-api
Open

Mantisus wants to merge 1 commit into
apify:v2from
Mantisus:session-pool-api

Conversation

@Mantisus

@Mantisus Mantisus commented Dec 2, 2026

Copy link
Copy Markdown
Collaborator

Description

SessionPool.get_session() takes an optional session ID and replaces get_session_by_id(). add_session() is now async, returns the added session, and also takes the options of a new session, which the pool builds the same way as the sessions it creates.

The pool holds one usable session per ID. Adding or creating a session with the ID of a usable session raises a ValueError.

Issues

Testing

  • Unit tests for add_session() with options and sessions, and for the duplicate ID checks.

✍️ Drafted by Claude Code

@Mantisus Mantisus self-assigned this Dec 2, 2026
@Mantisus
Mantisus requested a review from vdusek December 2, 2026 22:38
@github-actions github-actions Bot added the t-tooling Issues with this label are in the ownership of the tooling team. label Dec 2, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

t-tooling Issues with this label are in the ownership of the tooling team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant