[issue10498] calendar.LocaleHTMLCalendar.formatyearpage() results in traceback with 'unsupported locale setting' on Windows

2010-11-24 Thread Ned Deily

Ned Deily n...@acm.org added the comment:

Your analysis is correct.  Sorry, I should have noted that the OS X UTF8 vs 
UTF-8 discrepancy has already been discussed in Issue10090 and Issue10154.

--

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



[issue9852] test_ctypes fail with clang

2010-11-24 Thread Ned Deily

Ned Deily n...@acm.org added the comment:

Can you say exactly what arguments are given to clang for this compile?  (As 
you probably know, CPython builds on OS X for python.org installers use gcc, 
not clang.)

--
nosy: +ned.deily

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



[issue10430] _sha.sha().digest() method is endian-sensitive. and hexdigest()

2010-11-24 Thread Kristján Valur Jónsson

Kristján Valur Jónsson krist...@ccpgames.com added the comment:

Found the issue and it wasn't with sha1.
Turned out that the code was doing somethign like
sha1(buffer(unicode('str'))) which exposed the endianness of the unicode 
representation.
Sorry for wasting your time.

--
resolution:  - invalid
status: open - closed

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



[issue9852] test_ctypes fail with clang

2010-11-24 Thread Ismail Donmez

Ismail Donmez ism...@namtrac.org added the comment:

No interesting option. But this looks like a clang bug, compiling 
_ctypes_test.c with -O0 fixes the issue. So this is a compiler optimization bug.

--

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



[issue10513] sqlite3.InterfaceError after commit

2010-11-24 Thread Anders Blomdell

Anders Blomdell anders.blomd...@control.lth.se added the comment:

The culprit seems to be 'pysqlite_do_all_statements(self, ACTION_RESET, 0)' in 
pysqlite_connection_commit, which resets all active statements, but subsequent 
fetch/fetchall seems to trash the sqlite3 state in the statements. Removing the 
ACTION_RESET seems to bring back old behaviour (if it's the correct fix is, 
however, beyond me).

Slightly modified testprogram that shows more wierdness; output from:

c =  cursor.execute(' select k from t where k == ?;', (0,))
conn.commit()
print c.fetchall()

is:

[(0,), (0,)]

which is not what I would expect with a primary key...

--
Added file: http://bugs.python.org/file19794/sqlite_bug.py

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



[issue9852] test_ctypes fail with clang

2010-11-24 Thread Ned Deily

Ned Deily n...@acm.org added the comment:

OK, then if you care to follow up, I suggest pursuing with the Clang project.

--
resolution:  - invalid
status: open - closed

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



[issue10496] import site failed when Python can't find home directory

2010-11-24 Thread Ned Deily

Changes by Ned Deily n...@acm.org:


--
Removed message: http://bugs.python.org/msg122051

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



[issue10496] import site failed when Python can't find home directory

2010-11-24 Thread Ned Deily

Ned Deily n...@acm.org added the comment:

The problem is reproducible on a current Debian Linux system although with 
different results for current versions of Python (only security issues are 
accepted against 2.6).  Unlike with 2.6, 3.1 reports no error.  2.7 and 3.2 
both fail with an exception:

Traceback (most recent call last):
  File /usr/lib/python2.7/site.py, line 548, in module
main()
  File /usr/lib/python2.7/site.py, line 530, in main
known_paths = addusersitepackages(known_paths)
  File /usr/lib/python2.7/site.py, line 257, in addusersitepackages
user_site = getusersitepackages()
  File /usr/lib/python2.7/site.py, line 232, in getusersitepackages
user_base = getuserbase() # this will also set USER_BASE
  File /usr/lib/python2.7/site.py, line 222, in getuserbase
USER_BASE = get_config_var('userbase')
  File /usr/lib/python2.7/sysconfig.py, line 541, in get_config_var
return get_config_vars().get(name)
  File /usr/lib/python2.7/sysconfig.py, line 449, in get_config_vars
_CONFIG_VARS['userbase'] = _getuserbase()
  File /usr/lib/python2.7/sysconfig.py, line 198, in _getuserbase
return env_base if env_base else joinuser(~, .local)
  File /usr/lib/python2.7/sysconfig.py, line 185, in joinuser
return os.path.expanduser(os.path.join(*args))
  File /usr/lib/python2.7/posixpath.py, line 256, in expanduser
userhome = pwd.getpwuid(os.getuid()).pw_dir
KeyError: 'getpwuid(): uid not found: 12345'

--
nosy: +ned.deily
stage:  - needs patch

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



[issue10496] import site failed when Python can't find home directory

2010-11-24 Thread Ned Deily

Changes by Ned Deily n...@acm.org:


--
versions: +Python 2.7, Python 3.1, Python 3.2 -Python 2.6

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



[issue10518] Bring back callable()

2010-11-24 Thread Antoine Pitrou

New submission from Antoine Pitrou pit...@free.fr:

It was just resting. Here is a patch to wake it up for 3.2 (or 3.3 pending 
moratorium interpretation).

As for the py3k warning in 2.x (and the 2to3 fixer), it's not obvious what we 
should do: callable() clearly doesn't exist in 3.0 and 3.1.

--
assignee: georg.brandl
components: Interpreter Core
files: callable.patch
keywords: patch
messages: 122273
nosy: benjamin.peterson, georg.brandl, pitrou
priority: normal
severity: normal
status: open
title: Bring back callable()
type: feature request
versions: Python 3.2
Added file: http://bugs.python.org/file19795/callable.patch

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



[issue10519] setobject.c no-op typo

2010-11-24 Thread Armin Rigo

New submission from Armin Rigo ar...@users.sourceforge.net:

Probably a typo in setobject.c.

The patch attached here does not really change anything but fixes the typo, 
leading to slightly clearer code and avoiding one level of recursion.  All 
tests still pass.

--
components: Interpreter Core
files: diff1
messages: 122274
nosy: arigo
priority: normal
severity: normal
status: open
title: setobject.c no-op typo
type: behavior
versions: Python 2.7
Added file: http://bugs.python.org/file19796/diff1

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



