15
15
16
16
# External dependencies
17
17
import attr
18
- from deprecated import deprecated
19
18
from hepunits .constants import c_light
20
19
21
20
from .. import data
21
+ from .._compat .typing import Traversable
22
+ from .._compat .warnings import deprecated
22
23
from ..converters .evtgen import EvtGenName2PDGIDBiMap
23
24
from ..pdgid import PDGID , is_valid
24
25
from ..pdgid .functions import Location , _digit
25
- from ..typing import HasOpen , HasRead , StringOrIO , Traversable
26
+ from ..typing import HasOpen , HasRead , StringOrIO
26
27
from .enums import (
27
28
Charge ,
28
29
Charge_mapping ,
@@ -1240,8 +1241,7 @@ def findall(
1240
1241
1241
1242
@classmethod
1242
1243
@deprecated (
1243
- version = "0.22" ,
1244
- reason = "This method is deprecated and will be removed from version 0.23.0. Use finditer or findall instead." ,
1244
+ "This method is deprecated and will be removed from version 0.23.0. Use finditer or findall instead." ,
1245
1245
)
1246
1246
def from_string (cls : type [Self ], name : str ) -> Self :
1247
1247
"Get a particle from a PDG style name - returns the best match."
@@ -1252,8 +1252,7 @@ def from_string(cls: type[Self], name: str) -> Self:
1252
1252
1253
1253
@classmethod
1254
1254
@deprecated (
1255
- version = "0.22" ,
1256
- reason = "This method is deprecated and will be removed from version 0.23.0. Use finditer or findall instead." ,
1255
+ "This method is deprecated and will be removed from version 0.23.0. Use finditer or findall instead." ,
1257
1256
)
1258
1257
def from_string_list (cls : type [Self ], name : str ) -> list [Self ]:
1259
1258
"Get a list of particles from a PDG style name."
0 commit comments