[issue8411] New GIL: improve condition variable emulation on NT

2010-08-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: Closing as fixed, since nothing strange seems to have appeared so far. -- resolution: accepted -> fixed status: open -> closed ___ Python tracker <http://bugs.python.org/

[issue2281] Enhanced cPython profiler with high-resolution timer

2010-08-13 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- assignee: pitrou -> nosy: +belopolsky ___ Python tracker <http://bugs.python.org/issue2281> ___ ___ Python-bugs-list mai

[issue7862] fileio.c: ValueError vs. IOError with impossible operations

2010-08-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: All of them should probably raise io.UnsupportedOperation instead (which inherits from both IOError and ValueError). -- ___ Python tracker <http://bugs.python.org/issue7

[issue8844] Condition.wait() doesn't raise KeyboardInterrupt

2010-08-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: The portability API is now available (see Include/pytime.h). -- ___ Python tracker <http://bugs.python.org/issue8844> ___ ___

[issue9587] unittest.assertRaises() return the raised exception

2010-08-13 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- assignee: -> michael.foord ___ Python tracker <http://bugs.python.org/issue9587> ___ ___ Python-bugs-list mailing list Unsubscri

[issue9585] Largefile detection in configure fails

2010-08-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: The expression "largefile support" is a bit misleading. What it simply does is that it uses "long long" instead of "long" in order to store and compute file offsets. But, since a long is wide enough on your system to hold a

[issue9548] locale can be imported at startup but relies on too many library modules

2010-08-13 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +ncoghlan ___ Python tracker <http://bugs.python.org/issue9548> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue9425] Rewrite import machinery to work with unicode paths

2010-08-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: About wchar2char: - PEP 383 says “With this PEP, non-decodable bytes >= 128 will be represented as lone surrogate codes U+DC80..U+DCFF. Bytes below 128 will produce exceptions”. Your patch accepts bytes below 128. - I don't understand why you decreme

[issue9589] test_heapq: AttributeError: 'int' object has no attribute 'pop'

2010-08-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: This is a variant of the kind of annoyance pointed out in #9548. Here, it seems addbuilddir() in Lib/site.py shouldn't import sysconfig, because it imports the re module. -- nosy: +pitrou ___ Python tracker

[issue9589] test_heapq: AttributeError: 'int' object has no attribute 'pop'

2010-08-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: Here is a patch which works if the patch in #9548 is also applied. It won't work alone because opening a file in text mode currently imports locale which imports re, etc. ... all before adding the build dir to sys.path. Of course, since the log

[issue9589] test_heapq: AttributeError: 'int' object has no attribute 'pop'

2010-08-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: Here is a C version of addbuilddir. It solves the present issue. -- Added file: http://bugs.python.org/file18509/c-addbuildir.patch ___ Python tracker <http://bugs.python.org/issue9

[issue9593] utf8 codec readlines error after "\x85 "

2010-08-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: U+0085 corresponds to a line terminator (*). and codecs.open() observes this convention. Do note that the new io.open() (or the built-in open() in 3.x) only recognizes '\r' and '\n' as line separators. In any case, changing this b

[issue5867] No way to create an abstract classmethod

2010-08-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: The patch doesn't check that instantiating these methods work at all. -- nosy: +benjamin.peterson, pitrou stage: -> patch review versions: +Python 3.2 -Python 3.1 ___ Python tracker <http://bugs

[issue9593] utf8 codec readlines error after "\x85 "

2010-08-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Is there any way to get the efficiency of codecs I/O readlines() > chunking behavior and specify a list of characters to use? Can the > file delimiter be changed in python as in perl? No, but you can use readlines() from the standard open() functi

[issue9203] Use computed gotos by default

2010-08-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: I've committed a patch in r83986. I will watch the buildbots and close if everything's fine. -- assignee: -> pitrou resolution: -> fixed stage: needs patch -> committed/rejected status: open -> pending

[issue5867] No way to create an abstract classmethod

2010-08-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: Thank you. I'm not an ABC expert but it looks ok. Guido, what do you think? -- nosy: +gvanrossum ___ Python tracker <http://bugs.python.org/i

[issue9595] PC/getpathp.c unused?

