[issue14532] multiprocessing module performs a time-dependent hmac comparison

2012-04-30 Thread Jon Oberheide

Jon Oberheide j...@oberheide.org added the comment:

Ok, patch v4 uploaded. Only change is the rename to secure_compare.

--
Added file: http://bugs.python.org/file25414/hmac-time-independent-v4.patch

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



[issue14428] Implementation of the PEP 418

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

Charles-François Natali neolo...@free.fr added the comment:

 Yes, dt is not a number of seconds in the following example:

 t1=time.process_time(); (...); t2=time.process_time(); dt=t2-t1

OK, so what is it then?
It's not written anywhere - neither in the PEP nor in the
documentation - and it should.

Furthermore:

$ cat /tmp/test_ptime.py
import sys
import time

rt = time.time()
pt = time.process_time()

for i in range(int(sys.argv[1])):
pass

print(real time: %f % (time.time() - rt))
print(process time: %f % (time.process_time() - pt))
$ ./python /tmp/test_ptime.py 10
real time: 0.168570
process time: 0.168425


It really looks like seconds to me, definitely not jiffies ;-)
Also, I've had a quick look at the code, and ISTM that it does indeed
return seconds.

 I wrote the test to check if time.process_time() measures the total CPU of
 the process, and not the CPU time of only the current thread.

 I'm tired of this PEP, so I just removed the test. I don't think that it is
 really interesting and it looks difficult to write a reliable test.

Hum, right now, the only process_time test I see is test_process_time,
which just checks that a sleep almost doesn't consume process time,
which is a bit light.


# Use a factor of 0.75 because time.process_time() is maybe not precise
self.assertGreaterEqual(t2 - t1, busy * 0.75)


It's not that process_time() is not precise (I assume you mean accurate ;-).
It's just that since it measures CPU time (user+system), it depends on
the scheduling: in fact, if you have let's say a real-time priority
task running at the same time, on a uniprocessor system, the thread
could in theory not even get a chance to run, which would yield a CPU
time of 0: that would still be accurate.

--

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



[issue1522400] irda socket support

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

Charles-François Natali neolo...@free.fr added the comment:

 Actually I think it suffers from the same problem as AF_UNIX:
 sockaddr_irda-sir_name, like sockaddr_un-sun_path, don't have to be
 NUL-terminated, and the kernel can return non NUL-terminated strings.

Actually, I've had a look at the Linux and Windows documentation, and sir_name 
is NUL-terminated. I've also had a look at the kernel source, and it treats 
sir_name as NUL-terminated, so it should be safe.

Here's a new patch, with a couple new constants, documentation update and some 
- really basic - tests.
I guess Gregory is right, and we could push this as-is, and wait until some 
users is interested in improving the support and tests.

--
keywords: +needs review

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



[issue1522400] irda socket support

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

Changes by Charles-François Natali neolo...@free.fr:


Added file: http://bugs.python.org/file25415/irda-default-1.diff

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



[issue11352] Update cgi module doc

2012-04-30 Thread Pierre Quentel

Pierre Quentel pierre.quen...@gmail.com added the comment:

Thanks Hynek for raising this issue from the dead

Patch proposal attached. Sorry if there are markup errors, it's my first 
contact with rst

--
Added file: http://bugs.python.org/file25416/cgi.rst

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



[issue14034] Add argparse howto

2012-04-30 Thread Tshepang Lekhonkhobe

Tshepang Lekhonkhobe tshep...@gmail.com added the comment:

Thanks so much for your thorough attention to detail. I've addressed all your 
latest comments.

--
Added file: http://bugs.python.org/file25417/argparse_howto5.patch

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



[issue14693] hashlib fallback modules should be built even if openssl *is* available at build time

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

Changes by Martin v. Löwis mar...@v.loewis.de:


--
versions:  -Python 2.6, Python 2.7

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14693
___
___
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-30 Thread Stefano Taschini

Stefano Taschini tasch...@ieee.org added the comment:

Martin,

That was exactly my first approach. What made me change my mind is that 

   i) it is also fairly hacky (one might rightfully object that it is the 
isinstance(x, unicode) tests that should be changed)

   ii) it is now a hack spread over a dozen files, instead of the site.py alone.

   iii) the alterations in those files are executed even in the case of 
built-in unicode support, thus increasing the risk of introducing a regression 
in the stdlib.

In the end I was a bit loath to alter quite a few of the stdlib modules 
(including some of the core ones) for a rather infrequent case. My solution, 
on the other hand, is such that in the regular case of built-in unicode support 
those modules are not touched at all, thus reducing the risk of introducing a 
regression in the stdlib.

Still, if you guys do think that the maintainability risk due to the hackiness 
of my suggestion exceeds the potential benefits, it might be better to split 
the issue (and the patch) into two: one for the autoconf and interpreter, and 
one for the stdlib. In this way, the patch for autconf and interpreter (which 
should be less controversial) might be accepted sooner, while we bide our time 
until we come up with a better solution for the stdlib.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8767
___
___
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-30 Thread Martin v . Löwis

Martin v. Löwis mar...@v.loewis.de added the comment:

  it might be better to split the issue (and the patch) into two: one for the 
 autoconf and interpreter, and one for the stdlib.

Please do that. Splitting the patch could be enough, no need to split 
the issue.

--

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



[issue11352] Update cgi module doc