[issue10519] setobject.c no-op typo

2010-11-24 Thread Antoine Pitrou

Changes by Antoine Pitrou pit...@free.fr:


--
nosy: +rhettinger, stutzbach
versions: +Python 3.1, Python 3.2

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



[issue10027] os.lstat/os.stat don't set st_nlink on Windows

2010-11-24 Thread Brian Curtin

Brian Curtin cur...@acm.org added the comment:

Committed to py3k in r86727.


I think this should be backported to the maintenance branches, but not until 
after the upcoming point releases. Although those branches won't have the 
ability to create hard links, they should have the ability to view information 
about existing links on the system (or if they create them via ctypes/pywin32). 
Since those branches won't be able to explicitly test this, I think it makes 
sense to let this bake for a while on py3k.

--
assignee: ocean-city - brian.curtin
resolution: accepted - fixed
stage: patch review - committed/rejected

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



[issue5800] make wsgiref.headers.Headers accept empty constructor

2010-11-24 Thread SilentGhost

Changes by SilentGhost michael.mischurow+...@gmail.com:


Removed file: http://bugs.python.org/file19680/headers.py.diff

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



[issue5800] make wsgiref.headers.Headers accept empty constructor

2010-11-24 Thread SilentGhost

SilentGhost michael.mischurow+...@gmail.com added the comment:

Re-submitting the patch for Lib/wsgiref/headers.py w/o the isinstance change

--
keywords: +patch
Added file: http://bugs.python.org/file19797/headers.py.diff

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



[issue10518] Bring back callable()

2010-11-24 Thread Benjamin Peterson

Benjamin Peterson benja...@python.org added the comment:

I think we should lift the py3k warning after 3.2 is released, but leave the 
2to3 fixer in for the time being.

--

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



[issue5800] make wsgiref.headers.Headers accept empty constructor

2010-11-24 Thread Dirkjan Ochtman

Changes by Dirkjan Ochtman dirk...@ochtman.nl:


--
keywords: +needs review

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



[issue10520] Build with --enable-shared fails

2010-11-24 Thread Stefan Krah

Changes by Stefan Krah stefan-use...@bytereef.org:


--
nosy: skrah
priority: normal
severity: normal
status: open
title: Build with --enable-shared fails

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



[issue10520] Build with --enable-shared fails

2010-11-24 Thread Stefan Krah

New submission from Stefan Krah stefan-use...@bytereef.org:

Building the modules fails if --enable-shared is used. The linker picks
up an existing library from /usr/local/lib, which has not been compiled
with -fPIC:


