[issue6011] python doesn't build if prefix contains non-ascii characters

2010-10-23 Thread Éric Araujo

Éric Araujo  added the comment:

Same errors.

--

___
Python tracker 

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



[issue10077] Python 3.1: site error is not logged

2010-10-23 Thread STINNER Victor

STINNER Victor  added the comment:

Commited to Python 3.1 (r85802).

--
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



[issue10174] multiprocessing expects sys.stdout to have a fileno/close method.

2010-10-23 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
components: +Library (Lib) -None
nosy: +asksol, jnoller
versions: +Python 3.1, Python 3.2 -Python 2.6

___
Python tracker 

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



[issue10174] multiprocessing expects sys.stdout to have a fileno/close method.

2010-10-23 Thread Ask Solem

Ask Solem  added the comment:

Please add the traceback,  I can't seem to find any obvious places where this 
would happen now.

Also, what version are you currently using?


I agree with the fileno, but I'd say close is a reasonable method to implement, 
especially for stdin/stdout/stderr

--

___
Python tracker 

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



[issue10176] telnetlib.Telnet.read_very_eager() performance

2010-10-23 Thread ptz

New submission from ptz :

In Python 2.4, Assuming we've imported telnetlib, the following works:

>>> f = telnetlib.Telnet("some_text_based_server")
>>> f.read_very_eager()

The last call outputs the text that the server outputs upon connection (e.g. 
"login: ").

However, if we put this inside a function it does not work:

>>> def g():
...   f = telnetlib.Telnet("server")
...   data = f.read_very_eager()
...   print data
...
>>> g()

This returns the empty string. I believe this indicates that the data from the 
server isn't cooked. 

Note that if we use read_until() instead of read_very_eager(), everything works 
as expected, further supporting the hypothesis that data doesn't cook properly 
when the functions are called as above.

So why the difference?

--
components: Library (Lib)
messages: 119423
nosy: ptz
priority: normal
severity: normal
status: open
title: telnetlib.Telnet.read_very_eager() performance
type: behavior
versions: 3rd party

___
Python tracker 

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



[issue10177] PyUnicode_AsWideCharString and PyMem_Free

2010-10-23 Thread Hirokazu Yamamoto

New submission from Hirokazu Yamamoto :

Hello. I found several codes using PyMem_Free to free
allocated memory via PyUnicode_AsWideCharString.
In PyUnicode_AsWideCharString, memory is allocated
with PyMem_MALLOC. Is it OK to use PyMem_Free
not PyMem_FREE? Thank you.

--
keywords: easy
messages: 119424
nosy: ocean-city
priority: normal
severity: normal
status: open
title: PyUnicode_AsWideCharString and PyMem_Free
type: resource usage
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



[issue10176] telnetlib.Telnet.read_very_eager() performance

2010-10-23 Thread R. David Murray

R. David Murray  added the comment:

Presumably the difference is that there is a pause between the two statement 
executions at the interactive prompt (even if you cut and paste) that does not 
exist in the function.

--
nosy: +r.david.murray
resolution:  -> invalid
stage:  -> committed/rejected
status: open -> closed

___
Python tracker 

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



[issue10118] Tkinter does not find font

2010-10-23 Thread R. David Murray

R. David Murray  added the comment:

Terry meant 2.6 is in security fix only mode.  2.7 will get bug fixes for an 
extended period.

--
nosy: +r.david.murray

___
Python tracker 

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



[issue10178] PEP 378 uses replace where translate may work better

2010-10-23 Thread samwyse

New submission from samwyse :

PEP 378 states;

  format(n, "6,f").replace(",", "X").replace(".", ",").replace("X", ".")

This is complex and relatively slow.  A better technique, which IMHO the 
proposal should high-lighted, would be:

  swap_commas_and_periods = bytes.maketrans(b',.', b'.,')
  format(n, "6,f").translate(swap_commas_and_periods)

While performing the maketrans each time a string is formatted is slower than 
the triple replace, calling it once and caching the result is faster.  I have 
tested with with the 3.1 interpreter; example timings follow.

>>> Timer("""
  '1,234,567.89'.replace(',', 'X').replace('.', ',').replace('X', '.')
""").timeit()
3.0645400462908015

>>> Timer("""
  '1,234,567.89'.translate(swap_commas_and_periods)
""", """
  swap_commas_and_periods = bytes.maketrans(b',.', b'.,')
""").timeit()
2.276630409730846


>>> Timer("""
  '1,234,567.89'.translate(bytes.maketrans(b',.', b'.,'))
""").timeit()
3.760715677551161

--
assignee: d...@python
components: Documentation
messages: 119427
nosy: d...@python, samwyse
priority: normal
severity: normal
status: open
title: PEP 378 uses replace where translate may work better
type: behavior
versions: Python 2.7, Python 3.1

___
Python tracker 

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



[issue7761] telnetlib Telnet.interact fails on Windows but not Linux

2010-10-23 Thread R. David Murray

R. David Murray  added the comment:

The attached patch should fix the problem.  It replicates the bytes/string 
changes made for the unix branch in the windows branch.

It would be nice to come up with a unit test for this, but in this case that's 
a lot more complicated than figuring out the fix :)

--
keywords: +patch
nosy: +r.david.murray
Added file: http://bugs.python.org/file19340/telnetlib_windows.patch

___
Python tracker 

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



[issue10178] PEP 378 uses replace where translate may work better

2010-10-23 Thread R. David Murray

R. David Murray  added the comment:

The text in question is talking about 'replace' as a general mechanism for 
'fixing' the separator character, and as such I don't think introducing 
translate would enhance the exposition.  I suppose it could be added in a 
footnote.

--
nosy: +eric.smith, ncoghlan, r.david.murray, rhettinger

___
Python tracker 

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



[issue10179] os.stat fails on mapped network drive

2010-10-23 Thread Antoine Pitrou

New submission from Antoine Pitrou :

This network drive is actually mapped through the VirtualBox guest additions. 
Under Python 2.7 (official 64-bit MSI installer), this works fine:

>>> s = 'Z:\\__svn__\\Lib\\test\\keycert.pem'
>>> os.stat(s)
nt.stat_result(st_mode=33206, st_ino=0L, st_dev=0, st_nlink=0, st_uid=0, 
st_gid=0, st_size=1783L, st_atime=1287771307L, st_mtime=1286578916L, 
st_ctime=1286578916L)

Under a freshly compiled 32-bit py3k, though, it fails with a rather strange 
error message:

>>> s = 'Z:\\__svn__\\Lib\\test\\keycert.pem'
>>> os.stat(s)
Traceback (most recent call last):
  File "", line 1, in 
WindowsError: [Error 1] Incorrect function: 
'Z:\\__svn__\\Lib\\test\\keycert.pem'
>>> errno.errorcode[1]
'EPERM'

While a local directory works fine:

>>> os.stat('c:\\Windows')
nt.stat_result(st_mode=16895, st_ino=0, st_dev=0, st_nlink=0, st_uid=0, 
st_gid=0, st_size=16384, st_atime=1287843075, st_mtime=1287843075, 
st_ctime=1247541608)

--
components: Extension Modules
messages: 119430
nosy: brian.curtin, ocean-city, pitrou, tim.golden
priority: critical
severity: normal
status: open
title: os.stat fails on mapped network drive
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



[issue10179] os.stat fails on mapped network drive

2010-10-23 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

And 3.1 works fine.

--

___
Python tracker 

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



[issue10179] os.stat fails on mapped network drive

2010-10-23 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Hmm, it looks like this is actually VirtualBox-specific.
It works with another network drive mapped on Y:

>>> os.stat(r"y:")
nt.stat_result(st_mode=16895, st_ino=0, st_dev=0, st_nlink=0, st_uid=0, 
st_gid=0, st_size=0, st_atime=1287784175, st_mtime=1281439296, 
st_ctime=1281439296)
>>> os.stat(r"z:")
Traceback (most recent call last):
  File "", line 1, in 
WindowsError: [Error 1] Incorrect function: 'z:'

--

___
Python tracker 

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



[issue6668] locale.py: can't parse sr...@latin locale

2010-10-23 Thread R. David Murray

R. David Murray  added the comment:

Python 3.2a3+ (py3k:85670:85675M, Oct 17 2010, 20:27:19) 
[GCC 4.4.4] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import locale
>>> locale.setlocale(locale.LC_ALL)
'lc_ctype=sr...@latin;LC_NUMERIC=C;LC_TIME=C;LC_COLLATE=C;LC_MONETARY=C;LC_MESSAGES=C;LC_PAPER=C;LC_NAME=C;LC_ADDRESS=C;LC_TELEPHONE=C;LC_MEASUREMENT=C;LC_IDENTIFICATION=C'


rdmur...@hey:~/maestro/python/release31-maint>LC_ALL="sr...@latin" ./python
Python 3.1.2 (release31-maint:85675M, Oct 17 2010, 20:16:54) 
[GCC 4.4.4] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import locale
>>> locale.setlocale(locale.LC_ALL)
'lc_ctype=sr...@latin;LC_NUMERIC=C;LC_TIME=C;LC_COLLATE=C;LC_MONETARY=C;LC_MESSAGES=C;LC_PAPER=C;LC_NAME=C;LC_ADDRESS=C;LC_TELEPHONE=C;LC_MEASUREMENT=C;LC_IDENTIFICATION=C'


rdmur...@hey:~/maestro/python/release27-maint>LC_ALL="sr...@latin" ./python
Python 2.7.0+ (release27-maint:85802, Oct 23 2010, 11:15:26) 
[GCC 4.4.4] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import locale
>>> locale.setlocale(locale.LC_ALL)
'C'
>>> locale.setlocale(locale.LC_ALL, 'sr...@latin')
'sr...@latin'

--
nosy: +r.david.murray
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



[issue10176] telnetlib.Telnet.read_very_eager() performance

2010-10-23 Thread ptz

ptz  added the comment:

Strange. I was certain that I tried inserting a time.sleep() in the function 
and it still didn't work, but I tried it just now and it does work as expected. 
Sorry, and thanks for your answer, at least I learned something.

--

___
Python tracker 

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



[issue10157] Refleaks in pythonrun.c

