[issue8965] test_imp fails on OSX when LANG is set

2010-06-11 Thread STINNER Victor

STINNER Victor  added the comment:

One more patch to check sys.getfilesystemencoding() on any OS (r81920).

--

___
Python tracker 

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



[issue8965] test_imp fails on OSX when LANG is set

2010-06-11 Thread STINNER Victor

STINNER Victor  added the comment:

I commited issue8965-test-1.diff (r81916) with a minor changes: .strip() => 
.rstrip() and use @unittest.skipUnless().

--

___
Python tracker 

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



[issue8965] test_imp fails on OSX when LANG is set

2010-06-10 Thread Alexander Belopolsky

Changes by Alexander Belopolsky :


Added file: http://bugs.python.org/file17621/issue8965-test-1.diff

___
Python tracker 

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



[issue8965] test_imp fails on OSX when LANG is set

2010-06-10 Thread Alexander Belopolsky

Alexander Belopolsky  added the comment:

Sorry for extra traffic.  I thought my patch introduced an indentation error, 
but it looks like you truly don't check sys.getfilesystemencoding() output if 
not on darwin.

--

___
Python tracker 

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



[issue8965] test_imp fails on OSX when LANG is set

2010-06-10 Thread Alexander Belopolsky

Changes by Alexander Belopolsky :


Removed file: http://bugs.python.org/file17619/issue8965-test.diff

___
Python tracker 

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



[issue8965] test_imp fails on OSX when LANG is set

2010-06-10 Thread Alexander Belopolsky

Changes by Alexander Belopolsky :


Added file: http://bugs.python.org/file17620/issue8965-test.diff

___
Python tracker 

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



[issue8965] test_imp fails on OSX when LANG is set

2010-06-10 Thread Alexander Belopolsky

Changes by Alexander Belopolsky :


Added file: http://bugs.python.org/file17619/issue8965-test.diff

___
Python tracker 

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



[issue8965] test_imp fails on OSX when LANG is set

2010-06-10 Thread Alexander Belopolsky

Alexander Belopolsky  added the comment:

Nope.
$ ./python.exe -m test.regrtest test_sys
test test_sys failed -- Traceback (most recent call last):
  File "Lib/test/test_sys.py", line 877, in test_getfilesystemencoding
self.assertEqual(fs_encoding, 'utf-8')
AssertionError: b'utf-8\n' != 'utf-8'

Should be easy to fix, though.

--

___
Python tracker 

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



[issue8965] test_imp fails on OSX when LANG is set

2010-06-10 Thread STINNER Victor

STINNER Victor  added the comment:

Hum. To avoid regression, we should maybe have a test with the C locale. 

@belopolsky: Can you try test_sys.patch on Mac OS X?

--
Added file: http://bugs.python.org/file17617/test_sys.patch

___
Python tracker 

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



[issue8965] test_imp fails on OSX when LANG is set

2010-06-10 Thread STINNER Victor

STINNER Victor  added the comment:

Patch commited as r81883 (blocked in 3.1: r81884).

> Can you add a sys module test for this issue?

Ok, I added a test to test_sys: r81885 (blocked in 3.1: r81886).

> I don't really know where Py_FileSystemDefaultEncoding 
> is set on Darwin. :-)

In Python/bltinmodule.c.

--
resolution:  -> fixed
status: open -> closed

___
Python tracker 

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



[issue8965] test_imp fails on OSX when LANG is set

2010-06-10 Thread Alexander Belopolsky

Alexander Belopolsky  added the comment:

On the second thought, test_imp is not the right place to test this.  Can you 
add a sys module test for this issue?

--
stage:  -> unit test needed

___
Python tracker 

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



[issue8965] test_imp fails on OSX when LANG is set

2010-06-10 Thread Alexander Belopolsky

Alexander Belopolsky  added the comment:

Victor,

Your patch works for me and makes sense even though I don't really know where 
Py_FileSystemDefaultEncoding is set on Darwin. :-)

--

___
Python tracker 

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



[issue8965] test_imp fails on OSX when LANG is set

2010-06-10 Thread STINNER Victor

STINNER Victor  added the comment:

Oooh. That's my fault. I introduced this regression in issue #8610 (commit 
r81190). Can you try attached patch please?

The file system encoding is hardcoded to 'utf-8' on Mac OS X (it should not 
depend on the locale).

--
keywords: +patch
nosy: +haypo
Added file: http://bugs.python.org/file17614/initfsencoding_apple.patch

___
Python tracker 

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



[issue8965] test_imp fails on OSX when LANG is set

2010-06-10 Thread Ronald Oussoren

Ronald Oussoren  added the comment:

I haven't looked at the actual test yet, but the filesystem encoding on OSX is 
UTF-8.

--

___
Python tracker 

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



[issue8965] test_imp fails on OSX when LANG is set

2010-06-10 Thread Alexander Belopolsky

Alexander Belopolsky  added the comment:

Is this check needed on darwin?  Why not simply set fs_encoding = 'utf-8'?

--
nosy: +flox

___
Python tracker 

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



[issue8965] test_imp fails on OSX when LANG is set

2010-06-10 Thread Alexander Belopolsky

New submission from Alexander Belopolsky :

$ LANG=C ./python.exe -m test.regrtest test_imp
test_imp
test test_imp failed -- Traceback (most recent call last):
  File "Lib/test/test_imp.py", line 109, in test_issue5604
self.assertEqual(fs_encoding, 'utf-8')
AssertionError: 'ascii' != 'utf-8'
- ascii+ utf-8

1 test failed:
test_imp


Same with LC_ALL=C.  Passes on Linux.

--
assignee: ronaldoussoren
components: Macintosh
messages: 107498
nosy: belopolsky, ronaldoussoren
priority: normal
severity: normal
status: open
title: test_imp fails on OSX when LANG is set
type: behavior
versions: Python 3.2

___
Python tracker 

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