Python 3.13: KeyError: 'name'
on request_meta in ResponseContextManager.__exit__ after GC
#3050
Open
2 tasks done
Labels
Prerequisites
Description
After upgrade to Python 3.13 I've started seeing errors when running locust (I've added the traceback at the end). It seems if a GC happens within
with self.client.get(..., catch_response=True)
then somehow ResponseContextManager.request_meta gets cleared.Changing
ResponseContextManager.__init__
to copy theresponse.__dict__
, instead of just grabbing it, seems to help. I'm not sure how that change affects the rest of the project.The Traceback on failure:
Command line
uv run --with=locust==2.32.10 -p 3.13 locust --headless -u 1 -t 1s
Locustfile contents
Python version
3.13.2
Locust version
2.32.10
Operating system
Ubuntu 20.04, but also happens on Windows
The text was updated successfully, but these errors were encountered: