New submission from Brett Cannon <br...@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)
messages: 154557
nosy: brett.cannon, pitrou
priority: normal
severity: normal
stage: needs patch
status: open
title: Expose os.device_encoding() at the C level
versions: Python 3.3

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue14153>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to