[issue8438] Codecs: "surrogateescape" error handler in Python 2.7

2010-04-18 Thread Antoine Pitrou
Changes by Antoine Pitrou : Removed file: http://bugs.python.org/file16975/surrogateescape.patch ___ Python tracker <http://bugs.python.org/issue8438> ___ ___ Python-bug

[issue8426] multiprocessing.Queue fails to get() very large objects

2010-04-18 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- assignee: -> jnoller nosy: +jnoller priority: -> normal versions: +Python 2.7, Python 3.1, Python 3.2 -Python 2.5 ___ Python tracker <http://bugs.python.org/

[issue8439] test_linecache failing in py3k r80169

2010-04-18 Thread Antoine Pitrou
Antoine Pitrou added the comment: Should be fixed in r80194 / r80195. -- nosy: +pitrou resolution: -> fixed stage: patch review -> committed/rejected status: open -> pending ___ Python tracker <http://bugs.python.o

[issue8439] test_linecache failing in py3k r80169

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

[issue8439] test_linecache failing in py3k r80169

2010-04-18 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- status: open -> pending ___ Python tracker <http://bugs.python.org/issue8439> ___ ___ Python-bugs-list mailing list Unsubscri

[issue8444] openssl version detection doesn't work properly when using OSX SDK

2010-04-18 Thread Antoine Pitrou
Antoine Pitrou added the comment: On recent trunk and py3k you can get the real version number: http://docs.python.org/dev/library/ssl.html#ssl.OPENSSL_VERSION So perhaps you can first build the _ssl module, then import it to get that information. Of course it would be much better to build

[issue8447] buildbot: test_httpservers failure (No module named operator)

2010-04-18 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- assignee: -> ronaldoussoren components: +Macintosh nosy: +ronaldoussoren ___ Python tracker <http://bugs.python.org/iss

[issue8451] syslog.syslog('msg') logs message with ident "python".

2010-04-19 Thread Antoine Pitrou
Antoine Pitrou added the comment: Some notes about the patch: - NEWS blurbs generally appear antichronologically, that is newest first :-) - you don't have to mention that "The 3.2 changes mentioned above are included in 2.7" - the part of the PyArg_ParseTupleAndKeywords string

[issue8450] httplib: false BadStatusLine() raised

2010-04-19 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +orsenthil priority: -> normal versions: +Python 2.7, Python 3.1, Python 3.2 ___ Python tracker <http://bugs.python.org/iss

[issue8108] test_ftplib fails with OpenSSL 0.9.8m

2010-04-19 Thread Antoine Pitrou
Antoine Pitrou added the comment: > With regards to SSL_peek() blocking, you'd need to explain yourself > better on that one. The patch has been tested with the test cases > from Python SVN enough to be happy they run ok. IIRC it worked with OpenSSL 1.0.0 but failed with 0.9.8k

[issue8459] buildbot: test_select failure (test_returned_list_identity) on Python 2.6, Windows

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

[issue8438] Codecs: "surrogateescape" error handler in Python 2.7

2010-04-19 Thread Antoine Pitrou
Antoine Pitrou added the comment: Patch committed to trunk in r80215. I'm going to watch the buildbots, I suspect OS X might dislike surrogates in the filename. -- ___ Python tracker <http://bugs.python.org/i

[issue8438] Codecs: "surrogateescape" error handler in Python 2.7

2010-04-19 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.python.o

[issue2302] Uses of SocketServer.BaseServer.shutdown have a race

2010-04-19 Thread Antoine Pitrou
Antoine Pitrou added the comment: By the way, getting rid of poll_interval for a file descriptor is easy under Unix, but wouldn't work under Windows (where select() only takes sockets, not arbitrary file descriptors). -- ___ Python tracker

[issue7332] python script segment fault at PyMarshal_ReadLastObjectFromFile in import_submodule

2010-04-20 Thread Antoine Pitrou
Antoine Pitrou added the comment: A 16KB stack buffer is tiny compared to a 8MB stack. I'm not sure removing that buffer would really fix the problems. Perhaps other threads get a smaller stack? -- ___ Python tracker <http://bugs.py

[issue7332] python script segment fault at PyMarshal_ReadLastObjectFromFile in import_submodule

2010-04-20 Thread Antoine Pitrou
Antoine Pitrou added the comment: What's the value of MAXPATHLEN and PATH_MAX on those systems? -- ___ Python tracker <http://bugs.python.org/issue7332> ___ ___

