Skip to content

Commit 9bcd55f

Browse files
authored
create_temp_file_name: remove deprecated dir argument (#136)
1 parent 5f42a00 commit 9bcd55f

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ Version 2.0.1
99

1010
1. Minor description and doc updates for release uploads
1111

12+
2. `create_temp_file_name`: remove deprecated `dir` argument
13+
1214
Version 2.0.0
1315
-------------
1416

pygccxml/utils/utils.py

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -162,21 +162,14 @@ def remove_file_no_raise(file_name, config):
162162
file_name, str(error))
163163

164164

165-
# pylint: disable=W0622
166-
def create_temp_file_name(suffix, prefix=None, dir=None, directory=None):
165+
def create_temp_file_name(suffix, prefix=None, directory=None):
167166
"""
168167
Small convenience function that creates temporary files.
169168
170169
This function is a wrapper around the Python built-in
171170
function tempfile.mkstemp.
172171
173172
"""
174-
if dir is not None:
175-
warnings.warn(
176-
"The dir argument is deprecated.\n" +
177-
"Please use the directory argument instead.", DeprecationWarning)
178-
# Deprecated since 1.9.0, will be removed in 2.0.0
179-
directory = dir
180173

181174
if not prefix:
182175
prefix = tempfile.gettempprefix()

0 commit comments

Comments
 (0)