[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 resource2:
dostuffthatmightthrowexception()

If it's not a simple as calling close, you can write your own simple manager 
wrapper that calls some other cleanup function use @contextlib.contextmanager.

--
nosy: +josh.rosenberg

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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, but it's weird 
> to hide the true error like this.

I think that would only make sense if the SSLWant{Read/Write}Error
exceptions are eliminated completely, so that all methods raise
BlockingError (==EAGAIN) instead.

Raising BlockingError is marginally better than returning zero, but I
think not worth the change.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 think returning zero is an 
unreasonable thing to do; it's not obvious to me from send(2) that it is 
guaranteed to never return zero although I believe that to be the case).  It'll 
break Tornado, but there will be plenty of time to get a fix out before then.  
If there were a convenient place to put a deprecation warning I'd vote to 
deprecate in 3.5 and fix in 3.6, but there's no good way for the application to 
signal that it expects a WANT_WRITE exception.

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, but it's weird to hide the 
true error like this.

--
nosy: +Ben.Darnell

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 makes available to me.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 someone is willing to do the work (and I am), is there a reason *not* to 
allow TextIOWrapper to accept bytes-like objects?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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

This is especially handy when writing C code.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com




[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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_Oracle? If you 
can't, it's likely to be a bug in cx_Oracle.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 , arg=0x0) at Objects/exceptions.c:100

Is it a python bug, or could it be an issue with the cx_oracle extension ?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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: low
severity: normal
stage: patch review
status: open
title: Make ssl.PROTOCOL_* an enum
type: enhancement
versions: Python 3.5
Added file: http://bugs.python.org/file34621/sslproto_enum.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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) at 
Modules/gcmodule.c:373
373 if (PyObject_IS_GC(op)) {
(gdb) backtrace
#0  0x0043ab98 in visit_decref (op=0xb, data=0x0) at 
Modules/gcmodule.c:373
#1  0x0048193a in BaseException_traverse (self=0x70f645f8, 
visit=0x43ab64 , arg=0x0) at Objects/exceptions.c:97
#2  0x004dc4cc in subtype_traverse (self=0x70f645f8, visit=0x43ab64 
, arg=0x0) at Objects/typeobject.c:972
#3  0x0043ac8c in subtract_refs (containers=0x8f2ec0 ) at 
Modules/gcmodule.c:398
#4  0x0043bda0 in collect (generation=0, n_collected=0x7ffe6860, 
n_uncollectable=0x7ffe6858, nofail=0) at Modules/gcmodule.c:957
#5  0x0043c409 in collect_with_callback (generation=0) at 
Modules/gcmodule.c:1128
#6  0x0043c4a0 in collect_generations () at Modules/gcmodule.c:1151
#7  0x0043d77c in _PyObject_GC_Malloc (basicsize=48) at 
Modules/gcmodule.c:1726
#8  0x0043d7b4 in _PyObject_GC_New (tp=0x90f980 ) at 
Modules/gcmodule.c:1736
#9  0x0049bec5 in list_iter (seq=0x70f807c8) at 
Objects/listobject.c:2738
#10 0x004620d4 in PyObject_GetIter (o=0x70f807c8) at 
Objects/abstract.c:2656
#11 0x005a4923 in PyEval_EvalFrameEx (f=0xbf4878, throwflag=0) at 
Python/ceval.c:2640
#12 0x005aab83 in PyEval_EvalCodeEx (_co=0x7672fb80, 
globals=0x76721838, locals=0x0, args=0x713c79b0, argcount=2, kws=0x0, 
kwcount=0, defs=0x0, defcount=0, kwdefs=0x0, closure=0x0) at Python/ceval.c:3578
#13 0x0065b49a in function_call (func=0x766f19b0, 
arg=0x713c7988, kw=0x0) at Objects/funcobject.c:632
#14 0x00460069 in PyObject_Call (func=0x766f19b0, 
arg=0x713c7988, kw=0x0) at Objects/abstract.c:2067
#15 0x0047e933 in method_call (func=0x766f19b0, arg=0x713c7988, 
kw=0x0) at Objects/classobject.c:347
#16 0x00460069 in PyObject_Call (func=0x77ebd3d8, 
arg=0x76e30468, kw=0x0) at Objects/abstract.c:2067
#17 0x004dd338 in call_method (o=0x70f7cdc0, nameid=0x91a860 
, format=0x67cd45 "(O)") at Objects/typeobject.c:1394
#18 0x004eb850 in slot_mp_subscript (self=0x70f7cdc0, 
arg1=0x70f86040) at Objects/typeobject.c:5585
#19 0x0045aa4b in PyObject_GetItem (o=0x70f7cdc0, 
key=0x70f86040) at Objects/abstract.c:145
#20 0x005994e0 in PyEval_EvalFrameEx (f=0xbf42f8, throwflag=0) at 
Python/ceval.c:1571
#21 0x005aab83 in PyEval_EvalCodeEx (_co=0x72317d00, 
globals=0x725c6d08, locals=0x0, args=0xbf41b8, argcount=3, kws=0xbf41d0, 
kwcount=0, defs=0x0, defcount=0, kwdefs=0x71c797c8, closure=0x0) at 
Python/ceval.c:3578
#22 0x005adb71 in fast_function (func=0x71c7ba68, 
pp_stack=0x7ffea1b8, n=3, na=3, nk=0) at Python/ceval.c:4334
#23 0x005ad64c in call_function (pp_stack=0x7ffea1b8, oparg=2) at 
Python/ceval.c:4252
#24 0x005a5b37 in PyEval_EvalFrameEx (f=0xbf4018, throwflag=0) at 
Python/ceval.c:2829
#25 0x005ada33 in fast_function (func=0x71c823f0, 
pp_stack=0x7ffebb08, n=2, na=2, nk=0) at Python/ceval.c:4324
#26 0x005ad64c in call_function (pp_stack=0x7ffebb08, oparg=1) at 
Python/ceval.c:4252
#27 0x005a5b37 in PyEval_EvalFrameEx (f=0xd21018, throwflag=0) at 
Python/ceval.c:2829
#28 0x005aab83 in PyEval_EvalCodeEx (_co=0x758f3280, 
globals=0x725db1a8, locals=0x0, args=0xbdcc00, argcount=2, kws=0xbdcc10, 
kwcount=3, defs=0x71ca6440, defcount=3, kwdefs=0x0, closure=0x0) at 
Python/ceval.c:3578
#29 0x005adb71 in fast_function (func=0x71c646d0, 
pp_stack=0x7ffed648, n=8, na=2, nk=3) at Python/ceval.c:4334
#30 0x005ad64c in call_function (pp_stack=0x7ffed648, oparg=770) at 
Python/ceval.c:4252
#31 0x005a5b37 in PyEval_EvalFrameEx (f=0xbdca38, throwflag=0) at 
Python/ceval.c:2829
#32 0x005ada33 in fast_function (func=0x713d36d0, 
pp_stack=0x7ffeef98, n=2, na=2, nk=0) at Python/ceval.c:4324
---Type  to continue, or q  to quit---
#33 0x005ad64c in call_function (pp_stack=0x7ffeef98, oparg=1) at 
Python/ceval.c:4252
#34 0x005a5b37 in PyEval_EvalFrameEx (f=0xd1d118, throwflag=0) at 
Python/ceval.c:2829
#35 0x005ada33 in fast_function (func=0x722e3eb8, 
pp_stack=0x7fff08e8, n=2, na=2, nk=0) at Python/ceval.c:4324
#36 0x005ad64c in call_function (pp_stack=0x7fff08e8, oparg=2) at 
Python/ceval.c:4252
#37 0x005a5b37 in PyEval_EvalFrameEx (f=0xd1c278, throwflag=0) at 
Python/ceval.c:2829
#38 0x005ada33 in fast_function (func=0x713d23f0, 
pp_stack=0x7fff2238, n=2, na=2, nk=0) at Python/ceval.c:4324
#39 0x005ad64c in call

[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.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21067] Support Multiple finally clauses.

2014-03-25 Thread Georg Brandl

Georg Brandl added the comment:

For resource management, it would be more idiomatic to use context managers, 
either with multiple CMs in one with-statement or, dynamically, with 
contextlib.ExitStack.

For test suites using unittest, there is also the addCleanup functionality of 
the TestCase.  (And if another test framework is used, it might have something 
similar, or maybe should grow it.)

Anyway, such changes are not decided upon in the tracker. If you think this 
should go forward please discuss it on the python-ideas list. For it to go 
forward a PEP will likely need to be written.

--
nosy: +georg.brandl

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21067] Support Multiple finally clauses.

2014-03-25 Thread Kevin Cox

New submission from Kevin Cox:

I think it would be useful to support multiple finally clauses.  The idea would 
be that each clause would be run, even if prior clauses throw exceptions.

The idea came when hunting a bug in the Mozilla test suite.  The code looked 
like as follows.

try:
resource1 = allocateresource1()
resource2 = allocateresource2()

dostuffthatmightthrowexception()
finally:
if resource1:
resource1.close()
if resource2:
resource2.close()

The problem is that if resource1,close() throws an exception resource2 is not 
closed.

The alternative looks like this.

try:
resource1 = allocateresource1()
try:
resource2 = allocateresource2()

dostuffthatmightthrowexception()
finally:
if resource2:
resource2.close()
finally:
if resource2:
resource2.close()

Or it could look like this.

try:
resource1 = allocateresource1()
resource2 = allocateresource2()

dostuffthatmightthrowexception()
finally:
try:
if resource1:
resource1.close()
finally:
if resource2:
resource2.close()

Both of which exhibit indentation explosion when there are a number of 
resources that need to be cleaned up.

If multiple finally clauses were allowed the code would be much more readable 
and would look as follows.

try:
resource1 = allocateresource1()
resource2 = allocateresource2()

dostuffthatmightthrowexception()
finally:
if resource1:
resource1.close()
finally:
if resource2:
resource2.close()

--
messages: 214861
nosy: kevincox
priority: normal
severity: normal
status: open
title: Support Multiple finally clauses.

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21066] The separate download version for the documentation doesn't work

2014-03-25 Thread Cristian Baboi

New submission from Cristian Baboi:

I downloaded python 2.7.6 documentation file for Windows python276.chm and it 
doesn't display any documentation page. It shows only the table of content.

--
assignee: docs@python
components: Documentation, Windows
messages: 214860
nosy: Cristian.Baboi, docs@python
priority: normal
severity: normal
status: open
title: The separate download version for the documentation doesn't work
versions: Python 2.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21065] spam

2014-03-25 Thread R. David Murray

Changes by R. David Murray :


--
stage:  -> committed/rejected
status: open -> closed
title: Can't solve special women's problems? Let us do it. -> spam

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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:

Hi Sebastien,
Those symptoms are actually quite generic. If you want do diagnose your issue, 
I would suggest you compile a debug build of Python (./configure 
--with-pydebug), it will enable many additional checks (and of course be quite 
a bit slower too...).

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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:

Hello,

I encounter a quite similar issue with python 3.4.0 and cx_Oracle. It segfault 
from time to time (hard to reproduce) on visit_decref at Modules/gcmodule.c:373.
There were no issue with python 2.7. I did not test with 3.3.

With gdb i got the following stacktrace :
(gdb) info threads
  Id   Target Id Frame 
* 1Thread 0x77fc6740 (LWP 7415) "python3" visit_decref (op=0xb, 
data=data@entry=0x0) at Modules/gcmodule.c:373
(gdb) backtrace 
#0  visit_decref (op=0xb, data=data@entry=0x0) at Modules/gcmodule.c:373
#1  0x004318da in BaseException_traverse (self=0x71624888, 
visit=0x504660 , arg=0x0) at Objects/exceptions.c:97
#2  0x00504925 in subtract_refs (containers=) at 
Modules/gcmodule.c:398
#3  collect (generation=generation@entry=0, 
n_collected=n_collected@entry=0x7fffbd60, 
n_uncollectable=n_uncollectable@entry=0x7fffbd68, nofail=nofail@entry=0) at 
Modules/gcmodule.c:957
#4  0x00505573 in collect_with_callback (generation=0) at 
Modules/gcmodule.c:1128
#5  collect_generations () at Modules/gcmodule.c:1151
#6  0x00505cd1 in _PyObject_GC_Malloc (basicsize=) at 
Modules/gcmodule.c:1726
#7  _PyObject_GC_Malloc (basicsize=) at Modules/gcmodule.c:1743
#8  _PyObject_GC_NewVar (tp=tp@entry=0x810400 , 
nitems=nitems@entry=11) at Modules/gcmodule.c:1753
#9  0x0046470c in PyTuple_New (size=11) at Objects/tupleobject.c:104
#10 0x00464e05 in PyTuple_New (size=size@entry=11) at 
Objects/tupleobject.c:122
#11 0x7582e881 in Cursor_CreateRow (self=self@entry=0x71603290) at 
Cursor.c:1095
#12 0x7582f18f in Cursor_MultiFetch (self=0x71603290, rowLimit=0) 
at Cursor.c:1883
#13 0x004c4aa7 in call_function (oparg=, 
pp_stack=0x7fffbfb0) at Python/ceval.c:4210
#14 PyEval_EvalFrameEx (f=f@entry=0xab5208, throwflag=throwflag@entry=0) at 
Python/ceval.c:2829
#15 0x004be47b in PyEval_EvalCodeEx (_co=, 
globals=, locals=locals@entry=0x0, args=, 
argcount=argcount@entry=3, kws=0x711c3ad8, kwcount=0, defs=0x75a635a0, 
defcount=1, kwdefs=0x0, 
closure=0x0) at Python/ceval.c:3578
#16 0x004c3d91 in fast_function (nk=, na=3, n=, pp_stack=0x7fffc240, func=0x71e98b70) at Python/ceval.c:4334
#17 call_function (oparg=, pp_stack=0x7fffc240) at 
Python/ceval.c:4252
#18 PyEval_EvalFrameEx (f=f@entry=0x711c3930, throwflag=throwflag@entry=0) 
at Python/ceval.c:2829
#19 0x004be47b in PyEval_EvalCodeEx (_co=, 
globals=, locals=locals@entry=0x0, args=, 
argcount=argcount@entry=2, kws=0xbf7610, kwcount=1, defs=0x71eb14c0, 
defcount=1, kwdefs=0x0, 
closure=0x0) at Python/ceval.c:3578
#20 0x004c3d91 in fast_function (nk=, na=2, n=, pp_stack=0x7fffc4d0, func=0x7160b510) at Python/ceval.c:4334
#21 call_function (oparg=, pp_stack=0x7fffc4d0) at 
Python/ceval.c:4252
#22 PyEval_EvalFrameEx (f=, throwflag=throwflag@entry=0) at 
Python/ceval.c:2829
#23 0x004c5e85 in fast_function (nk=, na=2, n=2, 
pp_stack=0x7fffc6b0, func=0x71634d08) at Python/ceval.c:4324
#24 call_function (oparg=, pp_stack=0x7fffc6b0) at 
Python/ceval.c:4252
#25 PyEval_EvalFrameEx (f=, throwflag=throwflag@entry=0) at 
Python/ceval.c:2829
#26 0x004c5e85 in fast_function (nk=, na=2, n=2, 
pp_stack=0x7fffc890, func=0x72513730) at Python/ceval.c:4324
#27 call_function (oparg=, pp_stack=0x7fffc890) at 
Python/ceval.c:4252
#28 PyEval_EvalFrameEx (f=, throwflag=throwflag@entry=0) at 
Python/ceval.c:2829
#29 0x004c5e85 in fast_function (nk=, na=2, n=2, 
pp_stack=0x7fffca70, func=0x71633378) at Python/ceval.c:4324
#30 call_function (oparg=, pp_stack=0x7fffca70) at 
Python/ceval.c:4252
---Type  to continue, or q  to quit---
#31 PyEval_EvalFrameEx (f=, throwflag=throwflag@entry=0) at 
Python/ceval.c:2829
#32 0x004c5e85 in fast_function (nk=, na=2, n=2, 
pp_stack=0x7fffcc50, func=0x71635d90) at Python/ceval.c:4324
#33 call_function (oparg=, pp_stack=0x7fffcc50) at 
Python/ceval.c:4252
#34 PyEval_EvalFrameEx (f=, throwflag=throwflag@entry=0) at 
Python/ceval.c:2829
#35 0x004c5e85 in fast_function (nk=, na=2, n=2, 
pp_stack=0x7fffce30, func=0x72513730) at Python/ceval.c:4324
#36 call_function (oparg=, pp_stack=0x7fffce30) at 
Python/ceval.c:4252
#37 PyEval_EvalFrameEx (f=, throwflag=throwflag@entry=0) at 
Python/ceval.c:2829
#38 0x004c5e85 in fast_function (nk=, na=2, n=2, 
pp_stack=0x7fffd010, func=0x71633378) at Python/ceval.c:4324
#39 call_function (oparg=, pp_stack=0x7fffd010) at 
Python/ceval.c:4252
#40 PyEval_EvalFrameEx (f=f@entry=0xab9478, throwflag=throwflag@entry=0) at 
Python/ceval.c:2829
#41 0x004be47b in PyEval_EvalCodeEx (_co=, 
globals=, locals=locals@entry=0x0, args=, 
argcount=argcount@entry=1, kws=0xab9380, kwcount=0, defs=0x72504b88, 
defcount=1, kwdefs=0x0, 
closure=0x0) at Python/ceval.c:3578
#42 0x00

[issue21011] PyArg_ParseTupleAndKeywords doesn't take const char *keywords[]

2014-03-25 Thread Josh Rosenberg

Josh Rosenberg added the comment:

This has come up before. Links to additional info:

https://mail.python.org/pipermail/python-dev/2006-February/060689.html

http://bugs.python.org/issue1772673

--
nosy: +josh.rosenberg

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21056] csv documentation is incorrect

2014-03-25 Thread Josh Rosenberg

Josh Rosenberg added the comment:

Aside from the method being named __next__(), it's the same flaw in all copies 
of the Py3 documentation.

I don't think explicitly enumerating types is the way to go though. I'd just 
remove the documentation for __next__, and leave it up to the per-type 
documentation to describe the data structure returned when iterating. None of 
the other built-in types in Py3 bother to explicitly document "internal" 
methods like __next__, but rather describe iteration while describing the type 
itself.

--
nosy: +josh.rosenberg

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19264] subprocess.Popen doesn't support unicode on Windows

2014-03-25 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
resolution:  -> wont fix
stage: test needed -> committed/rejected
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20990] pyflakes: undefined names, get_context() and main(), in multiprocessing

2014-03-25 Thread Richard Oudkerk

Richard Oudkerk added the comment:

Testing the is_forking() requires cx_freeze or something similar, so it really 
cannot go in the test suite.

I have tested it manually (after spending too long trying to get cx_freeze to 
work with a source build).

It should be noted that on Unix freezing is currently only compatible with the 
default 'fork' start method.

--
resolution:  -> fixed
stage:  -> committed/rejected
status: open -> closed
type:  -> behavior

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20375] ElementTree: Document handling processing instructions

2014-03-25 Thread Nikolaus Rath

Changes by Nikolaus Rath :


Removed file: http://bugs.python.org/file34528/issue20951.diff

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21057] TextIOWrapper does not support reading bytearrays or memoryviews

2014-03-25 Thread Nikolaus Rath

Nikolaus Rath added the comment:

On 03/25/2014 01:39 PM, Serhiy Storchaka wrote:
> read1() should return bytes. MyByteStream doesn't implement the 
> io.BufferedIOBase interface.

Indeed, this is what this issue is about :-).

The question is: is there a good reason to require io.BufferedIOBase
implementors to return bytes rather than any bytes-like object from read1?

I'd also argue that the current documentation of io.BufferedIOBase
actually does not clearly require read1 to return bytes. The exact
formulation is "Read and return up to *size* bytes" (note that "bytes"
is not interpreted text). This can just as easily read as "return binary
data of up to *size* bytes using one of the customary Python types".

So if it turns out that there is a good reason for this requirement, the
documentation should at least make this requirement more explicit.

Best,
-Nikolaus

-- 
Encrypted emails preferred.
PGP fingerprint: 5B93 61F8 4EA2 E279 ABF6  02CF A9AD B7F8 AE4E 425C

 »Time flies like an arrow, fruit flies like a Banana.«

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21057] TextIOWrapper does not support reading bytearrays or memoryviews

2014-03-25 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

read1() should return bytes. MyByteStream doesn't implement the 
io.BufferedIOBase interface.

--
nosy: +serhiy.storchaka

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16047] Tools/freeze no longer works in Python 3

2014-03-25 Thread Marc-Andre Lemburg

Marc-Andre Lemburg added the comment:

Wait, Brett :-)

The issue that Christian mentioned was just a side discussion.

We still need to fix the main problem.

--
resolution: invalid -> 
status: closed -> open

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16047] Tools/freeze no longer works in Python 3

2014-03-25 Thread Brett Cannon

Changes by Brett Cannon :


--
resolution:  -> invalid
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16047] Tools/freeze no longer works in Python 3

2014-03-25 Thread Marc-Andre Lemburg

Marc-Andre Lemburg added the comment:

On 25.03.2014 19:41, M.-A. Lemburg wrote:
> I'll have to have a look at how the pyscopg2 package normally
> imports its C extension. It's likely that they will have to use
> something like this to make things work for frozen apps as well:
> 
> try:
> from psycopg2 import _psycopg
> except ImportError:
> # try to find the module at the top-level
> import _psyocpg
> 
> or setup the package's .__path__ to include the top-level
> dir.

The package uses absolute imports for importing the C extension, e.g.

from psycopg2._psycopg import __version__

This cannot work in Python with frozen packages. Not in Python 2 and
not in Python 3 either.

Christian: Your only option is not to freeze the psycopg2 package
and ship it along side your frozen application or to build the
frozen app with the psycopg2 C extension built statically.

In any case, freeze is not at fault here.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1298835] Add a vendor-packages directory for system-supplied modules

2014-03-25 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
stage:  -> patch review
versions: +Python 3.5 -Python 3.4

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2014-03-25 Thread Giampaolo Rodola'

Giampaolo Rodola' added the comment:

-1 about adding raise_on_blocking_send=False option as IMO it unnecessarily 
complicates the API.

Note: when working with plain sockets send() returning 0 means the connection 
has been closed by the other peer, same for os.sendfile().
It appears ssl module is the only one behaving differently therefore I'd be for 
signaling the discrepancy in the doc.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2014-03-25 Thread Antoine Pitrou

Antoine Pitrou added the comment:

> There's a great saying in the usability world: "You can't document 
> your way out of a usability problem".

However, adding a flag to change behaviour at runtime creates *another* 
usability problem. It's not obvious it would actually make things better (and 
implementors of async networking frameworks haven't asked for it, AFAICT).

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20145] unittest.assert*Regex functions should verify that expected_regex has a valid type

2014-03-25 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 3f8b801e7e76 by R David Murray in branch '2.7':
backport: #20145: assertRaisesRegexp now raises a TypeError on bad regex.
http://hg.python.org/cpython/rev/3f8b801e7e76

New changeset 32407a677215 by R David Murray in branch '3.4':
backport: #20145: assert[Raises|Warns]Regex now raise TypeError on bad regex.
http://hg.python.org/cpython/rev/32407a677215

New changeset 8f72f8359987 by R David Murray in branch 'default':
Merge #20145 backport: delete whatsnew entry.
http://hg.python.org/cpython/rev/8f72f8359987

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20344] subprocess.check_output() docs misrepresent what shell=True does

2014-03-25 Thread Tuomas Savolainen

Tuomas Savolainen added the comment:

Created a patch that adds notice of using shell=True and iterable to the 
documentation. Please do comment if the formatting is wrong (this my first 
documentation patch).

--
Added file: http://bugs.python.org/file34619/documentation20344.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16047] Tools/freeze no longer works in Python 3

2014-03-25 Thread Marc-Andre Lemburg

Marc-Andre Lemburg added the comment:

On 25.03.2014 19:27, Brett Cannon wrote:
> 
> Brett Cannon added the comment:
> 
> OK, so trying to import around the package was definitely why the first 
> instance didn't work so that's all expected.
> 
> As for the failure when importing psycopg2, my guess is that the freezing of 
> psycopg2.__init__ is not setting __path__ to anything reasonable to work with 
> dynamically loading psycopg2._psycopg. That really shouldn't really ever work 
> anyway since that just doesn't make sense from the perspective of freezing a 
> package unless you made the extension module a built-in module, but I don't 
> think submodules are supported in that case right now anyway.
> 
> MAL, do you agree with that assessment?

Using C extensions embedded in Python packages is supported in
Python 2's freeze - but not directly:

This works because Python2 search for the module in the top level
directories in case it cannot find the shared mod in the package dir
(which in the case of frozen packages does not exist). So you ship the
frozen app together with the .so shared module in the same directory
or setup sys.path to point to whatever dir you use for this.

I'll have to have a look at how the pyscopg2 package normally
imports its C extension. It's likely that they will have to use
something like this to make things work for frozen apps as well:

try:
from psycopg2 import _psycopg
except ImportError:
# try to find the module at the top-level
import _psyocpg

or setup the package's .__path__ to include the top-level
dir.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16047] Tools/freeze no longer works in Python 3

2014-03-25 Thread R. David Murray

Changes by R. David Murray :


--
nosy: +r.david.murray

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16047] Tools/freeze no longer works in Python 3

2014-03-25 Thread Brett Cannon

Brett Cannon added the comment:

OK, so trying to import around the package was definitely why the first 
instance didn't work so that's all expected.

As for the failure when importing psycopg2, my guess is that the freezing of 
psycopg2.__init__ is not setting __path__ to anything reasonable to work with 
dynamically loading psycopg2._psycopg. That really shouldn't really ever work 
anyway since that just doesn't make sense from the perspective of freezing a 
package unless you made the extension module a built-in module, but I don't 
think submodules are supported in that case right now anyway.

MAL, do you agree with that assessment?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16047] Tools/freeze no longer works in Python 3

2014-03-25 Thread Christian Bachmaier

Christian Bachmaier added the comment:

$ cat hello.py
import _psycopg
print('Works.')
$ export PYTHONVERBOSE=2
$ ./hello 2> res.txt
$ cat res.txt | grep psycopg   
# trying /export/scratch/chris/pgtest/_psycopg.cpython-34m-x86_64-linux-gnu.so
# trying /export/scratch/chris/pgtest/_psycopg.cpython-34m.so
# trying /export/scratch/chris/pgtest/_psycopg.abi3.so
# trying /export/scratch/chris/pgtest/_psycopg.so
# trying /export/scratch/chris/pgtest/_psycopg.py
# trying /export/scratch/chris/pgtest/_psycopg.pyc
# trying /usr/lib/python3.4/_psycopg.cpython-34m-x86_64-linux-gnu.so
# trying /usr/lib/python3.4/_psycopg.cpython-34m.so
# trying /usr/lib/python3.4/_psycopg.abi3.so
# trying /usr/lib/python3.4/_psycopg.so
# trying /usr/lib/python3.4/_psycopg.py
# trying /usr/lib/python3.4/_psycopg.pyc
# trying 
/usr/lib/python3.4/plat-x86_64-linux-gnu/_psycopg.cpython-34m-x86_64-linux-gnu.so
# trying /usr/lib/python3.4/plat-x86_64-linux-gnu/_psycopg.cpython-34m.so
# trying /usr/lib/python3.4/plat-x86_64-linux-gnu/_psycopg.abi3.so
# trying /usr/lib/python3.4/plat-x86_64-linux-gnu/_psycopg.so
# trying /usr/lib/python3.4/plat-x86_64-linux-gnu/_psycopg.py
# trying /usr/lib/python3.4/plat-x86_64-linux-gnu/_psycopg.pyc
# trying /usr/lib/python3.4/lib-dynload/_psycopg.cpython-34m-x86_64-linux-gnu.so
# trying /usr/lib/python3.4/lib-dynload/_psycopg.cpython-34m.so
# trying /usr/lib/python3.4/lib-dynload/_psycopg.abi3.so
# trying /usr/lib/python3.4/lib-dynload/_psycopg.so
# trying /usr/lib/python3.4/lib-dynload/_psycopg.py
# trying /usr/lib/python3.4/lib-dynload/_psycopg.pyc
# trying 
/usr/local/lib/python3.4/dist-packages/_psycopg.cpython-34m-x86_64-linux-gnu.so
# trying /usr/local/lib/python3.4/dist-packages/_psycopg.cpython-34m.so
# trying /usr/local/lib/python3.4/dist-packages/_psycopg.abi3.so
# trying /usr/local/lib/python3.4/dist-packages/_psycopg.so
# trying /usr/local/lib/python3.4/dist-packages/_psycopg.py
# trying /usr/local/lib/python3.4/dist-packages/_psycopg.pyc
# trying /usr/lib/python3/dist-packages/_psycopg.cpython-34m-x86_64-linux-gnu.so
# trying /usr/lib/python3/dist-packages/_psycopg.cpython-34m.so
# trying /usr/lib/python3/dist-packages/_psycopg.abi3.so
# trying /usr/lib/python3/dist-packages/_psycopg.so
# trying /usr/lib/python3/dist-packages/_psycopg.py
# trying /usr/lib/python3/dist-packages/_psycopg.pyc
import _psycopg
ImportError: No module named '_psycopg'



$ cat hello.py
import _psycopg
print('Works.')
$ export PYTHONPATH=/usr/lib/python3/dist-packages/psycopg2:$PYTHONPATH
$ ./hello
Works.



The correct import (see the doc of psycopg2) is import psycopg2. Otherwise a 
valid script does even not run in interpreted mode. The library lies in 
/usr/lib/python3/dist-packages/psycopg2/_psycopg.cpython...so Maybe there is 
the Problem. One has to Import the parent dir of the so-file, which Triggers 
the bug.

$ cat hello.py
import psycopg2
print('Works.')
$ export PYTHONVERBOSE=2
$ ./hello 2> res.txt
$ cat res.txt | grep psycopg   
import psycopg2
  File "/usr/lib/python3/dist-packages/psycopg2/__init__.py", line 67, in 

from psycopg2._psycopg import BINARY, NUMBER, STRING, DATETIME, ROWID
ImportError: No module named 'psycopg2._psycopg'
# destroy psycopg2


Marc-Andre: would you mind to install python3-psycopg2 to see that in real?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21058] tempfile.NamedTemporaryFile leaks file descriptor when fdopen fails

2014-03-25 Thread Roundup Robot

Roundup Robot added the comment:

New changeset aa2a05fe46ae by Victor Stinner in branch '3.4':
Issue #21058: fix typo in a comment. Patch written by Vajrasky Kok.
http://hg.python.org/cpython/rev/aa2a05fe46ae

New changeset 4e3c76cb0e8a by Victor Stinner in branch 'default':
(Merge 3.4) Issue #21058: fix typo in a comment. Patch written by Vajrasky Kok.
http://hg.python.org/cpython/rev/4e3c76cb0e8a

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16047] Tools/freeze no longer works in Python 3

2014-03-25 Thread Marc-Andre Lemburg

Marc-Andre Lemburg added the comment:

On 25.03.2014 17:47, Christian Bachmaier wrote:
> 
> Christian Bachmaier added the comment:
> 
>> To test what I asked for, please run freeze on this script:
>>
>> """
>> import _psycopg2

Sorry. The above should have read "import _psycopg".

>> print ('Works.')
>> """
> 
> $ xxx/freeze.py hello.py
> $ make
> $ ./hello
> Traceback (most recent call last):
>   File "hello.py", line 3, in 
> import _psycopg2
>   File "/usr/lib/python3.4/importlib/_bootstrap.py", line 2214, in 
> _find_and_load
> return _find_and_load_unlocked(name, import_)
>   File "/usr/lib/python3.4/importlib/_bootstrap.py", line 2201, in 
> _find_and_load_unlocked
> raise ImportError(_ERR_MSG.format(name), name=name)
> ImportError: No module named '_psycopg2'
> 
> Btw the same with import psycopg2, psycopg2._psycopg, or _psycopg. Event with 
> the subdir link as explained above. The first one (import psycopg2) is the 
> one which operates in interpretation mode.

Ok, now we're getting closer.

Could you run this to have Python print the locations where
it looks for the shared lib:

export PYTHONVERBOSE=2
./hello

This should print a long list of messages such as these:

import os # frozen
import errno # builtin
import posix # builtin
import posixpath # frozen
...

to stderr. Of those only the lines which mention _psycopg are relevant.

Please make sure that the dir where the .so file resides is
included in this list. If not, you will need to adjust PYTHONPATH
accordingly.

If the dir is mentioned in the listing, we have to dig deeper
using strace or similar.

Thanks,
-- 
Marc-Andre Lemburg
eGenix.com

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16047] Tools/freeze no longer works in Python 3

2014-03-25 Thread Christian Bachmaier

Christian Bachmaier added the comment:

> To test what I asked for, please run freeze on this script:
> 
> """
> import _psycopg2
> print ('Works.')
> """

$ xxx/freeze.py hello.py
$ make
$ ./hello
Traceback (most recent call last):
  File "hello.py", line 3, in 
import _psycopg2
  File "/usr/lib/python3.4/importlib/_bootstrap.py", line 2214, in 
_find_and_load
return _find_and_load_unlocked(name, import_)
  File "/usr/lib/python3.4/importlib/_bootstrap.py", line 2201, in 
_find_and_load_unlocked
raise ImportError(_ERR_MSG.format(name), name=name)
ImportError: No module named '_psycopg2'

Btw the same with import psycopg2, psycopg2._psycopg, or _psycopg. Event with 
the subdir link as explained above. The first one (import psycopg2) is the one 
which operates in interpretation mode.

> If it prints 'Works.', then your problem is unrelated to this
> ticket.

Nop, prints the error message instead of 'Works.'

> If it fails with an import error or some other error
> related to loading the shared lib, then it may be a problem
> with freeze and is likely related to the new import lib
> machinery.

=> we have a bug if Marc-Andre is right. Thanks.

Chris

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21064] Simple segfault

2014-03-25 Thread Ned Deily

Ned Deily added the comment:

Yes, upgrade. See Issue18458 for details.

--
resolution:  -> duplicate
stage:  -> committed/rejected
status: open -> closed
superseder:  -> interactive interpreter crashes and test_readline fails on OS X 
10.9 Mavericks due to libedit update

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21064] Simple segfault

2014-03-25 Thread STINNER Victor

STINNER Victor added the comment:

Please upgrade to Python 3.3.5 or even to Python 3.4 (!) which are already 
fixed.

--
nosy: +haypo, hynek, ned.deily

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21064] Simple segfault

2014-03-25 Thread Jona Sassenhagen

Jona Sassenhagen added the comment:

In fact this minimal example is sufficient to cause a CtD (OSX 10.9.2):

$ python3
Python 3.3.2 (v3.3.2:d047928ae3f6, May 13 2013, 13:52:24) 
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> class Word(object):
... def __init__(self):
Segmentation fault: 11

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21064] Simple segfault

2014-03-25 Thread Jona Sassenhagen

New submission from Jona Sassenhagen:

Simple OOP segfault CtD using OSX 10.9.2

User@here:~/$ python3
Python 3.3.2 (v3.3.2:d047928ae3f6, May 13 2013, 13:52:24) 
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> 
>>> class Word(object):
... def __init__(self, name, phon, semantics=None, askglobal=None, 
ask=None, giveglobal=None, give=None):
self.name = name
self.phon = phon
self.semantics = semantics
self.askglobal = askglobal
self.ask = ask
self.giveglobal = giveglobal
self.give = give


class V(Word):
def __init__(self)
super().__init__(self,name,phon,semantics=None, askglobal=None, 
ask=None, giveglobal=None, give=None):
self.askglobal = [nom,acc]

Segmentation fault: 11

--
assignee: ronaldoussoren
components: Macintosh
messages: 214835
nosy: Jona.Sassenhagen, ronaldoussoren
priority: normal
severity: normal
status: open
title: Simple segfault
type: crash
versions: Python 3.3

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21063] Touch up one-line descriptions of modules for module index

2014-03-25 Thread Brett Cannon

New submission from Brett Cannon:

