[issue14676] DeprecationWarning missing in default warning filters documentation

2012-04-27 Thread Ezio Melotti

Changes by Ezio Melotti :


--
keywords: +easy
nosy: +ezio.melotti
stage:  -> patch review
type:  -> enhancement

___
Python tracker 

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



[issue1521950] shlex.split() does not tokenize like the shell

2012-04-27 Thread Ezio Melotti

Changes by Ezio Melotti :


--
nosy: +ezio.melotti

___
Python tracker 

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



[issue14656] Add a macro for unreachable code

2012-04-27 Thread Ezio Melotti

Changes by Ezio Melotti :


--
nosy: +ezio.melotti

___
Python tracker 

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



[issue13934] sqlite3 test typo

2012-04-27 Thread Ezio Melotti

Changes by Ezio Melotti :


--
nosy: +ezio.melotti

___
Python tracker 

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



[issue14673] add sys.implementation

2012-04-27 Thread Martin v . Löwis

Martin v. Löwis  added the comment:

When I added sys.subversion, people requested that it shall contain the CPython 
string. When sys._mercurial was introduced, it copied that. So there are plenty 
of ways already to figure out that it is CPython which you are using.

--

___
Python tracker 

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



[issue8767] Configure: Cannot disable unicode

2012-04-27 Thread Stefano Taschini

Stefano Taschini  added the comment:

Here's the patch. It has four goals:

   1. Allow ./configure --disable-unicode to work;

   2. Have the naked interpreter running with no unicode support;

   3. Be able to compile most of the stdlib;

   4. Be able to run the test suite.

The one-line modification to configure.ac (and consequentley autoreconf'ed 
configure) achieve goal 1.

The changes to the three C files (which are nothing more than a few #ifdef 
Py_USING_UNICODE) achieve goal 2: you can run "./python -S".

The fix for site.py takes care of posixpath, glob, (and a few other modules) 
and makes it possible to compile most of the C extensions of the stdlib, goal 3 
-- The compilation process under posix requires posixpath and glob to work.  
The most notable extension that won't be built is, unsurprisingly enough, io. 
Fortunately it does not play in Python 2.7 the central role it plays in Python 
3. Still, a few other modules depend on it and won't be usable.

