[issue13390] Hunt memory allocations in addition to reference leaks

2011-11-13 Thread Antoine Pitrou
Changes by Antoine Pitrou : Added file: http://bugs.python.org/file23680/debugblocks2.patch ___ Python tracker <http://bugs.python.org/issue13390> ___ ___ Python-bug

[issue13390] Hunt memory allocations in addition to reference leaks

2011-11-13 Thread Antoine Pitrou
Changes by Antoine Pitrou : Added file: http://bugs.python.org/file23681/debugblocks3.patch ___ Python tracker <http://bugs.python.org/issue13390> ___ ___ Python-bug

[issue13390] Hunt memory allocations in addition to reference leaks

2011-11-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: And the latest patch (debugblocks3.patch) adds said heuristic. -- ___ Python tracker <http://bugs.python.org/issue13

[issue13396] new method random.getrandbytes()

2011-11-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: Good idea, IMO. +cum = set() +for i in range(100): +val = getbytes(span) +cum |= set(i for i in range(span) if val[i]) +self.assertEqual(len(cum), span) I find this test a bit strange. Also

[issue13204] sys.flags.__new__ crashes

2011-11-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: Thanks for the patch. You should add the same tests for sys.version_info and sys.getwindowsversion. -- nosy: +pitrou stage: -> patch review ___ Python tracker <http://bugs.python.org/issu

[issue13217] Missing header dependencies in Makefile

2011-11-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: Thank you for the patch. I only applied it to 3.3, since 3.2 doesn't have the additional header files. -- resolution: -> invalid stage: patch review -> committed/rejected status: open -> closed versions

[issue13396] new method random.getrandbytes()

2011-11-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: > The problem is that we need an API that will accommodate other random > number generators and not be specific to the MersenneTwister. Right > now, the starting point for everything in the random module is an > underlying generator supplying a ran

[issue13397] Option for XMLRPC clients to automatically transform Fault exceptions into standard exceptions

2011-11-13 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +flox, loewis ___ Python tracker <http://bugs.python.org/issue13397> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue11836] multiprocessing.queues.SimpleQueue is undocumented

2011-11-14 Thread Antoine Pitrou
Antoine Pitrou added the comment: Well, the sentinels argument, right now, is meant to be used internally. I don't think it's a good thing to document it, since I don't think it's a very clean API (I know, I introduced it :-)) - it's just so that concurrent.futures

[issue11836] multiprocessing.queues.SimpleQueue is undocumented

2011-11-14 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Wouldn't a better alternative be to have a wait function which can > deal with readable pipe connections and integer handles? > > On Unix this would just delegate to select(). > > On Windows it could work as follows: > * initiate

[issue13405] Add DTrace probes

2011-11-14 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +Garen, belopolsky, chrismiles, danchr, dhduvall, dmalcolm, fche, glyph, hazmat, jbaker, laca, mjw, movement, neologix, pitrou, rhettinger, robert.kern, ronaldoussoren, serverhorror, sirg3, twleung, wsanchez

[issue13333] utf-7 inconsistent with surrogates

2011-11-14 Thread Antoine Pitrou
Antoine Pitrou added the comment: Here is a patch. -- keywords: +patch stage: -> patch review Added file: http://bugs.python.org/file23686/utf7.patch ___ Python tracker <http://bugs.python.org/issu

[issue13404] Add support for system.methodSignature() to XMLRPC Server

2011-11-14 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +flox, loewis ___ Python tracker <http://bugs.python.org/issue13404> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue13401] test_argparse fails with root permissions

2011-11-14 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- stage: -> patch review ___ Python tracker <http://bugs.python.org/issue13401> ___ ___ Python-bugs-list mailing list Unsubscri

[issue13393] Improve BufferedReader.read1()

2011-11-14 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +neologix, sbt ___ Python tracker <http://bugs.python.org/issue13393> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue13406] Deprecation warnings when running the test suite

2011-11-14 Thread Antoine Pitrou
New submission from Antoine Pitrou : Now that the unicode-internal codec is deprecated, the test suite spouts some warning (in test_codecs, test_codeccallbacks and test_unicode). Example: [344/361] test_codecs /home/antoine/cpython/default/Lib/test/test_codecs.py:1024: DeprecationWarning

[issue13389] Clear lists and dicts freelist in gc.collect()

2011-11-14 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.python.or

[issue13333] utf-7 inconsistent with surrogates

2011-11-14 Thread Antoine Pitrou
Antoine Pitrou added the comment: It's a patch for 3.2. -- ___ Python tracker <http://bugs.python.org/issue1> ___ ___ Python-bugs-list mailing list

[issue13333] utf-7 inconsistent with surrogates

2011-11-14 Thread Antoine Pitrou
Antoine Pitrou added the comment: Here is a non-git diff then :) -- Added file: http://bugs.python.org/file23688/utf7-nogit.patch ___ Python tracker <http://bugs.python.org/issue13

[issue13333] utf-7 inconsistent with surrogates

2011-11-14 Thread Antoine Pitrou
Antoine Pitrou added the comment: I made a little fix to the patch for wide unicode builds and then committed it. Thank you! -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python track

[issue13390] Hunt memory allocations in addition to reference leaks

2011-11-15 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Valgrind does a much better job at this: it will also show you where > the leaked blocks were allocated. > OTOH, Valgrind is Linux-only and slow, but since I haven't used the > '-R' option much, I don't know how usable this

[issue13322] buffered read() and write() does not raise BlockingIOError

2011-11-15 Thread Antoine Pitrou
Antoine Pitrou added the comment: Thanks again. Just a nit: the tests should be in MiscIOTest, since they don't directly instantiate the individual classes. Also, perhaps it would be nice to check that the exception's "errno" attribute is EAGAIN. -- stage: needs p

[issue13392] Writing a pyc file is not atomic under Windows

2011-11-15 Thread Antoine Pitrou
Antoine Pitrou added the comment: Ok, done. Let's see if that fixes the sporadic failures on the buildbots. -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker <http:

[issue13380] ctypes: add an internal function for reseting the ctypes caches

2011-11-15 Thread Antoine Pitrou
Antoine Pitrou added the comment: The patch looks good to me. -- ___ Python tracker <http://bugs.python.org/issue13380> ___ ___ Python-bugs-list mailin

[issue13405] Add DTrace probes

2011-11-15 Thread Antoine Pitrou
Antoine Pitrou added the comment: > LD_LIBRARY_PATH=current_path > export LD_LIBRARY_PATH Why do you need LD_LIBRARY_PATH? > If you are inside a Solaris/OpenIndiana Zone, the zone *MUST* have > dtrace usermode permissions. If not, you can not use dtrace inside the > zone and,

[issue13411] Hashable memoryviews

2011-11-15 Thread Antoine Pitrou
New submission from Antoine Pitrou : This patch allows hashing of memoryviews, as discussed on python-dev. -- components: Interpreter Core files: memhash.patch keywords: patch messages: 147714 nosy: ncoghlan, pitrou, skrah priority: normal severity: normal stage: patch review status

[issue13412] No knowledge of symlinks on Windows

2011-11-15 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +brian.curtin, tim.golden ___ Python tracker <http://bugs.python.org/issue13412> ___ ___ Python-bugs-list mailing list Unsub

[issue11836] multiprocessing.queues.SimpleQueue is undocumented

2011-11-15 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Then it appears to me that Sandro's patch is good and can be committed. The doc patch is good. However, if you start exposing SimpleQueue at the top package level, you have to do it in 3.3 only (since that's a new API), and also mention it someh

[issue13413] time.daylight incorrect behavior in linux glibc

2011-11-16 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +belopolsky, lemburg ___ Python tracker <http://bugs.python.org/issue13413> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue1481032] patch smtplib:when SMTPDataError, rset crashes with sslerror

2011-11-16 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +barry, r.david.murray -BreamoreBoy ___ Python tracker <http://bugs.python.org/issue1481032> ___ ___ Python-bugs-list mailin

[issue6715] xz compressor support

2011-11-16 Thread Antoine Pitrou
Antoine Pitrou added the comment: What is the status on this, Nadeem? It would be lovely to get the feature in the stdlib. -- ___ Python tracker <http://bugs.python.org/issue6

