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

2019-07-12 Thread Suzumizaki


Suzumizaki  added the comment:

Thanks, but Those cannot resolve this issue.

This is install time problem. In other words, whatever the default encoding is, 
even some users change it, `distutils.util.byte_compile` must always succeed. 

There's no relation between using non-ASCII path and the default encoding. 
No logically reason to fail.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2019-07-12 Thread Aldwin Pollefeyt


Aldwin Pollefeyt  added the comment:

FYI, PEP597 is created to avoid these issues (i think), target Python 3.9.

https://www.python.org/dev/peps/pep-0597/

https://discuss.python.org/t/use-utf-8-as-default-text-file-encoding/1785

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2019-07-11 Thread Suzumizaki


Suzumizaki  added the comment:

... and please check "batch.diff" (Oops, that's typo of 'patch'). I just added 
"encoding" parameter to calling open() function, and added the temp file to 
'utf-8' code declaration. This bug could happen where the default encoding of 
open() function is not utf-8(may not only Windows).

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2019-07-11 Thread Suzumizaki


Suzumizaki  added the comment:

Terribly Sorry! I forgot to write this is only Windows Issue! Thanks!

--
components: +Unicode, Windows
nosy: +ezio.melotti, paul.moore, steve.dower, tim.golden, vstinner, zach.ware

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2019-07-11 Thread Aldwin Pollefeyt


Aldwin Pollefeyt  added the comment:

All 'The byte compiling test seems succeeded.' when i tested your script on 
ubuntu 18.04 on latest 3.7.4rc2+, 3.8.0b1+ and 3.9.0a0.

What are the exact python versions and the OS version you see the issue?

--
nosy: +aldwinaldwin

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2019-07-11 Thread Suzumizaki


Suzumizaki  added the comment:

Here's test code.

Note: I marked just Python 3.8 and 3.7 I tested, but maybe all versions.

--
Added file: https://bugs.python.org/file48473/my_test_case.py

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2019-07-11 Thread Suzumizaki


New submission from Suzumizaki :

`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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com