2012-04-30 Thread Hynek Schlawack

Hynek Schlawack h...@ox.cx added the comment:

That’s not a patch. :) Posting whole files makes them very hard to review 
because you can’t spot the changes.

The best thing would be to get a fresh clone of the repo: 
http://docs.python.org/devguide/setup.html#setup , copy your edited file to the 
appropriate place and run `hg diff`.

If it looks okay, redirect the output into a file (something like `hg diff 
cgi-doc-update.patch`) and attach it to this issue.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11352
___
___
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-30 Thread Stefano Taschini

Changes by Stefano Taschini tasch...@ieee.org:


Added file: http://bugs.python.org/file25418/issue8767_interpreter.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8767
___
___
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-30 Thread Stefano Taschini

Stefano Taschini tasch...@ieee.org added the comment:

Here we go.

--
Added file: http://bugs.python.org/file25419/issue8767_stdlib.patch

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



[issue14698] test_posix failures - getpwduid()/initgroups()/getgroups()

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

New submission from Charles-François Natali neolo...@free.fr:

test_posix is consistently failing on the bigmem buildbot:

http://python.org/dev/buildbot/all/builders/AMD64 debian bigmem 
3.x/builds/291/steps/test/logs/stdio


==
ERROR: test_getgrouplist (test.test_posix.PosixTester)
--
Traceback (most recent call last):
  File 
/var/tmpfs/martin.vonloewis/3.x.loewis-parallel2/build/Lib/test/test_posix.py,
 line 633, in test_getgrouplist