[issue7332] python script segment fault at PyMarshal_ReadLastObjectFromFile in import_submodule

2010-04-20 Thread Antoine Pitrou
Antoine Pitrou added the comment: > The problem is highlighted with recursive imports: > a module which imports another module, which imports another module, > etc. PyMarshal_ReadLastObjectFromFile is not the only function to use > stack-allocated buffers, there are also load_s

[issue5103] ssl.SSLSocket timeout not working correctly when remote end is hanging

2010-04-20 Thread Antoine Pitrou
Antoine Pitrou added the comment: Bill, I think we should move forward with this. Do you agree that removing the timeout dance is the right solution? -- nosy: +pitrou priority: -> high versions: +Python 2.7 ___ Python tracker &l

[issue3597] Allow application developers to select ciphers, and default to strong in ssl lib

2010-04-20 Thread Antoine Pitrou
Antoine Pitrou added the comment: I had never seen this issue but committed almost exactly the same feature in r80151. The parameters is named "ciphers" rather than "cipher_list" and allows you to override the allowed ciphers when creating an SSL object. It will be ava

[issue5639] Support TLS SNI extension in ssl module

2010-04-20 Thread Antoine Pitrou
Antoine Pitrou added the comment: Too late for 2.7 now, but looks like a good idea. -- nosy: +pitrou priority: -> normal stage: -> patch review versions: -Python 2.7 ___ Python tracker <http://bugs.python.org/

[issue3596] Provide a way to disable SSLv2 (or better yet, disable by default)

2010-04-20 Thread Antoine Pitrou
Antoine Pitrou added the comment: The new "ciphers" argument in trunk and py3k should do the trick, shouldn't it? Do note that starting with OpenSSL 1.0.0, SSLv2 is disabled by default when using the "SSLv23" client method (you can re-enable it by specifying &

[issue7927] SSL socket is not closed properly

2010-04-20 Thread Antoine Pitrou
Antoine Pitrou added the comment: Probably a duplicate of issue5238. -- nosy: +pitrou resolution: -> duplicate status: open -> closed superseder: -> ssl makefile never closes socket ___ Python tracker <http://bugs.python.o

[issue5238] ssl makefile never closes socket

2010-04-20 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +giampaolo.rodola versions: +Python 3.2 -Python 3.0 ___ Python tracker <http://bugs.python.org/issue5238> ___ ___ Python-bug

[issue8109] Support for TLS Server Name Indication extension

2010-04-20 Thread Antoine Pitrou
Antoine Pitrou added the comment: Duplicate of issue5639. -- nosy: +pitrou resolution: -> duplicate status: open -> closed superseder: -> Support TLS SNI extension in ssl module ___ Python tracker <http://bugs.python.o

[issue1926] NNTPS support in nntplib

2010-04-20 Thread Antoine Pitrou
Changes by Antoine Pitrou : Removed file: http://bugs.python.org/file9298/unnamed ___ Python tracker <http://bugs.python.org/issue1926> ___ ___ Python-bugs-list mailin

[issue1926] NNTPS support in nntplib

2010-04-20 Thread Antoine Pitrou
Changes by Antoine Pitrou : Removed file: http://bugs.python.org/file9309/unnamed ___ Python tracker <http://bugs.python.org/issue1926> ___ ___ Python-bugs-list mailin

[issue4470] smtplib SMTP_SSL not working.

2010-04-20 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- versions: +Python 2.7, Python 3.1, Python 3.2 ___ Python tracker <http://bugs.python.org/issue4470> ___ ___ Python-bugs-list mailin

[issue4870] ssl module is missing SSL_OP_NO_SSLv2

2010-04-20 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- resolution: accepted -> versions: +Python 3.2 -Python 2.6, Python 2.7, Python 3.0, Python 3.1 ___ Python tracker <http://bugs.python.org/iss

[issue967275] Better SSL support in socket module

2010-04-20 Thread Antoine Pitrou
Antoine Pitrou added the comment: Too vague and probably outdated, closing. -- nosy: +pitrou resolution: -> invalid status: open -> closed ___ Python tracker <http://bugs.python.org/is

[issue8447] buildbot: test_httpservers failure (No module named operator)

2010-04-20 Thread Antoine Pitrou
Antoine Pitrou added the comment: There's probably something wrong in the way test_httpservers sets up its own environment (can it impact the import mechanism?). The operator module exists and imports correctly in other conditions, e.g. test_operator passes on that buildbot. --

