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

Fix top level randomness in aiohttp #2108

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

hoodmane
Copy link
Contributor

@hoodmane hoodmane commented May 9, 2024

aiohttp instantiates a random.Random() in order to be a default argument for WebSocketWriter. Instead, use the random module itself for this which implements the same interface as Random.

Should fix one of the test failures in #2096.

@hoodmane hoodmane requested review from a team as code owners May 9, 2024 19:40
@hoodmane hoodmane force-pushed the hoodmane/aiohttp-top-level-random branch from 6418dc6 to 2a52995 Compare May 9, 2024 20:06
@hoodmane hoodmane changed the base branch from main to ggu/gen-import-tests May 9, 2024 20:06
@hoodmane hoodmane force-pushed the hoodmane/aiohttp-top-level-random branch from 2a52995 to 49712d5 Compare May 9, 2024 20:37
@hoodmane
Copy link
Contributor Author

hoodmane commented May 9, 2024

It works:

2024-05-09T20:58:32.9101316Z //src/workerd/server/tests/python:import/aiohttp/import    
PASSED in 26.5s

@hoodmane hoodmane force-pushed the hoodmane/aiohttp-top-level-random branch from 49712d5 to 87088de Compare May 10, 2024 16:58
@hoodmane hoodmane changed the base branch from ggu/gen-import-tests to main May 10, 2024 16:58
@garrettgu10 garrettgu10 changed the base branch from main to ggu/gen-import-tests May 13, 2024 21:03
@garrettgu10 garrettgu10 changed the base branch from ggu/gen-import-tests to main May 13, 2024 21:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants