[issue21067] Support Multiple finally clauses.

2014-03-25 Thread Jesús Cea Avión
Changes by Jesús Cea Avión : -- nosy: +jcea ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python

[issue20526] python: Modules/gcmodule.c:379: visit_decref: Assertion `((gc)->gc.gc_refs >> (1)) != 0' failed.

2014-03-25 Thread Sebastien Renard
Sebastien Renard added the comment: Hi Antoine, Thanks for your quick answer. I compiled with debug and compile cx_oracle again. Here the stack trace with gdb. Hope it will help. Program received signal SIGSEGV, Segmentation fault. 0x0043ab98 in visit_decref (op=0xb, data=0x0)

[issue20421] expose SSL socket protocol version

2014-03-25 Thread Antoine Pitrou
Antoine Pitrou added the comment: We could actually use the undocumented "int SSL_version(const SSL *s)" and convert the return value to one of our favourite protocol constants. -- ___ Python tracker _

[issue21068] Make ssl.PROTOCOL_* an enum

2014-03-25 Thread Antoine Pitrou
New submission from Antoine Pitrou: Small patch to make PROTOCOL_SSLv23 and friends enum members. Not sure this is useful. -- components: Library (Lib) files: sslproto_enum.patch keywords: patch messages: 214865 nosy: christian.heimes, dstufft, giampaolo.rodola, janssen, pitrou priority

[issue21068] Make ssl.PROTOCOL_* an enum

2014-03-25 Thread Ethan Furman
Changes by Ethan Furman : -- nosy: +ethan.furman ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue20526] python: Modules/gcmodule.c:379: visit_decref: Assertion `((gc)->gc.gc_refs >> (1)) != 0' failed.

2014-03-25 Thread Sebastien Renard
Sebastien Renard added the comment: Same issue with a fresh python 3.3.5: 361 if (PyObject_IS_GC(op)) { (gdb) backtrace #0 visit_decref (op=0xb, data=data@entry=0x0) at Modules/gcmodule.c:361 #1 0x0052d9da in BaseException_traverse (self=0x7156d328, visit=0x4c0800

[issue20526] python: Modules/gcmodule.c:379: visit_decref: Assertion `((gc)->gc.gc_refs >> (1)) != 0' failed.

2014-03-25 Thread Antoine Pitrou
Antoine Pitrou added the comment: Well, 0xb is an unlikely pointer value, especially since other dynamically-allocated pointers seem to lie in other memory areas. So it would look like there's some memory corruption here. As for whether it's a Python issue, try reproducing without cx_O

[issue21068] Make ssl.PROTOCOL_* an enum

2014-03-25 Thread Donald Stufft
Donald Stufft added the comment: I don't really feel real strongly one way or another about this patch fwiw. Not sure it makes anything easier but I don't think it makes anything harder either. -- ___ Python tracker

[issue21068] Make ssl.PROTOCOL_* an enum

2014-03-25 Thread Antoine Pitrou
Antoine Pitrou added the comment: It may be useful in relation with issue20421, since we could then return one of the enum values (not PROTOCOL_SSLv23, of course). -- ___ Python tracker ___

[issue21068] Make ssl.PROTOCOL_* an enum

2014-03-25 Thread Donald Stufft
Donald Stufft added the comment: Ah, sure it'd probably be useful in that context. -- ___ Python tracker ___ ___ Python-bugs-list mail

[issue21057] TextIOWrapper does not support reading bytearrays or memoryviews

2014-03-25 Thread Antoine Pitrou
Antoine Pitrou added the comment: bytes objects have two things going for them: - they have the full bytes API (all the startswith(), etc. methods) - not only buffer access - they are immutable: you can keep an internal reference to a bytes object and be sure it won't change under your feet Th

[issue21068] Make ssl.PROTOCOL_* an enum

2014-03-25 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: I like this. Possibly it should be done for all ssl APIs returning a constant. Are there others? -- ___ Python tracker ___ _

[issue20375] ElementTree: Document handling processing instructions

2014-03-25 Thread Nikolaus Rath
Nikolaus Rath added the comment: Indeed I did, here's the correct patch. Thanks! -- Added file: http://bugs.python.org/file34622/issue20375.diff ___ Python tracker ___ __

[issue21057] TextIOWrapper does not support reading bytearrays or memoryviews

2014-03-25 Thread Nikolaus Rath
Nikolaus Rath added the comment: Yes, bytes objects have some advantages. But if a bytes object is desired, it can always be created from bytes-like object. If a BufferedIOBase instance is required to only provide bytes objects, this conversion is forced even when it may not be necessary. If

[issue20469] ssl.getpeercert() should include extensions

2014-03-25 Thread A Hettinger
Changes by A Hettinger : Added file: http://bugs.python.org/file34623/Client.py ___ Python tracker ___ ___ Python-bugs-list mailing list Unsub

[issue20469] ssl.getpeercert() should include extensions

2014-03-25 Thread A Hettinger
Changes by A Hettinger : Added file: http://bugs.python.org/file34624/Server.py ___ Python tracker ___ ___ Python-bugs-list mailing list Unsub

[issue20469] ssl.getpeercert() should include extensions

2014-03-25 Thread A Hettinger
Changes by A Hettinger : Added file: http://bugs.python.org/file34625/cert.pem ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubs

[issue20469] ssl.getpeercert() should include extensions

2014-03-25 Thread A Hettinger
A Hettinger added the comment: The specific thing I'm interested in is the custom extension "1.3.6.1.4.43167.0.0", but all of the X509 data should be imported. Client shows both the openssl and python outputs. I would expect anything the ssl system doesn't explicitly know what to do with, it m

[issue20951] SSLSocket.send() returns 0 for non-blocking socket

2014-03-25 Thread Ben Darnell
Ben Darnell added the comment: Giampaolo, where do you see that send() may return zero if the other side has closed? I've always gotten an error in that case (EPIPE) I vote -1 to adding a new flag to control whether it returns zero or raises and +0 to just fixing it in Python 3.5 (I don't thi

[issue20951] SSLSocket.send() returns 0 for non-blocking socket

2014-03-25 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: Sorry, my fault. I got confused with os.sendfile() which returns 0 on EOF. -- ___ Python tracker ___

[issue20951] SSLSocket.send() returns 0 for non-blocking socket

2014-03-25 Thread Nikolaus Rath
Nikolaus Rath added the comment: On 03/25/2014 06:53 PM, Ben Darnell wrote: > Another option may be to have SSLSocket.send() convert the WANT_WRITE > exception into a socket.error with errno EAGAIN. This wouldn't break Tornado > and would make socket.send and SSLSocket.send more consistent, bu

[issue21067] Support Multiple finally clauses.

2014-03-25 Thread Josh Rosenberg
Josh Rosenberg added the comment: And for this particular case, even if the resource allocators don't support the context manager protocol, contextlib.closing can do the job: from contextlib import closing with closing(allocateresource1()) as resource1, closing(allocateresource2()) as

<    1   2