[issue8444] openssl version detection doesn't work properly when using OSX SDK

2010-04-20 Thread Antoine Pitrou
Antoine Pitrou added the comment: Looks like you forgot your patch. -- ___ Python tracker <http://bugs.python.org/issue8444> ___ ___ Python-bugs-list mailin

[issue8092] utf8, backslashreplace and surrogates

2010-04-20 Thread Antoine Pitrou
Antoine Pitrou added the comment: > I don't know if "nallocated += repsize - 4;" can overflow or not. > If yes, how can I detect the overflow? Sure, if they are both Py_ssize_t, just use: if (nallocated > PY_SSIZE_T_MAX - repsize + 4) { /* handle overflow ... */ }

[issue7724] setup.py ignores SDK root on OSX

2010-04-20 Thread Antoine Pitrou
Antoine Pitrou added the comment: There's a bunch of debug stuff in that patch ("if 1", commented out lines...). Also, the patch should not change behaviour on non-OS X platforms, which is not obvious right now. -- nosy: +pitrou ___

[issue8439] test_linecache failing in py3k r80169

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

[issue4870] ssl module is missing SSL_OP_NO_SSLv2

2010-04-20 Thread Antoine Pitrou
Antoine Pitrou added the comment: Here is an adapted patch for py3k. It also adds a couple of test cases. -- nosy: +pitrou Added file: http://bugs.python.org/file17016/sslopts.patch ___ Python tracker <http://bugs.python.org/issue4

[issue8477] _ssl: support surrogates in filenames, and bytes/bytearray filenames

2010-04-20 Thread Antoine Pitrou
Antoine Pitrou added the comment: Some comments: - your ssl_convert_filename() function has a strange signature - using PyByteArray_AsString() is wrong, we release the GIL later and the buffer could be reallocated, leading to a crash; the right approach is to use PyObject_GetBuffer() and

[issue6600] MemoryError in AiX 64-bit - PyMem_MALLOC fails in open/fdopen

2010-04-21 Thread Antoine Pitrou
Antoine Pitrou added the comment: Ok, closing then. -- resolution: -> works for me status: open -> closed ___ Python tracker <http://bugs.python.org/

[issue8484] ssl socket with certificate verification fails on SHA256 digest algorithm

2010-04-21 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +giampaolo.rodola, janssen, pitrou priority: -> normal type: crash -> behavior versions: +Python 2.7, Python 3.1, Python 3.2 ___ Python tracker <http://bugs.python.org/

[issue8484] ssl socket with certificate verification fails on SHA256 digest algorithm

2010-04-21 Thread Antoine Pitrou
Antoine Pitrou added the comment: Changing OpenSSL initialization to the following seems to fix the issue (with OpenSSL 0.9.8k and 1.0.0): /* Init OpenSSL */ SSL_load_error_strings(); SSL_library_init(); #ifdef WITH_THREAD /* note that this will start threading

[issue8485] Don't accept bytearray as filenames, or simplify the API

2010-04-21 Thread Antoine Pitrou
Antoine Pitrou added the comment: Or perhaps the bytearray can be converted to a bytes object. This is not optimal performance-wise but is unlikely to make a difference in real-world code (if you are passing a filename to an external API, chances are some IO will occur which will dwarf the

[issue8486] [PATCH] threading.Event()

2010-04-21 Thread Antoine Pitrou
Antoine Pitrou added the comment: Due to the nature of an Event, you should in most situations wait() on it, rather than test its value. Also, changing the boolean value of an Event would break existing code. I therefore think this should be rejected. -- nosy: +pitrou

[issue8486] [PATCH] threading.Event()

2010-04-21 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Yes, I agree when Event objects are used to sync threads. But in my > case, I'm using them like signals to terminate some server's thread > through a proper way. In this case, you don't have to use an Event. A boolean attribute o

[issue8486] threading.Event()

2010-04-21 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Using a boolean would look almostly the same so why to reinvent the > wheel ? :) Hmm, /you/ are reinventing the wheel by suggesting to use an Event instead of a simple boolean. Just loop like this: while not self.stop_me: # etc. and set the s

[issue7755] copyright clarification for audiotest.au

2010-04-21 Thread Antoine Pitrou
Antoine Pitrou added the comment: Shouldn't "My hovercraft is full of eels" be considered an original creation of the Monty Python, and as such copyrighted? -- nosy: +pitrou ___ Python tracker <http://bugs.py

[issue8484] ssl socket with certificate verification fails on SHA256 digest algorithm

2010-04-21 Thread Antoine Pitrou
Antoine Pitrou added the comment: Here is a patch. I'm not really happy about the test because it relies on an external test site, and the certificate apparently expires in 2011. -- keywords: +patch Added file: http://bugs.python.org/file17025/algos.

[issue8484] ssl socket with certificate verification fails on SHA256 digest algorithm

2010-04-21 Thread Antoine Pitrou
Antoine Pitrou added the comment: After several attempts, I've failed generating a self-signed certificate that would reproduce the issue without relying on an external server. Perhaps there's something else than simply the hashing algorithm. In any case I think I'm simply

[issue5516] equality not symmetric for subclasses of datetime.date and datetime.datetime

2010-04-21 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +mark.dickinson ___ Python tracker <http://bugs.python.org/issue5516> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue8487] os.mknod() fails on NFS mounted directories

2010-04-21 Thread Antoine Pitrou
Antoine Pitrou added the comment: Well, this looks like a filesystem problem more than a Python problem. The error (errno 2) comes from the mknod() system call itself. -- nosy: +pitrou ___ Python tracker <http://bugs.python.org/issue8

[issue8487] os.mknod() fails on NFS mounted directories

2010-04-21 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +exarkun ___ Python tracker <http://bugs.python.org/issue8487> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue8484] ssl socket with certificate verification fails on SHA256 digest algorithm