[issue12729] Python lib re cannot handle Unicode properly due to narrow/wide bug

2011-11-16 Thread Antoine Pitrou
Antoine Pitrou added the comment: Closing this bug as PEP 393 is now implemented and makes so-called "narrow builds" obsolete. Python now has an adaptative internal representation that is able to fit all unicode characters. -- resolution: -> out of date stage: -> co

[issue13417] faster utf-8 decoding

2011-11-16 Thread Antoine Pitrou
New submission from Antoine Pitrou : PEP 393 and the need for a two-pass decoding process has made utf-8 decoding much slower, especially with the current generic implementation. Attached patch makes utf-8 more than twice faster, which means we're around 10-20% slower than 3.2 on non-tr

[issue13215] multiprocessing Manager.connect() aggressively retries refused connections

2011-11-16 Thread Antoine Pitrou
Antoine Pitrou added the comment: Apparently you forgot to upload the patch... -- ___ Python tracker <http://bugs.python.org/issue13215> ___ ___ Python-bug

[issue6715] xz compressor support

2011-11-16 Thread Antoine Pitrou
Antoine Pitrou added the comment: I've tested under 64-bit Windows and it worked fine. -- ___ Python tracker <http://bugs.python.org/issue6715> ___ ___ Pytho

[issue13405] Add DTrace probes

2011-11-17 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +loewis ___ Python tracker <http://bugs.python.org/issue13405> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue13411] Hashable memoryviews

2011-11-17 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Does memory_hash() reject non-contiguous memory? It should, since it checks the strides array. > _Py_HashBytes() might be reused by unicode_hash() for PyUnicode_1BYTE_KIND. I don't really see how unicode hashing should be related to bytes ha

[issue13411] Hashable memoryviews

2011-11-17 Thread Antoine Pitrou
Antoine Pitrou added the comment: > I'm not sure that the "register" storage class specifier is still > relevant with modern compilers: I'm pretty sure gcc ignores it unless > -O0, and I think I've read somewhere Microsoft's compiler ignores it > t

[issue13215] multiprocessing Manager.connect() aggressively retries refused connections

2011-11-17 Thread Antoine Pitrou
Antoine Pitrou added the comment: Ok for me. Nice to see that piece of ugliness removed. -- ___ Python tracker <http://bugs.python.org/issue13215> ___ ___ Pytho

[issue13430] Add a curry function to the functools module

2011-11-18 Thread Antoine Pitrou
Antoine Pitrou added the comment: You can use functools.partial for similar effect. Not sure what a dedicated curry() primitive would improve. -- nosy: +pitrou ___ Python tracker <http://bugs.python.org/issue13

[issue13430] Add a curry function to the functools module

2011-11-18 Thread Antoine Pitrou
Antoine Pitrou added the comment: > However, here an example less confusional > > >>> adder = curry(lambda (x, y): (x + y)) > >>> adder3 = adder(3) > >>> adder3(4) > 7 > >>> adder3(5) > 8 > > Currying let you defining new fu

[issue10227] Improve performance of MemoryView slicing

2011-11-18 Thread Antoine Pitrou
Antoine Pitrou added the comment: Thanks Stefan. I'm leaving the issue open since the original topic is a bit different. -- ___ Python tracker <http://bugs.python.org/is

[issue13322] buffered read() and write() does not raise BlockingIOError

2011-11-18 Thread Antoine Pitrou
Antoine Pitrou added the comment: Thanks. Who should I credit? "sbt"? -- ___ Python tracker <http://bugs.python.org/issue13322> ___ ___ Python-bugs-l

[issue9614] _pickle is not entirely 64-bit safe

2011-11-18 Thread Antoine Pitrou
Antoine Pitrou added the comment: This issue is obsolete, there are no 64-bit warnings in _pickle.c anymore. See issue 11564. -- resolution: -> out of date stage: patch review -> committed/rejected status: open -> closed ___ Python track

[issue13430] Add a curry function to the functools module

2011-11-18 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Sure, it's common `defining new functions on other functions`... more > times. Here a stupid example with fold (our reduce). > > @curry > def fold(function, start, sequence): > if len(sequence) == 0: > return start &g

