Repository: pre-commit/pre-commit

Issue:
random.shuffle's random= argument got deprecated
Related issue: [bpo-40465](https://bugs.python.org/issue40465).
```
black..................................................................../home/isidentical/.venv/lib/python3.10/site-packages/pre_commit/languages/helpers.py:95: DeprecationWarning: The *random* parameter to shuffle() has been deprecated
since Python 3.9 and will be removed in a subsequent version.
  random.shuffle(seq, random=fixed_random.random)
Passed
```



Discussion:

Patch:
diff --git a/azure-pipelines.yml b/azure-pipelines.yml
index 9b385b4..c21843e 100644
--- a/azure-pipelines.yml
+++ b/azure-pipelines.yml
@@ -10,7 +10,7 @@ resources:
       type: github
       endpoint: github
       name: asottile/azure-pipeline-templates
-      ref: refs/tags/v1.0.0
+      ref: refs/tags/v2.0.0
 
 jobs:
 - template: job--pre-commit.yml@asottile
@@ -40,7 +40,7 @@ jobs:
       displayName: install swift
 - template: job--python-tox.yml@asottile
   parameters:
-    toxenvs: [pypy3, py36, py37, py38]
+    toxenvs: [pypy3, py36, py37, py38, py39]
     os: linux
     pre_test:
     - task: UseRubyVersion@0
diff --git a/pre_commit/languages/helpers.py b/pre_commit/languages/helpers.py
index b5c95e5..01c65ab 100644
--- a/pre_commit/languages/helpers.py
+++ b/pre_commit/languages/helpers.py
@@ -18,7 +18,7 @@ from pre_commit.xargs import xargs
 if TYPE_CHECKING:
     from typing import NoReturn
 
-FIXED_RANDOM_SEED = 1542676186
+FIXED_RANDOM_SEED = 1542676187
 
 
 def run_setup_cmd(prefix: Prefix, cmd: Tuple[str, ...]) -> None:
@@ -92,7 +92,7 @@ def _shuffled(seq: Sequence[str]) -> List[str]:
     fixed_random.seed(FIXED_RANDOM_SEED, version=1)
 
     seq = list(seq)
-    random.shuffle(seq, random=fixed_random.random)
+    fixed_random.shuffle(seq)
     return seq
 
 


Test patch:
diff --git a/tests/languages/helpers_test.py b/tests/languages/helpers_test.py
index c52e947..fa493cc 100644
--- a/tests/languages/helpers_test.py
+++ b/tests/languages/helpers_test.py
@@ -78,5 +78,5 @@ def test_target_concurrency_cpu_count_not_implemented():
 
 def test_shuffled_is_deterministic():
     seq = [str(i) for i in range(10)]
-    expected = ['3', '7', '8', '2', '4', '6', '5', '1', '0', '9']
+    expected = ['4', '0', '5', '1', '8', '6', '2', '3', '7', '9']
     assert helpers._shuffled(seq) == expected