Skip to content

Commit a1fe544

Browse files
committed
Remove the encoding parameter
The parameter is not used in-code and was scheduled for removal in v1.13.
1 parent 9475b0f commit a1fe544

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

pypandoc/__init__.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ def convert_text(source:str, to:str, format:str, extra_args:Iterable=(), encodin
9898

9999

100100
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,
102102
filters:Union[Iterable, None]=None, verify_format:bool=True, sandbox:bool=False,
103103
cworkdir:Union[str, None]=None, sort_files=True) -> str:
104104
"""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
119119
:param list extra_args: extra arguments (list of strings) to be passed to pandoc
120120
(Default value = ())
121121
122-
:param str encoding (deprecated): the encoding of the input bytes (Default value = 'utf-8')
123-
124122
:param str outputfile: output will be written to outputfile or the converted content
125123
returned if None. The output filename can be specified as a string
126124
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
149147
if cworkdir is None:
150148
cworkdir = os.getcwd()
151149

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-
156150
if _is_network_path(source_file): # if the source_file is an url
157151
format = _identify_format_from_path(source_file, format)
158152
return _convert_input(source_file, format, 'path', to, extra_args=extra_args,

0 commit comments

Comments
 (0)