[issue13155] Optimize finding the max character width

2011-10-11 Thread Antoine Pitrou
Antoine Pitrou added the comment: Slightly cleaned up patch after Victor's comments in private. -- Added file: http://bugs.python.org/file23381/find_max_char3.patch ___ Python tracker <http://bugs.python.org/is

[issue13155] Optimize finding the max character width

2011-10-11 Thread Antoine Pitrou
Antoine Pitrou added the comment: Ok, updated patch. -- Added file: http://bugs.python.org/file23382/find_max_char4.patch ___ Python tracker <http://bugs.python.org/issue13

[issue13155] Optimize finding the max character width

2011-10-11 Thread Antoine Pitrou
Antoine Pitrou added the comment: > > Ok, updated patch. > > "ret = ~mask + 1;" looks wrong: (~0xFF80+1) gives 128, not 127. That's on purpose, since the mask has just matched. If 0xFF80 matches, then the max char can't be 127, it has to be at least 1

[issue12555] PEP 3151 implementation

2011-10-11 Thread Antoine Pitrou
Antoine Pitrou added the comment: Thanks everyone for the reviews! -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.python.or

[issue13156] _PyGILState_Reinit assumes auto thread state will always exist which is not true.

2011-10-12 Thread Antoine Pitrou
Antoine Pitrou added the comment: > How many moons before Python 2.7.3 though? If you convince python-dev that's it's a critical bug (is it?) I suppose it could happen soon. -- ___ Python tracker <http://bugs.pytho

[issue13150] Most of Python's startup time is sysconfig

2011-10-12 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Actually, #9878 should supersede this bug: it proposes to generate a C > module to avoid parsing Makefile and pyconfig.h, and your patch > proposes to generate a Python module with the same goal. Well, #9878 doesn't have a patch, but pe

[issue13149] optimization for append-only StringIO

2011-10-12 Thread Antoine Pitrou
Antoine Pitrou added the comment: Yes, these are things I've been wondering about. The use-case for an append-only StringIO is obviously overlapping with the use-case for using ''.join(). However, the implementation I'm proposing is better than ''.join() w

[issue13146] Writing a pyc file is not atomic

