@@ -1028,8 +1028,7 @@ def search(self, filename):
1028
1028
1029
1029
1030
1030
@lru_cache ()
1031
- @_api .delete_parameter ("3.5" , "format" )
1032
- def _find_tex_file (filename , format = None ):
1031
+ def _find_tex_file (filename ):
1033
1032
"""
1034
1033
Find a file in the texmf tree using kpathsea_.
1035
1034
@@ -1057,15 +1056,13 @@ def _find_tex_file(filename, format=None):
1057
1056
# out of caution
1058
1057
if isinstance (filename , bytes ):
1059
1058
filename = filename .decode ('utf-8' , errors = 'replace' )
1060
- if isinstance (format , bytes ):
1061
- format = format .decode ('utf-8' , errors = 'replace' )
1062
1059
1063
1060
try :
1064
1061
lk = _LuatexKpsewhich ()
1065
1062
except FileNotFoundError :
1066
1063
lk = None # Fallback to directly calling kpsewhich, as below.
1067
1064
1068
- if lk and format is None :
1065
+ if lk :
1069
1066
path = lk .search (filename )
1070
1067
1071
1068
else :
@@ -1079,10 +1076,7 @@ def _find_tex_file(filename, format=None):
1079
1076
kwargs = {'encoding' : sys .getfilesystemencoding (),
1080
1077
'errors' : 'surrogateescape' }
1081
1078
1082
- cmd = ['kpsewhich' ]
1083
- if format is not None :
1084
- cmd += ['--format=' + format ]
1085
- cmd += [filename ]
1079
+ cmd = ['kpsewhich' , filename ]
1086
1080
try :
1087
1081
path = (cbook ._check_and_log_subprocess (cmd , _log , ** kwargs )
1088
1082
.rstrip ('\n ' ))
@@ -1099,11 +1093,9 @@ def _find_tex_file(filename, format=None):
1099
1093
1100
1094
# After the deprecation period elapses, delete this shim and rename
1101
1095
# _find_tex_file to find_tex_file everywhere.
1102
- @_api .delete_parameter ("3.5" , "format" )
1103
- def find_tex_file (filename , format = None ):
1096
+ def find_tex_file (filename ):
1104
1097
try :
1105
- return (_find_tex_file (filename , format ) if format is not None else
1106
- _find_tex_file (filename ))
1098
+ return _find_tex_file (filename )
1107
1099
except FileNotFoundError as exc :
1108
1100
_api .warn_deprecated (
1109
1101
"3.6" , message = f"{ exc .args [0 ]} ; in the future, this will raise a "
0 commit comments