The changes in Lib/test/script_helper.py and Lib/test/test_support.py make it 
possible to run the test suite. Roughly one third of the tests will fail, 
though, but I think that's acceptable. In relation to my purpose for submitting 
this patch ( #1065986 ) , I note that test_pydoc runs and succeeds.

--
keywords: +patch
Added file: http://bugs.python.org/file25377/issue8767.patch

___
Python tracker 

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



[issue2387] cStringIO and unicode

2012-04-27 Thread Florent Xicluna

Florent Xicluna  added the comment:

It seems the documentation is not enough accurate.

"Unlike the StringIO module, this module is not able to accept Unicode strings 
that cannot be encoded as plain ASCII strings."

I understand that u'foo' can be encoded as plan ASCII, however it does not 
behave correctly with cStringIO.


Python 2.7.3 (default, Apr 14 2012, 01:49:35) 
>>> from cStringIO import StringIO
>>> StringIO(u'foo').read()
'f\x00o\x00o\x00'
>>>

--
nosy: +flox
resolution: rejected -> 
status: closed -> open
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



[issue14673] add sys.implementation

2012-04-27 Thread Eric Snow

Eric Snow  added the comment:

An updated patch using a dict.  (FYI, I have the PEP up on python-ideas.)

--
Added file: http://bugs.python.org/file25378/sys_implementation_2.diff

___
Python tracker 

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



[issue14610] configure script hangs on pthread verification and PTHREAD_SCOPE_SYSTEM verification on Ubuntu

2012-04-27 Thread Charles-François Natali

Charles-François Natali  added the comment:

> Yes, this code is hanging in my system. I'm posting the strace output.
>
> If there's any other information that may be helpful I'll happily provide it.

Well, in that case it's a bug in your pthread implementation:
returning from main() with detached threads should terminate the
process.

You should report this to your distribution bug tracker.

--

___
Python tracker 

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



[issue14681] Problem in installation of version 2.3.5 on mac OS X 10.5.8

2012-04-27 Thread rampythonnewbie

New submission from rampythonnewbie :

Hello,

I am working on an application that runs only on Python version 2.3.5.  
Presently i am using mac os x 10.5.8. It came with pre-installed python 2.5.1. 
Now, when i am running that application with existing version, it is showing 
the following error..

"RuntimeWarning: Python C API version mismatch for module _AE: This Python has 
API version 1013, module _AE has version 1012."

So, I want to install version 2.3.5 on my machine along with existing python 
2.5.1 unchanged.

I tried the following procedure to install:

1. Downloaded  "Python-2.3.5.tgz" from www.python.org
2. Unpacked it with "tar -zxvf Python-2.3.5.tgz" command.
3. ./configure --prefix=/users/myhomedir/python23
4. make altinstall

But, I am getting following error:

"gcc  -u __dummy -u _PyMac_Error -framework System -framework CoreServices 
-framework Foundation -o python.exe \
Modules/python.o \
libpython2.3.a -ldl  
Undefined symbols:
  "__dummy", referenced from:
ld: symbol(s) not found
collect2: ld returned 1 exit status
make: *** [python.exe] Error 1"


Please help me to know how to install multiple versions of python on mac OS X 
10.5 without using macports and virtualenv...

Thanks in advance

--
messages: 159446
nosy: rampythonnewbie
priority: normal
severity: normal
status: open
title: Problem in installation of version 2.3.5 on mac OS X 10.5.8

___
Python tracker 

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



[issue11618] Locks broken wrt timeouts on Windows

2012-04-27 Thread Kristján Valur Jónsson

Kristján Valur Jónsson  added the comment:

Antoine: of course, sorry for rushing you.

Martin, 
This is an XP patch.  The "vista" option is put in there as a compile time 
option, and disabled by hand.  I'm not adding any apis that weren't already in 
use since the new gil (windows Semaphores).

Incidentally, we should make sure that python defines NTDDI_VERSION to 
NTDDI_WINXP (0x0501), either in the sources before including "windows" 
(tricky) or in the solution (probably in the .prefs files)

This will ensure that we don't attempt to use non-existent features, unless we 
dynamically check for them.

--

___
Python tracker 

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



[issue13210] Support Visual Studio 2010

2012-04-27 Thread Richard Oudkerk

Richard Oudkerk  added the comment:

The problems with error numbers seem to be caused by the addition of a new 
section in errno.h:

/* POSIX SUPPLEMENT */
#define EADDRINUSE  100
#define EADDRNOTAVAIL   101
...
#define ETXTBSY 139
#define EWOULDBLOCK 140

Of these the only ones which clash with WSA equivalents are

EADDRINUSE
EADDRNOTAVAIL
EAFNOSUPPORT
EALREADY
ECONNABORTED
ECONNREFUSED
ECONNRESET
EDESTADDRREQ
EHOSTUNREACH
EINPROGRESS
EISCONN
ELOOP
EMSGSIZE
ENETDOWN
ENETRESET
ENETUNREACH
ENOBUFS
ENOPROTOOPT
ENOTCONN
ENOTSOCK
EOPNOTSUPP
EPROTONOSUPPORT
EPROTOTYPE
ETIMEDOUT
EWOULDBLOCK

I think the simplest solution is just to undefine these new "clashing" 
constants near the top of Modules/errnomodule.c and Objects/exceptions.c so 
that we fall back to the preferred WSA equivalents later.

I have tried this by cloning sandbox/vs2010port, reverting 

Objects/exceptions.c
Modules/posixmodule.c
Modules/errnomodule.c
Modules/_io/fileio.c

to "ancestor(vs2010,default)" and then applying the attached patch.  I get four 
failures:

test_distutils
test_email
test_import
test_packaging

This is an improvement over the tip of vs2010 (2fc5398b3115) where I get two 
additional failures

test_importlib
test_subprocess

--
Added file: http://bugs.python.org/file25379/wsa_undef.patch

___
Python tracker 

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



[issue14339] Optimizing bin, oct and hex

2012-04-27 Thread STINNER Victor

STINNER Victor  added the comment:

> You may call assert(_PyUnicode_CheckConsistency(v, 1)) to ensure
> that the newly created string is "consistent" (see the function
> for the details).

Done in the following changeset:

changeset:   76560:3bdcf0cab164
parent:  76558:5fea362b92fc
user:Victor Stinner 
date:Thu Apr 26 00:37:21 2012 +0200
files:   Objects/longobject.c
description:
long_to_decimal_string() and _PyLong_Format() check the consistency of newly
created strings using _PyUnicode_CheckConsistency() in debug mode

--

___
Python tracker 

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



[issue2387] cStringIO and unicode

2012-04-27 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

This was fixed in 2.7.3 actually (27ae7d4e1983):


Python 2.7.3+ (2.7:8b8b580e3fd3, Apr 25 2012, 17:24:51) 
[GCC 4.5.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from cStringIO import StringIO
>>> StringIO(u'foo').read()
'foo'

--
nosy: +pitrou
resolution:  -> duplicate
stage:  -> committed/rejected
status: open -> closed
superseder:  -> shlex (or perhaps cStringIO) and unicode strings

___
Python tracker 

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



[issue8767] Configure: Cannot disable unicode

2012-04-27 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
nosy: +loewis

___
Python tracker 

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



[issue13621] Unicode performance regression in python3.3 vs python3.2

2012-04-27 Thread STINNER Victor

STINNER Victor  added the comment:

> "Andrew"+"Dalke" (*1000): -23.076923%

/python -m timeit '"Andrew"+"Dalke"' gives me very close results with Python 
3.2 (wide mode) and 3.3. Somethings like 0.15 vs 0.151 microseconds.

But using longer (ASCII) strings, Python 3.3 is 2.6x faster:

$ python3.2 -m timeit -s 'a="A"*1000; b="B"*1000' 'a+b'
100 loops, best of 3: 0.39 usec per loop
$ python3.3 -m timeit -s 'a="A"*1000; b="B"*1000' 'a+b'
1000 loops, best of 3: 0.151 usec per loop

--

___
Python tracker 

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



[issue1065986] Fix pydoc crashing on unicode strings

2012-04-27 Thread Stefano Taschini

Stefano Taschini  added the comment:

Here's my patch, along the lines of the work-around I posted earlier. A few 
remarks:

   1. The modifications in pydoc only touch the four console pagers and the 
html pager (html.page).

   2. A module-wide default encoding is initialized from 
locale.getpreferredencoding. Pagers that write to a file use the encoding of 
that file if defined, else they use the module-wide default. The html pager 
uses ascii. All of them use xml character entity replacement as fall-back.

   3. An additional set of tests has been added to test.test_pydoc to verify 
the behaviour of the modifications.

   4. No functionality is broken if Python is built without unicode support.

--
Added file: http://bugs.python.org/file25380/issue1065986.patch

___
Python tracker 

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



[issue14681] Problem in installation of version 2.3.5 on mac OS X 10.5.8

2012-04-27 Thread rampythonnewbie

rampythonnewbie  added the comment:

Hello,

I am working on an application that runs only on Python version 2.3.5.  
Presently i am using mac os x 10.5.8. It came with pre-installed python 2.5.1. 
Now, when i am running that application with existing version, it is showing 
the following error..

"RuntimeWarning: Python C API version mismatch for module _AE: This Python has 
API version 1013, module _AE has version 1012."

So, I want to install version 2.3.5 on my machine along with existing python 
2.5.1 unchanged.

I tried the following procedure to install:

1. Downloaded  "Python-2.3.5.tgz" from www.python.org
2. Unpacked it with "tar -zxvf Python-2.3.5.tgz" command.
3. ./configure --prefix=/users/myhomedir/python23
4. make altinstall

But, I am getting following error:

"gcc  -u __dummy -u _PyMac_Error -framework System -framework CoreServices 
-framework Foundation -o python.exe \
Modules/python.o \
libpython2.3.a -ldl  
Undefined symbols:
  "__dummy", referenced from:
ld: symbol(s) not found
collect2: ld returned 1 exit status
make: *** [python.exe] Error 1"


Please help me to know how to install multiple versions of python on mac OS X 
10.5 without using macports and virtualenv...

Thanks in advance

--
components: +Installation

___
Python tracker 

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



[issue10976] json.loads() raises TypeError on bytes object

2012-04-27 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

> According to current implementation this is acceptable.

Then perhaps auto-detection can be restricted to strict mode? Non-strict mode 
would always use utf-8.
Or we can just skip auto-detection altogether (I don't think many people 
produce utf-16 or utf-32 JSON; that would be a waste of bandwidth for no 
obvious benefit).

--

___
Python tracker 

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



[issue14059] Implement multiprocessing.Barrier

2012-04-27 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

RawValue uses ctypes, right? That's problematic for platforms which don't 
support ctypes.

--
nosy: +pitrou

___
Python tracker 

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



[issue14681] Problem in installation of version 2.3.5 on mac OS X 10.5.8

2012-04-27 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Both 2.3.5 and 2.5.1 are very old versions, and are unsupported. We would only 
take bug reports for Python 2.7 and 3.2.
Furthermore, it is not obvious that you are actually reporting a bug; it sounds 
like you're looking for help instead, which can be asked for on 
http://mail.python.org/pipermail/python-list/

--
nosy: +ned.deily, pitrou
resolution:  -> out of date
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



[issue14682] Backport missing errnos to 2.7

2012-04-27 Thread Hynek Schlawack

New submission from Hynek Schlawack :

In order to fix issue14662, we need to back port at least ENOTSUP to 2.7 
(presuming we don’t want to check for magic numbers).

The question is, whether we should back port all/most of them when we’re at it? 
There doesn’t seem to be much harm to it.

--
assignee: ronaldoussoren
components: IO, Library (Lib), Macintosh
messages: 159458
nosy: benjamin.peterson, eric.araujo, hynek, ned.deily, ronaldoussoren
priority: normal
severity: normal
status: open
title: Backport missing errnos to 2.7
type: enhancement
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



[issue11618] Locks broken wrt timeouts on Windows

2012-04-27 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

> This is an XP patch.  The "vista" option is put in there as a compile
> time option, and disabled by hand.  I'm not adding any apis that
> weren't already in use since the new gil (windows Semaphores).

Martin means that you shouldn't use #ifdef's but runtime detection, so that we 
can provide a single installer for all Windows versions.

--

___
Python tracker 

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



[issue14642] Fix importlib.h build rule to not depend on hg

2012-04-27 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset b3d3f3238c13 by Martin v. Loewis in branch 'default':
Issue #14642: Add "hg touch" extension, and "make touch" target.
http://hg.python.org/cpython/rev/b3d3f3238c13

--

___
Python tracker 

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



[issue14683] os.path.isdir.__name__ is "_isdir" on Windows (2.7.3)

2012-04-27 Thread Luke McCarthy

New submission from Luke McCarthy :

This caused something to break in our code. I know, maybe it shouldn't rely on 
that.

--
messages: 159460
nosy: shaurz
priority: normal
severity: normal
status: open
title: os.path.isdir.__name__ is "_isdir" on Windows (2.7.3)
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



[issue13621] Unicode performance regression in python3.3 vs python3.2

2012-04-27 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

But try ASCII+UCS2 or ASCII+UCS4.

--

___
Python tracker 

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



[issue13210] Support Visual Studio 2010

2012-04-27 Thread Richard Oudkerk

Richard Oudkerk  added the comment:

According to http://msdn.microsoft.com/en-us/library/5814770t.aspx the 
"supported" errno values in VS2010 are

E2BIG EACCES EAGAIN EBADF ECHILD EDEADLOCK EDOM EEXIST EILSEQ
EINVAL EMFILE ENOENT ENOEXEC ENOMEM ENOSPC ERANGE EXDEV STRUNCATE

of which the ones with WSA equivalents are

EACCES EBADF EINVAL EMFILE

The other constants listed in errno.h are for "compatibility with POSIX".

I take this to mean that the only errno values which will be set by libc are on 
the supported list.  We should not change any of these, but I think we can 
redefine the others to WSA equivalents without a problem.

--

___
Python tracker 

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



[issue14339] Optimizing bin, oct and hex

2012-04-27 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

I sent the signed form. Martin, sorry for the delay. Mark, sorry, that
involuntarily let you down.

--

___
Python tracker 

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



[issue11618] Locks broken wrt timeouts on Windows

2012-04-27 Thread Kristján Valur Jónsson

Kristján Valur Jónsson  added the comment:

I understand what he meant, but that wasn't the intent of the patch.  The patch 
is to use simulated critical sections using a semaphore, same as the new GIL 
implementation already does.

If you want dynamic runtime detection, then this is a feature request :)
I'm not sure we do it elsewhere in Python, and the benefit is doubtful...

--

___
Python tracker 

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



[issue11618] Locks broken wrt timeouts on Windows

2012-04-27 Thread Brian Curtin

Brian Curtin  added the comment:

We do the runtime checks for a few things in winreg as well as the os.symlink 
implementation and i think a few other supplemental functions for symlinking.

--

___
Python tracker 

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



[issue14682] Backport missing errnos to 2.7

2012-04-27 Thread Jesús Cea Avión

Jesús Cea Avión  added the comment:

Benjamin should talk about this, but I am +1 to backport the missing DEFINEs. 
In fact, hardwired values are actually a bug, as reported in the linked issue.

--
nosy: +jcea

___
Python tracker 

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



[issue4489] shutil.rmtree is vulnerable to a symlink attack

2012-04-27 Thread Hynek Schlawack

Hynek Schlawack  added the comment:

Anybody working on this one? I’d give it a shot otherwise.

--

___
Python tracker 

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



[issue11618] Locks broken wrt timeouts on Windows

2012-04-27 Thread Kristján Valur Jónsson

Kristján Valur Jónsson  added the comment:

Ok, but the patch as provided would become more compliated.  For general 
consumption, the primitives would need to become dynamically allocated 
structures, and so on.  I'm not sure that its worth the effort, but I can have 
a look.

(I thought the patch was radical enough, tbh.)

--

___
Python tracker 

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



[issue10976] json.loads() raises TypeError on bytes object

2012-04-27 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

Related to this question is a question about errors. How to inform the user, if 
an error occurred in the decoding with detected encoding? Leave 
UnicodeDecodeError or convert it to ValueError? If there is a syntax error in 
JSON -- exception will refer to the position in the decoded string, we should 
to translate it to the position in the original binary string?

--

___
Python tracker 

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



[issue13621] Unicode performance regression in python3.3 vs python3.2

2012-04-27 Thread Martin v . Löwis

Martin v. Löwis  added the comment:

I'm closing this as "won't fix". The only way to get back the exact performance 
of 3.2 is to restore to the 3.2 implementation, which clearly is no option. I 
don't consider performance regressions in micro benchmarks inherently as a bug.

If there is a specific regression which people think constitutes a real 
problem, a separate bug report should be submitted.

--
resolution:  -> wont fix
status: open -> closed

___
Python tracker 

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



[issue14683] os.path.isdir.__name__ is "_isdir" on Windows (2.7.3)

2012-04-27 Thread Martin v . Löwis

Martin v. Löwis  added the comment:

This is not a bug. Due to function name aliasing, this can easily happen, and 
the function's name should be considered as an implementation detail.

--
nosy: +loewis
resolution:  -> wont fix
status: open -> closed

___
Python tracker 

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



[issue14682] Backport missing errnos to 2.7

2012-04-27 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

That's like introducing a new API, and therefore it should be limited to 
feature releases.

--
nosy: +loewis, pitrou

___
Python tracker 

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



[issue8767] Configure: Cannot disable unicode

2012-04-27 Thread Martin v . Löwis

Martin v. Löwis  added the comment:

I find the injection of a fake unicode class too hacky. Instead, I suggest that 
each module does

try:
_unicode = unicode
except NameError:
# no unicode support in this build
class _unicode:
pass

and then have the isinstance checks look for _unicode

--

___
Python tracker 

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



[issue14682] Backport missing errnos to 2.7

2012-04-27 Thread Hynek Schlawack

Hynek Schlawack  added the comment:

So what does that mean for issue14662? Backport only ENOTSUP, check against 
“45” or “won't fix”?

--

___
Python tracker 

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



[issue14672] Windows installer: add desktop shortcut(s)

2012-04-27 Thread Martin v . Löwis

Martin v. Löwis  added the comment:

Is it really the case that novice users fail to understand the Start menu?

--
nosy: +loewis

___
Python tracker 

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



[issue14682] Backport missing errnos to 2.7

2012-04-27 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

> So what does that mean for issue14662? Backport only ENOTSUP, check
> against “45” or “won't fix”?

Then, backporting only ENOTSUP would be a reasonable solution.
Or perhaps backport it as a private attribute (_ENOTSUP).

--

___
Python tracker 

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



[issue14672] Windows installer: add desktop shortcut(s)

2012-04-27 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
nosy: +brian.curtin

___
Python tracker 

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



[issue14682] Backport missing errnos to 2.7

2012-04-27 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

I think it's okay to just backport ENOTSUP.

--

___
Python tracker 

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



[issue13903] New shared-keys dictionary implementation

2012-04-27 Thread Mark Shannon

Mark Shannon  added the comment:

Decref cached-keys when type is deallocated.

Patch attached.

--
Added file: http://bugs.python.org/file25381/cached_keys.patch

___
Python tracker 

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



[issue14662] shutil.move broken in 2.7.3 on OSX (chflags fails)

2012-04-27 Thread Hynek Schlawack

Hynek Schlawack  added the comment:

This is a fix for 2.7.

As Benjamin said in http://bugs.python.org/issue14682#msg159477 it’s okay to 
back port ENOTSUP, I did it as part of the patch here. I wasn’t sure whether we 
should document it?

I’m porting the patch to tip right now, reviews/opinions welcome.

--
keywords: +patch
nosy: +pitrou
Added file: http://bugs.python.org/file25382/expand-chflags-catch-2.7.diff

___
Python tracker 

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



[issue14662] shutil.move broken in 2.7.3 on OSX (chflags fails)

2012-04-27 Thread Hynek Schlawack

Hynek Schlawack  added the comment:

This one is against tip.

--
Added file: http://bugs.python.org/file25383/expand-chflags-catch-tip.diff

___
Python tracker 

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



[issue14662] shutil.move broken in 2.7.3 on OSX (chflags fails)

2012-04-27 Thread Hynek Schlawack

Hynek Schlawack  added the comment:

And finally against 3.2

--
Added file: http://bugs.python.org/file25384/expand-chflags-catch-3.2.diff

___
Python tracker 

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



[issue14605] Make import machinery explicit

2012-04-27 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset c18256de00bb by Brett Cannon in branch 'default':
Issue #14605: Insert to the front of sys.meta_path, don't append.
http://hg.python.org/cpython/rev/c18256de00bb

New changeset 3bd60cc27664 by Brett Cannon in branch 'default':
Issue #14605: Stop having implicit entries for sys.meta_path.
http://hg.python.org/cpython/rev/3bd60cc27664

--

___
Python tracker 

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



[issue7185] csv reader utf-8 BOM error

2012-04-27 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

I checked out. Files opened in "utf-8-sig" are seekable.

>>> open('test', 'w', encoding='utf-8-sig').write('qwerty\nйцукен\n')
>>> open('test', 'r', encoding="utf-8").read()
'\ufeffqwerty\nйцукен\n'
>>> open('test', 'r', encoding="utf-8-sig").read()
'qwerty\nйцукен\n'
>>> with open('test', 'r', encoding="utf-8-sig") as f:
... print(ascii(f.readline()))
... f.seek(0)
... print(ascii(f.readline()))
... 
'qwerty\n'
0
'qwerty\n'


Should this issue be closed?

--
nosy: +storchaka

___
Python tracker 

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



[issue13903] New shared-keys dictionary implementation

2012-04-27 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset a3beae842f13 by Benjamin Peterson in branch 'default':
decref cached keys on type deallocation (#13903)
http://hg.python.org/cpython/rev/a3beae842f13

--

___
Python tracker 

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



[issue13903] New shared-keys dictionary implementation

2012-04-27 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

> New changeset a3beae842f13 by Benjamin Peterson in branch 'default':
> decref cached keys on type deallocation (#13903)
> http://hg.python.org/cpython/rev/a3beae842f13

Is there any way to detect / avoid leaks on this separate refcounting
scheme?

--

___
Python tracker 

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



[issue14605] Make import machinery explicit

2012-04-27 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset 7025ee00dbf6 by Brett Cannon in branch 'default':
Issue #14605: Use None in sys.path_importer_cache to represent no
http://hg.python.org/cpython/rev/7025ee00dbf6

--

___
Python tracker 

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



[issue14674] Add link to RFC 4627 from json documentation

2012-04-27 Thread Éric Araujo

Changes by Éric Araujo :


--
keywords: +easy
nosy: +eric.araujo
stage:  -> needs patch

___
Python tracker 

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



[issue14605] Make import machinery explicit

2012-04-27 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset 141ed4b426e1 by Brett Cannon in branch 'default':
Issue #14605: Don't error out if get_importer() returns None.
http://hg.python.org/cpython/rev/141ed4b426e1

--

___
Python tracker 

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



[issue14605] Make import machinery explicit

2012-04-27 Thread Brett Cannon

Brett Cannon  added the comment:

OK, so the todo of this issue is now finished. I am just waiting for the 
buildbots to come back green before I close this issue fully.

--
stage: commit review -> 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



[issue13903] New shared-keys dictionary implementation

2012-04-27 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

This patch integrates the dictkeys' refcounting into the refcount checking 
framework. Seems to work ok, but it would be better if someone more acquainted 
with the code could confirm it.

--
Added file: http://bugs.python.org/file25385/dkdebug.patch

___
Python tracker 

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



[issue14605] Make import machinery explicit

2012-04-27 Thread Brett Cannon

Changes by Brett Cannon :


--
status: pending -> closed

___
Python tracker 

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



[issue7185] csv reader utf-8 BOM error

2012-04-27 Thread R. David Murray

R. David Murray  added the comment:

Serhiy, the bug is about csv in particular.  Can you confirm that using 
utf-8-sig allows one to process a file with a bom using the csv module?

--

___
Python tracker 

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



[issue1767933] Badly formed XML using etree and utf-16

2012-04-27 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

Here is a patch which solves the problem of writing ElementTree with utf-16 or 
utf-32 encoding.

--
keywords: +patch
nosy: +storchaka
versions: +Python 3.3
Added file: http://bugs.python.org/file25386/etree_write_utf16.patch

___
Python tracker 

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



[issue14684] zlib set dictionary support inflateSetDictionary

2012-04-27 Thread Sam Rushing

New submission from Sam Rushing :

Google's SPDY protocol requires the use of a pre-defined compression 
dictionary.  The current zlib module doesn't expose the two functions for 
setting the dictionary.

This patch is minimal in the sense that it only exposes the two functions, but 
unfortunately the sequence of zlib calls required is clumsy: a call to 
inflate() must fail first (with an error of Z_NEED_DICT):


import zlib
zdict = b"thequickbrownfoxjumped\x00"
c = zlib.compressobj()
c.set_dictionary (zdict)
cd = c.compress (b"the quick brown fox jumped over the candlestick")
cd += c.flush()
d = zlib.decompressobj()
try:
print (d.decompress (cd))
except zlib.error as what:
if what.args[0].startswith ('Error 2 '):
d.set_dictionary (zdict)
print (d.flush())

Obviously a better way to catch/match Z_NEED_DICT would be nice.
A much nicer solution would allow you to associate the dictionary at creation 
time, rather than having to wait for an error condition.  I can only guess that 
the zlib authors designed it that way for a reason?

--
components: Extension Modules
files: zlib_set_dictionary.patch
keywords: patch
messages: 159492
nosy: Sam.Rushing
priority: normal
severity: normal
status: open
title: zlib set dictionary support inflateSetDictionary
type: enhancement
versions: Python 3.4
Added file: http://bugs.python.org/file25387/zlib_set_dictionary.patch

___
Python tracker 

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



[issue14642] Fix importlib.h build rule to not depend on hg

2012-04-27 Thread Brett Cannon

Brett Cannon  added the comment:

Can this issue be closed, Martin, thanks to your extension?

--
assignee:  -> loewis

___
Python tracker 

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



[issue7185] csv reader utf-8 BOM error

2012-04-27 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

I ran the script above (only replaced 'utf-8' on 'utf-8-sig') and did not see 
anything strange. I looked at the source (cvs.py and _cvs.c) and also did not 
see anything that could lead to this effect. If the bug exists, it in utf-8-sig 
codec and should be expressed in other cases. There is nothing special for csv.

--

___
Python tracker 

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



[issue14646] Require loaders set __loader__ and __package__

2012-04-27 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset 496c68f90a03 by Brett Cannon in branch 'default':
Issue #14646: __import__() now sets __loader__ if need be.
http://hg.python.org/cpython/rev/496c68f90a03

--
nosy: +python-dev

___
Python tracker 

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



[issue14646] Require loaders set __loader__ and __package__

2012-04-27 Thread Brett Cannon

Changes by Brett Cannon :


--
resolution:  -> fixed
stage: test needed -> 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



[issue14685] segfault in --without-threads build

2012-04-27 Thread Stefan Krah

New submission from Stefan Krah :

The build --without-threads segfaults in run_tests.py:

http://www.python.org/dev/buildbot/all/builders/AMD64%20Fedora%20without%20threads%203.x/builds/2123/steps/test/logs/stdio

--
components: Tests
messages: 159496
nosy: skrah
priority: release blocker
severity: normal
stage: needs patch
status: open
title: segfault in --without-threads build
type: crash
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



[issue14304] Implement utf-8-bmp codec

2012-04-27 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

Andrew, the patch solves your issue?

--

___
Python tracker 

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



[issue13916] disallow the "surrogatepass" handler for non utf-* encodings

2012-04-27 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
nosy: +storchaka

___
Python tracker 

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



[issue14339] Optimizing bin, oct and hex

2012-04-27 Thread Mark Dickinson

Mark Dickinson  added the comment:

Serhiy:  thanks for submitting the form!  No need to apologise: it was my bad 
for making the commit prematurely.

And now that I see that all-important asterisk next to your name, I'll reclose 
the issue. :-)

--
status: open -> closed

___
Python tracker 

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



[issue14666] test_sendall_interrupted hangs on FreeBSD with a zombi multiprocessing thread

2012-04-27 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset f163c4731c58 by Antoine Pitrou in branch 'default':
Issue #14666: stop multiprocessing's resource-sharing thread after the tests 
are done.
http://hg.python.org/cpython/rev/f163c4731c58

--
nosy: +python-dev

___
Python tracker 

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



[issue14583] try/except import fails --without-threads

2012-04-27 Thread Stefan Krah

Stefan Krah  added the comment:

This issue is now apparently causing a segfault:

(gdb) r ./Tools/scripts/run_tests.py -j 1 -u all -W --timeout=3600
Starting program: /home/stefan/pydev/cpython/python 
./Tools/scripts/run_tests.py -j 1 -u all -W --timeout=3600

[...]

Program received signal SIGSEGV, Segmentation fault.
0x0041b038 in PyObject_Repr (v=) at 
Objects/object.c:377
377 if (Py_TYPE(v)->tp_repr == NULL)
(gdb) l

[...]



#0  0x0041b038 in PyObject_Repr (v=) 
at Objects/object.c:377
#1  0x00460db0 in PyUnicode_FromFormatV (format=0x63e3e8 "%R not in 
sys.modules as expected", vargs=
0x7fff1ae0) at Objects/unicodeobject.c:2609
#2  0x004e1be2 in PyErr_Format (exception=, 
format=
0x63e3e8 "%R not in sys.modules as expected") at Python/errors.c:697
#3  0x004ed53f in PyImport_ImportModuleLevelObject 
(name='multiprocessing.process

--
priority: high -> release blocker

___
Python tracker 

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



[issue14685] segfault in --without-threads build

2012-04-27 Thread Stefan Krah

Stefan Krah  added the comment:

Appears to be related to #14583.

--
keywords: +buildbot
resolution:  -> duplicate
stage: needs patch -> committed/rejected
status: open -> closed
superseder:  -> try/except import fails --without-threads

___
Python tracker 

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



[issue14007] xml.etree.ElementTree - XMLParser and TreeBuilder's doctype() method missing

2012-04-27 Thread Arfrever Frehtes Taifersar Arahesis

Changes by Arfrever Frehtes Taifersar Arahesis :


--
priority: normal -> release blocker

___
Python tracker 

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



[issue14686] SystemError in unicodeobject.c

2012-04-27 Thread Stefan Krah

New submission from Stefan Krah :

Seen on the Gentoo buildbot:

http://www.python.org/dev/buildbot/all/builders/x86%20Gentoo%20Non-Debug%203.x/builds/2154/steps/test/logs/stdio==
ERROR: test_format (test.test_bool.BoolTest)
--
Traceback (most recent call last):
  File 
"/var/lib/buildslave/3.x.murray-gentoo-wide/build/Lib/test/test_bool.py", line 
167, in test_format
self.assertEqual("%d" % False, "0")
SystemError: Objects/unicodeobject.c:13507: bad argument to internal function

--

--
components: Tests
messages: 159502
nosy: haypo, skrah
priority: normal
severity: normal
stage: needs patch
status: open
title: SystemError in unicodeobject.c
type: crash
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



[issue14686] SystemError in unicodeobject.c

2012-04-27 Thread Stefan Krah

Changes by Stefan Krah :


--
type: crash -> behavior

___
Python tracker 

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



[issue14686] SystemError in unicodeobject.c

2012-04-27 Thread Stefan Krah

Stefan Krah  added the comment:

On another bot:

http://www.python.org/dev/buildbot/all/builders/x86%20Gentoo%203.x/builds/2205/steps/test/logs/stdio



[250/364] test_bool
python: Objects/unicodeobject.c:13501: formatlong: Assertion 
`unicode_modifiable(result)' failed.
Fatal Python error: Aborted

Current thread 0xb75e16c0:
  File "", line 611 in get_code
  File "", line 510 in _load_module
  File "", line 294 in module_for_loader_wrapper
  File "", line 634 in load_module
  File "", line 1015 in _find_and_load
  File "/var/lib/buildslave/3.x.murray-gentoo/build/Lib/test/regrtest.py", line 
1229 in runtest_inner
  File "/var/lib/buildslave/3.x.murray-gentoo/build/Lib/test/regrtest.py", line 
907 in runtest
  File "/var/lib/buildslave/3.x.murray-gentoo/build/Lib/test/regrtest.py", line 
710 in main
  File "/var/lib/buildslave/3.x.murray-gentoo/build/Lib/test/__main__.py", line 
13 in 
  File "/var/lib/buildslave/3.x.murray-gentoo/build/Lib/runpy.py", line 75 in 
_run_code
  File "/var/lib/buildslave/3.x.murray-gentoo/build/Lib/runpy.py", line 162 in 
_run_module_as_main
make: *** [buildbottest] Aborted

--

___
Python tracker 

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



[issue14686] SystemError in unicodeobject.c

2012-04-27 Thread STINNER Victor

STINNER Victor  added the comment:

It's my fault. It should be fixed by:

changeset:   76590:7bacccd889c2
tag: tip
user:Victor Stinner 
date:Sat Apr 28 00:25:34 2012 +0200
files:   Objects/unicodeobject.c
description:
Fix my previous commit: bool is a long, restore the specical case for bool

--

___
Python tracker 

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



[issue3177] Add shutil.open

2012-04-27 Thread Miki Tebeka

Miki Tebeka  added the comment:

Just to note there's http://pypi.python.org/pypi/desktop/0.4 out there.

--
nosy: +tebeka

___
Python tracker 

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



[issue7185] csv reader utf-8 BOM error

2012-04-27 Thread R. David Murray

R. David Murray  added the comment:

I wasn't sure which script you were referring to, so I checked it myself and 
got the same results as you: after the seek(0) on the file object opened with 
utf-8-sig, csv read all the lines in the file, including reading the header 
line correctly.

So, let's close this.

--
resolution:  -> invalid
stage: needs patch -> 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



[issue3177] Add shutil.open

2012-04-27 Thread Hobs

Hobs  added the comment:

Had no idea. Sounds like a good place for it.
On Apr 28, 2012 6:54 AM, "Miki Tebeka"  wrote:

>
> Miki Tebeka  added the comment:
>
> Just to note there's http://pypi.python.org/pypi/desktop/0.4 out there.
>
> --
> nosy: +tebeka
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue14687] Optimize str%tuple for the PEP 393

2012-04-27 Thread STINNER Victor

New submission from STINNER Victor :

PyUnicode_Format() creates short temporary substrings. Attached patch tries to 
avoid substrings. For example, it avoids write of 1 character and repetition of 
1 character like a space. PyUnicode_Format() now works in two steps:

 - computes the maximum character and the length of the output string
 - write characters into the output string

I'm not sure that my patch is correct, nor that the change does really speed-up 
Python.


Benchmark:

./python -m timeit \
  -s 's="x=%s, y=%u, z=%x"; args=(123, 456, 789)' \
  's%args'
./python -m timeit \
  -s 's="The %(k1)s is %(k2)s the %(k3)s."; args={"k1":"x","k2":"y","k3":"z",}' 
\
  's%args'

Python 3.2:

100 loops, best of 3: 0.482 usec per loop
100 loops, best of 3: 0.295 usec per loop

Python 3.3:

100 loops, best of 3: 0.653 usec per loop
100 loops, best of 3: 0.666 usec per loop

Python 3.3 + patch:

100 loops, best of 3: 0.596 usec per loop
100 loops, best of 3: 0.566 usec per loop

--
files: pyunicode_format.patch
keywords: patch
messages: 159508
nosy: haypo, loewis, pitrou
priority: normal
severity: normal
status: open
title: Optimize str%tuple for the PEP 393
type: performance
versions: Python 3.3
Added file: http://bugs.python.org/file25388/pyunicode_format.patch

___
Python tracker 

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



[issue14686] SystemError in unicodeobject.c

2012-04-27 Thread STINNER Victor

Changes by STINNER Victor :


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



[issue7185] csv reader utf-8 BOM error

2012-04-27 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

I was referring to the script inlined in the message 
http://bugs.python.org/issue7185#msg94340 .

--

___
Python tracker 

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