2010-08-13 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: pitrou priority: normal severity: normal status: open title: PC/getpathp.c unused? ___ Python tracker <http://bugs.python.org/issue9

[issue9596] PC/getpathp.c unused?

2010-08-13 Thread Antoine Pitrou
New submission from Antoine Pitrou : PC/getpathp.c claims it is “Used by DOS, OS/2, Windows 3.1, Windows 95/98, Windows NT”, but Modules/getpath.c already tries to be cross-platform. It is not obvious whether the former is used at all. -- components: Interpreter Core messages: 113839

[issue9595] PC/getpathp.c unused?

2010-08-13 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- resolution: -> invalid status: open -> closed ___ Python tracker <http://bugs.python.org/issue9595> ___ ___ Python-bugs-list

[issue586680] -S hides standard dynamic modules

2010-08-13 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- resolution: wont fix -> duplicate superseder: -> test_heapq: AttributeError: 'int' object has no attribute 'pop' ___ Python tracker <http:

[issue9589] test_heapq: AttributeError: 'int' object has no attribute 'pop'

2010-08-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: I've committed an updated version of the C patch in r83988, after Victor's comments on IRC. -- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> pending ___ Py

[issue9203] Use computed gotos by default

2010-08-13 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- status: pending -> closed ___ Python tracker <http://bugs.python.org/issue9203> ___ ___ Python-bugs-list mailing list Unsubscri

[issue9589] test_heapq: AttributeError: 'int' object has no attribute 'pop'

2010-08-13 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- assignee: -> pitrou status: pending -> open ___ Python tracker <http://bugs.python.org/issue9589> ___ ___ Python-bugs-list

[issue9589] test_heapq: AttributeError: 'int' object has no attribute 'pop'

2010-08-13 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- status: open -> closed ___ Python tracker <http://bugs.python.org/issue9589> ___ ___ Python-bugs-list mailing list Unsubscri

[issue9596] PC/getpathp.c unused?

2010-08-14 Thread Antoine Pitrou
Antoine Pitrou added the comment: Oh, my bad. Is there any reason for the MS_WINDOWS guards in Modules/getpath.c, then? -- resolution: -> invalid status: open -> closed ___ Python tracker <http://bugs.python.org/

[issue9601] ftplib should accept 250 on MKD

2010-08-14 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +giampaolo.rodola ___ Python tracker <http://bugs.python.org/issue9601> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue9520] Add Patricia Trie high performance container