2011-10-12 Thread Antoine Pitrou
Antoine Pitrou added the comment: > > This new patch also fixes importlib. > > """ > path_tmp = path + '.tmp' > with _io.FileIO(path_tmp, 'wb') as file: > file.write(data) >

[issue13155] Optimize finding the max character width

2011-10-12 Thread Antoine Pitrou
Antoine Pitrou added the comment: > find_max_char5.patch: > - don't use adjusted ~mask+1: "precompute" the right max_char > - rename findwidth.h to find_max_char.h > - add some #undef Thank you, I've committed this version. -- resolution: -> fixed s

[issue13159] _io.FileIO uses a quadratic-time buffer growth algorithm

2011-10-12 Thread Antoine Pitrou
Antoine Pitrou added the comment: The patch looks good to me, thanks. -- versions: +Python 2.7, Python 3.2 ___ Python tracker <http://bugs.python.org/issue13

[issue13154] pep-0000.txt doesn't build anymore

2011-10-12 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +georg.brandl ___ Python tracker <http://bugs.python.org/issue13154> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue12807] Optimization/refactoring for {bytearray, bytes, unicode}.strip()

2011-10-12 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Please double check the removal of _PyUnicode_XStrip. I think it's ok. It is private, undocumented, and the only references returned by Google Code Search are in Python itself. I'll review the patch later, thank you. -- title: Mo

[issue13159] _io.FileIO uses a quadratic-time buffer growth algorithm

2011-10-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: Thank you :) -- ___ Python tracker <http://bugs.python.org/issue13159> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue13134] speed up finding of one-character strings

2011-10-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: > I think the >1 character sizes are overly complex in this patch, and > still memchr isn't typically used for them. So I suggest to simplify > the code and restrict it to 1-byte chars only. I would rather propose to simplify the needle heuri

[issue13163] `port` and `host` are confused in `_get_socket

2011-10-13 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +r.david.murray ___ Python tracker <http://bugs.python.org/issue13163> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue13165] Integrate stringbench in the Tools directory

2011-10-13 Thread Antoine Pitrou
New submission from Antoine Pitrou : The stringbench suite of micro-benchmarks, currently available through SVN at http://svn.python.org/projects/sandbox/trunk/stringbench, would probably be a reasonable addition to the Tools directory. -- components: Demos and Tools keywords: easy

[issue13150] Most of Python's startup time is sysconfig

2011-10-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: > > A Python solution would be more useful for other implementations > > if enough of the sysconfig info is not CPython specific. > That’s the point: the info currently parsed at runtime by sysconfig is > specific to CPython (Makefile and pyco

[issue13146] Writing a pyc file is not atomic

2011-10-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: Ok, here is a new patch using O_EXCL. Also, since import.c is quite different in 3.2, I'm not sure I will bother backporting. -- versions: -Python 3.2 Added file: http://bugs.python.org/file23396/importrename3.

[issue13088] Add Py_hexdigits constant: use one unique constant to format a digit to hexadecimal

2011-10-15 Thread Antoine Pitrou
Antoine Pitrou added the comment: You broke compilation under Windows. -- assignee: -> haypo nosy: +pitrou ___ Python tracker <http://bugs.python.org/issu

[issue13139] multiprocessing.map skips finally blocks

2011-10-15 Thread Antoine Pitrou
Antoine Pitrou added the comment: As mentioned in http://docs.python.org/dev/library/multiprocessing#multiprocessing.pool.AsyncResult.get “If the remote call raised an exception then that exception will be reraised by get().” map() is just map_async() followed by a get() call on the result

[issue10653] test_time test_strptime fails on windows

2011-10-15 Thread Antoine Pitrou
Antoine Pitrou added the comment: Crashes on the Windows buildbots: f:\dd\vctools\crt_bld\self_x86\crt\src\strftime.c(832) : Assertion failed: ( "Invalid format directive" , 0 ) f:\dd\vctools\crt_bld\self_x86\crt\src\strftime.c(484) : Assertion failed: FALSE -- assignee:

[issue13187] relative imports don't work when circular

2011-10-15 Thread Antoine Pitrou
New submission from Antoine Pitrou : This is, to say the least, annoying. $ mkdir mypackage $ touch mypackage/__init__.py $ echo "from . import b" > mypackage/a.py $ echo "from . import a" > mypackage/b.py $ ./python -c "import mypackage.a" Traceback (most

[issue13187] relative imports don't work when circular

2011-10-15 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +brett.cannon ___ Python tracker <http://bugs.python.org/issue13187> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue13188] generator.throw() ignores __traceback__ of exception

2011-10-15 Thread Antoine Pitrou
New submission from Antoine Pitrou : In the following code, the original traceback attached to the exception thrown into the generator is ignored: def gen(): try: yield except: raise g = gen() try: 1/0 except ZeroDivisionError as v: g.throw(v) But if you

[issue13192] ImportError silences low-level OS errors

2011-10-16 Thread Antoine Pitrou
New submission from Antoine Pitrou : Not sure this is by design or not, but I wanted to report this issue (it's rather hard to diagnose). Here the file descriptor limit is reached, and "import" raises an ImportError while it would be more helpful to let the original OS err

[issue13192] ImportError silences low-level OS errors

2011-10-16 Thread Antoine Pitrou
Antoine Pitrou added the comment: > _Py_fopen() returns NULL without raising an exception if fopen() fails. > > Attached patch raises a OSError if fopen() if errno is different than > ENOENT. I don't know if ENOENT is the right error number on Windows. It seems so. > S

[issue13193] test_packaging and test_distutils failures under Windows

2011-10-16 Thread Antoine Pitrou
New submission from Antoine Pitrou : http://www.python.org/dev/buildbot/all/builders/x86%20XP-5%203.x/builds/3593/steps/test/logs/stdio -- assignee: tarek components: Distutils, Distutils2, Library (Lib), Tests messages: 145643 nosy: alexis, eric.araujo, pitrou, tarek priority: high

[issue13192] ImportError silences low-level OS errors

2011-10-16 Thread Antoine Pitrou
Antoine Pitrou added the comment: > I don't think that fopen() can fails with ENOTDIR. According to POSIX: [ENOTDIR] A component of the path prefix is not a directory, or the filename argument contains at least one non- character and ends with one or more trailing characters

[issue13194] zlib (de)compressobj copy() method missing on Windows

2011-10-16 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +loewis, nadeem.vawda versions: +Python 3.3 ___ Python tracker <http://bugs.python.org/issue13194> ___ ___ Python-bugs-list m

[issue13192] ImportError silences low-level OS errors

2011-10-17 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Are you suggesting raising the OSError (or something else) rather than > an ImportError? If so, would it make sense to chain the exception > instead. That way the existing code that expects ImportError > continues to work Does any existing

[issue13146] Writing a pyc file is not atomic

2011-10-17 Thread Antoine Pitrou
Antoine Pitrou added the comment: Should be fixed now. Thanks for the reviews! -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.python.or

[issue12797] io.FileIO and io.open should support openat

2011-10-17 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Attached is a patch which adds dirfd= as a keyword argument. Thanks. Although, on second thought, I'm not sure whether Amaury's idea (allowing a custom opener) is not better... Thoughts? -- ___ P

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

2011-10-18 Thread Antoine Pitrou
Antoine Pitrou added the comment: > I made the > decision to raise a ValueError decision because __contains__ of both > bytes and bytearray raise a ValueError when passed an integer not in > range(0, 256). That sounds reasonable. OverflowError would have been another choice, but I

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

2011-10-18 Thread Antoine Pitrou
Antoine Pitrou added the comment: Doc/library/stdtypes.rst needs a "versionadded" tag for the additional semantics. Also, the patch doesn't compile fine on current default: In file included from Objects/unicodeobject.c:487:0: Objects/stringlib/find

[issue13188] generator.throw() ignores __traceback__ of exception

2011-10-18 Thread Antoine Pitrou
Antoine Pitrou added the comment: Thank you! There is a memory leak somewhere: $ ./python -m test -R 3:2 test_generators [1/1] test_generators beginning 5 repetitions 12345 . test_generators leaked [1945, 1945] references, sum=3890 1 test failed: test_generators Also, since the patch

[issue13188] generator.throw() ignores __traceback__ of exception

2011-10-18 Thread Antoine Pitrou
Antoine Pitrou added the comment: Actually, it is documented: “Return the traceback associated with the exception as a new reference (...)” http://docs.python.org/dev/c-api/exceptions.html#PyException_GetTraceback Thanks for the patch, will apply

[issue13188] generator.throw() ignores __traceback__ of exception

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

[issue13150] Most of Python's startup time is sysconfig

2011-10-18 Thread Antoine Pitrou
Antoine Pitrou added the comment: Done! If someone wants to give life to the C approach, they are welcome :) -- resolution: -> fixed stage: -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.python.or

[issue13193] test_packaging and test_distutils failures under Windows

2011-10-18 Thread Antoine Pitrou
Antoine Pitrou added the comment: Similar test failure under x86 OpenIndiana: == ERROR: test_resources (packaging.tests.test_command_install_data.InstallDataTestCase

[issue13218] test_ssl failures on Ubuntu 11.10

2011-10-19 Thread Antoine Pitrou
Antoine Pitrou added the comment: All the tests work fine with OpenSSL 1.0.0d under Mageia. Could you look into Ubuntu-specific patches to OpenSSL? They have known to add disruptive changes (we already have some Ubuntu-specific code in test_ssl). Also, how about the system Python? Does it

[issue13218] test_ssl failures on Ubuntu 11.10

2011-10-19 Thread Antoine Pitrou
Antoine Pitrou added the comment: Actually, I think you may just have to fix skip_if_broken_ubuntu_ssl() in test_ssl.py. Could you give it a try? -- ___ Python tracker <http://bugs.python.org/issue13

[issue13218] test_ssl failures on Ubuntu 11.10

2011-10-19 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Attached patch updates skip_if_broken_ubuntu_ssl(): OpenSSL in Ubuntu > is still broken :-( OpenSSL package version is 1.0.0e-2ubuntu4 but in > Python, ssl.OPENSSL_VERSION_INFO is still (0, 9, 8, 15, 15) !? Are you sure? Did yo

[issue13218] test_ssl failures on Ubuntu 11.10

2011-10-19 Thread Antoine Pitrou
Antoine Pitrou added the comment: > AssertionError: Client protocol SSLv23 succeeded with server protocol SSLv3! > AssertionError: Client protocol SSLv23 succeeded with server protocol TLSv1! Hmm... I guess Ubuntu may have aliased SSLv23 to SSLv3. Can someone take a look at Ubuntu patc

[issue13212] json library is decoding/encoding when it should not

2011-10-19 Thread Antoine Pitrou
Antoine Pitrou added the comment: Agreed that a strict parameter would be a good idea to implement this. Since it's technically a new feature (and not that important), I think only 3.3 should receive it. -- nosy: +pitrou ___ Python tracker

[issue6715] xz compressor support

2011-10-19 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Apart from this, is there anything else that needs to be done before this > change can be committed to the main repo? Things look fine to me, apart from a couple of minor comments I've made on the

[issue13222] Erroneous unclosed file warning

2011-10-19 Thread Antoine Pitrou
Antoine Pitrou added the comment: Since the "name" is 7, it's certainly another file than the one opened in: f = open("/proc/%s/cmdline" % self.pid) It could be that you called open on the result of os.pipe(), or perhaps you used a subprocess and didn'

[issue12619] Automatically regenerate platform-specific modules

2011-10-19 Thread Antoine Pitrou
Antoine Pitrou added the comment: > If they don't hurt, why remove them? Bogus constants don't hurt? -- ___ Python tracker <http://bugs.pytho

[issue1602] windows console doesn't print or input Unicode

2011-10-19 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +brian.curtin, mhammond ___ Python tracker <http://bugs.python.org/issue1602> ___ ___ Python-bugs-list mailing list Unsub

[issue7322] Socket timeout can cause file-like readline() method to lose data

2011-10-20 Thread Antoine Pitrou
Antoine Pitrou added the comment: > One could then continue processing, sending new transactions to the POP > server and getting responses. That's optimistic. You don't know how much data has been lost in readline(). Sure, again your test server, it happens to work :) But a

[issue13234] os.listdir breaks with literal paths

2011-10-20 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +brian.curtin, pitrou, tim.golden stage: -> patch review versions: +Python 3.2, Python 3.3 ___ Python tracker <http://bugs.python.org/issu

[issue13234] os.listdir breaks with literal paths

2011-10-20 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +haypo ___ Python tracker <http://bugs.python.org/issue13234> ___ ___ Python-bugs-list mailing list Unsubscribe:

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

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

[issue13240] computed gotos not enabled?

2011-10-21 Thread Antoine Pitrou
Antoine Pitrou added the comment: > According to issue 9203 the computed gotos should be enabled by default since > 3.2. > However, it is not visible from the interpreter. > > Python 3.2.2 (default, Sep 7 2011, 10:55:43) > [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on

[issue13240] sysconfig gives misleading results for USE_COMPUTED_GOTOS

2011-10-21 Thread Antoine Pitrou
Antoine Pitrou added the comment: > This looks like the system Python compiled by Apple. What about a > hand-compiled Python? Forget this. I get the same results here. However, if you add a "#error" at the right place in ceval.c, you'll see that computed gotos are enable

[issue13228] Add "Quick Start" section to the devguide index

2011-10-21 Thread Antoine Pitrou
Antoine Pitrou added the comment: You could replace "python -m test" with "make test", although it only does the right thing in 3.3. Otherwise, "python -m test -j3" would be friendlier to the reader I think :) +1 on the principle, by the

[issue13228] Add "Quick Start" section to the devguide index

2011-10-21 Thread Antoine Pitrou
Antoine Pitrou added the comment: > New patch that adds a few more instructions for Windows/Mac OS. `make > test` is UNIX-specific, so I left `./python -m test`. > I also moved the section before the quick links, since it seems to me > more interesting that those links (you don&#x

[issue13240] sysconfig gives misleading results for USE_COMPUTED_GOTOS

2011-10-21 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Extract of my pyconfig.h > - > /* Define if you want to use computed gotos in ceval.c. */ > /* #undef USE_COMPUTED_GOTOS */ > - Ok, now read ceval.c: #ifdef HAVE

[issue13240] sysconfig gives misleading results for USE_COMPUTED_GOTOS

2011-10-21 Thread Antoine Pitrou
Antoine Pitrou added the comment: > With the #error, I can confirm that computed gotos are enabled on OS X. > > About sysconfig, we may change the code to set None if the value is "undef". > I don't know the impact. Actually, I think sysconfig does the right thi

[issue13239] Remove <> operator from Grammar/Grammar

2011-10-21 Thread Antoine Pitrou
Antoine Pitrou added the comment: > OTOH, __future__ imports (even jokes) should never be removed. But their meaning can be altered? (as part of another joke if you want :) -- nosy: +pitrou ___ Python tracker <http://bugs.python.org/issu

[issue1548891] shlex (or perhaps cStringIO) and unicode strings

2011-10-21 Thread Antoine Pitrou
Antoine Pitrou added the comment: Still happens on latest 2.7: >>> from cStringIO import StringIO >>> sio = StringIO(u"abc") >>> sio.getvalue() 'a\x00b\x00c\x00' -- nosy: +pitrou resolution: fixed -> stage: -> needs patch sta

[issue1548891] shlex (or perhaps cStringIO) and unicode strings

2011-10-21 Thread Antoine Pitrou
Antoine Pitrou added the comment: And unsurprisingly so, since the fix was reverted in r56830 by Georg. -- ___ Python tracker <http://bugs.python.org/issue1548

[issue1548891] shlex (or perhaps cStringIO) and unicode strings

2011-10-21 Thread Antoine Pitrou
Antoine Pitrou added the comment: Georg, is this patch ok to you? -- assignee: georg.brandl -> keywords: +patch Added file: http://bugs.python.org/file23492/cio.patch ___ Python tracker <http://bugs.python.org/issue1

[issue13242] Crash in test_pydoc

2011-10-21 Thread Antoine Pitrou
New submission from Antoine Pitrou : On 2.7, I get the following crashes in test_pydoc: == FAIL: test_apropos_with_bad_package (test.test_pydoc.PydocImportTest

[issue13242] Crash in test_pydoc

2011-10-21 Thread Antoine Pitrou
Antoine Pitrou added the comment: Hmm, it seems it's due to a 3rd party C extension: $ ./python -c "import sqlalchemy.cprocessors" python: Objects/object.c:65: _Py_AddToAllObjects: Assertion `(op->_ob_prev == ((void *)0)) == (op->_ob_next == ((void *)0))' failed. C

[issue13242] Crash in test_pydoc

2011-10-21 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- resolution: -> invalid status: open -> closed ___ Python tracker <http://bugs.python.org/issue13242> ___ ___ Python-bugs-

[issue13238] Add shell command helpers to shutil module

2011-10-21 Thread Antoine Pitrou
Antoine Pitrou added the comment: Hum, in: return_code = shellcmd.shell_call('ls -l {}', dirname) listing = shellcmd.check_shell_output('ls -l {}', dirname) ...how do you know that dirname doesn't need some kind of escaping? This is not only a security issue, bu

[issue13212] json library is decoding/encoding when it should not

2011-10-21 Thread Antoine Pitrou
Antoine Pitrou added the comment: > HTMLParser got a strict argument and it's causing more problems than it > solves. Well, HTML is a big can of worms while JSON is a rather clean format. We can hope that adding a strict argument to json wouldn't cau

[issue13238] Add shell command helpers to shutil module

2011-10-21 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Yes, you have to be careful that "dirname" is legal in the shell, but > that usually isn't a big problem in practice, because dirname came > from a previous listdir call, or you otherwise know that it's valid to > interpol

[issue13238] Add shell command helpers to shutil module

2011-10-21 Thread Antoine Pitrou
Antoine Pitrou added the comment: > That's a fair point, but I think it actually *improves* the argument > for better helper functions Agreed :) -- ___ Python tracker <http://bugs.python.

[issue12406] msi.py needs updating for Python 3.3

2011-10-22 Thread Antoine Pitrou
Antoine Pitrou added the comment: Can't you use the normal algorithm for short names? I.e. KEYCER~1.PEM etc. Or doesn't it exist anymore? -- ___ Python tracker <http://bugs.python.o

[issue1548891] shlex (or perhaps cStringIO) and unicode strings

2011-10-22 Thread Antoine Pitrou
Antoine Pitrou added the comment: > If you think it's fine to change this behavior, then yes :) Well, the "documented" behaviour makes no sense. Either it should raise TypeError or convert. Since write() converts, it's logical for the constructor to do so as well.

[issue13218] test_ssl failures on Ubuntu 11.10

2011-10-22 Thread Antoine Pitrou
Antoine Pitrou added the comment: Barry, perhaps you could try to know what in Ubuntu's OpenSSL build can lead to such failures? -- nosy: +barry ___ Python tracker <http://bugs.python.org/is

[issue13246] Py_UCS4_strlen and friends needn't be public

2011-10-22 Thread Antoine Pitrou
New submission from Antoine Pitrou : It seems there's no reason to document these functions which operate on null-terminated unicode arrays. -- assignee: docs@python components: Documentation messages: 146187 nosy: docs@python, ezio.melotti, georg.brandl, haypo, loewis, pitrou pri

[issue11183] Finer-grained exceptions for the ssl module

2011-10-22 Thread Antoine Pitrou
Antoine Pitrou added the comment: Here is a patch. It adds SSLZeroReturnError, SSLWantReadError, SSLWantWriteError, SSLSyscallError and SSLEOFError. -- keywords: +patch Added file: http://bugs.python.org/file23498/sslerrors.patch ___ Python tracker

[issue11183] Finer-grained exceptions for the ssl module

2011-10-22 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- stage: needs patch -> patch review ___ Python tracker <http://bugs.python.org/issue11183> ___ ___ Python-bugs-list mai

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

2011-10-23 Thread Antoine Pitrou
Antoine Pitrou added the comment: I'm not sure, but I think that would be for the case where you are spawning the server yourself and the child process takes time to start up. -- nosy: +neologix, pitrou ___ Python tracker <http://bugs.py

[issue10332] Multiprocessing maxtasksperchild results in hang

2011-10-23 Thread Antoine Pitrou
Antoine Pitrou added the comment: The patch looks good to me, thanks. -- versions: +Python 3.3 -Python 3.1 ___ Python tracker <http://bugs.python.org/issue10

[issue13141] get rid of old threading API in the examples

2011-10-23 Thread Antoine Pitrou
Antoine Pitrou added the comment: Should be closed, no? -- nosy: +pitrou ___ Python tracker <http://bugs.python.org/issue13141> ___ ___ Python-bugs-list mailin

[issue8828] Atomic function to rename a file

2011-10-23 Thread Antoine Pitrou
Antoine Pitrou added the comment: MoveFileTransacted is only available under Vista or later. You should be able to use MoveFileEx for the same effect. -- ___ Python tracker <http://bugs.python.org/issue8

[issue8828] Atomic function to rename a file

2011-10-23 Thread Antoine Pitrou
Antoine Pitrou added the comment: "The solution? Let's remember that metadata changes are atomic. Rename is such a case." This is from a MSDN blog, I would hope he knows what he's talking about. http://blogs.msdn.com/b/adioltean/archive/2005/12/28/507866.aspx (MoveFileE

[issue9239] zipfile: truncating comment can corrupt the zipfile

2011-10-23 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- stage: -> patch review type: performance -> behavior versions: +Python 3.3 ___ Python tracker <http://bugs.python.org/

[issue6216] Raise Unicode KEEPALIVE_SIZE_LIMIT from 9 to 32?

2011-10-23 Thread Antoine Pitrou
Antoine Pitrou added the comment: Closing as outdated. There are no freelists anymore in the unicode implementation. -- resolution: -> out of date stage: -> committed/rejected status: open -> closed ___ Python tracker <http://bug

[issue10363] Embedded python, handle (memory) leak

2011-10-23 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +pitrou versions: +Python 3.2, Python 3.3 -Python 2.7 ___ Python tracker <http://bugs.python.org/issue10363> ___ ___ Pytho

[issue11447] test_pydoc refleak

2011-10-23 Thread Antoine Pitrou
Antoine Pitrou added the comment: I can't reproduce anymore. I believe this may have been due to the fact that pydoc can try to import everything on sys.path, including third-party libraries. I got bitten by that on another issue. -- resolution: -> invalid stage: nee

[issue8828] Atomic function to rename a file

2011-10-24 Thread Antoine Pitrou
Antoine Pitrou added the comment: > > "The solution? Let's remember that metadata changes are atomic. Rename is > > such a case." > > > > Hmmm. > Is he referring to the "standard" rename? The blog doesn't evoke a > specific functio

[issue13254] maildir.items() broken

2011-10-24 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +r.david.murray versions: +Python 3.3 ___ Python tracker <http://bugs.python.org/issue13254> ___ ___ Python-bugs-list mailin

[issue13248] deprecated in 3.2, should be removed in 3.3

2011-10-24 Thread Antoine Pitrou
Antoine Pitrou added the comment: > *array* > "fromstring" and "tostring" methods I think these ones (and other well-known 2.x methods) should be kept to ease porting to 3.x. -- nosy: +pitrou ___ Python tracke

[issue8828] Atomic function to rename a file

2011-10-24 Thread Antoine Pitrou
Antoine Pitrou added the comment: I see that Sun/Oracle Java trusts MoveFileEx to do atomic renames: 290 // atomic case 291 if (atomicMove) { 292 try { 293 MoveFileEx(sourcePath, targetPath, MOVEFILE_REPLACE_EXISTING); 294

[issue13256] Document and test new socket options

2011-10-24 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- assignee: -> docs@python components: +Documentation, Tests nosy: +docs@python stage: -> needs patch versions: +Python 3.3 ___ Python tracker <http://bugs.python.org/i

[issue13258] replace hasattr(obj, '__call__') with callable(obj)

2011-10-24 Thread Antoine Pitrou
Antoine Pitrou added the comment: For packaging I'm not sure it's worth complicating backporting. -- nosy: +eric.araujo, pitrou ___ Python tracker <http://bugs.python.o

[issue13259] __bytes__ not documented

2011-10-24 Thread Antoine Pitrou
Antoine Pitrou added the comment: Indeed. I didn't even remember we had that. There are tests, however, in Lib/test/test_bytes.py. This was added in issue #2415, by the way. -- nosy: +pitrou stage: -> needs patch versions: -Python 3.1, Py

[issue13234] os.listdir breaks with literal paths

2011-10-25 Thread Antoine Pitrou
Antoine Pitrou added the comment: Thanks for the patch. Is there a reason you don't use shutil.rmtree in tearDown()? I don't know if it's our business to convert forward slashes passed by the user. Also, general support for extended paths is anoth

[issue10278] add time.wallclock() method

2011-10-25 Thread Antoine Pitrou
Antoine Pitrou added the comment: CLOCK_MONOTONIC, CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID are optional according to POSIX, which only mandates CLOCK_REALTIME. You should mention it in the docs. You might also want to export clock_getres(): http://pubs.opengroup.org/onlinepubs

[issue13218] test_ssl failures on Debian/Ubuntu

2011-10-25 Thread Antoine Pitrou
Antoine Pitrou added the comment: > It looks like it's been this way for a long time too. But tests have always passed here using OpenSSL 1.0.0. > It's probably too difficult, and not really Python's responsibility, > to determine whether SSL_OP_NO_SSLv2 is set. Se

[issue13263] Group some os functions in submodules

2011-10-27 Thread Antoine Pitrou
Antoine Pitrou added the comment: I don't think submodules are a good idea. In practice, for example, urllib.request.urlopen is more painful to use than good old urllib.urlopen. If it's a matter of documentation, it can be split in several subchapters. If it's a matter of or

[issue13263] Group some os functions in submodules

2011-10-27 Thread Antoine Pitrou
Antoine Pitrou added the comment: > I agree about urllib.request.urlopen, but os.sched.get_priority_max() > is not longer than os.sched_get_priority_max(). Agreed. There are not many functions which could get this treatment, though. -- ___

[issue11183] Finer-grained exceptions for the ssl module

2011-10-27 Thread Antoine Pitrou
Antoine Pitrou added the comment: Committed now. -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.python.or

[issue13218] test_ssl failures on Debian/Ubuntu

2011-10-27 Thread Antoine Pitrou
Antoine Pitrou added the comment: For the record, both patches work fine here (Mageia 1, OpenSSL 1.0.0d). -- ___ Python tracker <http://bugs.python.org/issue13

[issue13279] Add memcmp into unicode_compare for optimizing comparisons

2011-10-27 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +ezio.melotti, haypo stage: -> patch review versions: -Python 3.4 ___ Python tracker <http://bugs.python.org/issu

[issue13188] generator.throw() ignores __traceback__ of exception

2011-10-27 Thread Antoine Pitrou
Antoine Pitrou added the comment: I agree with Arkadiusz, this doesn't seem to match Python 2's exception semantics, where you always specify the traceback explicitly if you want to. -- ___ Python tracker <http://bugs.python.o

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