File tree 3 files changed +2
-30
lines changed
3 files changed +2
-30
lines changed Original file line number Diff line number Diff line change
1
+ Remove the ``no-python-version-warning `` flag as it was a relic of the Python
2
+ 2 sunset transition.
Original file line number Diff line number Diff line change @@ -983,17 +983,6 @@ def check_list_path_option(options: Values) -> None:
983
983
help = "Exclude specified package from the output" ,
984
984
)
985
985
986
-
987
- no_python_version_warning : Callable [..., Option ] = partial (
988
- Option ,
989
- "--no-python-version-warning" ,
990
- dest = "no_python_version_warning" ,
991
- action = "store_true" ,
992
- default = False ,
993
- help = "Silence deprecation warnings for upcoming unsupported Pythons." ,
994
- )
995
-
996
-
997
986
# Features that are now always on. A warning is printed if they are used.
998
987
ALWAYS_ENABLED_FEATURES = [
999
988
"truststore" , # always on since 24.2
@@ -1058,7 +1047,6 @@ def check_list_path_option(options: Values) -> None:
1058
1047
no_cache ,
1059
1048
disable_pip_version_check ,
1060
1049
no_color ,
1061
- no_python_version_warning ,
1062
1050
use_new_feature ,
1063
1051
use_deprecated_feature ,
1064
1052
],
Original file line number Diff line number Diff line change @@ -43,24 +43,6 @@ def test_deprecation_warnings_can_be_silenced(
43
43
assert result .stderr == ""
44
44
45
45
46
- DEPRECATION_TEXT = "drop support for Python 2.7"
47
- CPYTHON_DEPRECATION_TEXT = "January 1st, 2020"
48
-
49
-
50
- def test_version_warning_is_not_shown_if_python_version_is_not_2 (
51
- script : PipTestEnvironment ,
52
- ) -> None :
53
- result = script .pip ("debug" , allow_stderr_warning = True )
54
- assert DEPRECATION_TEXT not in result .stderr , str (result )
55
- assert CPYTHON_DEPRECATION_TEXT not in result .stderr , str (result )
56
-
57
-
58
- def test_flag_does_nothing_if_python_version_is_not_2 (
59
- script : PipTestEnvironment ,
60
- ) -> None :
61
- script .pip ("list" , "--no-python-version-warning" )
62
-
63
-
64
46
@pytest .mark .skipif (
65
47
sys .version_info >= (3 , 10 ), reason = "distutils is deprecated in 3.10+"
66
48
)
You can’t perform that action at this time.
0 commit comments