[issue6906] Tkinter sets an unicode environment variable on win32

2010-03-28 Thread Florent Xicluna

Florent Xicluna florent.xicl...@gmail.com added the comment:

Ported to 2.6 with r79336

--
status: pending - closed

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



[issue6906] Tkinter sets an unicode environment variable on win32

2010-03-06 Thread Florent Xicluna

Florent Xicluna florent.xicl...@gmail.com added the comment:

confirmed on Win7 buildbot, when the tcl or tk test is run before test_wsgiref:

==
FAIL: test_simple_validation_error (test.test_wsgiref.IntegrationTests)
--
Traceback (most recent call last):
  File 
D:\cygwin\home\db3l\buildarea\trunk.bolen-windows7\build\lib\test\test_wsgiref.py,
 line 159, in test_simple_validation_error
AssertionError: Headers (('Content-Type', 'text/plain')) must
AssertionError: AssertionError: Environmental variable TCL_LIBRARY is not a 
string: type 'unicode' (value: 
u'D:cygwinhomedb3lbuildareatrunk.bolen-windows7tcltklibtcl8.5')
 != AssertionError: Headers (('Content-Type', 'text/plain')) must be of type 
list: type 'tuple'


http://www.python.org/dev/buildbot/all/builders/x86%20Windows7%20trunk/builds/171

This error was introduced with patch for #3881.

--
keywords: +buildbot
nosy: +flox
stage: test needed - needs patch
versions: +Python 2.7

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



[issue6906] Tkinter sets an unicode environment variable on win32

2010-03-06 Thread Florent Xicluna

Florent Xicluna florent.xicl...@gmail.com added the comment:

Fixed with r78722 on trunk. Pending backport to 2.6.

--
resolution:  - fixed
stage: needs patch - committed/rejected
status: open - pending

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



[issue6906] Tkinter sets an unicode environment variable on win32

2010-02-01 Thread Jon Foster

Jon Foster jon.fos...@cabot.co.uk added the comment:

This bug also breaks code that uses the subprocess module, e.g.:

env = os.environ.copy()
env['MY_VARIABLE'] = 'MY_VAL'
subprocess.Popen(... , env=env)

Fails on Windows 7 with an error that the environment can only contain strings. 
 The offending variables are TK_LIBRARY and TCL_LIBRARY, which have Unicode 
strings as their values.  I'm using Python 2.6.2.

(The subprocess module should probably be fixed to use CreateProcessW and 
handle Unicode, but that's a separate issue).

--
nosy: +JonFoster

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



[issue6906] Tkinter sets an unicode environment variable on win32

2010-02-01 Thread Brian Curtin

Changes by Brian Curtin cur...@acm.org:


--
components: +Windows
keywords: +needs review
nosy: +brian.curtin
priority:  - normal
stage:  - test needed
type:  - behavior

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



[issue6906] Tkinter sets an unicode environment variable on win32

2009-11-16 Thread Sridhar Ratnakumar

Changes by Sridhar Ratnakumar sridh...@activestate.com:


--
nosy: +srid

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



[issue6906] Tkinter sets an unicode environment variable on win32

2009-11-16 Thread ivank

ivank i...@ludios.org added the comment:

The bug on the Twisted side may be of interest:
http://twistedmatrix.com/trac/ticket/3964

--
nosy: +ivank

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



[issue6906] Tkinter sets an unicode environment variable on win32

2009-11-16 Thread Michał Pasternak

Michał Pasternak michal@gmail.com added the comment:

I hit that bug with Twisted too - I tried to use AMP: 
http://twistedmatrix.com/trac/ticket/3931

--

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



[issue6906] Tkinter sets an unicode environment variable on win32

2009-11-14 Thread Gabriel Genellina

Gabriel Genellina gagsl-...@yahoo.com.ar added the comment:

This patch may solve this issue, but I don't have a Vista install to 
test it.

--
keywords: +patch
Added file: http://bugs.python.org/file15335/FixTk.diff

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



[issue6906] Tkinter sets an unicode environment variable on win32

2009-11-14 Thread Michał Pasternak

Michał Pasternak michal@gmail.com added the comment:

This patch works OK for me (Vista Home Premium + Python 2.6), thanks!

--

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



[issue6906] Tkinter sets an unicode environment variable on win32

2009-10-28 Thread Tim Hatch

Tim Hatch t...@timhatch.com added the comment:

I'm running the exact same version as Gabriel (on Windows 7, 32 bit)
from the python.org installer, and have the same behavior as Michał. 
Checking FixTk.py it appears that on Vista and above, it calls the Win32
API GetFinalPathNameByHandleW to expand symbolic links, but this is a -W
function, not a -A so it deals with unicode.

The blame shows this function was added in response to #3881

For my system, the paths are all lower ascii so changing the end of
convert_path to return str(s) works.  I don't know anything about
filesystem encodings on Windows to do a more correct conversion.

--
nosy: +thatch

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



[issue6906] Tkinter sets an unicode environment variable on win32

2009-09-16 Thread Gabriel Genellina

Gabriel Genellina gagsl-...@yahoo.com.ar added the comment:

I cannot reproduce it with the python.org version:

Python 2.6.2 (r262:71605, Apr 14 2009, 22:40:02) [MSC v.1500 32 bit 
(Intel)] on
win32
Type help, copyright, credits or license for more information.
py import Tkinter
py import os
py os.environ['TK_LIBRARY']
'D:\\apps\\Python26\\tcl\\tk8.5'
py any(isinstance(value,unicode) for value in os.environ.values())
False

This might be an ActiveState issue.

--
nosy: +gagenellina

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



[issue6906] Tkinter sets an unicode environment variable on win32

2009-09-14 Thread Michał Pasternak

New submission from Michał Pasternak michal@gmail.com:

Hi,

I was recently playing with txAmpoule  Twisted on win32. When Twisted spawns 
processess, the 
environment is checked for unicode variables (and an exception is raised in 
case of). Then it 
came to my attention, that importing Tkinter on win32 sets an environment 
variable, which value 
is Unicode. Just have a look:

C:\python
ActivePython 2.6.2.2 (ActiveState Software Inc.) based on
Python 2.6.2 (r262:71600, Apr 21 2009, 15:05:37) [MSC v.1500 32 bit (Intel)] on 
win32
Type help, copyright, credits or license for more information.
 import Tkinter
 import os
 os.environ['TK_LIBRARY']
u'C:\\Python26\\tcl\\tk8.5'
 ^Z

Why is it Unicode? Does it really have to be? Do we need that environment 
variable at all?

On Linux, it is different:

r...@foo:~# python
Python 2.6.2 (release26-maint, Apr 19 2009, 01:56:41)
[GCC 4.3.3] on linux2
Type help, copyright, credits or license for more information.
 import Tkinter
 import os
 os.environ['TK_LIBRARY']
Traceback (most recent call last):
  File stdin, line 1, in module
  File /usr/lib/python2.6/UserDict.py, line 22, in __getitem__
raise KeyError(key)
KeyError: 'TK_LIBRARY'

--
components: Tkinter
messages: 92594
nosy: dotz
severity: normal
status: open
title: Tkinter sets an unicode environment variable on win32
versions: Python 2.6

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