2010-10-23 Thread Stefan Krah

Stefan Krah  added the comment:

After taking the scenic route through half of the tree[1], I finally
found another leak in pythonrun.c. I'm closing #10153, merging those
two leaks into the new patch.


Does it look ok?


[1] Valgrind stack traces should be approached with caution.

--
stage:  -> patch review
title: Memory leak (r70152) -> Refleaks in pythonrun.c
Added file: http://bugs.python.org/file19341/pythonrun3.patch

___
Python tracker 

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



[issue10153] Memory leak in pythonrun.c

2010-10-23 Thread Stefan Krah

Changes by Stefan Krah :


--
resolution:  -> duplicate
stage: patch review -> committed/rejected
status: open -> closed
superseder:  -> Refleaks in pythonrun.c

___
Python tracker 

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



[issue10176] telnetlib.Telnet.read_very_eager() performance

2010-10-23 Thread R. David Murray

R. David Murray  added the comment:

Well, perhaps when you ran the test with the sleep the target server had an 
unusually long startup delay.  If you are going to use read_very_eager you are 
going to have to deal with the possibility of not getting back what you 
expected, so it doesn't really matter what it's "performance" is :)

--

___
Python tracker 

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



[issue10179] os.stat fails on mapped network drive

2010-10-23 Thread Martin v . Löwis

Martin v. Löwis  added the comment:

Let me guess: It's GetFinalPathNameByHandle that is failing. Put some debug 
output right after the call to verify.

Why is this critical? Not being able to stat VirtualBox folders doesn't sound 
that critical to me.

--
nosy: +loewis

___
Python tracker 

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



[issue10179] os.stat fails on mapped network drive

2010-10-23 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Yes, indeed. It was critical before I found out that it's VirtualBox-specific.

--
priority: critical -> normal

___
Python tracker 

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



[issue10179] os.stat fails on mapped network drive

2010-10-23 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

This patch seems to do the trick, although I'm not sure it warrants including 
in Python.

--
keywords: +patch
Added file: http://bugs.python.org/file19342/osstat.patch

___
Python tracker 

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



[issue6058] Add cp65001 to encodings/aliases.py

2010-10-23 Thread David-Sarah Hopwood

David-Sarah Hopwood  added the comment:

This problem causes {{{os.getcwdu()}}} to fail when the console code page is 
set to 65001 (always, I think):
{{{
t:\>ver

Microsoft Windows [Version 6.0.6002]

t:\>chcp
Active code page: 65001

t:\>python -c "import os; print os.getcwdu()"
Traceback (most recent call last):
  File "", line 1, in 
LookupError: unknown encoding: cp65001

t:\>chcp 1252
Active code page: 1252

t:\>python -c "import os; print os.getcwdu()"
t:\
}}}

Incidentally, I don't agree that this codepage needs to be distinguished from 
UTF-8. The deviations in the Microsoft codec are just their bugs. There is only 
one correct way to encode/decode UTF-8, and cp65001 is supposed to be UTF-8 
according to Microsoft (e.g. 
http://msdn.microsoft.com/en-us/library/86hf4sb8%28en-US,VS.80%29.aspx ).

--
nosy: +davidsarah

___
Python tracker 

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



[issue6058] Add cp65001 to encodings/aliases.py

2010-10-23 Thread David-Sarah Hopwood

David-Sarah Hopwood  added the comment:

I said: "There is only one correct way to encode/decode UTF-8". This is true 
modulo differences in the treatment of initial byte order marks.

--

___
Python tracker 

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



[issue9778] Make hash values the same width as a pointer (or Py_ssize_t)

2010-10-23 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

Thank you. Applied in r85803.

--

___
Python tracker 

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



[issue9778] Make hash values the same width as a pointer (or Py_ssize_t)

2010-10-23 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Case's patch fixes test_builtin and test_complex failures on Windows 7 64-bit. 
But there's still a failure in test_dictviews:

==
FAIL: test_items_set_operations (test.test_dictviews.DictSetTest)
--
Traceback (most recent call last):
  File "Z:\__svn__\lib\test\test_dictviews.py", line 153, in 
test_items_set_operations
{('a', 1), ('b', 2)})
AssertionError: Items in the first set but not the second:
('a', 1)
('b', 2)

--

Which boils down to the following issue:

>>> d1 = {'a': 1, 'b': 2}
>>> d1.items()
dict_items([('a', 1), ('b', 2)])
>>> set(d1.items())
{('a', 1), ('b', 2)}
>>> d1.items() | set(d1.items())
{('a', 1), ('a', 1), ('b', 2), ('b', 2)}


There are also a bunch of possibly related failures in test_weakset:

==
FAIL: test_inplace_on_self (test.test_weakset.TestWeakSet)
--
Traceback (most recent call last):
  File "Y:\py3k\__svn__\lib\test\test_weakset.py", line 293, in test_inplace_on_
self
self.assertEqual(t, self.s)
AssertionError: <_weakrefset.WeakSet object at 0x0283CDC0> != <_weakrefs
et.WeakSet object at 0x0283B2C8>

