[New-bugs-announce] [issue37570] `distutils.util.byte_compile` fails indirect byte compiling with non-ASCII full-path.

Suzumizaki report at bugs.python.org
Thu Jul 11 22:28:51 EDT 2019


New submission from Suzumizaki <suzumizaki at free.japandesign.ne.jp>:

`distutils.util.byte_compile` fails _indirect_ byte compiling when the
full-path of the .py file contains non-ASCII characters.

Because there is the project (cx_Freeze) which directly uses
`distutils.util.byte_compile`, the problem would happen while installing it
under the non-ASCII path.

Fortunately, it is easy to fix.
 
Ofcourse, the files included in external libraries should be named ASCII only,
but `distutils.util.byte_compile` makes and uses full path of them. I learned
many of libraries uses setuptools instead of distutils, but please consider
the following situations:

1) The case that venv creates the virtual environment under or with
   non-ASCII named folder.
2) And special cases of 1), on Windows, the name of end-users OFTEN be
   composed with non-ASCII characters, this means including theirs
   Documents, Desktop, or Downloads etc.

The more they are not professional,they make easily the situation above.

----------
components: Distutils
files: batch.diff
keywords: patch
messages: 347718
nosy: Suzumizaki, dstufft, eric.araujo
priority: normal
severity: normal
status: open
title: `distutils.util.byte_compile` fails indirect byte compiling with non-ASCII full-path.
type: behavior
versions: Python 3.7, Python 3.8
Added file: https://bugs.python.org/file48472/batch.diff

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue37570>
_______________________________________


More information about the New-bugs-announce mailing list