2010-08-14 Thread Antoine Pitrou
Antoine Pitrou added the comment: > For example, on the x64 machine the following dict() mapping > 10,000,000 very short unicode keys (~7 chars) to integers eats 149 > bytes per entry. This is counting the keys too. Under 3.x: >>> d = {} >>> for i in range(

[issue9520] Add Patricia Trie high performance container

2010-08-14 Thread Antoine Pitrou
Antoine Pitrou added the comment: So, here is the modified benchmark. It first creates a cache of the random wordlist, because it is quite long to compute (for N up to 1000). The cache is reused in subsequent runs. This takes some memory though (probably won't run it if you have

[issue4947] sys.stdout fails to use default encoding as advertised

2010-08-14 Thread Antoine Pitrou
Antoine Pitrou added the comment: Your patch threatens to break compatibility. I think it would be better to simply change the "encoding" and "errors" attributes of standard streams. -- ___ Python tracker <http://bu

[issue9602] PyObject_AsCharBuffer() should only accept read-only objects

2010-08-14 Thread Antoine Pitrou
Antoine Pitrou added the comment: I don't think we should change anything in 2.7 at this point. It risks breaking compatibility while we are at the end of the 2.x line, for little added benefit (the old buffer API has always been insecure with mutable buffers). As fo

[issue9548] locale can be imported at startup but relies on too many library modules

2010-08-14 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Can we close this issue, or do you consider that it is still very > important to not load too much modules at startup? The patch eases the bootstrap constraints by creating a bootstrap-friendly subset of locale.py. It is indeed much less pressing no

[issue1739648] zipfile.testzip() using progressive file reads

2010-08-14 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +pitrou ___ Python tracker <http://bugs.python.org/issue1739648> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue9605] os.getlogin() should use PEP 383 decoding to match the pwd module

2010-08-14 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +haypo ___ Python tracker <http://bugs.python.org/issue9605> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue9604] os.initgroups() doesn't accept PEP 383 usernames returned by pwd module

2010-08-14 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +haypo ___ Python tracker <http://bugs.python.org/issue9604> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue9603] os.ttyname() and os.ctermid() don't decode result according to PEP 383

2010-08-14 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +haypo ___ Python tracker <http://bugs.python.org/issue9603> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue8866] socket.getaddrinfo() should support keyword arguments

2010-08-14 Thread Antoine Pitrou
Antoine Pitrou added the comment: -.. function:: getaddrinfo(host, port, family=0, socktype=0, proto=0, flags=0) +.. function:: getaddrinfo(host, port[, family[, type[, proto[, flags) You should keep using the new documentation convention, that is: .. function:: getaddrinfo(host, port

[issue5996] abstract class instantiable when subclassing dict

2010-08-14 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +benjamin.peterson ___ Python tracker <http://bugs.python.org/issue5996> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue9607] Test file 'test_keyword.py' submission for use with keyword.py

2010-08-15 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +benjamin.peterson ___ Python tracker <http://bugs.python.org/issue9607> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue1710703] zipfile.ZipFile behavior inconsistent.

2010-08-15 Thread Antoine Pitrou
Antoine Pitrou added the comment: Two nits: - bug fixes shouldn't have a "versionadded" or "versionchanged" entry (it's only for new features) - Misc/NEWS should be in antichronological order -- nosy: +pitrou ___

[issue8844] Condition.wait() doesn't raise KeyboardInterrupt

2010-08-15 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Added a patch that adds support for recomputing the timeout, plus a test for > it. > > Can this still make it into 3.2, or is it too disruptive at this point > in the release process? No problem at this point, we're not yet in beta pha

[issue9295] test_close_open_print_buffered(test_file) sometimes crashes

2010-08-15 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Is freeing the memory allocated for setvbuf() while close() running in > another thread really safe? I don't know. I guess nobody does that. -- ___ Python tracker <http://bugs.python

[issue8449] buildbot: test_dbm and test_dbm_ndbm failures on ia64 Ubuntu 3.1

2010-08-15 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +doko ___ Python tracker <http://bugs.python.org/issue8449> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue5867] No way to create an abstract classmethod

2010-08-15 Thread Antoine Pitrou
Antoine Pitrou added the comment: The patch looks fine code-wise, but it also needs a doc addition in Doc/library/abc.rst. -- ___ Python tracker <http://bugs.python.org/issue5

[issue9610] buildbot: uncaptured python exception (smtpd), but no failure in regrtest

2010-08-15 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +richard ___ Python tracker <http://bugs.python.org/issue9610> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue9611] FileIO not 64-bit safe under Windows

2010-08-15 Thread Antoine Pitrou
New submission from Antoine Pitrou : Modules/_io/fileio.c assumes that read() and write() allow a Py_ssize_t length, but under Windows the length is an int, limiting chunk size to 2GB. It should be easy enough to read or write in multiple chunks, although testing might be difficult

[issue9566] Compilation warnings under x64 Windows

2010-08-15 Thread Antoine Pitrou
Antoine Pitrou added the comment: Created #9611 to report the FileIO 64-bit issue under Windows. -- ___ Python tracker <http://bugs.python.org/issue9566> ___ ___

[issue9612] setobject.c warnings under 64-bit Windows

2010-08-15 Thread Antoine Pitrou
New submission from Antoine Pitrou : None of these warnings look critical (one affects the "search finger" optimization of pop(), one affects the result from __length_hint__ on set iterators, and the other the hash value of frozensets without any obviously bad consequences), but

[issue9566] Compilation warnings under x64 Windows

2010-08-15 Thread Antoine Pitrou
Antoine Pitrou added the comment: Created #9612 for the mostly harmless warnings in the set implementation. -- ___ Python tracker <http://bugs.python.org/issue9

[issue9566] Compilation warnings under x64 Windows

2010-08-15 Thread Antoine Pitrou
Antoine Pitrou added the comment: The zlib warnings are genuine and there's a specific bug for 64-bitness of zlibmodule.c: #8650. -- ___ Python tracker <http://bugs.python.org/i

[issue9611] FileIO not 64-bit safe under Windows

2010-08-15 Thread Antoine Pitrou
Antoine Pitrou added the comment: os.write() (in posixmodule.c) is also affected. os.read(), however, is limited to 32-bit inputs. -- ___ Python tracker <http://bugs.python.org/issue9

[issue9613] Python considers pid longs under 64-bit Windows

2010-08-15 Thread Antoine Pitrou
New submission from Antoine Pitrou : Under 64-bit Windows, Python aliases PyLong_FromPid() to PyLong_FromLong() (and PyLong_AsPid() to PyLong_AsLong()), but a C "long" is 32-bit, while apparently the MSVCRT defines a pid to be intptr_t, that is 64-bit. A potential loss of d

[issue9611] FileIO not 64-bit safe under Windows

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

[issue9566] Compilation warnings under x64 Windows

2010-08-15 Thread Antoine Pitrou
Antoine Pitrou added the comment: Opened #9613 for 64-bitness of process ids. -- ___ Python tracker <http://bugs.python.org/issue9566> ___ ___ Python-bugs-list m

[issue9614] _pickle is not entirely 64-bit safe

2010-08-15 Thread Antoine Pitrou
New submission from Antoine Pitrou : A number of legitimate warnings get emitted under a 64-bit Windows build (in many places, _pickle uses ints or longs instead of "Py_ssize_t" variable to store various lengths and sizes): 1>..\Modules\_pickle.c(284) : warning C4244: '=&

[issue9566] Compilation warnings under x64 Windows

2010-08-15 Thread Antoine Pitrou
Antoine Pitrou added the comment: Opened #9614 for the _pickle issues (which look quite legitimate). -- ___ Python tracker <http://bugs.python.org/issue9

[issue9611] FileIO not 64-bit safe under Windows

2010-08-15 Thread Antoine Pitrou
Antoine Pitrou added the comment: The write() man page says: The number of bytes written may be less than count if, for example, there is insufficient space on the underlying physical medium, or the RLIMIT_FSIZE resource limit is encountered (see setrlimit(2)), or the

[issue9611] FileIO not 64-bit safe under Windows

2010-08-15 Thread Antoine Pitrou
Antoine Pitrou added the comment: > > Most people use buffered I/O, and the buffered layer automatically retries. > > I see. I think this is already slightly problematic: if you send an > interrupt, it won't oblige. IMO, any such loop ought to be > interruptable. Well,

[issue9611] FileIO not 64-bit safe under Windows

2010-08-15 Thread Antoine Pitrou
Antoine Pitrou added the comment: Le dimanche 15 août 2010 à 18:53 +, Martin v. Löwis a écrit : > Martin v. Löwis added the comment: > > > Well, the loop stops when an error status is returned by the raw IO > > layer. At that point, the buffered IO layer re-raises

[issue9615] Building SSL fails under 64-bit Windows

2010-08-15 Thread Antoine Pitrou
New submission from Antoine Pitrou : This is what I get when MSVC 2008 tries to build the _ssl module: 8>-- Build started: Project: _ssl, Configuration: Debug x64 -- 8>Performing Pre-Build Event... 8>'""' is not recognized as an internal or external command

[issue9612] setobject.c warnings under 64-bit Windows

2010-08-15 Thread Antoine Pitrou
Antoine Pitrou added the comment: There is also a similar warning for deque iterators' __length_hint__ (line 1124 in _collectionsmodule.c). -- ___ Python tracker <http://bugs.python.org/i

[issue9615] Building SSL fails under 64-bit Windows

2010-08-15 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Try setting HOST_PYTHON. It worked, thank you. -- resolution: -> fixed status: open -> closed ___ Python tracker <http://bugs.python.o

[issue9617] Buffered IO shouldn't ignore incoming signals during a partial write

2010-08-15 Thread Antoine Pitrou
New submission from Antoine Pitrou : Prompted by Martin in #9611, here is a patch fixing the new buffered IO layer so that an incoming signal during a successful partial write() doesn't get ignored. Tests included. -- components: IO files: sigbufio.patch keywords: patch mes

[issue9617] Buffered IO shouldn't ignore incoming signals during a partial write

2010-08-15 Thread Antoine Pitrou
Antoine Pitrou added the comment: Another possibility is to do the check in the FileIO object instead. Both approaches give the same results for standard file descriptor IO. -- ___ Python tracker <http://bugs.python.org/issue9

[issue9619] test_ssl freezes

2010-08-15 Thread Antoine Pitrou
New submission from Antoine Pitrou : Recently there have been test_ssl freezes on the buildbots. They seem to happen in the asyncore test case: http://www.python.org/dev/buildbot/builders/i386%20Ubuntu%203.x/builds/1903/steps/test/logs/stdio http://www.python.org/dev/buildbot/builders/x86

[issue9619] test_ssl freezes

2010-08-15 Thread Antoine Pitrou
Antoine Pitrou added the comment: Actually, this can be reproduced by running test_smtpd before test_ssl: $ ./python -m test.regrtest -v -uall test_smtpd test_ssl It then freezes at that point: [...] test_asyncore_server (test.test_ssl.ThreadedTests) Check the example asyncore integration

[issue9619] test_ssl freezes

2010-08-15 Thread Antoine Pitrou
Antoine Pitrou added the comment: > does test_smtpd register file descriptor 0 (stdin) in asyncore? After some debug prints, it turns out to be the case. One general problem is asyncore's global socket_map, which means it can leak between tests if some tests fail cleaning correct

[issue9619] test_ssl freezes

2010-08-15 Thread Antoine Pitrou
Antoine Pitrou added the comment: In r84086, I've added a save/restore guard of asyncore.socket_map to the regression test suite. It also warns when a test fails to leave the socket_map in its initial test. test_smtpd is the only test that displays the wa

[issue9622] Allow to set profile/trace function globally

2010-08-17 Thread Antoine Pitrou
Antoine Pitrou added the comment: Adding new "global" objects looks a bit complicated. Why not simply update all thread-local objects when the "global" flag is set? -- nosy: +pitrou ___ Python tracker <http://bu

[issue9622] Allow to set profile/trace function globally

2010-08-17 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Good question. Is that simple to do? I didn't think to look if there > were a central list of all python TLS states. There's a linked list from the current interpreter state, which in turn can be got from the current thread state (see I

[issue9601] ftplib should accept 250 on MKD

2010-08-17 Thread Antoine Pitrou
Antoine Pitrou added the comment: Well, given that both replies (expected and actual) are in the 25x category, and that (according to the RFC) “the third digit gives a finer gradation of meaning in each of the function categories, specified by the second digit”, perhaps practicality beats

[issue9629] SIZEOF_SOCKET_T used in longobject.h but undefined

2010-08-17 Thread Antoine Pitrou
New submission from Antoine Pitrou : longobject.h uses SIZEOF_SOCKET_T: #if SIZEOF_SOCKET_T <= SIZEOF_LONG #define PyLong_FromSocket_t(fd) PyLong_FromLong((SOCKET_T)(fd)) #define PyLong_AsSocket_t(fd) (SOCKET_T)PyLong_AsLong(fd) #else #define PyLong_FromSocket_t(fd) PyLong_FromLongL

[issue9629] SIZEOF_SOCKET_T used in longobject.h but undefined

2010-08-17 Thread Antoine Pitrou
Antoine Pitrou added the comment: This is witnessed in MSVC warning messages such as: 2>..\Modules\socketmodule.c(1611) : warning C4244: 'function' : conversion from 'SOCKET_T' to 'long', possible loss of data --

[issue4835] SIZEOF_SOCKET_T not defined

2010-08-17 Thread Antoine Pitrou
Antoine Pitrou added the comment: We don't need a separate header file, the definitions can go into pyport.h instead. -- nosy: +brian.curtin, pitrou, tim.golden versions: +Python 2.7 -Python 3.3 ___ Python tracker <http://bugs.python.org/i

[issue4835] SIZEOF_SOCKET_T not defined

2010-08-17 Thread Antoine Pitrou
Antoine Pitrou added the comment: However, since this makes SOCKET_T public, it should probably be renamed to Py_SOCKET_T. -- nosy: +loewis ___ Python tracker <http://bugs.python.org/issue4

[issue9612] setobject.c warnings under 64-bit Windows

2010-08-17 Thread Antoine Pitrou
Antoine Pitrou added the comment: This is now fixed in r84146 (py3k) and r84151 (3.1). I've made the "hash" field a Py_ssize_t, consistently with the dict implementation. -- resolution: -> fixed status: open -> closed ___

[issue9612] setobject.c warnings under 64-bit Windows

2010-08-17 Thread Antoine Pitrou
Antoine Pitrou added the comment: > I'm not sure whether backporting it to 3.1 is a good idea. It's > potentially an ABI change (although a minor one, as the field offsets > remain the same, only the interpretation of the padding may change). Well, it is unlikely that

[issue4835] SIZEOF_SOCKET_T not defined

2010-08-17 Thread Antoine Pitrou
Antoine Pitrou added the comment: After trying it out, pulling SOCKET in the Python headers brings complications under Windows, because you need to include which in turn breaks compilation of _pickle.c (duplicate definition of "FLOAT", "INT", etc.). An alternative

[issue4835] SIZEOF_SOCKET_T not defined

2010-08-17 Thread Antoine Pitrou
Antoine Pitrou added the comment: Here is a patch implementing the approach I proposed above. It successfully removes warnings about casting SOCKET to long under 64-bit Windows. -- Added file: http://bugs.python.org/file18557/sockdefine.patch

[issue502236] Asynchronous exceptions between threads

2010-08-17 Thread Antoine Pitrou
Antoine Pitrou added the comment: For the record, there is now a C API function (PyThreadState_SetAsyncExc()) to raise an asynchronous exception on a Python thread, although the signature is bizarre (it takes the thread id rather than the thread state structure itself). -- nosy

[issue3488] Provide compress/uncompress functions on the gzip module

2010-08-17 Thread Antoine Pitrou
Antoine Pitrou added the comment: Modified patch committed in r84155 (py3k). Thanks for your contribution! -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker <http://bug

[issue9433] regrtest.py -j 2 doesn't work on Windows: remove close_fds=True on Windows

2010-08-17 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +brian.curtin, tim.golden ___ Python tracker <http://bugs.python.org/issue9433> ___ ___ Python-bugs-list mailing list Unsub

[issue4835] SIZEOF_SOCKET_T not defined

2010-08-17 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Why is PyLong_FromSocket_t defined in a header file in the first > place? The only caller is in socketmodule.c, and calling it elsewhere > wouldn't work, anyway, since it relies on SOCKET_T being defined. I agree, but it was already like that

[issue9433] regrtest.py -j 2 doesn't work on Windows: remove close_fds=True on Windows

2010-08-18 Thread Antoine Pitrou
Antoine Pitrou added the comment: Ok, I've committed the change in r84176 (py3k) and r84178 (2.7). Thank you! -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker <http:

[issue9634] Add timeout parameter to Queue.join()

2010-08-18 Thread Antoine Pitrou
Antoine Pitrou added the comment: We already have an optional timeout on threading.Thread.join(), which I suppose means that people need/want that feature. -- nosy: +pitrou ___ Python tracker <http://bugs.python.org/issue9

[issue5737] add Solaris errnos

2010-08-18 Thread Antoine Pitrou
Antoine Pitrou added the comment: I don't have a Solaris machine to test, but the patch is straightforward enough. I've committed it in r84179. Thank you! -- resolution: -> fixed stage: patch review -> committed/rejected status

[issue6822] Error calling .storlines from ftplib

2010-08-19 Thread Antoine Pitrou
Antoine Pitrou added the comment: > I do not agree with Antoine. For binary transfer, another method is > called, and it does work fine. However, storelines would be called > for ASCII mode, in which encoding and decoding should be done by the > FTP program. ASCII mode would tra

[issue805194] Inappropriate error received using socket timeout

2010-08-19 Thread Antoine Pitrou
Antoine Pitrou added the comment: I'm not sure in what way the error is inappropriate. Python simply propagates whatever errno the C library sets on failure. As for the comment that connect() shouldn't be called twice, this was fixed in 2.6 by r60101. -- nosy: +pitrou

[issue9636] {'key': 'value'}[b'key'] raises a BytesWarning

2010-08-19 Thread Antoine Pitrou
Antoine Pitrou added the comment: Well, that's what BytesWarning is for. I agree it is annoying in normal use, but it is meant to ease porting of 2.x code. That's why it is only enabled when you use the corresponding command-line switch. The warning in the dict case is especially

[issue8595] Explain the default timeout in http-client-related libraries

2010-08-19 Thread Antoine Pitrou
Antoine Pitrou added the comment: > That way, if _HTTP_DEFAULT_TIMEOUT is never set, it will use the the > socket timeout. Admittedly I'd rather see all uses of module globals go > away, but I think this would be a good compromise. Why not provide {httplib,urllib}.{set,get}

[issue9636] {'key': 'value'}

2010-08-19 Thread Antoine Pitrou
Antoine Pitrou added the comment: > It's worth noting that this warning is dependent on hash() producing > the same values for 'equivalent' bytes and str instances. This seems > a bit fragile, and is something that could potentially change in the > future---with byte

[issue7415] PyUnicode_FromEncodedObject() uses PyObject_AsCharBuffer()

2010-08-20 Thread Antoine Pitrou
Antoine Pitrou added the comment: I think the bytearray special-casing should be removed. Otherwise one can reallocate the buffer in another thread while it is being used for decoding. -- nosy: +pitrou versions: -Python 2.7 ___ Python tracker

[issue7415] PyUnicode_FromEncodedObject() uses PyObject_AsCharBuffer()

2010-08-20 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Doesn't the GIL protect the bytearray buffer? Or does decoding free the GIL? Well, decoding can call arbitrary Python code and therefore, yes, release the GIL. Ironically, PyUnicode_Decode() itself (called from PyUnicode_FromEncodedObject()) fills

[issue9437] test_distutils failure with -m32

2010-08-21 Thread Antoine Pitrou
Antoine Pitrou added the comment: It turns out, quite expectedly, that distutils doesn't reuse the various LDFLAGS recorded by sysconfig (why are there three of them?), but instead only uses LDSHARED: >>> sysconfig.get_config_var('LDSHARED'

[issue9437] test_distutils failure with -m32

2010-08-21 Thread Antoine Pitrou
Antoine Pitrou added the comment: Following patch works here. I've added XXX tags in strange places. -- keywords: +patch Added file: http://bugs.python.org/file18598/m32.patch ___ Python tracker <http://bugs.python.org/i

[issue9437] test_distutils failure with -m32

2010-08-21 Thread Antoine Pitrou
Antoine Pitrou added the comment: Ok, there is also a failure in test_sysconfig (the patch makes no difference): == FAIL: test_ldshared_value (test.test_sysconfig.TestSysConfig

[issue9437] test_distutils failure with -m32

2010-08-21 Thread Antoine Pitrou
Antoine Pitrou added the comment: It appears that 2.7 has the same issue, although fewer tests fail (apparently not all 3.2 tests have been backported). -- versions: +Python 2.7 ___ Python tracker <http://bugs.python.org/issue9

[issue9437] can't build extensions with non-default ldflags (e.g. -m32)

2010-08-21 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- priority: high -> release blocker title: test_distutils failure with -m32 -> can't build extensions with non-default ldflags (e.g. -m32) ___ Python tracker <http://bugs.python

[issue9251] Test for the import lock

2010-08-21 Thread Antoine Pitrou
Antoine Pitrou added the comment: Ping? -- ___ Python tracker <http://bugs.python.org/issue9251> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue9657] Add circular imports test

2010-08-21 Thread Antoine Pitrou
New submission from Antoine Pitrou : Here is a test for multi-threaded circular imports (in order to exercise the import lock), following a comment by Graham Dumpleton on #9260. -- components: Tests files: circulartest.patch keywords: patch messages: 114541 nosy: brett.cannon, ncoghlan

[issue4835] SIZEOF_SOCKET_T not defined

2010-08-21 Thread Antoine Pitrou
Antoine Pitrou added the comment: This new patch takes the reverse approach and makes the function definitions (PyLong_FromSocket_t() and PyLong_AsSocket_t()) private to socketmodule.h. I will commit if no-one objects. -- Added file: http://bugs.python.org/file18601/sockdefine2.patch

<    9   10   11   12   13   14   15   16   17   18   >