==
FAIL: test_or (test.test_weakset.TestWeakSet)
--
Traceback (most recent call last):
  File "Y:\py3k\__svn__\lib\test\test_weakset.py", line 72, in test_or
self.assertEqual(self.s | set(self.items2), i)
AssertionError: <_weakrefset.WeakSet object at 0x0285B400> != <_weakrefs
et.WeakSet object at 0x0285B260>

==
FAIL: test_symmetric_difference (test.test_weakset.TestWeakSet)
--
Traceback (most recent call last):
  File "Y:\py3k\__svn__\lib\test\test_weakset.py", line 110, in test_symmetric_d
ifference
self.assertEqual(c in i, (c in self.d) ^ (c in self.items2))
AssertionError: False != True

==
FAIL: test_union (test.test_weakset.TestWeakSet)
--
Traceback (most recent call last):
  File "Y:\py3k\__svn__\lib\test\test_weakset.py", line 61, in test_union
self.assertEqual(c in u, c in self.d or c in self.items2)
AssertionError: False != True

==
FAIL: test_xor (test.test_weakset.TestWeakSet)
--
Traceback (most recent call last):
  File "Y:\py3k\__svn__\lib\test\test_weakset.py", line 117, in test_xor
self.assertEqual(self.s ^ set(self.items2), i)
AssertionError: <_weakrefset.WeakSet object at 0x0292CA18> != <_weakrefs
et.WeakSet object at 0x0292C878>


Another bunch of test_pyclbr failures:

==
FAIL: test_decorators (test.test_pyclbr.PyclbrTest)
--
Traceback (most recent call last):
  File "Y:\py3k\__svn__\lib\test\test_pyclbr.py", line 152, in test_decorators
self.checkModule('test.pyclbr_input', ignore=['om'])
  File "Y:\py3k\__svn__\lib\test\test_pyclbr.py", line 101, in checkModule
self.assertListEq(real_bases, pyclbr_bases, ignore)
  File "Y:\py3k\__svn__\lib\test\test_pyclbr.py", line 28, in assertListEq
self.fail("%r missing" % missing.pop())
AssertionError: 'object' missing

==
FAIL: test_easy (test.test_pyclbr.PyclbrTest)
--
Traceback (most recent call last):
  File "Y:\py3k\__svn__\lib\test\test_pyclbr.py", line 142, in test_easy
self.checkModule('pyclbr')
  File "Y:\py3k\__svn__\lib\test\test_pyclbr.py", line 101, in checkModule
self.assertListEq(real_bases, pyclbr_bases, ignore)
  File "Y:\py3k\__svn__\lib\test\test_pyclbr.py", line 28, in assertListEq
self.fail("%r missing" % missing.pop())
AssertionError: 'object' missing

==
FAIL: test_others (test.test_pyclbr.PyclbrTest)
--
Traceback (most recent call last):
  File "Y:\py3k\__svn__\lib\test\test_pyclbr.py", line 158, in test_others
cm('random', ignore=('Random',))  # from _random import Random as CoreGenera
tor
  File "Y:\py3k\__svn__\lib\test\test_pyclbr.py", line 101, in checkModule
self.assertListEq(real

[issue9778] Make hash values the same width as a pointer (or Py_ssize_t)

2010-10-23 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
status: closed -> open

___
Python tracker 

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



[issue6058] Add cp65001 to encodings/aliases.py

2010-10-23 Thread David-Sarah Hopwood

David-Sarah Hopwood  added the comment:

I meant to say that the os.getcwdu() test in msg119440 was done with Windows 
native Python 2.6.2.

--

___
Python tracker 

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



[issue9778] Make hash values the same width as a pointer (or Py_ssize_t)

2010-10-23 Thread Stefan Krah

Changes by Stefan Krah :


--
nosy: +skrah

___
Python tracker 

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



[issue10178] PEP 378 uses replace where translate may work better

2010-10-23 Thread samwyse

samwyse  added the comment:

The text in question is also talking about the problems with using 'replace' to 
swap pairs of characters, so a better, alternate, process would be valuable, 
especially for anyone unaware of the translate method.

--

___
Python tracker 

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



[issue9778] Make hash values the same width as a pointer (or Py_ssize_t)

2010-10-23 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

This patch seems to fix all aforementioned failures.

--
Added file: http://bugs.python.org/file19343/hashw64.patch

___
Python tracker 

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



[issue6058] Add cp65001 to encodings/aliases.py

2010-10-23 Thread David-Sarah Hopwood

David-Sarah Hopwood  added the comment:

Oops, false alarm. python -c "import os; print repr(os.getcwdu())" works as 
expected, so the exception is part of issue 1602.

(My command about there being no need to distinguish this codepage from UTF-8 
stands.)

--

___
Python tracker 

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



[issue7761] telnetlib Telnet.interact fails on Windows but not Linux

2010-10-23 Thread Stefan Krah

Stefan Krah  added the comment:

The patch works. I agree that no test is needed, since no one will
attempt to revert this. :)

--

___
Python tracker 

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



[issue6011] python doesn't build if prefix contains non-ascii characters

2010-10-23 Thread STINNER Victor

STINNER Victor  added the comment:

> Same errors.

Please describe exactly how you reproduced the error (write each command).