E.g. linecache says "This module provides random access to individual lines 
from text files." That's a big awkward and could just drop "This module" to 
read more easily.

--
assignee: docs@python
components: Documentation
keywords: easy
messages: 214834
nosy: brett.cannon, docs@python
priority: low
severity: normal
stage: needs patch
status: open
title: Touch up one-line descriptions of modules for module index
versions: Python 3.5

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21062] Evalute all import-related modules for best practices

2014-03-25 Thread Brett Cannon

New submission from Brett Cannon:

I'm thinking of:

* pkgutil
* py_compile
* compileall
* modulefinder
* freeze

Should make sure they are (a) doing the right/best thing in the face of 
importlib/PEP 302/PEP 420/PEP 451, and (b) if they should be integrated into 
importlib somehow in a non-compatible fashion for future growth and let the old 
versions slowly wither away.

I'm leaving out runpy as it's not directly import-related, just import-reliant, 
and zipimport because I don't want to touch its code. =)

--
messages: 214833
nosy: brett.cannon, eric.snow, ncoghlan
priority: normal
severity: normal
status: open
title: Evalute all import-related modules for best practices

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12209] Minor edits to faulthandler doc

2014-03-25 Thread Éric Araujo

Éric Araujo added the comment:

Thanks!

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20100] epoll docs are not clear with regards to CLOEXEC.

2014-03-25 Thread priya

Changes by priya :


Added file: http://bugs.python.org/file34618/epoll.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16047] Tools/freeze no longer works in Python 3

2014-03-25 Thread Christian Bachmaier

Christian Bachmaier added the comment:

Sorry I forgot: PyRun seems only support Python 2.x.

The only other freeze tool I know for Pyhton3 code is cx_freeze. I would 
prefere the vanilla freeze of the python distribution itself and as far as I 
can see using cx_freeze makes more problems for me as it may solve. But that is 
not a discussion for this thread or forum.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16047] Tools/freeze no longer works in Python 3

2014-03-25 Thread Marc-Andre Lemburg

Marc-Andre Lemburg added the comment:

On 25.03.2014 16:21, Christian Bachmaier wrote:
> 
> Sorry I forgot: PyRun seems only support Python 2.x.

Right, because PyRun uses freeze and freeze currently does not work
for Python 3. Which is what this ticket is all about and why
I opened it.

To test what I asked for, please run freeze on this script:

"""
import _psycopg2
print ('Works.')
"""

If it prints 'Works.', then your problem is unrelated to this
ticket. If it fails with an import error or some other error
related to loading the shared lib, then it may be a problem
with freeze and is likely related to the new import lib
machinery.

Thanks,
-- 
Marc-Andre Lemburg
eGenix.com

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20100] epoll docs are not clear with regards to CLOEXEC.

2014-03-25 Thread priya

Changes by priya :


Added file: http://bugs.python.org/file34616/epoll.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16047] Tools/freeze no longer works in Python 3

2014-03-25 Thread Christian Bachmaier

Christian Bachmaier added the comment:

The shared library is not linked into the resulting binary
by simply having an import in the Python file.

Yes. This is why (at least in Python 3.2) it must be in the right path 
(subdirectory), see above.

> freeze does
> support adding the external library statically, but it's not
> easy.

Unfortunately, Debian/Ubuntu does not deliver a static version of psycopg2. So 
I'd like to use the dynamic version. This is definitively possible with Python 
3.2 x86, again, see above.

> The question I raised was whether running "hello" will
> fail to import the shared library _pyscopg2*.so or not.

That's a good question. I think so, but how can I test that? At least the 
(only) way in Python 3.2 does not work any more. Even with Python 3.2 there 
must be a link in the subdirectory as shown above. It is not enough to have it 
only in the usual installation directory 
/usr/lib/python3/dist-packages/psycopg2/_psycopg.xxx.so
Even any set LD_LIBRARY_PATH is ignored, like also putting it in /usr/lib as 
far as I can see.

> This ticket is about getting freeze working again for
> Python 3.x

Right. So we should test the library feature which worked somehow magically in 
Python 3.2. Then we will see if it is a bug. My statement is that it is a bug.

Thanks again to all.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21058] tempfile.NamedTemporaryFile leaks file descriptor when fdopen fails

2014-03-25 Thread Vajrasky Kok

Vajrasky Kok added the comment:

There is a typo.

s/io.pen/io.open/

--
keywords: +patch
nosy: +vajrasky
Added file: http://bugs.python.org/file34617/fix_typo_21058.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20210] Provide configure options to enable/disable Python modules and extensions

2014-03-25 Thread Mark Lawrence

Mark Lawrence added the comment:

I certainly like the principle.  Does this need a wider audience, python-dev 
maybe?

--
nosy: +BreamoreBoy

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16047] Tools/freeze no longer works in Python 3

2014-03-25 Thread Marc-Andre Lemburg

Marc-Andre Lemburg added the comment:

On 25.03.2014 13:02, Christian Bachmaier wrote:
> 
> Christian Bachmaier added the comment:
> 
> # ldd hello
> linux-vdso.so.1 =>  (0x7fffd677e000)
> libpython3.4m.so.1.0 => 
> /usr/lib/x86_64-linux-gnu/libpython3.4m.so.1.0 (0x7f968c6c2000)
> libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 
> (0x7f968c4a4000)
> libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x7f968c0dd000)
> libexpat.so.1 => /lib/x86_64-linux-gnu/libexpat.so.1 
> (0x7f968beb3000)
> libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x7f968bc9a000)
> libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x7f968ba95000)
> libutil.so.1 => /lib/x86_64-linux-gnu/libutil.so.1 
> (0x7f968b892000)
> libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x7f968b58c000)
> /lib64/ld-linux-x86-64.so.2 (0x7f968ccfb000)
> 
> and (even strace) does not show an attempt to acces the so-file. Also tried 
> to add
> 
> -L/usr/lib/python3/dist-packages/psycopg2 
> -l_psycopg.cpython-34m-x86_64-linux-gnu.so
> 
> and similar without success.
> 
> Can anyone try to reproduce it, a freeze (with patches) of hello.py 
> containing only
> 
> import _psycopg2
> 
> or maybe another external library? In the first case apt-get install 
> python3-psycopg2 is necessary.

Christian, what you're expecting is not what freeze can offer.

The shared library is not linked into the resulting binary
by simply having an import in the Python file. freeze does
support adding the external library statically, but it's not
easy.

See the eGenix PyRun source archive for how it's done:

http://www.egenix.com/products/python/PyRun/

The question I raised was whether running "hello" will
fail to import the shared library _pyscopg2*.so or not.

If that's the case (and only then), you have found a bug that
needs fixing. If not, please ask your usage questions on other
lists. This ticket is about getting freeze working again for
Python 3.x, not about its usage.

Thanks,
-- 
Marc-Andre Lemburg
eGenix.com

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19264] subprocess.Popen doesn't support unicode on Windows

2014-03-25 Thread STINNER Victor

STINNER Victor added the comment:

>  The original issue was reported against 2.7

Oh... Ok :-)

It's tricky to fix this issue in Python 2.7 because you have to choose which 
function is used: CreateProcessA() (bytes) or CreateProcessW() (Unicode). To 
use CreateProcessW(), you have to decode bytes parameter. Python 3 has 
os.fsencode()/os.fsdecode() functions, similar functions in C. The "mbcs" 
Python codec is strict by default, but it now supports any Python error 
handler. This change changed was improved in each Python 3 release.

