This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: unicode in sys.path
Type: Stage:
Components: Interpreter Core Versions:
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: doerwalter Nosy List: doerwalter, loewis
Priority: normal Keywords: patch

Created on 2002-06-10 18:19 by doerwalter, last changed 2022-04-10 16:05 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
diff.txt doerwalter, 2002-06-10 18:19
diff2.txt doerwalter, 2002-06-14 11:24
Messages (9)
msg40259 - (view) Author: Walter Dörwald (doerwalter) * (Python committer) Date: 2002-06-10 18:19
This patch enhances Python/import.c/find_module() so
that unicode objects found in sys.path will be treated
as legal directory names (The current code ignores
anything that is not a str). The unicode name is
converted to str using the Py_FileSystemDefaultEncoding.
msg40260 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2002-06-13 19:49
Logged In: YES 
user_id=21627

The patch must be adjusted to work with --disable-unicode. I
would also appreciated if it did not contain pure
whitespace-only changes.
msg40261 - (view) Author: Walter Dörwald (doerwalter) * (Python committer) Date: 2002-06-14 11:24
Logged In: YES 
user_id=89016

diff2.txt includes the "#ifdef Py_USING_UNICODE" section.
Which "whitespace-only changes" do you mean? I readded two
blank lines, anything else?
msg40262 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2002-06-14 13:18
Logged In: YES 
user_id=21627

It appears to me that 

-
	if (stat(buf, &statbuf) == 0 && /* it exists */
+
	if (stat(buf, &statbuf) == 0 && /* it exists */

is a white-space only change, no?
msg40263 - (view) Author: Walter Dörwald (doerwalter) * (Python committer) Date: 2002-06-14 14:12
Logged In: YES 
user_id=89016

It's a "whitespace adaptation change"! ;)

The comments
/* it exists */
/* it's a directory */
/* it has __init__.py */
/* and case matches */
were aligned and I had to add a { at the end of the
"if (stat(..." line, so I fixed the alignment.
msg40264 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2002-06-14 16:25
Logged In: YES 
user_id=21627

This makes reading the patch harder; I always prefer to read
patches that only contain the essential (non-whitespace)
changes. White-space adjustments are fine when committing
changes.

Anyway, the essential parts of the patch look fine, so
please commit that change.
msg40265 - (view) Author: Walter Dörwald (doerwalter) * (Python committer) Date: 2002-06-15 23:16
Logged In: YES 
user_id=89016

OK, I'll check in the patch on Monday (together with a short 
note in Misc/News). Is there any documentation that must be 
updated?
msg40266 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2002-06-17 08:41
Logged In: YES 
user_id=21627

Not that I know of. You should consider this a bugfix; it is
unusual to point out that a bug has been fixed in the "main"
documentation.
msg40267 - (view) Author: Walter Dörwald (doerwalter) * (Python committer) Date: 2002-06-17 10:45
Logged In: YES 
user_id=89016

Checked in as:
Misc/NEWS 1.430
Python/import.c 2.207
History
Date User Action Args
2022-04-10 16:05:24adminsetgithub: 36719
2002-06-10 18:19:17doerwaltercreate