r85805 fixes another bug related to this problem. Is it a better fix than 
distutils_makefile_encoding.patch: use surrogateescape error handler to decode 
the Makefile file.

--

___
Python tracker 

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



[issue10180] File objects should not pickleable

2010-10-23 Thread Antoine Pitrou

New submission from Antoine Pitrou :

In Python 3, pickle accepts to serialize a file object, but the result is 
nonsensical when unpickled. I think we should explicitly forbid pickling of 
FileIO, Buffered{Reader,Writer} and TextIOWrapper objects.

--
components: IO, Library (Lib)
messages: 119450
nosy: alexandre.vassalotti, amaury.forgeotdarc, benjamin.peterson, pitrou
priority: normal
severity: normal
status: open
title: File objects should not pickleable
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



[issue6518] Enable 'with' statement in ossaudiodev module

2010-10-23 Thread Georg Brandl

Georg Brandl  added the comment:

Applied (with new test, and docs) in r85807.  I also removed the AttributeError 
catch.

--
nosy: +georg.brandl
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



[issue5178] Add context manager for temporary directory

2010-10-23 Thread Georg Brandl

Georg Brandl  added the comment:

Ping... soon it's too late for 3.2 too :)

--
nosy: +georg.brandl

___
Python tracker 

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



[issue9778] Make hash values the same width as a pointer (or Py_ssize_t)

2010-10-23 Thread Martin v . Löwis

Martin v. Löwis  added the comment:

These changes also look all reasonable to me.

--

___
Python tracker 

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



[issue8777] Add threading.Barrier

2010-10-23 Thread Georg Brandl

Georg Brandl  added the comment:

Ping -- is this something you want in 3.2, Kristjan?

--
nosy: +georg.brandl

___
Python tracker 

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



[issue10179] os.stat fails on mapped network drive

2010-10-23 Thread Martin v . Löwis

Martin v. Löwis  added the comment:

I think something like this is worth adding. I'd like to see two changes 
implemented:
- GetLastError should be checked for the "not implemented or some such" error 
that you got, and the fallback only performed if its this error
- a comment explaining the motivation for this fallback should be added.

--

___
Python tracker 

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



[issue9778] Make hash values the same width as a pointer (or Py_ssize_t)

2010-10-23 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Ok, I've committed them in r85808.

--
status: open -> pending

___
Python tracker 

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



[issue10180] File objects should not pickleable

2010-10-23 Thread Georg Brandl

Georg Brandl  added the comment:

Sounds like a good idea to me.

--
nosy: +georg.brandl

___
Python tracker 

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



[issue10179] os.stat fails on mapped network drive

2010-10-23 Thread Hirokazu Yamamoto

Hirokazu Yamamoto  added the comment:

Can you try my patch in #10027? Does this also fail?

--

___
Python tracker 

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



[issue10180] File objects should not pickleable

2010-10-23 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Here is a patch, but issue10173 must probably be fixed first.

--
dependencies: +Don't pickle TestCase instances in test_multiprocessing
keywords: +patch
Added file: http://bugs.python.org/file19344/pickleio.patch

___
Python tracker 

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



[issue10181] get_shape0 in memoryobject.c not checked for error return

2010-10-23 Thread Roger Upole

New submission from Roger Upole :

There are a number of places in memoryobject.c where get_shape0 is used without 
the return value being checked.  If it fails, this leads to hanging exceptions 
and crashes.

--
components: Interpreter Core
messages: 119460
nosy: rupole
priority: normal
severity: normal
status: open
title: get_shape0 in memoryobject.c not checked for error return
type: crash
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



[issue10179] os.stat fails on mapped network drive

2010-10-23 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

> Can you try my patch in #10027? Does this also fail?

No, your patch seems to fix the issue.

--

___
Python tracker 

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



[issue10182] match_start truncates large values

2010-10-23 Thread Martin v . Löwis

New submission from Martin v. Löwis :

_sre.c:match_start currently uses Py_BuildValue("i") to return the start index, 
which itself is of type Py_ssize_t. This will get truncated on x64 Windows if 
the start is > 2**31. PyInt_FromSsize_t should be used instead. Other usages of 
Py_BuildValue should be reviewed as well.

--
messages: 119462
nosy: loewis
priority: normal
severity: normal
status: open
title: match_start truncates large values
versions: Python 2.7, Python 3.1, Python 3.2

___
Python tracker 

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



[issue5178] Add context manager for temporary directory

2010-10-23 Thread Giampaolo Rodola'

Giampaolo Rodola'  added the comment:

Personally I would like to have a unique tempfile.mkdtemp which can be used as 
both a function and a context manager, as it happens for open() and others.
Not sure how to do that though, unless tempfile.mkdtemp gets turned into a 
class.
There would be objections against doing that?

--

___
Python tracker 

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



[issue9778] Make hash values the same width as a pointer (or Py_ssize_t)

2010-10-23 Thread Case Van Horsen

Case Van Horsen  added the comment:

On Win64, I get two unexpected failures:

I terminated test_capi after a Windows exception box popped up.

[ 37/349] test_capi
test test_capi failed -- Traceback (most recent call last):
  File "C:\svn\py3k\lib\test\test_capi.py", line 50, in 