2010-04-21 Thread Antoine Pitrou
Antoine Pitrou added the comment: > "OpenSSL_add_ssl_algorithms() and SSLeay_add_ssl_algorithms() are > synonyms for SSL_library_init()" The patch calls OpenSSL_add_all_algorithms(), though. (yes, it's a different one :-)) http://www.openssl.org/docs/crypto/OpenSSL_ad

[issue5103] ssl.SSLSocket timeout not working correctly when remote end is hanging

2010-04-21 Thread Antoine Pitrou
Antoine Pitrou added the comment: Here is a patch, with tests. I also had to rework the asyncore-based test server in test_ssl, and fixed an omission in _ssl.c's do_handshake method. (works with OpenSSL 0.9.8k and 1.0.0) -- keywords: +patch stage: -> patch review Added fi

[issue8484] ssl socket with certificate verification fails on SHA256 digest algorithm

2010-04-21 Thread Antoine Pitrou
Antoine Pitrou added the comment: Fixed in r80314 (trunk), r80316 (2.6), r80317 (py3k), r80318 (3.1). Thank you! -- resolution: -> fixed stage: -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.python.o

[issue7332] python script segment fault at PyMarshal_ReadLastObjectFromFile in import_submodule

2010-04-21 Thread Antoine Pitrou
Antoine Pitrou added the comment: Thank you Kees, this sounds quite likely. I will still commit the patch to remove the stack buffer, and then close this issue. -- ___ Python tracker <http://bugs.python.org/issue7

[issue7332] python script segment fault at PyMarshal_ReadLastObjectFromFile in import_submodule

2010-04-21 Thread Antoine Pitrou
Antoine Pitrou added the comment: Patch committed in trunk (r80325) and py3k (r80326). I won't backport it to 2.6/3.1 since it's not likely to fix anything in practice -- it's just a nice simplification. Thanks everyone for comments and patches. -- resolution: ->

[issue8498] Cannot use backlog = 0 for sockets

2010-04-22 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +exarkun ___ Python tracker <http://bugs.python.org/issue8498> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue8490] asyncore test suite

2010-04-22 Thread Antoine Pitrou
Antoine Pitrou added the comment: Some remarks: - I agree with RDM's comment regarding inheritance - you don't use use_poll in loop_waiting_for_flag() - calling time.sleep() in loop_waiting_for_flag() looks wrong to me - test_handle_error should check that the exception state is th

[issue8305] memoview[0] creates an invalid view if ndim != 1

2010-04-22 Thread Antoine Pitrou
Antoine Pitrou added the comment: I'll leave this to our numpy experts. I don't even know how to unit test this without installing numpy. -- assignee: -> teoliphant priority: -> normal stage: -> needs patch ___ Py

[issue6484] No unit test for mailcap module

2010-04-22 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +ezio.melotti priority: low -> normal stage: unit test needed -> patch review versions: -Python 2.7 ___ Python tracker <http://bugs.python.org/

[issue8496] mailcap.lookup() returns filter iterator rather than list if key is given

2010-04-22 Thread Antoine Pitrou
Antoine Pitrou added the comment: Looks goot to me. -- nosy: +pitrou priority: -> normal stage: -> patch review versions: +Python 3.1 ___ Python tracker <http://bugs.python.org/

[issue8496] mailcap.lookup() returns filter iterator rather than list if key is given

2010-04-22 Thread Antoine Pitrou
Antoine Pitrou added the comment: Good, sorry. -- ___ Python tracker <http://bugs.python.org/issue8496> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue8496] mailcap.lookup() returns filter iterator rather than list if key is given

2010-04-22 Thread Antoine Pitrou
Antoine Pitrou added the comment: Committed in r80369. Thanks! -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.python.o

[issue8500] Erroneous Invalid Syntax Error

2010-04-22 Thread Antoine Pitrou
Antoine Pitrou added the comment: Surely you forgot to capitalize Python, not to mention the lack of punctuation. -- nosy: +pitrou ___ Python tracker <http://bugs.python.org/issue8

[issue6085] Logging in BaseHTTPServer.BaseHTTPRequestHandler causes lag

2010-04-22 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +orsenthil priority: -> normal versions: +Python 3.2 -Python 2.6 ___ Python tracker <http://bugs.python.org/iss

[issue8484] ssl socket with certificate verification fails on SHA256 digest algorithm

2010-04-22 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Probably test case will fail is sha256 module is not loaded - openssl > versions before 0.9.8 Yes, this has been fixed in r80375. -- ___ Python tracker <http://bugs.python.org/

[issue4768] email.generator.Generator object bytes/str crash - b64encode() bug?

2010-04-22 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- priority: -> high stage: -> patch review versions: +Python 3.1, Python 3.2 -Python 3.0 ___ Python tracker <http://bugs.python.org/

[issue8465] re: Backreferences vs. escapes: a silent failure solved

2010-04-22 Thread Antoine Pitrou
Antoine Pitrou added the comment: Not sure why this was assigned to me. -- assignee: pitrou -> ___ Python tracker <http://bugs.python.org/issue8465> ___ _

[issue8465] re: Backreferences vs. escapes: a silent failure solved

2010-04-22 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: -pitrou ___ Python tracker <http://bugs.python.org/issue8465> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue8498] Cannot use backlog = 0 for sockets

2010-04-22 Thread Antoine Pitrou
Antoine Pitrou added the comment: The request to allow 0 looks reasonable to me. Now if someone wants to propose a patch (+ tests if there's any way of testing for this). -- nosy: +pitrou ___ Python tracker <http://bugs.python.org/i

[issue8498] Cannot use backlog = 0 for sockets

2010-04-22 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- priority: -> low versions: +Python 2.7, Python 3.1, Python 3.2 ___ Python tracker <http://bugs.python.org/issue8498> ___ ___ Py

[issue8108] test_ftplib fails with OpenSSL 0.9.8m

2010-04-22 Thread Antoine Pitrou
Antoine Pitrou added the comment: Patch committed to r80392 (trunk) and r80394 (py3k). Am pondering a partial backport of the SSL shutdown fixes to 2.6 and 3.1 (test_ftplib doesn't need any backport since it doesn't support TLS in these branches). -- assignee: -> pitr

[issue8477] _ssl: support surrogates in filenames, and bytes/bytearray filenames

2010-04-23 Thread Antoine Pitrou
Antoine Pitrou added the comment: > key_file and cert_file are mandatory No, they are not. Not for a client connection, at least. Also, please add at least a simple test. -- ___ Python tracker <http://bugs.python.org/iss

[issue8507] abc.abstractproperty does not copy docstring

2010-04-23 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- priority: -> normal versions: +Python 2.7, Python 3.1, Python 3.2 ___ Python tracker <http://bugs.python.org/issue8507> ___ _

[issue8108] test_ftplib fails with OpenSSL 0.9.8m

2010-04-23 Thread Antoine Pitrou
Antoine Pitrou added the comment: Ok, I've backported the shutdown fixes to 2.6 (r80419) and 3.1 (r80420). Thanks again everyone. -- status: pending -> closed versions: +Python 2.6, Python 3.1 ___ Python tracker <http://bugs.python.or

[issue5103] ssl.SSLSocket timeout not working correctly when remote end is hanging

2010-04-23 Thread Antoine Pitrou
Antoine Pitrou added the comment: New patch fixing test_poplib failures. -- Added file: http://bugs.python.org/file17058/ssltimeout2.patch ___ Python tracker <http://bugs.python.org/issue5

[issue7943] Memory leak due to circular references in ssl.SSLSocket

2010-04-23 Thread Antoine Pitrou
Antoine Pitrou added the comment: Committed with test in r80423 (trunk) and r80425 (2.6). Also ported the test to py3k/3.1. Thanks! -- nosy: +pitrou resolution: -> fixed stage: unit test needed -> committed/rejected status: open -&g

[issue5238] ssl makefile never closes socket

2010-04-23 Thread Antoine Pitrou
Antoine Pitrou added the comment: The makefile issue is fixed in r80428 (trunk) and r80431 (2.6). Also ported the additional test to py3k and 3.1. The other issue pointed out by Marcin Bachry doesn't seem fixable without breaking backwards compatibility, for applications which close(

[issue8350] os.mkdir doc comment is incorrect

2010-04-24 Thread Antoine Pitrou
Antoine Pitrou added the comment: I think it would be overkill to add special markup for positional-only arguments. I think we should just close the issue as invalid. -- ___ Python tracker <http://bugs.python.org/issue8

[issue7865] io close() swallowing exceptions

2010-04-24 Thread Antoine Pitrou
Antoine Pitrou added the comment: The tests should probably check all three types of I/O (raw, buffered, text). -- stage: needs patch -> patch review ___ Python tracker <http://bugs.python.org/iss

[issue8524] SSL sockets do not retain the parent socket's attributes

2010-04-24 Thread Antoine Pitrou
New submission from Antoine Pitrou : In 3.x, SSL sockets are created by dup()ing the original socket and then closing it. No attempt is made to conserve the socket's characteristics, such as the timeout and probably other flags. I understand that it may be too late to change the d

[issue8524] SSL sockets do not retain the parent socket's attributes

2010-04-24 Thread Antoine Pitrou
Antoine Pitrou added the comment: It is actually a little funnier. dup() preserves the blocking/non-blocking nature of the underlying OS socket, but not the "timeout" of the Python socket. As such, a "blocking-with-timeout" Python socket gets replaced with a truely

[issue8524] SSL sockets do not retain the parent socket's attributes

2010-04-24 Thread Antoine Pitrou
Antoine Pitrou added the comment: Another consequence is that the following check in __init__: timeout = self.gettimeout() if timeout == 0.0: # non-blocking raise ValueError("do_handshake_on_connect s

[issue8524] SSL sockets do not retain the parent socket's attributes

2010-04-24 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- priority: normal -> high type: -> behavior ___ Python tracker <http://bugs.python.org/issue8524> ___ ___ Python-bugs-list

[issue5103] ssl.SSLSocket timeout not working correctly when remote end is hanging

2010-04-24 Thread Antoine Pitrou
Antoine Pitrou added the comment: Fixed in trunk (r80452) and 2.6 (r80453). Also ported relevant parts to 3.x (one half of the test had to be disabled because or #8524). -- resolution: -> fixed stage: patch review -> committed/rejected status: open -&g

[issue8524] SSL sockets do not retain the parent socket's attributes

2010-04-24 Thread Antoine Pitrou
Antoine Pitrou added the comment: I committed a fix+tests for the timeout value in r80456 (py3k) and r80457 (3.1). Apparently the socket objects' own dup() method doesn't try to retain anything else than the timeout. I'm leaving this issue as "pending" in case critic

[issue8530] Stringlib fastsearch can read beyond the front of an array

2010-04-25 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- components: +Interpreter Core nosy: +flox priority: -> normal stage: -> needs patch type: -> behavior versions: +Python 2.6, Python 2.7, Python 3.1, Python 3.2 ___ Python tracker <http://bugs.python.o

[issue8530] Stringlib fastsearch can read beyond the front of an array

2010-04-25 Thread Antoine Pitrou
Antoine Pitrou added the comment: I can't manage to trigger any crash on a Linux machine, so I think we'll live without a test. -- nosy: +pitrou ___ Python tracker <http://bugs.python.

[issue8530] Stringlib fastsearch can read beyond the front of an array

2010-04-25 Thread Antoine Pitrou
Antoine Pitrou added the comment: Of course your patch might slow down the loop, so perhaps you want to run some benchmarks. -- ___ Python tracker <http://bugs.python.org/issue8

[issue8530] Stringlib fastsearch can read beyond the front of an array

2010-04-25 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- versions: -Python 2.6, Python 3.1 ___ Python tracker <http://bugs.python.org/issue8530> ___ ___ Python-bugs-list mailing list Unsub

[issue6483] Modules are not deallocated correctly if m_size = -1

2010-04-25 Thread Antoine Pitrou
Antoine Pitrou added the comment: Well, in 2.x you didn't even have the choice. The dict of an extension module was always copied, becoming essentially immortal. In 3.x you can use an m_size>=0 so as to disable this behaviour. -- nosy: +pitrou versions: +Py

[issue8530] Stringlib fastsearch can read beyond the front of an array

2010-04-25 Thread Antoine Pitrou
Antoine Pitrou added the comment: It could read into an invalid page and segfault. It depends on specifics of the memory allocator. -- ___ Python tracker <http://bugs.python.org/issue8

[issue2302] Uses of SocketServer.BaseServer.shutdown have a race

2010-04-25 Thread Antoine Pitrou
Antoine Pitrou added the comment: Fixed with a test in r80484 (trunk), r80486 (2.6), r80487 (py3k), r80491 (3.1). -- resolution: -> fixed stage: -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.python.o

[issue4171] SSL handshake fails after TCP connection in getpeername()

2010-04-25 Thread Antoine Pitrou
Antoine Pitrou added the comment: What happens if you remove the call to settimeout()? Also, it would be nice if you could try with the latest py3k checkout. There's a couple of fixes for do_handshake there (including timeout issues). -- nosy: +pitrou priority: -> normal

[issue7672] _ssl module overwrites existing thread safety callbacks

2010-04-25 Thread Antoine Pitrou
Antoine Pitrou added the comment: I don't think asking Python extensions to be safe in the face of brutal DLL unloading is wise. I don't think any of our C extensions tries to respect such an use case. We could still try to support the use case of some application registeri

[issue8532] Refinements to Python 3 New GIL

2010-04-26 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- resolution: -> duplicate status: open -> closed superseder: -> Convoy effect with I/O bound threads and New GIL ___ Python tracker <http://bugs.python.o

[issue7946] Convoy effect with I/O bound threads and New GIL

2010-04-26 Thread Antoine Pitrou
Antoine Pitrou added the comment: Dave, > In the current implementation, threads perform a timed-wait on a > condition variable. If time expires and no thread switches have > occurred, the currently running thread is forced to drop the GIL. A problem, as far as I can see, is t

[issue8493] socket's send can raise errno 35 under OS X, which causes problems in sendall

2010-04-26 Thread Antoine Pitrou
Antoine Pitrou added the comment: > That's what I thought at first too. But the user's sockets were set to > blocking. If you set a timeout on a socket, it is really non-blocking internally (from the OS' point of view). So perhaps this is what you are witnessing. By

[issue8493] socket's send can raise errno 35 under OS X, which causes problems in sendall

2010-04-26 Thread Antoine Pitrou
Antoine Pitrou added the comment: What is the mnemonic corresponding to errno 35 under OS X? (under Linux I get EDEADLOCK, which probably isn't the right one) -- ___ Python tracker <http://bugs.python.org/i

[issue4171] SSL handshake fails after TCP connection in getpeername()

2010-04-26 Thread Antoine Pitrou
Antoine Pitrou added the comment: Ok, so I think we can close the issue then. Thank you! -- resolution: -> out of date status: open -> closed ___ Python tracker <http://bugs.python.org/

[issue6085] Logging in BaseHTTPServer.BaseHTTPRequestHandler causes lag

2010-04-26 Thread Antoine Pitrou
Antoine Pitrou added the comment: Actually, DNS resolution should be disabled by default, as in most HTTP servers probably. -- nosy: +pitrou stage: -> unit test needed ___ Python tracker <http://bugs.python.org/iss

[issue6085] Logging in BaseHTTPServer.BaseHTTPRequestHandler causes lag

2010-04-26 Thread Antoine Pitrou
Antoine Pitrou added the comment: > And for this specific request, it fdqn is looked up only for "logging" > to sys.stderr. Either removing the fqdn call or just caching per > connection it as the patch does is both fine. I doubt if someone is > relying this logging anyw

<    45   46   47   48   49   50   51   52   53   54   >