gcc -pthread -shared 
build/temp.linux-x86_64-3.2/home/stefan/svn/py3k/Modules/_struct.o 
-L/usr/local/lib -L. -lpython3.2m -o 
build/lib.linux-x86_64-3.2/_struct.cpython-32m.so
/usr/bin/ld: /usr/local/lib/libpython3.2m.a(abstract.o): relocation 
R_X86_64_32S against `_PyObject_NextNotImplemented' can not be used when making 
a shared object; recompile with -fPIC
/usr/local/lib/libpython3.2m.a: could not read symbols: Bad value
collect2: ld returned 1 exit status


Linking works if the order of the flags is changed to -L. L/usr/local/lib.

--
components: +Build
nosy: +pitrou, tarek
priority: normal - critical
type:  - behavior
versions: +Python 2.7, Python 3.1, Python 3.2

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



[issue7238] frame.f_lineno doesn't get updated after local trace function assigned to it

2010-11-24 Thread Ray.Allen

Ray.Allen ysj@gmail.com added the comment:

It's not a bug. What happens is like this:

1, You set trace function using sys.settrace(tracer).
2, When the following func() is called, tracer is called with a call event, 
so the trace function in PyThreadState is set to NULL since 
sys.settrace(None) is execute, but since the return value is a valid local 
trace function, the frame of called function(func()) has its local trace 
function.
3, The called function(func()) executes, though its frame has a local trace 
function, but it will not be executed since PyThreadState-c_tracefunc is NULL. 
When you get f_lineno from frame, you get the not refreshed f_lineno value but 
not the dynamically computed lineno, as the f_lineno's getter function said:
if(f-f_trace)
return f-f_lineno;
else
return PyCode_Addr2Line(f-f_code, f-f_lasti);

   Here because your frame's local trace function is not executed, the f_lineno 
is not refreshed.

4, When the second time func() calls, there is no global trace function. Each 
time you get the f_lineno, it uses PyCode_Addr2Line() to get the dynamically 
computed line number.


I think this situation is so rarely that the doc saying f_lineno is 
the current line number of the frame is correct.

--
nosy: +ysj.ray

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



[issue10520] Build with --enable-shared fails

2010-11-24 Thread Antoine Pitrou

Changes by Antoine Pitrou pit...@free.fr:


--
nosy: +barry

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



[issue10517] test_concurrent_futures crashes with Fatal Python error: Invalid thread state for this thread

2010-11-24 Thread Dave Malcolm

Changes by Dave Malcolm dmalc...@redhat.com:


--
nosy: +dmalcolm

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



[issue10521] str methods don't accept non-BMP fillchar on a narrow Unicode build

2010-11-24 Thread Alexander Belopolsky

New submission from Alexander Belopolsky belopol...@users.sourceforge.net:

 'xyz'.center(20, '\U00100140')
Traceback (most recent call last):
  File stdin, line 1, in module
TypeError: The fill character must be exactly one character long

str.ljust and str.rjust are similarly affected.

--
components: Interpreter Core
messages: 122280
nosy: belopolsky
priority: normal
severity: normal
stage: needs patch
status: open
title: str methods don't accept non-BMP fillchar on a narrow Unicode build
type: behavior
versions: Python 3.2

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



[issue10522] test_telnet exception

2010-11-24 Thread Antoine Pitrou

New submission from Antoine Pitrou pit...@free.fr:

This has just occurred on the Solaris buildbot:

test_telnetlib
Exception in thread Thread-452:
Traceback (most recent call last):
  File /home2/buildbot/slave/2.7.loewis-sun/build/Lib/threading.py, line 530, 
in __bootstrap_inner
self.run()
  File /home2/buildbot/slave/2.7.loewis-sun/build/Lib/threading.py, line 483, 
in run
self.__target(*self.__args, **self.__kwargs)
  File /home2/buildbot/slave/2.7.loewis-sun/build/Lib/test/test_telnetlib.py, 
line 41, in server
conn.close()
UnboundLocalError: local variable 'conn' referenced before assignment

--
components: Tests
messages: 122281
nosy: jackdied, pitrou
priority: normal
severity: normal
stage: needs patch
status: open
title: test_telnet exception
type: behavior
versions: Python 2.7

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



[issue10520] Build with --enable-shared fails

2010-11-24 Thread Barry A. Warsaw

Barry A. Warsaw ba...@python.org added the comment:

So, you must have done a 'make install' or 'make altinstall' to get a build 
into /usr/local, right?  Without that of course it works fine.

You're probably still right about changing the order so it picks up the local 
copy first.

--

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



[issue10520] Build with --enable-shared fails

2010-11-24 Thread Barry A. Warsaw

Barry A. Warsaw ba...@python.org added the comment:

I'm bumping the status down since this likely won't affect the average user, 
only developers who do their own source installs.

--
assignee:  - barry
priority: critical - high

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



[issue10521] str methods don't accept non-BMP fillchar on a narrow Unicode build

2010-11-24 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

The question is, what should it do with such an input? Pretend it's a single 
char (but other chars in the source string won't get the same treatment)? Treat 
it as a two-char string (but then center() and friends should logically be 
extended to accept strings of arbitrary lengths)?

--
nosy: +pitrou

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



[issue10521] str methods don't accept non-BMP fillchar on a narrow Unicode build

2010-11-24 Thread Eric Smith

Eric Smith e...@trueblade.com added the comment:

str.__format__ and friends (int, float, complex) also have this same problem. 
For example, when they're computing the fill character:

 format('', 'x^')
''

 format('', '\U00100140^')
Traceback (most recent call last):
  File stdin, line 1, in module
ValueError: Invalid conversion specification

--
nosy: +eric.smith

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



[issue10520] Build with --enable-shared fails

2010-11-24 Thread Matthias Klose

Matthias Klose d...@debian.org added the comment:

-L. should appear before -L/usr/local/lib.

--
nosy: +doko

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



[issue10517] test_concurrent_futures crashes with Fatal Python error: Invalid thread state for this thread

2010-11-24 Thread Dave Malcolm

Dave Malcolm dmalc...@redhat.com added the comment:

I'm able to reliably reproduce this on a RHEL 5 box (i386 in this case).

All of the ProcessPool* unittest subclasses within 
Lib/test/test_concurrent_futures.py exhibit this hang, each printing out just 
the name of the first test (so presumably either within the first test method, 
or in shared setup/teardown).

None of the other subclasses hang.

You need to build with --with-pydebug to see this: the error message is coming 
from this code in PyThreadState_Swap in Python/pystate.c:

   390  #if defined(Py_DEBUG)  defined(WITH_THREAD)
   391  if (newts) {
   392  /* This can be called from PyEval_RestoreThread(). Similar
   393 to it, we need to ensure errno doesn't change.
   394  */
   395  int err = errno;
   396  PyThreadState *check = PyGILState_GetThisThreadState();
   397  if (check  check-interp == newts-interp  check != newts)
398  Py_FatalError(Invalid thread state for this thread);
   399  errno = err;
   400  }
   401  #endif

--

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



[issue10516] Add list.clear() and list.copy()

2010-11-24 Thread Giampaolo Rodola'

Changes by Giampaolo Rodola' g.rod...@gmail.com:


--
nosy: +giampaolo.rodola

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



[issue4147] xml.dom.minidom toprettyxml: omit whitespace for text-only elements

2010-11-24 Thread anatoly techtonik

Changes by anatoly techtonik techto...@gmail.com:


--
nosy: +techtonik

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



[issue10517] test_concurrent_futures crashes with Fatal Python error: Invalid thread state for this thread

2010-11-24 Thread Dave Malcolm

Dave Malcolm dmalc...@redhat.com added the comment:

Minimal reproducer:
$ ./python -c from concurrent.futures import * ; e = ProcessPoolExecutor() ; 
e.submit(pow, 2, 5)
Fatal Python error: Invalid thread state for this thread

--

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



[issue4147] xml.dom.minidom toprettyxml: omit whitespace for text-only elements

2010-11-24 Thread anatoly techtonik

anatoly techtonik techto...@gmail.com added the comment:

This one is bug.

--

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



[issue10517] test_concurrent_futures crashes with Fatal Python error: Invalid thread state for this thread

2010-11-24 Thread Dave Malcolm

Dave Malcolm dmalc...@redhat.com added the comment:

Seems to be an issue within (or triggered by) multiprocessing (test_threads and 
test_threading pass OK, fwiw):
$ ./python -m test.test_multiprocessing
Fatal Python error: Invalid thread state for this thread
Traceback (most recent call last):
  File /home/dmalcolm/coding/python-svn/py3k-clean/Lib/runpy.py, line 160, in 
_run_module_as_main
__main__, fname, loader, pkg_name)
  File /home/dmalcolm/coding/python-svn/py3k-clean/Lib/runpy.py, line 73, in 
_run_code
exec(code, run_globals)
  File 
/home/dmalcolm/coding/python-svn/py3k-clean/Lib/test/test_multiprocessing.py, 
line 2127, in module
main()
  File 
/home/dmalcolm/coding/python-svn/py3k-clean/Lib/test/test_multiprocessing.py, 
line 2124, in main
test_main(unittest.TextTestRunner(verbosity=2).run)
  File 
/home/dmalcolm/coding/python-svn/py3k-clean/Lib/test/test_multiprocessing.py, 
line 2103, in test_main
ManagerMixin.pool = ManagerMixin.manager.Pool(4)
  File 
/home/dmalcolm/coding/python-svn/py3k-clean/Lib/multiprocessing/managers.py, 
line 644, in temp
token, exp = self._create(typeid, *args, **kwds)
  File 
/home/dmalcolm/coding/python-svn/py3k-clean/Lib/multiprocessing/managers.py, 
line 542, in _create
conn = self._Client(self._address, authkey=self._authkey)
  File 
/home/dmalcolm/coding/python-svn/py3k-clean/Lib/multiprocessing/connection.py,
 line 149, in Client
answer_challenge(c, authkey)
  File 
/home/dmalcolm/coding/python-svn/py3k-clean/Lib/multiprocessing/connection.py,
 line 383, in answer_challenge
message = connection.recv_bytes(256) # reject large message
EOFError

--

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



[issue10517] test_concurrent_futures crashes with Fatal Python error: Invalid thread state for this thread

2010-11-24 Thread Łukasz Langa

Changes by Łukasz Langa luk...@langa.pl:


--
nosy: +jnoller

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



[issue10520] Build with --enable-shared fails

2010-11-24 Thread Stefan Krah

Stefan Krah stefan-use...@bytereef.org added the comment:

Since I'm on Linux, I did a prior install into /usr/local. But I'm pretty
sure that BSD ports (which you might view as the system install) also use
/usr/local.

--

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



[issue10518] Bring back callable()

2010-11-24 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

Does the plan include deprecating collections.Callable?

--
nosy: +eric.araujo

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



[issue10516] Add list.clear() and list.copy()

2010-11-24 Thread Éric Araujo

Changes by Éric Araujo mer...@netwok.org:


--
nosy: +eric.araujo

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



[issue10518] Bring back callable()

2010-11-24 Thread SilentGhost

SilentGhost michael.mischurow+...@gmail.com added the comment:

What is the reason for this? Why do we need it?

--
nosy: +SilentGhost

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



[issue8938] Mac OS dialogs(Save As..., Load) translation

2010-11-24 Thread gius.dima

gius.dima gius.d...@gmail.com added the comment:

I'm using Python 2.7, PyQt 4.8.1, qt 4.7.1 on OS X Leopard 10.6.5 and have just 
the same problem.
In C++ and qt all dialog's messages are in italian, in PyQt dialogs are 
partially in english.

--
nosy: +gius.dima
Added file: http://bugs.python.org/file19798/pyqt_getsavefilename.jpg

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



[issue10517] test_concurrent_futures crashes with Fatal Python error: Invalid thread state for this thread

2010-11-24 Thread Dave Malcolm

Dave Malcolm dmalc...@redhat.com added the comment:

By strategically adding print() and input() calls, I was able to isolate the 
error to this line in test_multiprocessing.py's test_main:
   ManagerMixin.pool = ManagerMixin.manager.Pool(4)

specifically, to the construction:
  ManagerMixin.manager.Pool(4)

Minimal reproducer seems to be:
 import multiprocessing.managers
 mpp = multiprocessing.Pool(4)
 sm = multiprocessing.managers.SyncManager()
 sm.start()

i.e.:

$ ./python -c import multiprocessing.managers ; mpp = multiprocessing.Pool(4); 
sm = multiprocessing.managers.SyncManager(); sm.start()
Fatal Python error: Invalid thread state for this thread

--

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



[issue10519] setobject.c no-op typo

2010-11-24 Thread Raymond Hettinger

Changes by Raymond Hettinger rhettin...@users.sourceforge.net:


--
assignee:  - rhettinger

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



[issue10521] str methods don't accept non-BMP fillchar on a narrow Unicode build

2010-11-24 Thread Alexander Belopolsky

Alexander Belopolsky belopol...@users.sourceforge.net added the comment:

On Wed, Nov 24, 2010 at 10:33 AM, Antoine Pitrou rep...@bugs.python.org wrote:
..
 The question is, what should it do with such an input?

I think the rule for such functions should be that if
input.encode('utf-8') is the same on wide and narrow builds, then the
output.encode('utf-8') should be the same.

 Pretend it's a single char (but other chars in the source string won't get 
 the same treatment)?

Yes, *and* surrogate pairs in the source string should count for one
char as well.

 Treat it as a two-char string (but then center() and friends should logically 
 be
 extended to accept strings of arbitrary lengths)?

No.  For better or worse, on wide builds these methods effectively
operate on code points.  They don't interpret multi-code-point-
graphemes or take grapheme width into account:


​123


Application code has to ascertain that it is dealing with with fixed
width characters in the target font before using these methods for
text alignment.

--

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



[issue8938] Mac OS dialogs(Save As..., Load) translation

2010-11-24 Thread Terry J. Reedy

Changes by Terry J. Reedy tjre...@udel.edu:


--
nosy:  -terry.reedy

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



[issue10519] setobject.c no-op typo

2010-11-24 Thread Raymond Hettinger

Raymond Hettinger rhettin...@users.sourceforge.net added the comment:

Try to match the whitespace convention of the surrounding code.

--
assignee: rhettinger - anthonybaxter
nosy: +anthonybaxter
resolution:  - accepted

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



[issue9807] deriving configuration information for different builds with the same prefix

2010-11-24 Thread Barry A. Warsaw

Barry A. Warsaw ba...@python.org added the comment:

r86731

--
resolution:  - fixed
status: open - closed

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



[issue10519] setobject.c no-op typo

2010-11-24 Thread Raymond Hettinger

Raymond Hettinger rhettin...@users.sourceforge.net added the comment:

A few lines later, a similar change can be made for set_discard.

--
assignee: anthonybaxter - arigo

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



[issue10521] str methods don't accept non-BMP fillchar on a narrow Unicode build

2010-11-24 Thread Ezio Melotti

Changes by Ezio Melotti ezio.melo...@gmail.com:


--
nosy: +ezio.melotti

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



[issue9509] argparse FileType raises ugly exception for missing file

2010-11-24 Thread Steven Bethard

Steven Bethard steven.beth...@gmail.com added the comment:

I'm not sure about the patch - this will convert *all* IOErrors into command 
line error messages, while we should really only be converting the ones raised 
by FileType. Instead, the try/except should be in FileType.__call__, and you 
should raise an ArgumentTypeError there.

The test looks fine.

--

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



[issue10497] Incorrect use of gettext in argparse

2010-11-24 Thread Steven Bethard

Steven Bethard steven.beth...@gmail.com added the comment:

Looks like a great fix.

And yes, anyone who knows anything about gettext, please feel free to add a 
test or ten. ;-) I just copied optparse when I put that stuff in, so I have no 
confidence in how it's done now.

--

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



[issue10299] Add index with links section for built-in functions

2010-11-24 Thread Ezio Melotti

Ezio Melotti ezio.melo...@gmail.com added the comment:

Committed in r86732 on py3k, will backport on 3.1/2.7 if Benjamin is OK with 
that.

--
nosy: +benjamin.peterson

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



[issue10299] Add index with links section for built-in functions

2010-11-24 Thread Benjamin Peterson

Benjamin Peterson benja...@python.org added the comment:

Okay.

2010/11/24 Ezio Melotti rep...@bugs.python.org:

 Ezio Melotti ezio.melo...@gmail.com added the comment:

 Committed in r86732 on py3k, will backport on 3.1/2.7 if Benjamin is OK with 
 that.

 --
 nosy: +benjamin.peterson

 ___
 Python tracker rep...@bugs.python.org
 http://bugs.python.org/issue10299
 ___


--

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



[issue8879] Implement os.link on Windows

2010-11-24 Thread Brian Curtin

Brian Curtin cur...@acm.org added the comment:

Removing link to #10027. It's fixed for py3k but the issue should stay open for 
backport to other branches.

--
dependencies:  -os.lstat/os.stat don't set st_nlink on Windows
resolution:  - fixed

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



[issue8879] Implement os.link on Windows

2010-11-24 Thread Brian Curtin

Brian Curtin cur...@acm.org added the comment:

Fixed in r86733.

--
stage: patch review - committed/rejected
status: open - closed

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



[issue10520] Build with --enable-shared fails

2010-11-24 Thread Barry A. Warsaw

Barry A. Warsaw ba...@python.org added the comment:

r86734

--
resolution:  - fixed
status: open - closed

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



[issue10520] Build with --enable-shared fails

2010-11-24 Thread Barry A. Warsaw

Barry A. Warsaw ba...@python.org added the comment:

BTW, I am not sure it's worth backporting this to 3.1 and 2.7.  It seems like a 
corner case that will not affect most users.

--

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



[issue10518] Bring back callable()

2010-11-24 Thread Ezio Melotti

Ezio Melotti ezio.melo...@gmail.com added the comment:

I'm not sure it's worth bringing callable() back at this point.
It would have made more sense for 3.1, but now we already have 2  
callable()-less versions of Python if we do it for 3.2 (what about the 
moratorium though?) or 3 if we do it for 3.3.  Also if isinstance(obj, 
collections.Callable) is correct in what it does, it's trivial to do something 
like:

def callable(obj):
  return isinstance(obj, collections.Callable)


If it goes in the `iscallable` name suggested on python-dev might be better 
(IMHO).  At least people will realize that it's something new and don't 
assume that the old callable() has been there all the time (it also clear that 
it returns a boolean and reads better in e.g. `if iscallable(obj): ...`).
(The patch should also include an entry in the table at the top of 
functions.rst now that I committed #10299 in r86732.)

--
nosy: +ezio.melotti

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



[issue10521] str methods don't accept non-BMP fillchar on a narrow Unicode build

2010-11-24 Thread Marc-Andre Lemburg

Marc-Andre Lemburg m...@egenix.com added the comment:

Alexander Belopolsky wrote:
 
 New submission from Alexander Belopolsky belopol...@users.sourceforge.net:
 
 'xyz'.center(20, '\U00100140')
 Traceback (most recent call last):
   File stdin, line 1, in module
 TypeError: The fill character must be exactly one character long
 
 str.ljust and str.rjust are similarly affected.

I don't think we should change that for the formatting methods.

See my reply on python-dev:

str.center(n) centers the string in a padded string that
is composed of n code units. Whether that operation will result
in a text that's centered visually on output is a completely
different story. The original string could contain surrogates,
it could also contain combing code points, so the visual
presentation of the result may very well not be centered at
all; it may not even appear as having the length n to the user.

Since we're not going change the semantics of those APIs,
it is OK to not support padding with non-BMP code points on
UCS-2 builds.

Supporting such cases would only cause problems:

* if the methods would pad with surrogates, the resulting
  string would no longer have length n; breaking the
  assumption that len(str.center(n)) == n

* if the methods would pad with half the number of surroagtes
  to make sure that len(str.center(n)) == n, the resulting
  output to e.g. a terminal would be further off, than what
  you already have with surrogates and combining code points
  in the original string.

--
nosy: +lemburg

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



[issue8938] Mac OS dialogs(Save As..., Load) translation

2010-11-24 Thread Ned Deily

Ned Deily n...@acm.org added the comment:

There seem to be several different issues being reported here.  As far as I can 
tell, the only issue that directly relates to code in the Python standard 
library is the lack of internationalization for EasyDialogs.  EasyDialogs 
depends on deprecated OS X Carbon interfaces that do not exist in 64-bit mode.  
For that reason, EasyDialogs is itself deprecated and has been removed in 
Python 3; further, new features are not being added in Python 2.  All the other 
issues mentioned have to do with 3rd-party packages like Aqua Tk (which as far 
as I can tell, does not ship with i18n resources for its GUI interfaces like 
the file dialogs) and PyQt.  Those issues should be pursued with those other 
projects.

--
nosy: +ned.deily
resolution:  - wont fix
status: open - closed

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



[issue10520] Build with --enable-shared fails

2010-11-24 Thread Éric Araujo

Changes by Éric Araujo mer...@netwok.org:


--
nosy: +benjamin.peterson, eric.araujo

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



[issue10515] csv sniffer does not recognize quotes at the end of line

2010-11-24 Thread Martin Budaj

Martin Budaj m.bu...@gmail.com added the comment:

Units test and two patches for 2.7 are included.

p1.patch fixes testEnd case reported yesterday

After running unittest it seems that also other case is broken (testAl -- if 
there is just one data item on the line, enclosed in quotes). Patch p2 fixes 
it, but should be checked for side-effects.

--
Added file: http://bugs.python.org/file19799/fix.tar.gz

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



[issue10521] str methods don't accept non-BMP fillchar on a narrow Unicode build

2010-11-24 Thread Alexander Belopolsky

Alexander Belopolsky belopol...@users.sourceforge.net added the comment:

On Wed, Nov 24, 2010 at 3:37 PM, Marc-Andre Lemburg
rep...@bugs.python.org wrote:
..
 I don't think we should change that for the formatting methods.

That's a reasonable position.  What about

'Lo'
 '\N{OLD ITALIC LETTER A}'.isalpha()
False

the str.isalpha() method is underspecified in the reference manual,
but a comment in unicodectype.c describes Py_UNICODE_ISALPHA as
follows:

/* Returns 1 for Unicode characters having the category 'Ll', 'Lu',
'Lt',
   'Lo' or 'Lm',  0 otherwise. */

I don't have a wide build handy, but I am fairly sure  '\N{OLD ITALIC
LETTER A}'.isalpha() would produce True there.  The result above is
simply consequence of surrogates considered to be non-letters:

[False, False]

--

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



[issue10523] argparse has problem parsing option files containing empty rows

2010-11-24 Thread Michal Pomorski

New submission from Michal Pomorski misi...@gmail.com:

When using the argument file option, i.e  @file_with_arguments the following 
problems arise:

1. argparse crashes when the file contains an empty line (even if it is the 
last line) - arg_string[0] is done when arg_string is empty. 
This is caused by the use of splitlines() instead of strip().split() in the 
function _read_args_from_files(self, arg_strings)

2. options separated by spaces in one row are passed as a single long option, 
meaning each option has to be on its own line.
This is caused by the new function 
   def convert_arg_line_to_args(self, arg_line):
return [arg_line]
   which should be 
return arg_line.split()


Both problems are caused by a modification in
def _read_args_from_files(self, arg_strings)
The version from argparse 1.0.1 worked well and was correct, it should be 
sufficient to reverse the changes done from 1.0.1 to 1.1.

Here is the old implementation:

def _read_args_from_files(self, arg_strings):
# expand arguments referencing files
new_arg_strings = []
for arg_string in arg_strings:

# for regular arguments, just add them back into the list
if arg_string[0] not in self.fromfile_prefix_chars:
new_arg_strings.append(arg_string)

# replace arguments referencing files with the file content
else:
try:
args_file = open(arg_string[1:])
try:
arg_strings = args_file.read().strip().split()
arg_strings = self._read_args_from_files(arg_strings)

new_arg_strings.extend(arg_strings)
finally:
args_file.close()
except IOError:
err = _sys.exc_info()[1]
self.error(str(err))

# return the modified argument list
return new_arg_strings

--
components: Library (Lib)
messages: 122314
nosy: Michal.Pomorski
priority: normal
severity: normal
status: open
title: argparse has problem parsing option files containing empty rows
versions: Python 2.7

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



[issue10523] argparse has problem parsing option files containing empty rows

2010-11-24 Thread Michal Pomorski

Changes by Michal Pomorski misi...@gmail.com:


--
type:  - crash

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



[issue10515] csv sniffer does not recognize quotes at the end of line

2010-11-24 Thread Ned Deily

Changes by Ned Deily n...@acm.org:


Added file: http://bugs.python.org/file19800/test.py

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



[issue10524] Patch to add Pardus to supported dists in platform

2010-11-24 Thread Onur Küçük

New submission from Onur Küçük o...@pardus.org.tr:

Attached patch adds Pardus to supported dists in platform. Diff is against 
current release27-maint, but it applies to release31-maint and py3k too.

--
components: Library (Lib)
files: pardus_platform_release27-maint.patch
keywords: patch
messages: 122315
nosy: zaburt
priority: normal
severity: normal
status: open
title: Patch to add Pardus to supported dists in platform
Added file: 
http://bugs.python.org/file19801/pardus_platform_release27-maint.patch

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



[issue10515] csv sniffer does not recognize quotes at the end of line

2010-11-24 Thread Ned Deily

Changes by Ned Deily n...@acm.org:


--
keywords: +patch
Added file: http://bugs.python.org/file19802/p1.patch

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



[issue10515] csv sniffer does not recognize quotes at the end of line

2010-11-24 Thread Ned Deily

Ned Deily n...@acm.org added the comment:

(Thanks. I've unpacked and uploaded the three files from your tar file.)

--
stage: unit test needed - patch review
Added file: http://bugs.python.org/file19803/p2.patch

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



[issue10299] Add index with links section for built-in functions

2010-11-24 Thread Ezio Melotti

Ezio Melotti ezio.melo...@gmail.com added the comment:

Backported in r86735 (3.1) and r86736 (2.7).

--
resolution:  - fixed
stage: patch review - committed/rejected
status: open - closed

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



[issue5800] make wsgiref.headers.Headers accept empty constructor

2010-11-24 Thread SilentGhost

SilentGhost michael.mischurow+...@gmail.com added the comment:

Here is the correction for the docs. I would love to see this making it into 
3.2 release.

--
Added file: http://bugs.python.org/file19804/wsgiref.rst.diff

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



[issue8879] Implement os.link on Windows

2010-11-24 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc amaur...@gmail.com added the comment:

The patch uses the ANSI version, and converts the filename from unicode to 
bytes; this will fail for names that cannot be encoded with the mbcs codec.

All other functions in the posix module first try the Wide version of the win32 
API, and use the ANSI version as a fallback, when the argument is a bytes 
string. PyUnicode_FSConverter should be avoided on Windows. See posix_mkdir() 
for a good example.

Here is an example that fails on a Western Windows (where ANSI=cp1252).  Note 
that even the file name is not encodable in mbcs, it is correctly displayed in 
the Explorer for example.

 name = \u65e5\u672c # Japan
 open(name, w).close()   # Appears correctly in the explorer
 import os
 os.link(name, name + _1)
Traceback (most recent call last):
  File stdin, line 1, in module
UnicodeEncodeError: 'mbcs' codec can't encode characters in position 0--1: 
invalid character

--
nosy: +amaury.forgeotdarc
status: closed - open

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



[issue10517] test_concurrent_futures crashes with Fatal Python error: Invalid thread state for this thread

2010-11-24 Thread Dave Malcolm

Dave Malcolm dmalc...@redhat.com added the comment:

FWIW, I was able to do an almost full run of regrtest on this box with:
  -x test_multiprocessing test_concurrent_futures

Other than those two, all tests pass.

So _something_ is going wrong w.r.t. threads, though I'm not sure what at this 
stage.

--

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



[issue3063] memory leak in random number generation

2010-11-24 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc amaur...@gmail.com added the comment:

For the record, this was finally fixed with issue2862: gc.collect() now clears 
the free-lists during the collection of the highest generation.

--
nosy: +amaury.forgeotdarc

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



[issue9509] argparse FileType raises ugly exception for missing file

2010-11-24 Thread SilentGhost

SilentGhost michael.mischurow+...@gmail.com added the comment:

Attached patch with the try-except clause as suggested by Steven, Doug's 
example now produces the following output:

$ ./python argparse_filetype_error.py
usage: argparse_filetype_error.py [-h] [-i I]
argparse_filetype_error.py: error: no such file or directory 
'file-does-not-exist.txt'

I have digressed and fixed an issue with _bufsize 0. I thought it would be just 
natural to default to -1 which is default buffering size for a simple open call 
anyway. It also makes for a cleaner try-except clause. All tests pass, 
including akira's.

--
nosy: +SilentGhost
Added file: http://bugs.python.org/file19805/argparse.py.diff

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



[issue5800] make wsgiref.headers.Headers accept empty constructor

2010-11-24 Thread Ramiro Batista da Luz

Ramiro Batista da Luz ramiro...@gmail.com added the comment:

I reviewed the patch.

 - I applied all the patchs(3 files).
 - Ran make and make html in the Doc directory.
 - Ran the test_wsgiref.py
 - Ran the python interpreter and typed the suggested code:

 from wsgiref.headers import Headers
 headers = Headers([])
 headers.add_header('Content-Type', 'text/plain')
 headers = Headers()
 headers.add_header('Content-Type', 'text/plain')
 

 - Read the documentation in a web browser.

All in the revision 86742.

--

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



[issue10027] os.lstat/os.stat don't set st_nlink on Windows

2010-11-24 Thread Hirokazu Yamamoto

Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp added the comment:

Thank you for commit!

--

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



[issue10154] locale.normalize strips - from UTF-8, which fails on Mac

2010-11-24 Thread MunSic JEONG

Changes by MunSic JEONG rus...@gmail.com:


--
nosy: +ruseel

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



[issue9509] argparse FileType raises ugly exception for missing file

2010-11-24 Thread akira

akira 4kir4...@gmail.com added the comment:

I've added tests for readonly files. SilentGhost's patch doesn't handle this 
case.

--
Added file: http://bugs.python.org/file19806/test_argparse.diff

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



[issue9509] argparse FileType raises ugly exception for missing file

2010-11-24 Thread akira

akira 4kir4...@gmail.com added the comment:

Attached patch for argparse.py (argparse.diff -- without tests, see tests in 
test_argparse.diff) where ValueError is raises in FileType.__call__ and 
additional details printed on ArgumentError

--
Added file: http://bugs.python.org/file19807/argparse.diff

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



[issue9509] argparse FileType raises ugly exception for missing file

2010-11-24 Thread akira

akira 4kir4...@gmail.com added the comment:

updated patch on http://codereview.appspot.com/3251041/

--

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



[issue8481] doc: ctypes no need to explicitly allocate writable memory with Structure

2010-11-24 Thread Ray.Allen

Ray.Allen ysj@gmail.com added the comment:

I think not only Structures but also other ctypes can be passed with byref() to 
functions expecting pointer to mutable memory.

--
nosy: +ysj.ray

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



[issue10521] str methods don't accept non-BMP fillchar on a narrow Unicode build

2010-11-24 Thread Alexander Belopolsky

Alexander Belopolsky belopol...@users.sourceforge.net added the comment:

On Wed, Nov 24, 2010 at 3:37 PM, Marc-Andre Lemburg
rep...@bugs.python.org wrote:
..
 I don't think we should change that for the formatting methods.

That's a reasonable position.  What about

 unicodedata.category('\N{OLD ITALIC LETTER A}')
'Lo'
 '\N{OLD ITALIC LETTER A}'.isalpha()
False

the str.isalpha() method is underspecified in the reference manual,
but a comment in unicodectype.c describes Py_UNICODE_ISALPHA as
follows:

/* Returns 1 for Unicode characters having the category 'Ll', 'Lu',
'Lt',
  'Lo' or 'Lm',  0 otherwise. */

I don't have a wide build handy, but I am fairly sure  '\N{OLD ITALIC
LETTER A}'.isalpha() would produce True there.  The result above is
simply consequence of surrogates considered to be non-letters:

 [c.isalpha() for c in '\N{OLD ITALIC LETTER A}']
[False, False]

--

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



[issue10521] str methods don't accept non-BMP fillchar on a narrow Unicode build

2010-11-24 Thread Alexander Belopolsky

Alexander Belopolsky belopol...@users.sourceforge.net added the comment:

Here is another str method not ready for non-BMP chars:


 u = '\U00010140'
 u.translate({ord(u):ord('A')})
'ŀ'

(expected 'A')

 u = 'B'
 u.translate({ord(u):ord('A')})
'A'

--

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



[issue10402] sporadic test_bsddb3 failures

2010-11-24 Thread Hirokazu Yamamoto

Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp added the comment:

This should be duplicate of #3892.

I suppose timeout in this test might be very short. Refers to
http://www.systomath.eu/doc/BerkeleyDb-4.7/html/api_c/rep_timeout.html
timeout is in microseconds, so
  self.dbenvMaster.rep_set_timeout(db.DB_REP_CONNECTION_RETRY,100123)
means only 100 milliseconds. (I don't know BSDDB entirely, so maybe this
might be valid value though)

--
nosy: +ocean-city

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



[issue10525] Added mouse and colour support to Game of Life curses demo

2010-11-24 Thread Dafydd Crosby

New submission from Dafydd Crosby dtcr...@gmail.com:

I was just going through the source of the curses demo Game of Life (life.py), 
and saw that the TODO had mouse support and colour.

I created a patch that adds those two wishlist items. Given that mouse support 
and the use of curses.flash() are missing from the demo programs, I think it's 
a bit of an upgrade ;-)

--
components: Demos and Tools
files: mouse_and_colour.diff
keywords: patch
messages: 122332
nosy: Dafydd.Crosby
priority: normal
severity: normal
status: open
title: Added mouse and colour support to Game of Life curses demo
type: behavior
Added file: http://bugs.python.org/file19808/mouse_and_colour.diff

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



[issue9014] Incorrect documentation of the PyObject_HEAD macro

2010-11-24 Thread Ray.Allen

Ray.Allen ysj@gmail.com added the comment:

Additionally, I prefer move the discussion of Py_TRACE_REFS under the 
documentation of PyObject: 
http://docs.python.org/dev/py3k/c-api/structures.html?highlight=pyobject_head#PyObject,
 since they'are connected directly. The doc of PyObject_HEAD should only saying 
like expands to a PyObject variable.

--
nosy: +ysj.ray

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



[issue10525] Added mouse and colour support to Game of Life curses demo

2010-11-24 Thread Senthil Kumaran

Senthil Kumaran orsent...@gmail.com added the comment:

On Thu, Nov 25, 2010 at 05:44:21AM +, Dafydd Crosby wrote:
 I created a patch that adds those two wishlist items. Given that
 mouse support and the use of curses.flash() are missing from the
 demo programs, I think it's a bit of an upgrade ;-)
 

Pretty cool. Do you think, the '*' themselves should be colored or
randomly colored? ( No, I have not seen a Game of 'Random-Colored' life )

--
nosy: +orsenthil
title: Added mouse and colour support to Game of Life curses demo - Added 
mouse and colour support to Game of Life curses  demo

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



[issue2986] difflib.SequenceMatcher not matching long sequences

2010-11-24 Thread Terry J. Reedy

Terry J. Reedy tjre...@udel.edu added the comment:

Since I am not sure I will be able to do any more before the 3.2b1 feature 
freeze, I went ahead with the minimal patch after checking the differences from 
the 2.7 version and redoing the Misc/News entry.
(I suspect putting a new entry immediately after the appropriate heading, 
instead of between other headings, is probably least likely to fatally conflict 
with intervening changes.) r86745 Thank you Eli and Simon.

Leaving this open for possible further changes.

--
type: behavior - feature request

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



[issue10521] str methods don't accept non-BMP fillchar on a narrow Unicode build

2010-11-24 Thread Ezio Melotti

Ezio Melotti ezio.melo...@gmail.com added the comment:

I think that methods like str.isalpha can and should be fixed. Since 
_PyUnicode_IsAlpha now accepts a Py_UCS4, the body of unicode_isalpha can be 
changed to convert normal chars and surrogates pairs to a Py_UCS4 before 
calling Py_UNICODE_ISALPHA.
The attached patch is a proof of concept of this approach and returns True for 
'\N{OLD ITALIC LETTER A}'.isalpha() on a narrow build.
It still has a number of issues that should be addressed (check for narrow 
builds, check for lone surrogates, check for high surrogate at the end of a 
string, fix compiler warnings ...) but it should be good enough as a PoC.

I would also suggest to introduce a set of macros to handle surrogates (e.g. 
detect, combine) and use it in all the functions that need to work with them.

--
keywords: +patch
Added file: http://bugs.python.org/file19809/issue10521-isalpha.diff

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



[issue2986] difflib.SequenceMatcher not matching long sequences

2010-11-24 Thread Simon Cross

Simon Cross hodges...@gmail.com added the comment:

My vote is that this bug be closed and a new feature request be opened. Failing 
that, it would be good to have a concise description of what else we would like 
done (and the priority should be downgraded, I guess).

--

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



[issue2986] difflib.SequenceMatcher not matching long sequences

2010-11-24 Thread Eli Bendersky

Eli Bendersky eli...@gmail.com added the comment:

Terry, I agree with Simon re closing and opening a new feature request. This 
issue has too much baggage in it, and you we always link to it. A new feature 
request should be opened strictly for 3.2

If you want I can close this issue and open a new one, but I'm waiting for your 
approval.

--

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



[issue10521] str methods don't accept non-BMP fillchar on a narrow Unicode build

2010-11-24 Thread Alexander Belopolsky

Alexander Belopolsky belopol...@users.sourceforge.net added the comment:

Here is another proof of concept patch for the isalpha issue that introduces a 
higher level abstraction macro - Py_UNICODE_NEXT.  It should be possible to 
reuse this macro in all isxyz methods and other places where surrogates are 
currently processed.  I should be possible to come up with a pure macro 
definition of Py_UNICODE_NEXT.

--
Added file: http://bugs.python.org/file19810/issue10521-unicode-next.diff

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



[issue10521] str methods don't accept non-BMP fillchar on a narrow Unicode build

2010-11-24 Thread Ezio Melotti

Changes by Ezio Melotti ezio.melo...@gmail.com:


--
nosy: +amaury.forgeotdarc

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



[issue10521] str methods don't accept non-BMP fillchar on a narrow Unicode build

2010-11-24 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc amaur...@gmail.com added the comment:

issue9200 already proposes a similar change to str.is* methods.

--

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



[issue8879] Implement os.link on Windows

2010-11-24 Thread Hirokazu Yamamoto

Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp added the comment:

r86733 introduces st_ino setup in attribute_data_to_stat(),
but Fild ID is not guaranteed to be same when file is not opened.
So I think it's meaningful only for os.fstat().

Please see
http://msdn.microsoft.com/en-us/library/aa363788%28v=VS.85%29.aspx

--

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