Async state and message handler
Maintainers usually reply within 9 days
Nobody has claimed this yet.
- #1411 by @Nikhil172913832 — closed without merging
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
- Issue type
- Feature
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- python
- Domain
- testing-qa
Research direction
Start by locating the state_handler and message_handler entry points and reading how synchronous functions are currently invoked. Compare the requirements of asyncio, trio, and curio, including ContextVar and thread implications; done means the supported asynchronous handlers work without breaking existing synchronous handlers and are covered by tests.
Written by the indexing model from the issue text.
Description
Have you read the Contributing Guidelines on issues?
- I have read the Contributing Guidelines on issues.
Description
Original suggestion by Val on Slack
To allow the state_handler and message_handler functions to handle asynchronous functions.
Motivation
These two functions are used to interface with code outside of Pact Python to setup/teardown states and generate messages. Especially in the case of the state setup and teardown, a common pattern would be to make a number of calls to (mocked or not) databases or other services to ensure they are in a particular state. These requests can be significantly sped up by running them in parallel, such as with an asyncio.gather call or using a task group.
Have you tried building it?
Not yet, but I will first open this issue and ask for anyone with specific examples to work towards.
While asynchronous function bring a number of advantages, they can also bring some complications. In particular:
- There are a number of underlying runtimes:
asyncio,trio,curio. If possible, it would be ideal to support all of these. - The use of threads has implications for
ContextVar(if used)
Self-service
- I'd be willing to contribute this feature to Pact Python myself.
- Dominant language
- Python
- Stars
- 689
- Forks
- 147
- Avg merge
- 8d 11h
- Merged PRs (30d)
- 27
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from pact-foundation/pact-python
-
Function/dict state handlers can't supply provider-state injected values (`generate.provider_state`)Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
pact-foundation/pact-python#1789 ·
Maintainers usually reply within 9 days
-
Post v3 tracking issueMay be free again @JP-Ellis claimed this 412 days ago, and no pull request is open. Opentype:tracking
pact-foundation/pact-python#1272 · 1 assignee ·
Maintainers usually reply within 9 days
-
area:documentation difficulty:easy type:chore
Difficulty 3/5 1-2 days Newbie friendliness 48/100
pact-foundation/pact-python#1267 ·
Maintainers usually reply within 9 days
-
area:documentation difficulty:easy type:chore
Difficulty 3/5 1-2 days Newbie friendliness 45/100
pact-foundation/pact-python#1266 · 2 comments ·
Maintainers usually reply within 9 days
-
(V3) Verifying a contract with a missing content field is always successful when it should errorPossibly taken @JP-Ellis claimed this 412 days ago. Openarea:core type:bug
pact-foundation/pact-python#1103 · 5 comments · 1 assignee ·
Maintainers usually reply within 9 days
All issues in pact-foundation/pact-python
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
huggingface/datasets#9128 ·
Maintainers usually reply within 1 day
-
priority:low ready-for-dev
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
OpenHands/extensions#975 ·
Maintainers usually reply within 1 day
-
documentation
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
juandresrodca/AdminForge#66 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
backend/local comp/tools P2 tool/terminal type/bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
NousResearch/hermes-agent#158788 ·
Maintainers usually reply within 1 day