[issue13393] Improve BufferedReader.read1()

2011-11-18 Thread Antoine Pitrou
Antoine Pitrou added the comment: I've committed a slightly modified patch. Not a huge improvement, but makes sense nevertheless (and it's really short). -- resolution: -> fixed stage: patch review -> committed/rejected status

[issue7695] missing termios constants

2011-11-19 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +haypo versions: -Python 2.7, Python 3.2 ___ Python tracker <http://bugs.python.org/issue7695> ___ ___ Python-bugs-list m

[issue13434] time.xmlrpc.com dead

2011-11-19 Thread Antoine Pitrou
New submission from Antoine Pitrou : time.xmlrpc.com seems dead (no DNS entry), which leads to failures on one of the stable buildbots (redirecting DNS catchall?): == ERROR: test_current_time

[issue13441] TestEnUSCollation.test_strxfrm() fails on Solaris

2011-11-21 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: -pitrou ___ Python tracker <http://bugs.python.org/issue13441> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue13445] Enable linking the module pysqlite with Berkeley DB SQL instead of SQLite

2011-11-21 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +ghaering versions: +Python 3.3 ___ Python tracker <http://bugs.python.org/issue13445> ___ ___ Python-bugs-list mailin

[issue6135] subprocess seems to use local 8-bit encoding and gives no choice

2011-11-21 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Firstly, I don't think it makes any sense to set encoding information > globally for the Popen object. As a simple example, consider using > Python to write a test suite for the iconv command line tool: there's > only one Popen instan

[issue13417] faster utf-8 decoding

2011-11-21 Thread Antoine Pitrou
Antoine Pitrou added the comment: Thanks for the review, patch committed now (with bogus comments removed). -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker <http://bug

[issue13411] Hashable memoryviews

2011-11-21 Thread Antoine Pitrou
Antoine Pitrou added the comment: Fixed, thanks. -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.python.or

[issue12328] multiprocessing's overlapped PipeConnection on Windows

2011-11-21 Thread Antoine Pitrou
Antoine Pitrou added the comment: I've re-added the fast uncontended path in semaphore.c and committed sigint_event.patch. Now I'm gonna take a look at pipe_poll_fix.patch... -- stage: -> patch review versions: -Python 2.6, Python 2.7, Python 3.

[issue13448] PEP 3155 implementation

2011-11-21 Thread Antoine Pitrou
New submission from Antoine Pitrou : Here is an issue covering PEP 3155 implementation. Hopefully a "review" link will appear in front of the hg repo URL. -- components: Interpreter Core hgrepos: 91 messages: 148087 nosy: ncoghlan, pitrou priority: normal severity: normal st

[issue13448] PEP 3155 implementation

2011-11-21 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- keywords: +patch Added file: http://bugs.python.org/file23744/baec10c6dcd4.diff ___ Python tracker <http://bugs.python.org/issue13

[issue13449] sched - provide an "async" argument for run() method

2011-11-21 Thread Antoine Pitrou
Antoine Pitrou added the comment: I think this would be better served by a separate method. You could call it e.g. run_nowait(). -- nosy: +pitrou ___ Python tracker <http://bugs.python.org/issue13

[issue13450] fix ''.format_map test

2011-11-21 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +eric.smith, rhettinger ___ Python tracker <http://bugs.python.org/issue13450> ___ ___ Python-bugs-list mailing list Unsub

[issue13455] Reorganize tracker docs in the devguide

2011-11-22 Thread Antoine Pitrou
Antoine Pitrou added the comment: I think the reason these docs are scattered is that the devguide is a guide, not a reference manual. I don't think this patch makes sense: if the tracker really needed so much text to explain how it works, then the tracker would have a severe UI pr

[issue13444] closed stdout causes error on stderr when the interpreter unconditionally flushes on shutdown

2011-11-22 Thread Antoine Pitrou
Antoine Pitrou added the comment: I think closing stdout is a legitimate desire so, yes, I would consider it a bug if we print an error in that case. A patch could either first check the "closed" attribute, or silence the ValueError. -- stage: -> needs patch type:

[issue12328] multiprocessing's overlapped PipeConnection on Windows

