|
6 | 6 | from typing import Dict, Iterable, List
|
7 | 7 |
|
8 | 8 | from pip._vendor.packaging.tags import Tag
|
9 |
| -from pip._vendor.packaging.utils import ( |
10 |
| - InvalidVersion, |
11 |
| - parse_wheel_filename, |
12 |
| -) |
13 | 9 | from pip._vendor.packaging.utils import (
|
14 | 10 | InvalidWheelFilename as PackagingInvalidWheelName,
|
15 | 11 | )
|
| 12 | +from pip._vendor.packaging.utils import parse_wheel_filename |
16 | 13 |
|
17 | 14 | from pip._internal.exceptions import InvalidWheelFilename
|
18 | 15 | from pip._internal.utils.deprecation import deprecated
|
@@ -41,31 +38,15 @@ def __init__(self, filename: str) -> None:
|
41 | 38 | if "_" in _version:
|
42 | 39 | try:
|
43 | 40 | parse_wheel_filename(filename)
|
44 |
| - except InvalidVersion as e: |
45 |
| - deprecated( |
46 |
| - reason=( |
47 |
| - f"Wheel filename version part {_version!r} is not correctly " |
48 |
| - "normalised, and contained an underscore character in the " |
49 |
| - "version part. Future versions of pip will fail to recognise " |
50 |
| - f"this wheel and report the error: {e.args[0]}." |
51 |
| - ), |
52 |
| - replacement=( |
53 |
| - "rename the wheel to use a correctly normalised " |
54 |
| - "version part (this may require updating the version " |
55 |
| - "in the project metadata)" |
56 |
| - ), |
57 |
| - gone_in="25.1", |
58 |
| - issue=12938, |
59 |
| - ) |
60 | 41 | except PackagingInvalidWheelName as e:
|
61 | 42 | deprecated(
|
62 | 43 | reason=(
|
63 |
| - f"The wheel filename {filename!r} is not correctly normalised. " |
64 |
| - "Future versions of pip will fail to recognise this wheel. " |
65 |
| - f"and report the error: {e.args[0]}." |
| 44 | + f"Wheel filename {filename!r} is not correctly normalised. " |
| 45 | + "Future versions of pip will raise the following error:\n" |
| 46 | + f"{e.args[0]}\n\n" |
66 | 47 | ),
|
67 | 48 | replacement=(
|
68 |
| - "rename the wheel to use a correctly normalised " |
| 49 | + "to rename the wheel to use a correctly normalised " |
69 | 50 | "name (this may require updating the version in "
|
70 | 51 | "the project metadata)"
|
71 | 52 | ),
|
|
0 commit comments