[New-bugs-announce] [issue26671] Clean up path_converter in posixmodule.c

Serhiy Storchaka report at bugs.python.org
Wed Mar 30 05:31:14 EDT 2016

New submission from Serhiy Storchaka:

path_converter in Modules/posixmodule.c sequentially tries to convert an argument to str, bytes, and int. If previous conversion is failed, it clears the error and tries with type. This can hide some errors (such as MemoryError) and even cause using unexpected conversion.

Proposed patch cleans up path_converter. In addition it avoids copying the content of instances of string subclass.

assignee: serhiy.storchaka
components: Extension Modules
files: path_converter_cleanup.patch
keywords: patch
messages: 262657
nosy: larry, serhiy.storchaka
priority: normal
severity: normal
stage: patch review
status: open
title: Clean up path_converter in posixmodule.c
type: enhancement
versions: Python 3.6
Added file: http://bugs.python.org/file42327/path_converter_cleanup.patch

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list