Skip to content

Fix top level randomness in aiohttp#2108

Closed
hoodmane wants to merge 1 commit intomainfrom
hoodmane/aiohttp-top-level-random
Closed

Fix top level randomness in aiohttp#2108
hoodmane wants to merge 1 commit intomainfrom
hoodmane/aiohttp-top-level-random

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
@garrettgu10
Copy link
Contributor

Merged as part of #2096 🥳

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.

2 participants