Python 2 has PyUnicode_DecodeMBCSStateful() and PyUnicode_EncodeMBCS() which 
use the default Windows behaviour. I'm not sure that using 
PyUnicode_DecodeMBCSStateful() (or directly MultiByteToWideChar) + 
CreateProcessW() is exactly the same than calling CreateProcessA().

Should we support CreateProcessA() and CreateProcessW(), and use one or the 
other depending on the type of the pararameters?

IMO such change requires too much work and it is not enough to have a full 
Unicode support for filenames. You have to fix much more code. I already did 
all this work in Python 3 (in 3.1, 3.2 and then 3.3). I suggest you to upgrade 
to port your application to Python 3 if you want a full Unicode support. Using 
Unicode in Python 3 is natural and just works fine.

So I still suggest to close this issue as wontfix.

--

Similar discussions on Python 3:
http://bugs.python.org/issue8393#msg103565
http://bugs.python.org/issue8514#msg104224

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16047] Tools/freeze no longer works in Python 3

2014-03-25 Thread Meador Inge

Meador Inge added the comment:

Apologies for not replying over the weekend.  I am still looking into this one.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21052] Consider dropping ImportWarning for empty sys.path_hooks and sys.meta_path

2014-03-25 Thread Arfrever Frehtes Taifersar Arahesis

Changes by Arfrever Frehtes Taifersar Arahesis :


--
nosy: +Arfrever

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21059] idle_test.test_warning failure

2014-03-25 Thread Zachary Ware

Changes by Zachary Ware :


--
assignee:  -> zach.ware
dependencies: +Suppress 'os.environ was modified' warning on Tcl/Tk tests
versions: +Python 3.5

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21059] idle_test.test_warning failure

2014-03-25 Thread Zachary Ware

Zachary Ware added the comment:

Indeed, although honestly I can't figure out exactly why.  However, #20035 
should fix the failures; I haven't committed it because the patch is in C and I 
can't guarantee that I haven't missed anything big.  If either of you (or 
anyone else at all :-) could review that patch for me, I would be very grateful.

--
nosy: +zach.ware

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17846] Building Python on Windows - Supplementary info

2014-03-25 Thread Kathleen Weaver

Changes by Kathleen Weaver :


Added file: http://bugs.python.org/file34615/winreadme.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17846] Building Python on Windows - Supplementary info

2014-03-25 Thread Kathleen Weaver

Changes by Kathleen Weaver :


Added file: http://bugs.python.org/file34614/winreadme.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1298835] Add a vendor-packages directory for system-supplied modules

2014-03-25 Thread Piotr Dobrogost

Changes by Piotr Dobrogost :


--
nosy: +piotr.dobrogost

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17846] Building Python on Windows - Supplementary info

2014-03-25 Thread Kathleen Weaver

Kathleen Weaver added the comment:

I've got a patch for the readme from cpyton and for the setup from devguide

I have had trouble reading the comments.

--
Added file: http://bugs.python.org/file34613/win.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1298835] Add a vendor-packages directory for system-supplied modules

2014-03-25 Thread Nick Coghlan

Nick Coghlan added the comment:

Note that authority over package design decisions has been delegated to the 
Python Packaging Authority - it's up to them to decide what they want and ask 
for it (of they decide they actually need modifications to the interpreter), 
not for Python core to tell them what to do.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16484] pydoc generates invalid docs.python.org link for xml.etree.ElementTree and other modules

2014-03-25 Thread Éric Araujo

Éric Araujo added the comment:

It would be nice to have unit tests for this change.

Did you get an email from the review system?  If not, follow the “review” link 
on the right of the list of files on this page.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6699] IDLE: Warn user about overwriting a file that has a newer version on filesystem

2014-03-25 Thread priya

Changes by priya :


Added file: http://bugs.python.org/file34612/idle.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16047] Tools/freeze no longer works in Python 3

2014-03-25 Thread Christian Bachmaier

Christian Bachmaier added the comment:

# ldd hello
linux-vdso.so.1 =>  (0x7fffd677e000)
libpython3.4m.so.1.0 => /usr/lib/x86_64-linux-gnu/libpython3.4m.so.1.0 
(0x7f968c6c2000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 
(0x7f968c4a4000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x7f968c0dd000)
libexpat.so.1 => /lib/x86_64-linux-gnu/libexpat.so.1 
(0x7f968beb3000)
libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x7f968bc9a000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x7f968ba95000)
libutil.so.1 => /lib/x86_64-linux-gnu/libutil.so.1 (0x7f968b892000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x7f968b58c000)
/lib64/ld-linux-x86-64.so.2 (0x7f968ccfb000)

and (even strace) does not show an attempt to acces the so-file. Also tried to 
add

-L/usr/lib/python3/dist-packages/psycopg2 
-l_psycopg.cpython-34m-x86_64-linux-gnu.so

and similar without success.

Can anyone try to reproduce it, a freeze (with patches) of hello.py containing 
only

import _psycopg2

or maybe another external library? In the first case apt-get install 
python3-psycopg2 is necessary.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21038] test_epoll.TestEPoll.test_control_and_wait: remove extra assertion

2014-03-25 Thread STINNER Victor

STINNER Victor added the comment:

Thanks for the patch, it's now fixed in Python 2.7, 3.4 and 3.5.

--
nosy: +haypo
resolution:  -> fixed
status: open -> closed
versions: +Python 3.5

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20100] epoll docs are not clear with regards to CLOEXEC.

2014-03-25 Thread priya

Changes by priya :


--
keywords: +patch
Added file: http://bugs.python.org/file34611/epoll.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21038] test_epoll.TestEPoll.test_control_and_wait: remove extra assertion

2014-03-25 Thread Roundup Robot

Roundup Robot added the comment:

New changeset d09032a9adee by Victor Stinner in branch '2.7':
Issue #21038: Cleanup test_epoll.py
http://hg.python.org/cpython/rev/d09032a9adee

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21038] test_epoll.TestEPoll.test_control_and_wait: remove extra assertion

2014-03-25 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 3cd216b56599 by Victor Stinner in branch '3.4':
Issue #21038: Cleanup test_epoll.py
http://hg.python.org/cpython/rev/3cd216b56599

New changeset 945d7dd3b455 by Victor Stinner in branch '3.4':
Issue #21038: Use monotonic clock to compute timeout, not the system clock
http://hg.python.org/cpython/rev/945d7dd3b455

--
nosy: +python-dev

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19818] tracemalloc: comments on the doc

2014-03-25 Thread STINNER Victor

Changes by STINNER Victor :


--
keywords:  -3.3regression

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19818] tracemalloc: comments on the doc

2014-03-25 Thread STINNER Victor

Changes by STINNER Victor :


--
keywords: +3.3regression
resolution:  -> out of date
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15971] Sporadic failure in test_dump_tracebacks_later_file (test_faulthandler)

2014-03-25 Thread STINNER Victor

STINNER Victor added the comment:

I didn't see this error recently.

--
resolution:  -> out of date
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12209] Minor edits to faulthandler doc

2014-03-25 Thread STINNER Victor

STINNER Victor added the comment:

Sorry for the delay. I applied your patch.

--
resolution:  -> fixed
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12209] Minor edits to faulthandler doc

2014-03-25 Thread Roundup Robot