2011-11-22 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Here is an updated patch (pipe_poll_fix.patch) which should be applied > on top of sigint_event.patch. > > It fixes the problems with PipeConnection.poll() and Queue.empty() and > makes PipeListener.accept() use overlapped I/O. This should

[issue13458] _ssl memory leak in _get_peer_alt_names

2011-11-22 Thread Antoine Pitrou
Antoine Pitrou added the comment: Patch committed, thank you. -- resolution: -> fixed stage: -> committed/rejected status: open -> closed versions: +Python 3.3 ___ Python tracker <http://bugs.python.or

[issue12328] multiprocessing's overlapped PipeConnection on Windows

2011-11-23 Thread Antoine Pitrou
Antoine Pitrou added the comment: > There are three "expected" error conditions: > > ERROR_OPERATION_ABORTED: operation stopped by CancelIo(Ex)() > ERROR_MORE_DATA: operation complete, but only got part of the message > ERROR_IO_INCOMPLETE: operation still has not f

[issue13125] test_all_project_files() expected failure

2011-11-23 Thread Antoine Pitrou
Antoine Pitrou added the comment: Ping. -- ___ Python tracker <http://bugs.python.org/issue13125> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue13448] PEP 3155 implementation

2011-11-23 Thread Antoine Pitrou
Changes by Antoine Pitrou : Added file: http://bugs.python.org/file23766/942ba1e2f8c1.diff ___ Python tracker <http://bugs.python.org/issue13448> ___ ___ Python-bug

[issue13448] PEP 3155 implementation

2011-11-23 Thread Antoine Pitrou
Antoine Pitrou added the comment: New patch addressing Benjamin's and Victor's comments. -- ___ Python tracker <http://bugs.python.org/issue13448> ___ ___

[issue13455] Reorganize tracker docs in the devguide

2011-11-23 Thread Antoine Pitrou
Antoine Pitrou added the comment: > This is true, however different people can figure out a different > amount of things just by using and experiment with something. While > most of the tasks should be obvious, some are a bit more advanced, and > even the "obvious" onc

[issue13448] PEP 3155 implementation

2011-11-23 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Why an upper P in "PyFunction_NewWithQualName"? If you use an upper P, > it should use an underscore in Python: __qual_name__ to be consistent. __getattr__ / PyObject_GetAttr. -- ___ Pytho

[issue12328] multiprocessing's overlapped PipeConnection on Windows

2011-11-23 Thread Antoine Pitrou
Antoine Pitrou added the comment: > > It seems to me that ERROR_OPERATION_ABORTED is a "true" error, and so > > should raise an exception. > > I guess so, although we do expect it whenever poll() times out. What > exception would be appropriate? BlockingIOEr

[issue13465] A Jython section in the dev guide would be great

