Skip to content

Commit 801b956

Browse files
committed
remove deprecated python_venv alias
1 parent a2f7b80 commit 801b956

File tree

4 files changed

+0
-36
lines changed

4 files changed

+0
-36
lines changed

pre_commit/all_languages.py

-2
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,5 @@
4444
'script': script,
4545
'swift': swift,
4646
'system': system,
47-
# TODO: fully deprecate `python_venv`
48-
'python_venv': python,
4947
}
5048
language_names = sorted(languages)

pre_commit/repository.py

-9
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
import json
44
import logging
55
import os
6-
import shlex
76
from collections.abc import Sequence
87
from typing import Any
98

@@ -68,14 +67,6 @@ def _hook_install(hook: Hook) -> None:
6867
logger.info('Once installed this environment will be reused.')
6968
logger.info('This may take a few minutes...')
7069

71-
if hook.language == 'python_venv':
72-
logger.warning(
73-
f'`repo: {hook.src}` uses deprecated `language: python_venv`. '
74-
f'This is an alias for `language: python`. '
75-
f'Often `pre-commit autoupdate --repo {shlex.quote(hook.src)}` '
76-
f'will fix this.',
77-
)
78-
7970
lang = languages[hook.language]
8071
assert lang.ENVIRONMENT_DIR is not None
8172

tests/all_languages_test.py

-7
This file was deleted.

tests/repository_test.py

-18
Original file line numberDiff line numberDiff line change
@@ -80,24 +80,6 @@ def _test_hook_repo(
8080
assert out == expected
8181

8282

83-
def test_python_venv_deprecation(store, caplog):
84-
config = {
85-
'repo': 'local',
86-
'hooks': [{
87-
'id': 'example',
88-
'name': 'example',
89-
'language': 'python_venv',
90-
'entry': 'echo hi',
91-
}],
92-
}
93-
_get_hook(config, store, 'example')
94-
assert caplog.messages[-1] == (
95-
'`repo: local` uses deprecated `language: python_venv`. '
96-
'This is an alias for `language: python`. '
97-
'Often `pre-commit autoupdate --repo local` will fix this.'
98-
)
99-
100-
10183
def test_system_hook_with_spaces(tempdir_factory, store):
10284
_test_hook_repo(
10385
tempdir_factory, store, 'system_hook_with_spaces_repo',

0 commit comments

Comments
 (0)