@@ -97,7 +97,7 @@ def convert_text(source:str, to:str, format:str, extra_args:Iterable=(), encodin
97
97
98
98
99
99
def convert_file (source_file :Union [list , str , Path , Iterator ], to :str , format :Union [str , None ]= None ,
100
- extra_args :Iterable = (), encoding : str = 'utf-8' , outputfile :Union [None , str , Path ]= None ,
100
+ extra_args :Iterable = (), outputfile :Union [None , str , Path ]= None ,
101
101
filters :Union [Iterable , None ]= None , verify_format :bool = True , sandbox :bool = False ,
102
102
cworkdir :Union [str , None ]= None , sort_files = True ) -> str :
103
103
"""Converts given `source` from `format` to `to`.
@@ -118,8 +118,6 @@ def convert_file(source_file:Union[list, str, Path, Iterator], to:str, format:Un
118
118
:param list extra_args: extra arguments (list of strings) to be passed to pandoc
119
119
(Default value = ())
120
120
121
- :param str encoding (deprecated): the encoding of the input bytes (Default value = 'utf-8')
122
-
123
121
:param str outputfile: output will be written to outputfile or the converted content
124
122
returned if None. The output filename can be specified as a string
125
123
or pathlib.Path object. (Default value = None)
@@ -148,10 +146,6 @@ def convert_file(source_file:Union[list, str, Path, Iterator], to:str, format:Un
148
146
if cworkdir is None :
149
147
cworkdir = os .getcwd ()
150
148
151
- # TODO: remove 'encoding' parameter and warning
152
- if encoding != "utf-8" :
153
- logger .warning ("The 'encoding' parameter will be removed in version 1.13. Just remove the parameter, because currently the method does not use it." )
154
-
155
149
if _is_network_path (source_file ): # if the source_file is an url
156
150
format = _identify_format_from_path (source_file , format )
157
151
return _convert_input (source_file , format , 'path' , to , extra_args = extra_args ,
0 commit comments