set(posix.getgrouplist(pwd.getpwuid(os.getuid())[0],
KeyError: 'getpwuid(): uid not found: 5025'

==
ERROR: test_initgroups (test.test_posix.PosixTester)
--
Traceback (most recent call last):
  File 
/var/tmpfs/martin.vonloewis/3.x.loewis-parallel2/build/Lib/test/test_posix.py,
 line 111, in test_initgroups
name = pwd.getpwuid(posix.getuid()).pw_name
KeyError: 'getpwuid(): uid not found: 5025'


I assume that's because the buildbot tests run with a UID without any 
corresponding pwd entry (which is legit).
The attached patch should fix thoe failures, by making the tests more robust.

--
components: Tests
files: test_no_pwd.diff
keywords: buildbot, easy, needs review, patch
messages: 159677
nosy: neologix, pitrou
priority: normal
severity: normal
status: open
title: test_posix failures - getpwduid()/initgroups()/getgroups()
type: behavior
versions: Python 3.2, Python 3.3
Added file: http://bugs.python.org/file25420/test_no_pwd.diff

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



[issue11352] Update cgi module doc

2012-04-30 Thread Pierre Quentel

Pierre Quentel pierre.quen...@gmail.com added the comment:

Sorry about that. I didn't dare to say I was also a Mercurial newbie

--
Added file: http://bugs.python.org/file25421/cgi-doc-update.patch

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



[issue11352] Update cgi module doc

2012-04-30 Thread Pierre Quentel

Changes by Pierre Quentel pierre.quen...@gmail.com:


Removed file: http://bugs.python.org/file25416/cgi.rst

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



[issue11352] Update cgi module doc

2012-04-30 Thread Senthil Kumaran

Senthil Kumaran sent...@uthcode.com added the comment:

Not to worry about that Pierre. I shall review the patch (contents) in
the evening (SGT) and I should be able to commit/close this issue.

Thanks,
Senthil

--

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



[issue11352] Update cgi module doc

2012-04-30 Thread Pierre Quentel

Pierre Quentel pierre.quen...@gmail.com added the comment:

Thanks Senthil
I spot a typo in the first modified paragraph : cet instead of set

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11352
___
___
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-30 Thread Martin v . Löwis

Martin v. Löwis mar...@v.loewis.de added the comment:

As it stands, the patch is pointless, and can safely be rejected. We will just 
not have defined NTDDI_VERSION at NTDDI_VISTA for any foreseeable future, so 
all the Vista-specific code can be eliminated from the patch.

Python had been using dynamic checking for API forever. In 2.5, there was a 
check for presence of GetFileAttributesExA; in 2.4, there was a check for 
CryptAcquireContextA.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11618
___
___
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-30 Thread Martin v . Löwis

Martin v. Löwis mar...@v.loewis.de added the comment:

Please, go ahead, explain :-)

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14656
___
___
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-30 Thread Mark Shannon

Mark Shannon m...@hotpy.org added the comment:

Change insertdict to follow normal (non-stealing) ref-counting behaviour which 
fixes possible leakage.

Patch attached.

--
Added file: http://bugs.python.org/file25422/insertdict.patch

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



[issue14669] test_multiprocessing failure on OS X Tiger

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

Charles-François Natali neolo...@free.fr added the comment:

 I can't work out what is wrong here.

OS-X has known issues with FD-passing over Unix domain sockets, see issues 
#6560 and #12958.
Since those failures only occur on OS-X buildbots, I'd suggest just skipping 
them...

--
nosy: +neologix

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



[issue14692] json.joads parse_constant callback not working anymore

2012-04-30 Thread Jakob Simon-Gaarde

Jakob Simon-Gaarde jako...@gmail.com added the comment:

Ok, I accept that at some point it was decided to take away the call to 
parse_constant hook on true and false values. But how does it help me to 
know this, I still need to react on these values?

It seems a little overkill to parse through all parsed values using 
object_pairs_hook.

Best Regards
Jakob Simon-Gaarde

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14692
___
___
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-30 Thread Kristján Valur Jónsson

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

Martin, I think you misunderstand completely. the patch is _not_ about using 
the VISTA features.  It is about not using a mutex for threading.lock.

Currently, the locks in python use Mutex objects, and a WaitForSingleObjects() 
system call to acquire them.
This patch replaces theses locks with user-level objects (critical sections and 
condition variables.).  This drops the time needed for an uncontended 
acquire/release by 60% since there is no kernel transition and scheduling.

The patch comes in two flavors.  The current version _emulates_ condition 
variables on Windows by the same mechanism as I introduced for the new GIL, 
that is, using a combination of critical section objects and a construct made 
of a semaphore and a counter.

Also provided, for those that want, and for future reference, is a version that 
uses native system objects (windows condition variables and SRWLocks).  I can 
drop them from the patch to make you happy, but they are dormant and nicely 
show how conditional compilation can switch in more modern features for a 
different target architecture.

K

 -Original Message-
 From: Martin v. Löwis [mailto:rep...@bugs.python.org]
 Sent: 30. apríl 2012 09:05
 To: Kristján Valur Jónsson
 Subject: [issue11618] Locks broken wrt timeouts on Windows
 
 
 Martin v. Löwis mar...@v.loewis.de added the comment:
 
 As it stands, the patch is pointless, and can safely be rejected. We will just
 not have defined NTDDI_VERSION at NTDDI_VISTA for any foreseeable
 future, so all the Vista-specific code can be eliminated from the patch.
 
 Python had been using dynamic checking for API forever. In 2.5, there was
 a check for presence of GetFileAttributesExA; in 2.4, there was a check for
 CryptAcquireContextA.
 
 --
 
 ___
 Python tracker rep...@bugs.python.org
 http://bugs.python.org/issue11618
 ___

--

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



[issue14699] Calling a classmethod_descriptor directly raises a TypeError for wrong number of parameters.

2012-04-30 Thread Mark Shannon

New submission from Mark Shannon m...@hotpy.org:

classmethod_descriptor should either be uncallable or (better) accept the 
correct number of arguments.
The classmethod_descriptor can be regarded as the Python object corresponding 
directly to the underlying C function, as well as a descriptor object.
When called it should check that its first parameter is a subtype of the type 
in which it was declared, and then pass that as the 'self' parameter to the 
underlying C function. Currently it passes the type in which it was declared as 
its 'self' parameter, adding the remaining parameters.

This means that this fails:
float.__dict__['fromhex'](float, 1)
and this succeeds:
float.__dict__['fromhex'](1)
but it should be the other way around, otherwise it is impossible to pass a 
subtype as a parameter.

There is no tests for calling classmethod_descriptors in the test suite.

Attached patch includes tests and fixes the behaviour.

--
components: Interpreter Core
files: classmethoddescr_call.patch
keywords: patch
messages: 159687
nosy: Mark.Shannon
priority: normal
severity: normal
status: open
title: Calling a classmethod_descriptor directly raises a TypeError for wrong 
number of parameters.
type: behavior
versions: Python 3.3
Added file: http://bugs.python.org/file25423/classmethoddescr_call.patch

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



[issue7719] distutils: ignore .nfsXXXX files

2012-04-30 Thread Hynek Schlawack

Hynek Schlawack h...@ox.cx added the comment:

Jeff,

the patch LGTM but Eric indicated he'd like to have a higher level test inside 
Lib/distutils/tests/test_sdist.py. Possibly as part of a bigger test like 
test_prune_file_list or test_add_defaults; no need to remove the old test 
though I guess.

P.S. There's an extra empty line inside of apiref.rst. You may want to strip it 
from your next patch.

--
nosy: +hynek

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



[issue13152] textwrap: support custom tabsize

2012-04-30 Thread Hynek Schlawack

Hynek Schlawack h...@ox.cx added the comment:

The code LGTM, the documentation lacks `versionchanged` tag though. Would you 
mind adding it?

--
nosy: +hynek

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13152
___
___
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-30 Thread Benjamin Peterson

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

Did you see the sample patch I posted?

--

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



[issue14693] hashlib fallback modules should be built even if openssl *is* available at build time

2012-04-30 Thread Arfrever Frehtes Taifersar Arahesis

Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com added the comment:

Python in Gentoo is also patched to always build _sha256, _sha512, _md5 and 
_sha1 modules.

--
nosy: +Arfrever

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14693
___
___
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-30 Thread Arfrever Frehtes Taifersar Arahesis

Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com:


--
nosy: +Arfrever

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



[issue14157] time.strptime without a year fails on Feb 29

2012-04-30 Thread Arfrever Frehtes Taifersar Arahesis

Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com:


--
nosy: +Arfrever

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14157
___
___
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-30 Thread Arfrever Frehtes Taifersar Arahesis

Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com:


--
nosy: +Arfrever

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



[issue14157] time.strptime without a year fails on Feb 29

2012-04-30 Thread Alexander Belopolsky

Alexander Belopolsky alexander.belopol...@gmail.com added the comment:

This is a bit of a hack, but seems to get the work done.  Does anyone have any 
objections to committing?

--

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



[issue12958] test_socket failures on Mac OS X

2012-04-30 Thread Roundup Robot

Roundup Robot devn...@psf.upfronthosting.co.za added the comment:

New changeset e64bec91ac91 by Richard Oudkerk in branch 'default':
Issue #14669: Skip multiprocessing connection pickling test on MacOSX
http://hg.python.org/cpython/rev/e64bec91ac91

--

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



[issue14669] test_multiprocessing failure on OS X Tiger

2012-04-30 Thread Roundup Robot

Roundup Robot devn...@psf.upfronthosting.co.za added the comment:

New changeset e64bec91ac91 by Richard Oudkerk in branch 'default':
Issue #14669: Skip multiprocessing connection pickling test on MacOSX
http://hg.python.org/cpython/rev/e64bec91ac91

--
nosy: +python-dev

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



[issue6560] socket sendmsg(), recvmsg() methods

2012-04-30 Thread Roundup Robot

Roundup Robot devn...@psf.upfronthosting.co.za added the comment:

New changeset e64bec91ac91 by Richard Oudkerk in branch 'default':
Issue #14669: Skip multiprocessing connection pickling test on MacOSX
http://hg.python.org/cpython/rev/e64bec91ac91

--

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



[issue10142] Support for SEEK_HOLE/SEEK_DATA

2012-04-30 Thread Hynek Schlawack

Hynek Schlawack h...@ox.cx added the comment:

bikeshedIn some cases you change invalid to unsupported when encountering 
an invalid/unsupported `whence' and in others you keep them on invalid. I 
find it rather hard to really differentiate these two words in that context; 
care to shed a light and tell me the thought process behind that?/bikeshed

--
nosy: +hynek

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



[issue12947] Examples in library/doctest.html lack the flags

2012-04-30 Thread Stefano Taschini

Stefano Taschini tasch...@ieee.org added the comment:

Ezio, the patch I attached goes into that direction, by adding a 
:trim-doctest-flags: disable option to the code blocks.

I thought I had a good reason for having the option worded as 
:trim-doctest-flags: disable instead of :keep-doctest-flags:, now I'm not 
so sure.

Note: the patch is against the 2.7 branch.

--
keywords: +patch
Added file: http://bugs.python.org/file25424/issue12947_v0.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12947
___
___
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-30 Thread Roundup Robot

Roundup Robot devn...@psf.upfronthosting.co.za added the comment:

New changeset c5fd332e5857 by Benjamin Peterson in branch 'default':
change insertdict to not steal references (#13903)
http://hg.python.org/cpython/rev/c5fd332e5857

--

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



[issue7522] random.choice should accept a set as input

2012-04-30 Thread Michele Mazzucchi

Michele Mazzucchi mich...@buddyns.com added the comment:

Folks, I really think this should be addressed.

Python has beautiful data structure semantics, and this is a stain in them.

An implementation based on the current underlying hash table is quite simple, 
just pick random addresses until an active key is found. Even on sparse tables 
this is probabilistic O(1). Even with average load factor = 50%, only 1 extra 
attempt is needed; 2 with LF as low as 33%.

I'm happy to provide a patch if anyone defines the desired API in 
Include/setobject.h .

--
nosy: +michelem

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



[issue11352] Update cgi module doc

2012-04-30 Thread Roundup Robot

Roundup Robot devn...@psf.upfronthosting.co.za added the comment:

New changeset a54b6e321f1c by Senthil Kumaran in branch '3.2':
Issue11352 - Update cgi module docs
http://hg.python.org/cpython/rev/a54b6e321f1c

New changeset 910a4b12c796 by Senthil Kumaran in branch 'default':
Issue11352 - Update cgi module docs
http://hg.python.org/cpython/rev/910a4b12c796

--
nosy: +python-dev

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



[issue11352] Update cgi module doc

2012-04-30 Thread Senthil Kumaran

Senthil Kumaran sent...@uthcode.com added the comment:

I have made the suggested specific changes, but while reviewing the entire doc, 
I realized that much improvements can be made. Keeping the documentation more 
helpful aligned with the cgi.py APIs. I shall keep bug report to update the cgi 
docs further.

--

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



[issue11352] Update cgi module doc

2012-04-30 Thread Hynek Schlawack

Changes by Hynek Schlawack h...@ox.cx:


--
nosy:  -hynek

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



[issue11352] Update cgi module doc

2012-04-30 Thread Peter Kleiweg

Changes by Peter Kleiweg pklei...@xs4all.nl:


--
nosy:  -pebbe

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



[issue14558] Documentation for unittest.main does not describe some keyword arguments.

2012-04-30 Thread Michael Foord

Michael Foord mich...@voidspace.org.uk added the comment:

A good change - thanks Ezio.

--

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



[issue14558] Documentation for unittest.main does not describe some keyword arguments.

2012-04-30 Thread Roundup Robot

Roundup Robot devn...@psf.upfronthosting.co.za added the comment:

New changeset 55b2258c1c7c by Ezio Melotti in branch '2.7':
#14558: document the module, argv, and testLoader args of unittest.main.
http://hg.python.org/cpython/rev/55b2258c1c7c

New changeset 06046a6943a7 by Ezio Melotti in branch '3.2':
#14558: document the module, argv, and testLoader args of unittest.main.
http://hg.python.org/cpython/rev/06046a6943a7

New changeset 6e541ed4e987 by Ezio Melotti in branch 'default':
#14558: merge with 3.2.
http://hg.python.org/cpython/rev/6e541ed4e987

--
nosy: +python-dev

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



[issue14558] Documentation for unittest.main does not describe some keyword arguments.

2012-04-30 Thread Ezio Melotti

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

Fixed, thanks for the review!

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

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



[issue13579] string.Formatter doesn't understand the a conversion specifier

2012-04-30 Thread Francisco Martín Brugué

Francisco Martín Brugué franci...@email.de added the comment:

The patch is updated. Please let me know.

And as Éric noticed the NEWS entry could be: 

Issue #13579: string.Formatter now understands the a conversion specifier.

Thanks!

--
Added file: http://bugs.python.org/file25425/issue13579_910a4b12c796.patch

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



[issue10665] Expand unicodedata module documentation

2012-04-30 Thread Ezio Melotti

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


--
stage:  - patch review
type:  - enhancement
versions: +Python 3.3

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



[issue13183] pdb skips frames after hitting a breakpoint and running step

2012-04-30 Thread Senthil Kumaran

Senthil Kumaran sent...@uthcode.com added the comment:

Hello Xavier,

This issue required some tracing through the calls and I see the problem that 
you have mentioned and patch fixes the problem.

One comment on the patch, for the tests in the module, this line - 

self.frame_returning = None 

does not seem to have a coverage. Is there a specific significance in setting 
this to None and would a test help?


 def dispatch_return(self, frame, arg):
 if self.stop_here(frame) or frame == self.returnframe:
+self.frame_returning = frame
 self.user_return(frame, arg)
+self.frame_returning = None
 if self.quitting: raise BdbQuit
 return self.trace_dispatch

Sorry for the delay, I shall commit the fix in 3.3.

--
assignee:  - orsenthil

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



[issue14700] Integer overflow in classic string formatting

2012-04-30 Thread Serhiy Storchaka

New submission from Serhiy Storchaka storch...@gmail.com:

Check for integer overflow for width and precision is buggy.

Just a few examples (on platform with 32-bit int):

 '%.21d' % 123
'00123'
 '%.2147483648d' % 123
'123'
 '%.2147483650d' % 123
Traceback (most recent call last):
  File stdin, line 1, in module
ValueError: prec too big

 '%.21f' % (1./7)
'0.142857142857142849213'
 '%.2147483648f' % (1./7)
'0.142857'
 '%.2147483650f' % (1./7)
Traceback (most recent call last):
  File stdin, line 1, in module
ValueError: prec too big

--
components: Interpreter Core
messages: 159707
nosy: storchaka
priority: normal
severity: normal
status: open
title: Integer overflow in classic string formatting
type: behavior
versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3

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



[issue14532] multiprocessing module performs a time-dependent hmac comparison

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

Changes by Charles-François Natali neolo...@free.fr:


--
stage:  - commit review

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



[issue14700] Integer overflow in classic string formatting

2012-04-30 Thread R. David Murray

R. David Murray rdmur...@bitdance.com added the comment:

Serhiy: FYI we use the versions field to indicate which versions the fix will 
be made in, not which versions the bug occurs in.  Since only 2.7, 3.2, and 3.3 
get bug fixes, I've changed the versions field to be just those three.  (3.1 
and 2.6 are still in the list because they get *security* fixes, but those are 
rare.)

--
nosy: +eric.smith, mark.dickinson, r.david.murray
versions:  -Python 2.6, Python 3.1

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



[issue14700] Integer overflow in classic string formatting

2012-04-30 Thread Mark Dickinson

Mark Dickinson dicki...@gmail.com added the comment:

Indeed, Objects/unicodeobject.c (default branch) has this, at around line 13839:

if ((prec*10) / 10 != prec) {
PyErr_SetString(PyExc_ValueError,
prec too big);
goto onError;
}

... which since 'prec' has type int, will invoke undefined behaviour.  There 
are probably many other cases like this one.

Serhiy, what platform are you on?  And are you applying any special 
compile-time flags?  For gcc, we should be using -fwrapv, which in this case 
should make the above code work as intended.

--

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



[issue14700] Integer overflow in classic string formatting

2012-04-30 Thread Mark Dickinson

Mark Dickinson dicki...@gmail.com added the comment:

See get_integer in Objects/stringlib/unicode_format.h for a better way to do 
this sort of thing.

--

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



[issue9530] integer undefined behaviors

2012-04-30 Thread Mark Dickinson

Changes by Mark Dickinson dicki...@gmail.com:


--
dependencies: +Integer overflow in classic string formatting

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



[issue9530] integer undefined behaviors

2012-04-30 Thread John Regehr

John Regehr reg...@cs.utah.edu added the comment:

Hi folks,

I realize it was a long time ago that I reported this issue!  Since then our 
tool has been made available:

  http://embed.cs.utah.edu/ioc/

In particular, that web page contains a pre-compiled version of the tool for 
recent Ubuntu on x86-64, that should be pretty easy to use.

Alternatively, I can re-run the Python test suite on a Python compiled using 
our tool.  Let me know if this would be helpful.

--

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



[issue14700] Integer overflow in classic string formatting

2012-04-30 Thread Serhiy Storchaka

Serhiy Storchaka storch...@gmail.com added the comment:

 Serhiy: FYI we use the versions field to indicate which versions the fix will 
 be made in, not which versions the bug occurs in.  Since only 2.7, 3.2, and 
 3.3 get bug fixes, I've changed the versions field to be just those three.  
 (3.1 and 2.6 are still in the list because they get *security* fixes, but 
 those are rare.)

Well, David, I understand. This ridiculous bug is unlikely security
issue.

Here is a patch that fixes this bug.

--
keywords: +patch
Added file: 
http://bugs.python.org/file25426/pyunicode_format_integer_overflow.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14700
___diff -r 6e541ed4e987 Objects/unicodeobject.c
--- a/Objects/unicodeobject.c   Mon Apr 30 19:11:11 2012 +0300
+++ b/Objects/unicodeobject.c   Mon Apr 30 20:42:31 2012 +0300
@@ -13799,7 +13799,7 @@
 c = PyUnicode_READ(fmtkind, fmt, fmtpos++);
 if (c  '0' || c  '9')
 break;
-if ((width*10) / 10 != width) {
+if (width = PY_SSIZE_T_MAX / 10) {
 PyErr_SetString(PyExc_ValueError,
 width too big);
 goto onError;
@@ -13834,7 +13834,7 @@
 c = PyUnicode_READ(fmtkind, fmt, fmtpos++);
 if (c  '0' || c  '9')
 break;
-if ((prec*10) / 10 != prec) {
+if (prec = INT_MAX / 10) {
 PyErr_SetString(PyExc_ValueError,
 prec too big);
 goto onError;
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14700] Integer overflow in classic string formatting

2012-04-30 Thread Serhiy Storchaka

Serhiy Storchaka storch...@gmail.com added the comment:

 Serhiy, what platform are you on?

32-bit Linux (Ubuntu), gcc 4.6. But it has to happen on any platform
with a 32-bit integer (for 64-bit use 9223372036854775808).

214748364*10/10 == 214748364 -- test passed
214748364*10 + ('8'-'0') == -2147483648 -- oops!

See also how is this problem solved in _struct.c.

--

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



[issue14700] Integer overflow in classic string formatting

2012-04-30 Thread Mark Dickinson

Mark Dickinson dicki...@gmail.com added the comment:

 But it has to happen on any platform
 with a 32-bit integer

Not necessarily:  it's undefined behaviour, so the compiler can do as it wishes.

Your patch should also address possible overflow of the addition.

--

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



[issue14700] Integer overflow in classic string formatting

2012-04-30 Thread Serhiy Storchaka

Serhiy Storchaka storch...@gmail.com added the comment:

 Your patch should also address possible overflow of the addition.

Here there is no overflow. The patch limits prec of a little stronger
(instead of 2147483647 to 2147483639 on a 32-bit platform).

--

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



[issue14700] Integer overflow in classic string formatting

2012-04-30 Thread Mark Dickinson

Mark Dickinson dicki...@gmail.com added the comment:

Ah yes, true.

--

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



[issue10433] Document unique behavior of 'getgroups' on OSX

2012-04-30 Thread Roundup Robot

Roundup Robot devn...@psf.upfronthosting.co.za added the comment:

New changeset 2468b58f7fce by Ned Deily in branch '2.7':
Issue #10433: Document unique behavior of 'os.getgroups' on Mac OS X.
http://hg.python.org/cpython/rev/2468b58f7fce

New changeset 5c801899cd6d by Ned Deily in branch '3.2':
Issue #10433: Document unique behavior of 'os.getgroups' on Mac OS X.
http://hg.python.org/cpython/rev/5c801899cd6d

New changeset e7d545a5f6bc by Ned Deily in branch 'default':
Issue #10433: merge
http://hg.python.org/cpython/rev/e7d545a5f6bc

--
nosy: +python-dev

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



[issue14700] Integer overflow in classic string formatting

2012-04-30 Thread Mark Dickinson

Mark Dickinson dicki...@gmail.com added the comment:

Any chance of some tests? :-)

--

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



[issue14570] Document json sort_keys parameter properly

2012-04-30 Thread Michal Nowikowski

Michal Nowikowski godf...@gmail.com added the comment:

Attached a patch.
To preserve current order of arguments in dumps/dump functions sort_keys 
argument has been added to the end of arguments just before **kw.

--
keywords: +patch
Added file: http://bugs.python.org/file25427/json-sort-keys.patch

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



[issue10433] Document unique behavior of 'getgroups' on OSX

2012-04-30 Thread Ned Deily

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

Committed with minor revisions for 2.7.4, 3.2.4, and 3.3.0a3.

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

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



[issue14697] parser module doesn't support set displays or set comprehensions

2012-04-30 Thread Mark Dickinson

Mark Dickinson dicki...@gmail.com added the comment:

Patch attached.

--
keywords: +patch
stage: needs patch - patch review
Added file: http://bugs.python.org/file25428/parser_dictorsetmaker.patch

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



[issue14693] hashlib fallback modules should be built even if openssl *is* available at build time

2012-04-30 Thread Gregory P. Smith

Gregory P. Smith g...@krypto.org added the comment:

regarding the attached patch, rather than changing the test at all, I'd leave 
it as is.  The test as is will do what we want on the buildbots (warning us if 
they failed to compile when in debug mode).  I am not concerned about it 
testing if they compiled in opt mode or not.  I also do not think it is worth 
making them always compile on other platforms that do not use setup.py.

In short:  if we do anything, just make the setup.py change to get rid of the 
conditional compilation.

--

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



[issue14701] parser module doesn't support 'raise ... from'

2012-04-30 Thread Mark Dickinson

New submission from Mark Dickinson dicki...@gmail.com:

 import parser
 parser.tuple2st(parser.expr('raise exc from e'))
Traceback (most recent call last):
  File stdin, line 1, in module
  File string, line 1
raise exc from e

--
messages: 159724
nosy: mark.dickinson
priority: normal
severity: normal
stage: needs patch
status: open
title: parser module doesn't support 'raise ... from'
type: behavior
versions: Python 3.2, Python 3.3

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



[issue14701] parser module doesn't support 'raise ... from'

2012-04-30 Thread Mark Dickinson

Mark Dickinson dicki...@gmail.com added the comment:

Patch attached.

--
keywords: +patch
stage: needs patch - patch review
Added file: http://bugs.python.org/file25429/parser_yieldfrom.patch

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



[issue14700] Integer overflow in classic string formatting

2012-04-30 Thread Serhiy Storchaka

Serhiy Storchaka storch...@gmail.com added the comment:

 Any chance of some tests? :-)

Even a test for struct tests only struct.calcsize on this specific case.
For string formatting has no such function, on most platforms testing
would be a memory overflow.

--

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



[issue14466] Rip out mq instructions

2012-04-30 Thread Francisco Martín Brugué

Francisco Martín Brugué franci...@email.de added the comment:

Just for the record:

Thanks to the old mq workflow in the devguide I've learned about them and I'm 
now using it all the time to send and manage the patches.

The only thing is that one should first use the “qqueue” functionality (see “hg 
help qqueue”) and then in a qqueue all the old devguide stuff (hg qdiff, hg 
qpush, hg qpop, and so on...).

I agree that for a beginner the actual workflow maybe easier.

--
nosy: +francismb

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



[issue14702] os.makedirs breaks under autofs directories

2012-04-30 Thread Andrew McNabb

New submission from Andrew McNabb amcn...@mcnabbs.org:

When a os.makedirs is used under an autofs directory, it crashes. For example, 
on my machine, `os.makedirs('/net/prodigy/tmp')` crashes with the following 
traceback:

Traceback (most recent call last):
  ...
  File /usr/lib64/python2.7/os.py, line 157, in makedirs
mkdir(name, mode)
OSError: [Errno 13] Permission denied: '/net/prodigy/tmp'

In this case, '/net' is an autofs directory that automatically mounts the 
prodigy directory by connecting to a host called prodigy using NFS. The 
problem seems to be related to the fact that the /net/prodigy directory does 
not actually exist until it is first accessed.

I tried running `mkdir -p /net/prodigy/tmp`, and it succeeds even though the 
/net/prodigy directory did not exist before the mkdir command was run.

I'm not sure exactly how `mkdir -p` is implemented, but one potential 
workaround for Python's makedirs would be to add the following at the top of 
the function:

os.stat(name)

This stat call really only needs to be run the first time makedirs is called 
(it does not need to be used for each recursive call).

--
components: Library (Lib)
messages: 159728
nosy: amcnabb
priority: normal
severity: normal
status: open
title: os.makedirs breaks under autofs directories
versions: Python 2.7

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



[issue14700] Integer overflow in classic string formatting

2012-04-30 Thread Serhiy Storchaka

Serhiy Storchaka storch...@gmail.com added the comment:

 32-bit Linux (Ubuntu), gcc 4.6.

Sorry, gcc 4.4.

--

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



[issue14702] os.makedirs breaks under autofs directories

2012-04-30 Thread Hynek Schlawack

Hynek Schlawack h...@ox.cx added the comment:

As makedirs in 3.x doesn’t handle EPERM and is otherwise the same, I presume 
the error is there as well.

I also presume, that after the failed makedirs(), the directory is mounted? I'd 
just handle the error just we handle EEXIST in 3.x now.

--
nosy: +hynek
stage:  - needs patch
type:  - behavior
versions: +Python 3.2, Python 3.3

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



[issue14700] Integer overflow in classic string formatting

2012-04-30 Thread Mark Dickinson

Mark Dickinson dicki...@gmail.com added the comment:

Still, I think it would be useful to have some tests that exercise the overflow 
branches.  (If those tests had existed before, then this issue would probably 
already have been found and fixed, since clang could have detected the 
undefined behaviour resulting from signed overflow.)

I'll add tests and apply this later.

--
assignee:  - mark.dickinson

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



[issue14700] Integer overflow in classic string formatting

2012-04-30 Thread Serhiy Storchaka

Serhiy Storchaka storch...@gmail.com added the comment:

 I'll add tests and apply this later.

Well, look at test_crasher in Lib/test/test_struct.py.

--

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



[issue9400] multiprocessing.pool.AsyncResult.get() messes up exceptions

2012-04-30 Thread Daniel Blanchard

Daniel Blanchard dan.blanch...@gmail.com added the comment:

The patch appears to fix the issue, so is there any chance of this actually 
getting accepted this time? It seems bizarre that such a simple bug that has 
been on the books for almost two years now can't get a patch accepted.

--

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



[issue14702] os.makedirs breaks under autofs directories

2012-04-30 Thread Hynek Schlawack

Changes by Hynek Schlawack h...@ox.cx:


--
keywords: +easy

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



[issue13183] pdb skips frames after hitting a breakpoint and running step

2012-04-30 Thread Xavier de Gaye

Xavier de Gaye xdeg...@gmail.com added the comment:

Hi Senthil,

Thanks for your help with this issue.

self.frame_returning is both a flag to indicate that we are returning
from the current frame and a value (the current frame). We need both
as set_step() (the method invoked when the user runs the step command)
does not know the current frame and wether we are returning from the
current frame.

Here is a raw sketch of the call chain in the case where the user
types the step command on returning from the current frame (Pdb
subclasses both bdb.Bdb and cmd.Cmd):

Bdb::dispatch_return
Pdb::user_return (Bdb overriden method)
Pdb::interaction
Cmd::cmdloop
Cmd::onecmd
Pdb::do_step
Bdb::set_step

So self.frame_returning must be set to None after the call to
self.user_return() so that its value is not used in another later step
command, where we are not returning from this frame. Actually it is
more explicit and more robust to use a try-finally clause, such as:

def dispatch_return(self, frame, arg):
if self.stop_here(frame) or frame == self.returnframe:
try:
self.frame_returning = frame
self.user_return(frame, arg)
finally:
self.frame_returning = None
if self.quitting: raise BdbQuit
return self.trace_dispatch


Xavier

--

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



[issue9530] integer undefined behaviors

2012-04-30 Thread Stefan Krah

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


--
nosy: +skrah

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



[issue14660] Implement PEP 420: Implicit Namespace Packages

2012-04-30 Thread Eric V. Smith

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

I've modified zipimport to support namespace packages, and checked it in to the 
feature branch. This completes all of the functionality I think needs to be 
added. Next up is adding tests.

--
stage:  - test needed

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



[issue9400] multiprocessing.pool.AsyncResult.get() messes up exceptions

2012-04-30 Thread Antoine Pitrou

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


--
nosy: +sbt

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



[issue14157] time.strptime without a year fails on Feb 29

2012-04-30 Thread Antoine Pitrou

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

Fine with me.

--
nosy: +pitrou
stage: patch review - commit review

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14157
___
___
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-30 Thread Antoine Pitrou

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

 I wasn’t sure whether we should document it?

No, it should remain hidden.

--

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



[issue14082] shutil doesn't copy extended attributes

2012-04-30 Thread Antoine Pitrou

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

Hynek, did you get a notification of my review on Rietveld?

--

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



[issue14082] shutil doesn't copy extended attributes

2012-04-30 Thread Hynek Schlawack

Hynek Schlawack h...@ox.cx added the comment:

I didn't. :/ I'll look into it tomorrow.

--

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



[issue14703] Update PEP metaprocesses to describe PEP czar role

2012-04-30 Thread Nick Coghlan

New submission from Nick Coghlan ncogh...@gmail.com:

The PEP czar role isn't yet described in the relevant meta PEPs.

We should fix that, as well as updating the PEP metadata to include the named 
czar where relevant.

--
components: None
messages: 159740
nosy: ncoghlan
priority: normal
severity: normal
status: open
title: Update PEP metaprocesses to describe PEP czar role
type: enhancement

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



[issue13183] pdb skips frames after hitting a breakpoint and running step

2012-04-30 Thread Roundup Robot

Roundup Robot devn...@psf.upfronthosting.co.za added the comment:

New changeset 96cb47f8142e by Senthil Kumaran in branch '3.2':
issue13183 - Fix pdb skipping frames after hitting a breakpoint and running 
step. Patch by Xavier de Gaye
http://hg.python.org/cpython/rev/96cb47f8142e

New changeset 5ea23739e9ba by Senthil Kumaran in branch '2.7':
issue13183 - Fix pdb skipping frames after hitting a breakpoint and running 
step. Patch by Xavier de Gaye
http://hg.python.org/cpython/rev/5ea23739e9ba

New changeset ab63e874265e by Senthil Kumaran in branch 'default':
issue13183 - Fix pdb skipping frames after hitting a breakpoint and running 
step. Patch by Xavier de Gaye
http://hg.python.org/cpython/rev/ab63e874265e

--
nosy: +python-dev

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



[issue13183] pdb skips frames after hitting a breakpoint and running step

2012-04-30 Thread Senthil Kumaran

Senthil Kumaran sent...@uthcode.com added the comment:

Hello Xavier,

Thanks for the explanation. Understood the reason for setting the 
frame_returning to None. The patch is committed in all python versions and the 
issue is fixed now. Thanks for the patch and prodding through this.

-- 
Senthil

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

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



[issue14701] parser module doesn't support 'raise ... from'

2012-04-30 Thread Meador Inge

Changes by Meador Inge mead...@gmail.com:


--
nosy: +meador.inge

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



[issue14371] Add support for bzip2 compression to the zipfile module

2012-04-30 Thread Roundup Robot

Roundup Robot devn...@psf.upfronthosting.co.za added the comment:

New changeset 028e8e0b03e8 by Martin v. Löwis in branch 'default':
Issue #14371: Support bzip2 in zipfile module.
http://hg.python.org/cpython/rev/028e8e0b03e8

--
nosy: +python-dev

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



[issue14371] Add support for bzip2 compression to the zipfile module

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

Martin v. Löwis mar...@v.loewis.de added the comment:

Thanks for the patch!

--
resolution:  - fixed
status: open - closed

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