test_no_FatalError_infinite_loop
b'Fatal Python error:'
AssertionError: b"Fatal Python error: PyThreadState_Get: no current 
thread\r\n\r\nThis application has requested the Runtime to term
inate it in an unusual way.\nPlease contact the application's support team for 
more information." != b'Fatal Python error: PyThreadS
tate_Get: no current thread'

[ 67/349] test_concurrent_futures
test test_concurrent_futures failed -- Traceback (most recent call last):
  File "C:\svn\py3k\lib\test\test_concurrent_futures.py", line 442, in 
test_timeout
future1]), finished)
AssertionError: Items in the second set but not the first:


The dictviews test passes successfully.

--
status: pending -> open

___
Python tracker 

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



[issue10169] socket.sendto raises incorrect exception when passed incorrect types

2010-10-23 Thread Giampaolo Rodola'

Changes by Giampaolo Rodola' :


--
nosy: +giampaolo.rodola

___
Python tracker 

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



[issue9778] Make hash values the same width as a pointer (or Py_ssize_t)

2010-10-23 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

The test_capi problem is not 64-bit-specific (see issue9116).

As for test_concurrent_futures, I also have a failure (not the same one) in 
both 32-bit and 64-bit builds here. I'm gonna open a separate issue.

--

___
Python tracker 

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



[issue10183] test_concurrent_futures failure on Windows

2010-10-23 Thread Antoine Pitrou

New submission from Antoine Pitrou :

I get this failure quite reliably on a Windows 7 VM, in both 32-bit and 64-bit 
builds:

==
FAIL: test_map_timeout (test.test_concurrent_futures.ProcessPoolExecutorTest)
--
Traceback (most recent call last):
  File "Y:\py3k\__svn__\lib\test\test_concurrent_futures.py", line 572, in 
test_map_timeout
self.assertEquals([42, 42], results)
AssertionError: Lists differ: [42, 42] != []

First list contains 2 additional elements.
First extra element 0:
42

- [42, 42]
+ []

--
assignee: bquinlan
components: Library (Lib)
messages: 119466
nosy: bquinlan, pitrou
priority: normal
severity: normal
status: open
title: test_concurrent_futures failure on Windows
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



[issue10184] tarfile touches directories twice

2010-10-23 Thread Martin v . Löwis

New submission from Martin v. Löwis :

When extracting, the time stamps of directories are modified twice: once when 
creating the directories, and then once in reverse order when done.
The first utimes call is redundant; it also causes issues with a buggy NFS 
server, see

http://www.python.org/dev/buildbot/3.1/builders/AMD64%20debian%20parallel%203.1/builds/147/steps/test/logs/stdio

(specifically, touching a file twice with the same second-resolution time stamp 
will increase the microsecond counter).

The attached patch works around the issue; regardless of the NFS bug, I think 
that the redundant call should be eliminated.

--
assignee: ghaering
files: tarfile.diff
keywords: patch
messages: 119467
nosy: ghaering, loewis
priority: normal
severity: normal
status: open
title: tarfile touches directories twice
Added file: http://bugs.python.org/file19345/tarfile.diff

___
Python tracker 

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



[issue9778] Make hash values the same width as a pointer (or Py_ssize_t)

2010-10-23 Thread Martin v . Löwis

Martin v. Löwis  added the comment:

I recommend to declare this issue closed, and keep it closed unless somebody 
wants to propose to revert the change (widening the hash type) completely. Any 
remaining issues that people want to attribute to this change (correctly or 
incorrectly) should be reported as separate issues.

--
status: open -> closed

___
Python tracker 

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



[issue10185] Py_hash_t declaration needed in _testcapimodule

2010-10-23 Thread Case Van Horsen

New submission from Case Van Horsen :

While researching errors in issue 9778, I found a variable in _testcapimodule.c 
that should be declared Py_hash_t instead of long.

Patch is attached.

--
components: Interpreter Core
files: py_hash_t_testcapimodule.diff
keywords: patch
messages: 119469
nosy: casevh
priority: normal
severity: normal
status: open
title: Py_hash_t declaration needed in _testcapimodule
versions: Python 3.2, Python 3.3
Added file: http://bugs.python.org/file19346/py_hash_t_testcapimodule.diff

___
Python tracker 

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



[issue10180] File objects should not pickleable

2010-10-23 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc  added the comment:

The patch modifies _io.TextIOWrapper, but not _pyio.TextIOWrapper. Is there a 
reason?

--

___
Python tracker 

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



[issue10180] File objects should not pickleable

2010-10-23 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

> The patch modifies _io.TextIOWrapper, but not _pyio.TextIOWrapper. Is
> there a reason?

Yes, two of them:
- modifying _pyio.Buffered* is enough to trigger the TypeError
- _pyio.StringIO inherits from TextIOWrapper, and it must be pickleable

--

___
Python tracker 

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



[issue10185] Py_hash_t declaration needed in _testcapimodule

2010-10-23 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Committed in r85810, thank you.

--
nosy: +pitrou
resolution:  -> fixed
status: open -> closed
versions:  -Python 3.3

