[New-bugs-announce] [issue14153] Expose os.device_encoding() at the C level
report at bugs.python.org
Tue Feb 28 18:03:50 CET 2012
New submission from Brett Cannon <brett at python.org>:
The _io module imports the os module purely for the use of os.device_encoding(). That function, though, is defined by posix and thus is already available to C code. To avoid this import dependency it would be better to simply expose the function somehow so that _io can just directly call the function.
Antoine has suggested Python/fileutils.c as a possible place, although I'm personally happy simply exposing the function from posix and making it a METH_O function so that as little code needs to change for _io to use it.
components: Library (Lib)
nosy: brett.cannon, pitrou
stage: needs patch
title: Expose os.device_encoding() at the C level
versions: Python 3.3
Python tracker <report at bugs.python.org>
More information about the New-bugs-announce