2011-11-23 Thread Antoine Pitrou
Antoine Pitrou added the comment: Uh, rather -1 on this. I would suggest Jython gets its own devguide (which can of course copy stuff from CPython's), since Jython and CPython are distinct projects. No need to confuse readers by mixing instructions for two different projects in a s

[issue13465] A Jython section in the dev guide would be great

2011-11-24 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Hosting "docs.python.org/devguide/jython" doesn't seem like an > unreasonable idea at all to me, and what's the benefit to CPython in > making the Jython team go to the effort of building out independent > deployment and s

[issue12170] index() and count() methods of bytes and bytearray should accept byte ints

2011-11-24 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Just a thought: Would this change be worthy for the "What's new in 3.3" > list? I think so. -- ___ Python tracker <http://bu

[issue13470] A user may need ... when she has ...

2011-11-24 Thread Antoine Pitrou
Antoine Pitrou added the comment: "they" is right and "she" is actually right too. See http://en.wikipedia.org/wiki/Singular_they -- nosy: +pitrou resolution: -> works for me status: open -> pending ___ Python tracke

[issue13469] TimedRotatingFileHandler fails to handle intervals of several weeks correctly

2011-11-24 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +vinay.sajip type: -> behavior versions: +Python 2.7, Python 3.2, Python 3.3 -Python 2.6 ___ Python tracker <http://bugs.python.org/issu

[issue6407] multiprocessing Pool should allow custom task queue

2011-11-24 Thread Antoine Pitrou
Antoine Pitrou added the comment: As the name implies, _setup_queues is a private method. It feels a bit weird to recommend overriding it in a subclass. -- nosy: +pitrou stage: test needed -> needs patch versions: +Python 3.3 -Python 3.2 ___ Pyt

[issue13472] Quick Start in devguide doesn’t mention build dependencies

2011-11-24 Thread Antoine Pitrou
Antoine Pitrou added the comment: Well, it's a quick start. The link to "build Python" actually tells you about dependencies. -- nosy: +pitrou ___ Python tracker <http://bugs.pyt

[issue13461] Error on test_issue_1395_5 with Python 2.7 and VS2010

2011-11-24 Thread Antoine Pitrou
Antoine Pitrou added the comment: What if you replace: PyObject *decoded = PyObject_CallMethod( self->decoder, "decode", "s#", input, 1); with: PyObject *decoded = PyObject_CallMethod( self->decoder, "decode", "s#&q

[issue9957] SpooledTemporayFile.truncate should take size parameter

2011-11-24 Thread Antoine Pitrou
Antoine Pitrou added the comment: Looks ok to me as well. I think this is a new feature, so 3.3-only IMHO. -- nosy: +pitrou ___ Python tracker <http://bugs.python.org/issue9

[issue11849] glibc allocator doesn't release all free()ed memory

2011-11-24 Thread Antoine Pitrou
Antoine Pitrou added the comment: For the record, this seems to make large allocations slower: -> with patch: $ ./python -m timeit "b'x'*20" 1 loops, best of 3: 27.2 usec per loop -> without patch: $ ./python -m timeit "b'x'*20" 10

[issue13448] PEP 3155 implementation

2011-11-24 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Is it intended that pickle will use __qualname__? That's part of the plan for PEP 3154, yes. -- ___ Python tracker <http://bugs.python.org

[issue11849] glibc allocator doesn't release all free()ed memory

2011-11-24 Thread Antoine Pitrou
Antoine Pitrou added the comment: More surprising is that, even ignoring the allocation cost, other operations on the memory area seem more expensive: $ ./python -m timeit -s "b=bytearray(50)" "b[:] = b" -> python 3.3: 1000 loops, best of 3: 367 usec per loop -&g

[issue11849] glibc allocator doesn't release all free()ed memory

2011-11-25 Thread Antoine Pitrou
Antoine Pitrou added the comment: > I see you're comparing 3.2 and default: could you run the same > benchmark on default with and without the patch ? Same results: -> default branch: 1000 loops, best of 3: 364 usec per loop -> default branch with patch reverted: 1 loop

[issue11849] glibc allocator doesn't release all free()ed memory

2011-11-25 Thread Antoine Pitrou
Antoine Pitrou added the comment: Ah, sorry, false alarm. "b[:] = b" actually makes a temporary copy of the bytearray when assigning to itself (!). However, there's still another strange regression: $ ./python -m timeit \ -s "n=30; f=open('10MB.bin', &#x

[issue11365] Integrate Buildroot patches (cross-compilation)

2011-11-25 Thread Antoine Pitrou
Antoine Pitrou added the comment: > The distutils changes will not happen, we’re under a feature freeze. > Cross-compilation support would need to be added to packaging, and we > need to port Python’s build process to packaging too for 3.4 or 3.5. Why 3

[issue13461] Error on test_issue_1395_5 with Python 2.7 and VS2010

2011-11-25 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- versions: +Python 3.2, Python 3.3 ___ Python tracker <http://bugs.python.org/issue13461> ___ ___ Python-bugs-list mailing list Unsub

[issue13461] Error on test_issue_1395_5 with Python 2.7 and VS2010

2011-11-25 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- priority: normal -> high type: -> crash ___ Python tracker <http://bugs.python.org/issue13461> ___ ___ Python-bugs-list

[issue9957] SpooledTemporayFile.truncate should take size parameter

2011-11-25 Thread Antoine Pitrou
Antoine Pitrou added the comment: Committed, thank you. By the way, Ryan, we now use Mercurial for developing, the Subversion repository is obsolete (see the devguide for more info). -- ___ Python tracker <http://bugs.python.org/issue9

[issue13448] PEP 3155 implementation

2011-11-25 Thread Antoine Pitrou
Antoine Pitrou added the comment: Now committed together with docs and a what's new entry. Thanks for the reviews! -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker <http:

[issue13402] Document absoluteness of sys.executable

2011-11-25 Thread Antoine Pitrou
Antoine Pitrou added the comment: LGTM too. You could also add a test to test_sys ensuring that sys.executable is always executable. -- ___ Python tracker <http://bugs.python.org/issue13

[issue13402] Document absoluteness of sys.executable

2011-11-25 Thread Antoine Pitrou
Antoine Pitrou added the comment: > > You could also add a test to test_sys ensuring that sys.executable > > is always executable. > > And that sys.executable is absolute? Er, yes, that's what I meant. Sorry. -- __

[issue12856] tempfile PRNG reuse between parent and child process

2011-11-25 Thread Antoine Pitrou
Antoine Pitrou added the comment: Patch committed, thank you! -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.python.or

[issue11849] glibc allocator doesn't release all free()ed memory

2011-11-25 Thread Antoine Pitrou
Antoine Pitrou added the comment: > On my box: > default: > $ ./python -m timeit -s "n=30; f=open('/tmp/10MB.bin', 'rb'); > b=bytearray(n)" "f.seek(0);f.readinto(b)" > 1000 loops, best of 3: 640 usec per loop > > default wi

[issue12567] curses implementation of Unicode is wrong in Python 3

2011-11-25 Thread Antoine Pitrou
Antoine Pitrou added the comment: This broke several Gentoo buildbots. -- nosy: +pitrou ___ Python tracker <http://bugs.python.org/issue12567> ___ ___ Python-bug

[issue13481] Use an accurate clock in timeit

2011-11-25 Thread Antoine Pitrou
New submission from Antoine Pitrou : This patch uses an accurate POSIX clock if possible in the timeit module. -- components: Library (Lib) files: timeit_clock.patch keywords: patch messages: 148369 nosy: georg.brandl, pitrou priority: normal severity: normal stage: patch review status

[issue13448] PEP 3155 implementation

2011-11-25 Thread Antoine Pitrou
Antoine Pitrou added the comment: > There are some callables which are missing __qualname__: > > method_descriptor > wrapper_descriptor > builtin_function_or_method > > For the descriptors, at least, obj.__qualname__ should be equivalent to > > ob

[issue13481] Use an accurate clock in timeit

2011-11-26 Thread Antoine Pitrou
Antoine Pitrou added the comment: Well, you only call the clock at the begining and end of a timing run, not at each iteration. -- ___ Python tracker <http://bugs.python.org/issue13

[issue13481] Use an accurate clock in timeit

2011-11-26 Thread Antoine Pitrou
Antoine Pitrou added the comment: > With CLOCK_PROCESS_CPUTIME_ID: > - depending on the platform, we'll measure either wall-clock time or > CPU time Indeed. I thought CPU time would be more useful (and that's the point of the patch) but perhaps it breaks the spec. >

[issue13481] Use an accurate clock in timeit

2011-11-26 Thread Antoine Pitrou
Antoine Pitrou added the comment: > > But does it include kernel CPU time for the given process? > > Yes. But it won't be reliable, for example, to measure the performance > of a new readinto() implentation, since time spent by the process in > 'S' or '

[issue13483] Use VirtualAlloc to allocate memory arenas

2011-11-26 Thread Antoine Pitrou
New submission from Antoine Pitrou : Similar to issue #11849, this patch proposes to use VirtualAlloc/VirtualFree to allocate the Python allocator's memory arenas (rather than malloc() / free()). It might help release more memory if there is some fragmentation, although I don'

[issue12618] py_compile cannot create files in current directory

2011-11-26 Thread Antoine Pitrou
Antoine Pitrou added the comment: The tests break on the Windows buildbots: == ERROR: test_relative_path (test.test_py_compile.PyCompileTests) -- Traceback

<    1   2   3   4   5   6   7   8   9   10   >