___
Python tracker 

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




[issue9967] encoded_word regular expression in email.header.decode_header()

2010-10-23 Thread R. David Murray

Changes by R. David Murray :


--
assignee:  -> r.david.murray

___
Python tracker 

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



[issue10180] File objects should not pickleable

2010-10-23 Thread Alex

Alex  added the comment:

I don't see why Buffered or TextIO's shouldn't be pickleable, ISTM their 
pickleability should be based on what the underlying file obj is.

--
nosy: +alex

___
Python tracker 

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



[issue10180] File objects should not pickleable

2010-10-23 Thread Georg Brandl

Georg Brandl  added the comment:

What would be the use case for that?

--

___
Python tracker 

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



[issue10180] File objects should not pickleable

2010-10-23 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

> I don't see why Buffered or TextIO's shouldn't be pickleable, ISTM
> their pickleability should be based on what the underlying file obj
> is.

That could be. Right now, though, pickling them gives nonsensical
results and I think it would be better to give an explicit error
message.

(a problem with making them pickleable is that, by exposing details of
the internal structure in the pickle, you're limiting what
implementation changes you can do in the future)

--

___
Python tracker 

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



[issue10030] Patch for zip decryption speedup

2010-10-23 Thread Shashank

Shashank  added the comment:

>the C module should be private and therefore called _zipdecrypt
done

>if you want to avoid API mismatch, you could give a tp_call to your C 
>>decrypter object, rather than a "decrypt" method
done

>- you can put all initialization code in zipdecrypt_new and avoid the >need 
>for zipdecrypt_init
keeping this similar to the existing _ZipDecrypter class in ZipFile (all 
initialization in init rather than new), which was probably to allow re-init 
and re-use of one instance

>it's better to use the "y*" code in PyArg_ParseTuple, rather than "s#"
y* does not seem to be available in 2.7, using s* instead

>you should define your module as PY_SSIZE_T_CLEAN and use Py_ssize_t >as 
>length variables (rather than int)
done

>you *mustn't* change the contents of the buffer which is given you by >"s#" or 
>"y*", since that buffer is read-only (it can be a bytes >object); instead, 
>create a new bytes object using >PyBytes_FromStringAndSize(NULL, length) and 
>write into that; or, if >you want a read-write buffer, use the "w*" code
corrected, not altering the input buffer, reading input buffer as s*

--
Added file: http://bugs.python.org/file19347/zipdecrypt.patch

___
Python tracker 

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



[issue10178] PEP 378 uses replace where translate may work better

2010-10-23 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

Sorry, the text needs to stand as-is.
It is supposed to be a hint of what can be done,
nothing more.

The technique of t=x; x=y; y=t is somewhat basic
and has general applicability -- there's nothing
"complex" about it.   Also, for short strings 
such as the one in the example, the translate 
approach is slower unless the used in a loop
where the translation table is already built.

BTW, the PEP itself is not primary documentation
for users.  It is meant to document the design
discussion only.  

Feel free to post your recipe on ASPN or on
the newsgroup.

--
resolution:  -> rejected
status: open -> closed

___
Python tracker 

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



[issue1349106] email.Generator does not separate headers with "\r\n"

2010-10-23 Thread R. David Murray

R. David Murray  added the comment:

Committed in r85811.

--
resolution:  -> accepted
stage: commit review -> committed/rejected
status: open -> closed

___
Python tracker 

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



[issue10186] Invalid SyntaxError pointer offset

2010-10-23 Thread Alex

New submission from Alex :

Builtin SyntaxError formatter does never point to char before last in wrong 
source line. traceback.format_exception() is not affected.

*** Example:
>>> raise SyntaxError('', ('', 0, 3, 'hello'))
...
hello
  ^
SyntaxError: test
>>> raise SyntaxError('', ('', 0, 4, 'hello'))
...
hello
   ^
SyntaxError: test
>>> raise SyntaxError('', ('', 0, 5, 'hello'))
...
hello   # <-- note that it's not "o"
   ^
SyntaxError: test
>>> raise SyntaxError('', ('', 0, 6, 'hello'))
...
hello
 ^
SyntaxError: test

--
components: Interpreter Core
messages: 119479
nosy: mwizard
priority: normal
severity: normal
status: open
title: Invalid SyntaxError pointer offset
versions: Python 2.7

___
Python tracker 

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



[issue10155] Add fixups for encoding problems to wsgiref

2010-10-23 Thread And Clover

Changes by And Clover :


Removed file: http://bugs.python.org/file19303/wsgiref-patches-3.2a3.patch

___
Python tracker 

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



[issue10186] Invalid SyntaxError pointer offset

2010-10-23 Thread Alex

Changes by Alex :


--
type:  -> behavior

___
Python tracker 

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



[issue10155] Add fixups for encoding problems to wsgiref

2010-10-23 Thread And Clover

And Clover  added the comment:

Ah, sorry, submitted wrong patch against 3.2, disregard. Here's the 'proper' 
version (the functionality isn't changed, just the former patch had an unused 
and-Falsed out clause for reading environb, which in the end I decided not to 
use as the surrogateescape approach already covers it just as well for values).

