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