Roundup Robot added the comment:

New changeset a97dcdee35f9 by Victor Stinner in branch '3.4':
Issue #12209: Minor edits to faulthandler doc. Patch written by Éric Araujo.
http://hg.python.org/cpython/rev/a97dcdee35f9

New changeset 6f80ca0012ae by Victor Stinner in branch 'default':
(Merge 3.4) Issue #12209: Minor edits to faulthandler doc. Patch written by
http://hg.python.org/cpython/rev/6f80ca0012ae

--
nosy: +python-dev

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19610] setup.py does not allow a tuple for classifiers

2014-03-25 Thread STINNER Victor

STINNER Victor added the comment:

> A patch to detect bad type for classifiers in the check command would also be 
> acceptable for 3.5, or to catch it earlier, a check in the Distribution class.

Why only in Python 3.5? Does it make sense to pass something different
than a list in older Python versions?

I would prefer to see a fix the bug fixed in Python 2.7, 3.4 and 3.5.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20210] Provide configure options to enable/disable Python modules and extensions

2014-03-25 Thread Antoine Pitrou

Antoine Pitrou added the comment:

> A complicated build system is not a function its feature-set or
> flexibility, but of the quality of its evolution.

Certainly, but that doesn't change the concrete issue: we have a complicated 
build system that these patches will make more complicated.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16047] Tools/freeze no longer works in Python 3

2014-03-25 Thread Marc-Andre Lemburg

Marc-Andre Lemburg added the comment:

On 25.03.2014 11:37, Christian Bachmaier wrote:
> 
> Martin: this is clearly a bug, as it is now (Python 3.3 onwards) impossible 
> to use an external module (in a .so) from a frozen binary. 

Are you sure about this ?

If you freeze an application which imports just the _psycopg*.so file
and make sure the linker can find it, does the import still fail from
the frozen app ?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1298835] Add a vendor-packages directory for system-supplied modules

2014-03-25 Thread Robert Kuska

Robert Kuska added the comment:

There is ongoing discussion on pip's github tracker [1] about default location 
where to install user modules. 

IMO this is something that should be dealt with in Python Interpreter Core 
[2][3]. I would like to hear some opinion from python devs on this.




[1] https://github.com/pypa/pip/issues/1668
[2] https://github.com/pypa/pip/issues/1668#issuecomment-38418185
[3] https://github.com/pypa/pip/issues/1668#issuecomment-38428857

--
nosy: +rkuska

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16047] Tools/freeze no longer works in Python 3

2014-03-25 Thread Christian Bachmaier

Christian Bachmaier added the comment:

Martin: this is clearly a bug, as it is now (Python 3.3 onwards) impossible to 
use an external module (in a .so) from a frozen binary. 
The phrase "please help" was intended to fix the bug. If there is a new option 
then this would also result in some kind of a bug, since nowhere documented. It 
turns freeze.py unusable in many situations. At least it cannot be done as in 
Python 3.2 (described above) and the many other methods I tried. The mailing 
list can only be a last option, since Meador's patches are nowhere officially 
included and thus not very widespread. Unfortunately, both of your advices only 
work in theory for me. However, I am glad to have found in you a person who 
gives at least some advices.

Meanwhile, the psycopg guys are do (also) not see a bug on their side:
http://psycopg.lighthouseapp.com/projects/62710/tickets/201

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16047] Tools/freeze no longer works in Python 3

2014-03-25 Thread Marc-Andre Lemburg

Marc-Andre Lemburg added the comment:

Will these patches still make it into the Python 3.4 branch ?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21061] Is contextlib.redirect_stdout reentrant or not?

2014-03-25 Thread Nick Coghlan

Nick Coghlan added the comment:

Indeed, it is actually reentrant now - the part that claims it isn't needs to 
be tweaked appropriately.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20375] ElementTree: Document handling processing instructions

2014-03-25 Thread Stefan Behnel

Stefan Behnel added the comment:

I think you attached the wrong file.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21061] Is contextlib.redirect_stdout reentrant or not?

2014-03-25 Thread Berker Peksag

Changes by Berker Peksag :


--
nosy: +ncoghlan

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16047] Tools/freeze no longer works in Python 3

2014-03-25 Thread Martin v . Löwis

Martin v. Löwis added the comment:

Christian: please don't use this bug tracker to get help. Please use e.g. 
python-list to ask questions on how to use Python. To answer your question: in 
theory, you have the choice to either continue to use dynamic loading from the 
frozen interpreter, or to make psycopg.so a builtin module. Freeze won't help 
here, as it only deals with modules written in Python.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21061] Is contextlib.redirect_stdout reentrant or not?

2014-03-25 Thread Timothy Pederick

New submission from Timothy Pederick:

The docs are contradictory on whether or not contextlib.redirect_stdout is 
reentrant, or reusable-but-not-reentrant. This would seem to be an oversight 
from issue19403, which probably should have changed "reusable but not 
reentrant" to "reentrant".

Present in both current and upcoming docs:
  http://docs.python.org/3/library/contextlib.html
  http://docs.python.org/3.5/library/contextlib.html

contextlib.redirect_stdout(new_target)
  ...
  This context manager is reusable but not reentrant.

29.6.3.1. Reentrant context managers
  ...
  threading.RLock is an example of a reentrant context manager, as are 
suppress() and redirect_stdout().
  ...
  Note also that being reentrant is not the same thing as being thread safe. 
redirect_stdout(), for example...

--
assignee: docs@python
components: Documentation
messages: 214801
nosy: docs@python, perey
priority: normal
severity: normal
status: open
title: Is contextlib.redirect_stdout reentrant or not?
versions: Python 3.4, Python 3.5

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17829] csv.Sniffer.snif doesn't set up the dialect properly for a csv created with dialect=csv.excel_tab and containing quote (") char

2014-03-25 Thread Antoon Pardon

Antoon Pardon added the comment:

I had a look at this and have the following remarks.

1) the file csv_sniffing_excel_tab.py no longer works with python 3.3. It now 
produces the folowing traceback:

Traceback (most recent call last):
  File "csv_sniffing_excel_tab.py", line 36, in 
create_file()
  File "csv_sniffing_excel_tab.py", line 23, in create_file
writer.writerows(test_data)
TypeError: 'str' does not support the buffer interface

2) The problem seems to be in the _guess_quote_and_delimiter method. If you 
always call _guess_delimiter, the sniffer give the correct result.

3) As far as I understand the problem is the first regular expression:
(?P[^\w\n"\'])(?P ?)(?P["\']).*?(?P=quote)(?P=delim)

Now if we have a line as the following

273:MVREGR1:ByEuPo:"Baryton ""Euphonium"" populaire"

The delim group will match the space, the space group will match nothing the 
quote group will match " the non-group pattern will match "Euphonium" followed 
by the quote group matching " again and the delim group matching the space.

And so we get the wrong delimiter.

--
nosy: +Antoon.Pardon

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19610] setup.py does not allow a tuple for classifiers

2014-03-25 Thread Éric Araujo

Éric Araujo added the comment:

I’m open to a patch that would make it clear in the docs that classifiers must 
be a list.

A patch to detect bad type for classifiers in the check command would also be 
acceptable for 3.5, or to catch it earlier, a check in the Distribution class.

--
title: setup.py should allow a tuple for classifiers -> setup.py does not allow 
a tuple for classifiers
versions: +Python 2.7, Python 3.5

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



  1   2   >