@Éric: yes. Actually the whole patch is pretty much new functionality, which 
should not be considered for a 2.7.x bugfix release. I've submitted a patch 
against 2.7 for completeness and for the use of a separately-maintained 
post-2.7 wsgiref, but unless there is ever a Python 2.8 it should never hit 
stdlib.

The status quo wrt Unicode in environ is broken and inconsistent, which an 
accepted PEP  would finally clear up. But there may be webapps deployed 
that rely on their particular server's current inconsistent environ, and those 
shouldn't be broken by a bugfix 2.7 or 3.1 release.

--
versions:  -Python 3.1
Added file: http://bugs.python.org/file19348/wsgiref-patches-3.2a3.proper.patch

___
Python tracker 

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



[issue10186] Invalid SyntaxError pointer offset

2010-10-23 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

r85814

--
nosy: +benjamin.peterson
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



[issue10187] exec encode unicode to utf-8 str automatically in GBK environment

2010-10-23 Thread wjm251

New submission from wjm251 :

windows Xp chinese version

see the attached file, the header was set to GBK,and the file is GBK encoded, 
but why the output was '\xe5\xa4\xa7'(it is utf-8 encoded of Chinese character 
"大")

--
components: Library (Lib)
files: test.py
messages: 119482
nosy: wjm251
priority: normal
severity: normal
status: open
title: exec encode unicode to utf-8 str automatically in GBK environment
type: behavior
versions: Python 2.6
Added file: http://bugs.python.org/file19349/test.py

___
Python tracker 

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



[issue10187] exec encode unicode to utf-8 str automatically in GBK environment

2010-10-23 Thread wjm251

wjm251  added the comment:

in windows English Version and ubuntu 10.04(locale is utf-8)
all have the same the behavior,

am I wrong?

--

___
Python tracker 

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



[issue10164] Add an assertBytesEqual to unittest and use it for bytes assertEqual

2010-10-23 Thread R. David Murray

R. David Murray  added the comment:

My best guess currently is that the failing test is a bug in difflib, but I 
haven't dug into that code yet to prove it.  It's still possible it's something 
stupid in my code, but as far as I can see there's no character over where that 
- is in the difflib output (that is, the two lines that it says are different 
appear identical when viewed with cat -A).

--

___
Python tracker 

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



[issue9228] Make changes in the path and pathext on installation

2010-10-23 Thread R. David Murray

R. David Murray  added the comment:

Modifying the path has be definitely rejected by python-dev.  I don't know 
enough about windows to comment on the other two, but I suspect that everything 
that it is reasonable to do automatically is already being done.

--
nosy: +loewis, r.david.murray
resolution:  -> rejected
stage:  -> committed/rejected
status: open -> pending

___
Python tracker 

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



[issue7696] Improve Memoryview/Buffer documentation

2010-10-23 Thread R. David Murray

R. David Murray  added the comment:

Antoine, is there more that remains to be done on this, or can it be closed?

--
nosy: +r.david.murray

___
Python tracker 

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



[issue10187] exec encode unicode to utf-8 str automatically in GBK environment

2010-10-23 Thread Martin v . Löwis

Martin v. Löwis  added the comment:

This is not a bug, but intentional.

a is a Unicode string; it does not have an encoding internally (not GBK, not 
UTF-8). Then, the string being exec'ed also becomes a Unicode string. exec'ing 
Unicode strings is confusing; try to avoid this. The semantics of exec'ing a 
Unicode string is that all str (but not unicode) literals get encoded as UTF-8.

To see the result you expect, write

a = "麓贸"

--
nosy: +loewis
resolution:  -> invalid
status: open -> closed

___
Python tracker 

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



[issue10187] exec encode unicode to utf-8 str automatically in GBK environment

2010-10-23 Thread Martin v . Löwis

Martin v. Löwis  added the comment:

Oops, I meant

a = "大"

--

___
Python tracker 

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



[issue10187] exec encode unicode to utf-8 str automatically in GBK environment

2010-10-23 Thread wjm251

wjm251  added the comment:

but why it is forced to encoded to utf-8,
I think it should be encoded by the locale related encodings,not always utf-8,
for example,in GBK locale,it should use GBK to encode the unicode object,right?

--

___
Python tracker 

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



[issue10187] exec encode unicode to utf-8 str automatically in GBK environment

2010-10-23 Thread Martin v . Löwis

Martin v. Löwis  added the comment:

> but why it is forced to encoded to utf-8,
> I think it should be encoded by the locale related encodings,not always utf-8,
> for example,in GBK locale,it should use GBK to encode the unicode 
> object,right?

Wrong. Exec'ing Unicode strings has been specified to encode all strings
as UTF-8. This cannot be changed anymore.

Even if this was possible to change, it should *not* use the locale
encoding. The source encoding and the locale encoding are independent;
the source encoding is normally determined from PEP 263 declarations.
So if anything, exec'ing Unicode strings should use an encoding
declaration that you have in that string. However, you don't have one,
and they are unsupported for Unicode strings, anyway.

--
title: exec encode unicode to utf-8 str automatically in GBK environment -> 
exec encode unicode to utf-8 str automatically in GBK   environment

___
Python tracker 

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