[issue23847] Add xml pretty print option to ElementTree

2015-04-02 Thread Raymond Hettinger

Changes by Raymond Hettinger :


--
nosy: +eli.bendersky, scoder -rhettinger

___
Python tracker 

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



[issue23847] Add xml pretty print option to ElementTree

2015-04-02 Thread Raymond Hettinger

New submission from Raymond Hettinger:

The xml.dom.minidom package has as a xml.toprettyxml() function that has the 
problem of altering the whitespace of the text of elements.   The ElementTree 
module needs a prettify option that works better, perhaps something based of 
Effbot's code at:

http://effbot.org/zone/element-lib.htm#prettyprint

The lxml package also provides an API for this purpose:

print(etree.tostring(root, pretty_print=True))

--
messages: 239879
nosy: rhettinger
priority: normal
severity: normal
status: open
title: Add xml pretty print option to ElementTree
type: enhancement
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



[issue21526] Support new booleans in Tkinter

2015-04-02 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

When I said this, I understood that the patch should be backported to 
maintained releases.

Unpatched Python with Tcl 8.5:

>>> import tkinter; tcl = tkinter.Tcl()
>>> tcl.call('expr', 'false')

>>> bool(tcl.call('expr', 'false'))
True

--

___
Python tracker 

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



[issue21526] Support new booleans in Tkinter

2015-04-02 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
status: closed -> open

___
Python tracker 

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



[issue23847] Add xml pretty print option to ElementTree

2015-04-02 Thread Stefan Behnel

Stefan Behnel added the comment:

duplicate of issue 14465

--
nosy: +rhettinger

___
Python tracker 

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



[issue22977] Unformatted “Windows Error 0x%X” exception message on Wine

2015-04-02 Thread STINNER Victor

STINNER Victor added the comment:

I'm not sure that Windows appreciate your change :-)

http://buildbot.python.org/all/builders/AMD64%20Windows7%20SP1%203.x/builds/6011/steps/test/logs/stdio

[216/393] test_exceptions
Traceback (most recent call last):
  File 
"C:\buildbot.python.org\3.x.kloth-win64\build\PCbuild\..\lib\test\regrtest.py", 
line 1589, in 
main_in_temp_cwd()
  File 
"C:\buildbot.python.org\3.x.kloth-win64\build\PCbuild\..\lib\test\regrtest.py", 
line 1564, in main_in_temp_cwd
main()
  File 
"C:\buildbot.python.org\3.x.kloth-win64\build\PCbuild\..\lib\test\regrtest.py", 
line 738, in main
raise Exception("Child error on {}: {}".format(test, result[1]))
Exception: Child error on test_exceptions: Exit code 3765269347

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

___
Python tracker 

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



[issue23834] socketmodule.c: add sock_call() to fix how the timeout is recomputed

2015-04-02 Thread STINNER Victor

STINNER Victor added the comment:

The changeset 920b700d9509 fixed AMD64 Snow Leop 3.x, I close the issue.

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



[issue9026] argparse subcommands not printed in the same order they were added

2015-04-02 Thread Ned Deily

Ned Deily added the comment:

@ddvento: This issue has been closed and the fixes for it released several 
years ago.  Comments added here will likely be ignored.  If you believe there 
is a problem with current releases (for Python 2, Python 2.7.9 is current), 
please open a new issue and document how to reproduce, including on what 
platform(s) and with which versions of Python.  FWIW, the original test case in 
this issue works correctly with both a 2.7.6 and current 2.7.9 on the platforms 
I tried it with.

--
nosy: +ned.deily

___
Python tracker 

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



[issue22977] Unformatted “Windows Error 0x%X” exception message on Wine

2015-04-02 Thread Martin Panter

Martin Panter added the comment:

I don’t pretend to know what is going on, or the best way to fix it. That exit 
code is the same code that my test passes to RaiseException. Perhaps it would 
be best to disable the test until someone with more knowledge or a Windows 
compiler can investigate.

--

___
Python tracker 

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



[issue21526] Support new booleans in Tkinter

2015-04-02 Thread Roundup Robot

Roundup Robot added the comment:

New changeset de3496cd609e by Serhiy Storchaka in branch '3.4':
Issue #21526: Tkinter now supports new boolean type in Tcl 8.5.
https://hg.python.org/cpython/rev/de3496cd609e

New changeset b2413da7516f by Serhiy Storchaka in branch 'default':
Issue #21526: Fixed support of new boolean type in Tcl 8.5.
https://hg.python.org/cpython/rev/b2413da7516f

New changeset d0554559de53 by Serhiy Storchaka in branch '2.7':
Issue #21526: Tkinter now supports new boolean type in Tcl 8.5.
https://hg.python.org/cpython/rev/d0554559de53

--

___
Python tracker 

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



[issue23843] ssl.wrap_socket doesn't handle virtual TLS hosts

2015-04-02 Thread John Nagle

John Nagle added the comment:

I'm using wrap_socket because I want to read the details of a server's SSL 
certificate.  

"Starting from Python 3.2, it can be more flexible to use 
SSLContext.wrap_socket() instead" does not convey that ssl.wrap_socket() will 
fail to connect to some servers because it will silently check the wrong 
certificate.

--

___
Python tracker 

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



[issue22977] Unformatted “Windows Error 0x%X” exception message on Wine

2015-04-02 Thread STINNER Victor

STINNER Victor added the comment:

On Python 3.4, windll.kernel32.RaiseException(2, 0, 0, None) raised a 
FileNotFound error.

On Python 3.5, it displays a popup and the program exit.

It looks like the behaviour of RaiseException() changed in Python 3.5. I tested 
in debug and release mode.

@Steve: Any idea?

--

Instead of RaiseException, you can use 
ctypes.pythondll.PyErr_SetFromWindowsErr(code).

> code = int.from_bytes(b"\xE0msc", "big")

Why not writing directly code = 3765269347?

The unit test should also check the exception message.

--

___
Python tracker 

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



[issue21526] Support new booleans in Tkinter

2015-04-02 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

And indeed, "app->BooleanType" is NULL, because the "booleanString" type is not 
registered in Tcl. Thank you for pointing on it Amaury. Now it is 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



[issue23848] faulthandler: setup an exception handler on Windows

2015-04-02 Thread STINNER Victor

New submission from STINNER Victor:

Attached patch setup an exception handler on Windows.

I wrote it when investigating a failure of test_exceptions related to the issue 
#22977. faulthandler was not trigerred while the program crashed.

I didn't test the patch yet (I tested a previous attempt, a little bit 
different). Maybe we can avoid setting signal handlers on Windows if an 
exception handler is set?

--
components: Windows
files: faulthandler_exc_handler.patch
keywords: patch
messages: 239890
nosy: haypo, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: faulthandler: setup an exception handler on Windows
versions: Python 3.5
Added file: http://bugs.python.org/file38802/faulthandler_exc_handler.patch

___
Python tracker 

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



[issue22977] Unformatted “Windows Error 0x%X” exception message on Wine

2015-04-02 Thread STINNER Victor

STINNER Victor added the comment:

Oh, and the ctypes module (import) must be optional, just skip the test if 
ctypes is missing.

http://buildbot.python.org/all/builders/AMD64%20OpenIndiana%203.x/builds/9555/steps/test/logs/stdio

test test_exceptions crashed -- Traceback (most recent call last):
  File 
"/export/home/buildbot/64bits/3.x.cea-indiana-amd64/build/Lib/test/regrtest.py",
 line 1267, in runtest_inner
the_module = importlib.import_module(abstest)
  File 
"/export/home/buildbot/64bits/3.x.cea-indiana-amd64/build/Lib/importlib/__init__.py",
 line 109, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
  File "", line , in _gcd_import
  File "", line 2205, in _find_and_load
  File "", line 2194, in _find_and_load_unlocked
  File "", line 1153, in _load_unlocked
  File "", line 1431, in exec_module
  File "", line 321, in _call_with_frames_removed
  File 
"/export/home/buildbot/64bits/3.x.cea-indiana-amd64/build/Lib/test/test_exceptions.py",
 line 9, in 
import ctypes
  File 
"/export/home/buildbot/64bits/3.x.cea-indiana-amd64/build/Lib/ctypes/__init__.py",
 line 7, in 
from _ctypes import Union, Structure, Array
ImportError: No module named '_ctypes'

--

___
Python tracker 

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



[issue23847] Add xml pretty print option to ElementTree

2015-04-02 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> xml.etree.ElementTree: add feature to prettify XML output

___
Python tracker 

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



[issue22977] Unformatted “Windows Error 0x%X” exception message on Wine

2015-04-02 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Could you provide a patch if you can test it Victor?

--
assignee: serhiy.storchaka -> 
stage: resolved -> needs patch

___
Python tracker 

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



[issue21526] Support new booleans in Tkinter

2015-04-02 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 954e7e1d85f1 by Serhiy Storchaka in branch '2.7':
Issue #21526: Fixed the test_booleans test for wantobjects = 0.
https://hg.python.org/cpython/rev/954e7e1d85f1

New changeset 4255ca2f5314 by Serhiy Storchaka in branch '3.4':
Issue #21526: Fixed the test_booleans test for wantobjects = 0.
https://hg.python.org/cpython/rev/4255ca2f5314

New changeset bb0b5b6c13f3 by Serhiy Storchaka in branch 'default':
Issue #21526: Fixed the test_booleans test for wantobjects = 0.
https://hg.python.org/cpython/rev/bb0b5b6c13f3

--

___
Python tracker 

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



[issue23849] Leaks in test_deque

2015-04-02 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

$ ./python -m test.regrtest -R 3:3:reflog test_deque
[1/1] test_deque
beginning 6 repetitions
123456
..
test_deque leaked [91, 91, 91] references, sum=273
test_deque leaked [21, 23, 23] memory blocks, sum=67
1 test failed:
test_deque

--
components: Tests
messages: 239894
nosy: rhettinger, serhiy.storchaka
priority: normal
severity: normal
status: open
title: Leaks in test_deque
type: resource usage
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



[issue23849] Leaks in test_deque

2015-04-02 Thread STINNER Victor

Changes by STINNER Victor :


--
nosy: +haypo

___
Python tracker 

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



[issue23850] Missing documentation for Py_TPFLAGS_HAVE_NEWBUFFER

2015-04-02 Thread Giacomo Alzetta

New submission from Giacomo Alzetta:

Python2.7 documentation is missing critical information regarding the 
backporting of the new-buffer protocol.
There is no mention whatsoever of the Py_TPFLAGS_HAVE_NEWBUFFER flag which is 
required to implement it. The only way to discover it is by reading the sources 
of the built-ins or stdlib.

--
messages: 239895
nosy: Giacomo.Alzetta
priority: normal
severity: normal
status: open
title: Missing documentation for Py_TPFLAGS_HAVE_NEWBUFFER

___
Python tracker 

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



[issue23850] Missing documentation for Py_TPFLAGS_HAVE_NEWBUFFER

2015-04-02 Thread Giacomo Alzetta

Changes by Giacomo Alzetta :


--
assignee:  -> docs@python
components: +Documentation
nosy: +docs@python
type:  -> enhancement
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



[issue23618] PEP 475: handle EINTR in the socket module (connect)

2015-04-02 Thread STINNER Victor

STINNER Victor added the comment:

test_connnect_eintr.py: program to interrupt socket.connect() with signals. It 
looks like socket.connect() cannot be interrupted by signals: connect() only 
fails with WSAEINTR when WSACancelBlockingCall() is called, but 
WSACancelBlockingCall() "has been removed in compliance with the Windows 
Sockets 2 specification, revision 2.2.0":

https://msdn.microsoft.com/en-us/library/windows/desktop/ms741547%28v=vs.85%29.aspx

"Blocking hooks are generally used to keep a single-threaded GUI application 
responsive during calls to blocking functions. Instead of using blocking hooks, 
an applications should use a separate thread (separate from the main GUI 
thread) for network activity."

--
Added file: http://bugs.python.org/file38803/test_connect_eintr.py

___
Python tracker 

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



[issue23830] Add AF_IUCV support to sockets

2015-04-02 Thread Nick Coghlan

Nick Coghlan added the comment:

Slavek, there's an s390x patch here to add AF_IUCV support to the socket module.

One interesting point to note is that s390x isn't an officially supported 
CPython architecture by the terms of PEP 11. While I can vouch for it working 
there (courtesy of beaker-project.org), I don't see any reasonable way we could 
provide an upstream buildbot for it.

--
nosy: +bkabrda, ncoghlan

___
Python tracker 

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



[issue23756] Tighten definition of bytes-like objects

2015-04-02 Thread Stefan Krah

Changes by Stefan Krah :


--
assignee: docs@python -> skrah

___
Python tracker 

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



[issue23839] Clear caches after every test

2015-04-02 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

I ran all tests with and without clearing all caches.

Unpatched (without clearing):

real31m23.694s
user16m10.340s
sys 2m25.084s

Patched (with clearing):

real29m28.859s
user16m19.048s
sys 1m42.184s

There is no significant difference (may be with the patch tests are even 
faster).

--

___
Python tracker 

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



[issue23839] Clear caches after every test

2015-04-02 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
keywords: +patch
stage:  -> patch review
Added file: http://bugs.python.org/file38804/regrtest_clear_caches.patch

___
Python tracker 

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




[issue23376] getargs.c: redundant C-contiguity check

2015-04-02 Thread Stefan Krah

Changes by Stefan Krah :


--
assignee:  -> skrah

___
Python tracker 

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



[issue23618] PEP 475: handle EINTR in the socket module (connect)

2015-04-02 Thread Roundup Robot

Roundup Robot added the comment:

New changeset aad52bfc816f by Victor Stinner in branch 'default':
Issue #23618: Don't declare recvmsg/sendmsg helper functions on Windows
https://hg.python.org/cpython/rev/aad52bfc816f

New changeset f22188acc77d by Victor Stinner in branch 'default':
Issue #23618: Document EINTR changes in socket documentation
https://hg.python.org/cpython/rev/f22188acc77d

--

___
Python tracker 

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



[issue23830] Add AF_IUCV support to sockets

2015-04-02 Thread Neale Ferguson

Neale Ferguson added the comment:

I can provide one if required. I have access to an s390x Linux Foundation 
machine where I have a couple of virtual machines that could be used.

 Original message 
From: Nick Coghlan 
Date:2015/04/02 06:35 (GMT-05:00)
To: Neale Ferguson 
Subject: [issue23830] Add AF_IUCV support to sockets

Nick Coghlan added the comment:

Slavek, there's an s390x patch here to add AF_IUCV support to the socket module.

One interesting point to note is that s390x isn't an officially supported 
CPython architecture by the terms of PEP 11. While I can vouch for it working 
there (courtesy of beaker-project.org), I don't see any reasonable way we could 
provide an upstream buildbot for it.

--
nosy: +bkabrda, ncoghlan

___
Python tracker 

___

--

___
Python tracker 

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



[issue23756] Tighten definition of bytes-like objects

2015-04-02 Thread Stefan Krah

Stefan Krah added the comment:

If you think that the previous version was "incorrect and misleading",
the bar for changes to be accepted seems pretty high for me.

"grep -r" doesn't seem to find "flattened length" in Doc/*.

"An object that supports the :ref:`bufferobject` and is C-contiguous, like 
:class:`bytes`, :class:`bytearray` or :class:`memoryview`."


This implies that all memoryviews are C-contiguous.

--

___
Python tracker 

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



[issue23618] PEP 475: handle EINTR in the socket module (connect)

2015-04-02 Thread STINNER Victor

STINNER Victor added the comment:

Hum, connect() does not always block with test_connect_eintr.py, and this 
program sometimes fail with ConnectionResetError on connect() on FreeBSD.

New program which works on Linux and FreeBSD. It now ensures that connect() 
will block.

--
Added file: http://bugs.python.org/file38805/test_connect_eintr2.py

___
Python tracker 

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



[issue23618] PEP 475: handle EINTR in the socket module (connect)

2015-04-02 Thread STINNER Victor

STINNER Victor added the comment:

test_connect_eintr3.py: even better:

- block signals in the server thread
- count signals during connect()
- display progress: "*" for signal received during connect(), "_" for signal 
received before/after connect(), "[" and "]" for the beginning and end of a 
connection, "#" for client connection reset

Example of output on FreeBSD:

Register SIGINT
Register SIGALRM
Register SIGWINCH
Register SIGTERM
Register SIGCHLD
Send SIGALRM every 200.0 ms
Run func() during 5.0 seconds
Type CTRL+c, resize the window, etc.

___[]__[]_[_*#]_[#]__[#][#][#]_[**][*#]__[__#]___[#]_[#][*#]__[#]__[#]_[*#]_[#]_[#]__[#]__[#]__[#]__[#]__[#][#]___[#]_[#]___[#]_[#]_[#]__[#]___[#][#]__[#]__[*#]_[#][#]__

Test completed in 5.1 sec
func() has been called 36 times
Got 204 signals
Got 7 signals during connect()

--
Added file: http://bugs.python.org/file38806/test_connect_eintr3.py

___
Python tracker 

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



[issue23618] PEP 475: handle EINTR in the socket module (connect)

2015-04-02 Thread STINNER Victor

STINNER Victor added the comment:

Example of test_connect_eintr3.py output on Linux (3.18):

Register SIGINT
Register SIGALRM
Register SIGWINCH
Register SIGTERM
Register SIGCHLD
Send SIGALRM every 200.0 ms
Run func() during 5.0 seconds
Type CTRL+c, resize the window, etc.

[]_[]_[]_[]_[**][**][]__[**][]_[][**][**]

Test completed in 5.4 sec
func() has been called 12 times
Got 85 signals
Got 50 signals during connect()


Example of test_connect_eintr3.py output on Mac OS X Yosemite (10.10):

Register SIGINT
Register SIGALRM
Register SIGWINCH
Register SIGTERM
Register SIGCHLD
Send SIGALRM every 200.0 ms
Run func() during 5.0 seconds
Type CTRL+c, resize the window, etc.

[]__[*][***][**]_[][***]

Test completed in 5.3 sec
func() has been called 6 times
Got 55 signals
Got 49 signals during connect()

--

___
Python tracker 

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



[issue23618] PEP 475: handle EINTR in the socket module (connect)

2015-04-02 Thread STINNER Victor

STINNER Victor added the comment:

Example of test_connect_eintr3.py output on OpenIndiana:

Register SIGINT
Register SIGALRM
Register SIGWINCH
Register SIGTERM
Register SIGCHLD
Send SIGALRM every 200.0 ms
Run func() during 5.0 seconds
Type CTRL+c, resize the window, etc.

__[][]_[**]__[]___[*]__[*]__[]

Test completed in 5.2 sec
func() has been called 7 times
Got 56 signals
Got 16 signals during connect()


Oh, and obviously, test_connect_eintr3.py fails with InterruptedError without 
the patch. Example on Linux:

Register SIGINT
Register SIGALRM
Register SIGWINCH
Register SIGTERM
Register SIGCHLD
Send SIGALRM every 200.0 ms
Run func() during 5.0 seconds
Type CTRL+c, resize the window, etc.

[][]_[]_[][**Traceback (most recent call last):
  File "test_connect_eintr.py", line 97, in 
func()
  File "test_connect_eintr.py", line 51, in func
client.connect(server_addr)
InterruptedError: [Errno 4] Interrupted system call

--

___
Python tracker 

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



[issue23618] PEP 475: handle EINTR in the socket module (connect)

2015-04-02 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 75fcc7a3738a by Victor Stinner in branch 'default':
Issue #23618: socket.socket.connect() now waits until the connection completes
https://hg.python.org/cpython/rev/75fcc7a3738a

--

___
Python tracker 

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



[issue23851] PEP 475: _posixsubprocess retries close() on EINTR

2015-04-02 Thread STINNER Victor

New submission from STINNER Victor:

According to the PEP 475, the close() function must *not* be retried if it 
fails with EINTR:
- http://alobbs.com/post/54503240599/close-and-eintr
- http://lwn.net/Articles/576478/
- http://linux.derkeiler.com/Mailing-Lists/Kernel/2005-09/3000.html
- http://alobbs.com/post/54503240599/close-and-eintr

The _posixsubprocess retries close() when it fails with EINTR. Example:

while (close(fd_num) < 0 && errno == EINTR);

It should be fixed.

--
messages: 239907
nosy: haypo
priority: normal
severity: normal
status: open
title: PEP 475: _posixsubprocess retries close() on EINTR
versions: Python 2.7, 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



[issue23648] PEP 475 meta issue

2015-04-02 Thread STINNER Victor

STINNER Victor added the comment:

New issue #23851: _posixsubprocess retries close() on EINTR.

--
dependencies: +PEP 475: _posixsubprocess retries close() on EINTR

___
Python tracker 

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



[issue23648] PEP 475 meta issue

2015-04-02 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 66e4ef9a7467 by Victor Stinner in branch 'default':
Issue #23648: Complete the list of modified functions for the PEP 475
https://hg.python.org/cpython/rev/66e4ef9a7467

--

___
Python tracker 

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



[issue22977] Unformatted “Windows Error 0x%X” exception message on Wine

2015-04-02 Thread Roundup Robot

Roundup Robot added the comment:

New changeset dafae2b3c257 by Victor Stinner in branch '3.4':
Issue #22977: Fix test_exceptions
https://hg.python.org/cpython/rev/dafae2b3c257

--

___
Python tracker 

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



[issue23618] PEP 475: handle EINTR in the socket module (connect)

2015-04-02 Thread STINNER Victor

STINNER Victor added the comment:

http://buildbot.python.org/all/builders/AMD64%20Snow%20Leop%203.x/builds/2904/steps/test/logs/stdio

==
FAIL: test_connect_ex_error (test.test_ssl.NetworkedTests)
--
Traceback (most recent call last):
  File 
"/Users/buildbot/buildarea/3.x.murray-snowleopard/build/Lib/test/test_ssl.py", 
line 1441, in test_connect_ex_error
self.assertIn(rc, (errno.ECONNREFUSED, errno.EWOULDBLOCK))
AssertionError: 36 not found in (61, 35)

where 36 is errno.EINPROGRESS

--

___
Python tracker 

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



[issue23618] PEP 475: handle EINTR in the socket module (connect)

2015-04-02 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 44adbb5eeb4b by Victor Stinner in branch 'default':
Issue #23618: Fix sock_connect_impl(), set the socket error code
https://hg.python.org/cpython/rev/44adbb5eeb4b

--

___
Python tracker 

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



[issue10395] new os.path function to extract common prefix based on path components

2015-04-02 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

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



[issue23803] str.partition() is broken in 3.4

2015-04-02 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

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



[issue23618] PEP 475: handle EINTR in the socket module (connect)

2015-04-02 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 09a4d5cc6afd by Victor Stinner in branch 'default':
Issue #23618: Ooops, remove abort() added for debug purpose
https://hg.python.org/cpython/rev/09a4d5cc6afd

--

___
Python tracker 

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



[issue22350] nntplib file write failure causes exception from QUIT command

2015-04-02 Thread R. David Murray

R. David Murray added the comment:

That's fine, but you need to look at each case individually, and not try to 
deal with them as if they were all the same.  This is because you want the 
correct error to percolate up.  For example, in smtplib we have a case where 
the server may respond to a command by closing the connection (which is 
technically a violation of the RFC).  It used to be that smtplib would raise a 
connection error at that point because it would try to send an RST command to 
the server over the closed connection.  The original error message reported by 
the server was lost.  The solution was to rewrite the error handling so that we 
had an internal send_RST that was different from the one that would be used by 
the application, and that internal RST send was wrapped in a try/except 
ignoring the connection error.   That way the command the application called 
returned the received response, and then the application got the connection 
closed error the *next* time it tried to use the connection.

nntplib presumably requires as a similar strategy if the network connection 
terminates unexpectedly: just ignoring the connection closed error when the 
quit is sent.  The code already closes the connection after the QUIT attempt, 
so that should leave things in the correct state for all other errors.

Other network errors may benefit from additional handling, but I don't know 
since I don't have examples here to think about :)

As for the keyboard interrupt problem, it looks like what needs to happen is a 
custom response handler for the internal QUIT, that will recognize when it is 
not getting "its" response back and just return.

This is more similar to the smptlib problem than I originally thought: it seems 
like the basic problem is that that internal QUIT needs custom handling that is 
different from the QUIT issued at the application level.

--

___
Python tracker 

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



[issue16991] Add OrderedDict written in C

2015-04-02 Thread shiyao.ma

Changes by shiyao.ma :


--
nosy: +introom

___
Python tracker 

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



[issue21526] Support new booleans in Tkinter

2015-04-02 Thread STINNER Victor

STINNER Victor added the comment:

http://buildbot.python.org/all/builders/x86%20Tiger%203.x/builds/9465/steps/test/logs/stdio

==
FAIL: test_booleans (test.test_tcl.TclTest)
--
Traceback (most recent call last):
  File "/Users/db3l/buildarea/3.x.bolen-tiger/build/Lib/test/test_tcl.py", line 
391, in test_booleans
check('true', True)
  File "/Users/db3l/buildarea/3.x.bolen-tiger/build/Lib/test/test_tcl.py", line 
386, in check
self.assertEqual(result, expected)
AssertionError: 'true' != True

--
nosy: +haypo
resolution: fixed -> 
status: closed -> open

___
Python tracker 

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



[issue23618] PEP 475: handle EINTR in the socket module (connect)

2015-04-02 Thread STINNER Victor

Changes by STINNER Victor :


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



[issue19610] Give clear error messages for invalid types used for setup.py params (e.g. tuple for classifiers)

2015-04-02 Thread Éric Araujo

Éric Araujo added the comment:

Thanks, reviewed.

When running a setup.py that uses a tuple for classifiers, is the error message 
in the terminal user-friendly, or do we get a full traceback?

--
title: setup.py does not allow a tuple for classifiers -> Give clear error 
messages for invalid types used for setup.py params (e.g. tuple for classifiers)

___
Python tracker 

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



[issue23786] test_unaligned_buffers (test.test_hash.HashEqualityTestCase) ... Fatal Python error: Bus error

2015-04-02 Thread Peter

Peter added the comment:

So this morning I got around to rebuilding the tool chain using GCC 4.9.2 and 
I'm happy to report that this problem goes away (no patch required)! So it must 
be some sort of problem with the 4.6 GCC.

I've still got the old tool chain around, and I'm happy to further patch / test 
if anyone at Python wants me to.

$ gcc --verbose
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/sparc-sun-solaris2.11/4.9.2/lto-wrapper
Target: sparc-sun-solaris2.11
Configured with: ../gcc-4.9.2/configure --prefix=/usr/local 
--enable-languages=c,c++ --disable-nls --with-gnu-as --with-gnu-ld 
--target=sparc-sun-solaris2.11
Thread model: posix
gcc version 4.9.2 (GCC)

--

___
Python tracker 

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



[issue23851] PEP 475: _posixsubprocess retries close() on EINTR

2015-04-02 Thread Roundup Robot

Roundup Robot added the comment:

New changeset e54b23d7afa6 by Victor Stinner in branch '3.4':
Issue #23851: close() must not be retried when it fails with EINTR
https://hg.python.org/cpython/rev/e54b23d7afa6

--
nosy: +python-dev

___
Python tracker 

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



[issue23851] PEP 475: _posixsubprocess retries close() on EINTR

2015-04-02 Thread STINNER Victor

Changes by STINNER Victor :


--
resolution:  -> fixed
status: open -> closed
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



[issue3566] httplib persistent connections violate MUST in RFC2616 sec 8.1.4.

2015-04-02 Thread Demian Brecht

Changes by Demian Brecht :


--
stage: patch review -> commit review

___
Python tracker 

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



[issue23756] Tighten definition of bytes-like objects

2015-04-02 Thread R. David Murray

R. David Murray added the comment:

> If a Fortran array was allowed in a bytes-like context without memory 
> copying, the order of the array elements would differ from the order returned 
> by the meoryview.tobytes() method, which essentially is defined to copy them 
> out in C-array or flattend-tolist() order.

I'm still not seeing how this would cause such an object to throw an error if 
used in a bytes-like context.  I presume by the above that you mean that the 
results of passing the object directly to a bytes like context differs from the 
results of calling .tobytes() on it and passing *that* to the bytes like 
context.  That's not what your suggested documentation change says, though.

--

___
Python tracker 

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



[issue23852] Wrong FD_DIR file name on OpenBSD

2015-04-02 Thread Cédric Krier

New submission from Cédric Krier:

The test_subprocess fails since issue21618 on OpenBSD because the FD_DIR is 
wrong (/dev/fd instead of /proc/self/fd).

--
files: fd_dir.patch
keywords: patch
messages: 239920
nosy: ced
priority: normal
severity: normal
status: open
title: Wrong FD_DIR file name on OpenBSD
Added file: http://bugs.python.org/file38807/fd_dir.patch

___
Python tracker 

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



[issue22708] httplib/http.client in method _tunnel used HTTP/1.0 CONNECT method

2015-04-02 Thread Demian Brecht

Demian Brecht added the comment:

Thanks for the report and follow up Vova. I've come across this line and it 
puzzled me as well as to why it's hardcoded. Rather than the hardcoded approach 
in your patch, I've attached a patch that uses _http_vsn_str which is 
consistent with other areas of the library.

Additionally, I noticed that a failure will occur if the destination address 
contains characters outside of ASCII range, so I've added support for IDN.

I assume that the patch should be committed to tip and maintenance branches as 
both issues are bugs (there is IDN support elsewhere in the library).

--
nosy: +demian.brecht
stage: resolved -> patch review
versions:  -Python 3.2, Python 3.3
Added file: http://bugs.python.org/file38808/issue22708.patch

___
Python tracker 

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



[issue23466] PEP 461: Inconsistency between str and bytes formatting of integers

2015-04-02 Thread Ethan Furman

Ethan Furman added the comment:

It's a new feature for 3.5 that is partly responsible for compatibility with 
2.7 code.

2.7 raises Overflow error, so 3.5 should also (for out of range values -- wrong 
value types raise TypeError).

--

___
Python tracker 

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



[issue23834] socketmodule.c: add sock_call() to fix how the timeout is recomputed

2015-04-02 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 29c32ca46652 by Victor Stinner in branch '2.7':
Issue #23834: Fix socket.sendto(), use the C long type to store the result of
https://hg.python.org/cpython/rev/29c32ca46652

New changeset 436bb7ad6349 by Victor Stinner in branch '3.4':
Issue #23834: Fix socket.sendto(), use the C Py_ssize_t type to store the
https://hg.python.org/cpython/rev/436bb7ad6349

New changeset a064abfd436c by Victor Stinner in branch 'default':
(Merge 3.4) Issue #23834: Fix socket.sendto(), use the C Py_ssize_t type to
https://hg.python.org/cpython/rev/a064abfd436c

--

___
Python tracker 

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



[issue23853] PEP 475: handle EINTR in the ssl module

2015-04-02 Thread STINNER Victor

New submission from STINNER Victor:

The _ssl module uses an helper function check_socket_and_wait_for_timeout() to 
poll until the socket is ready (got data or became writable). 
check_socket_and_wait_for_timeout() always uses the socket timeout. If select() 
or poll() is interrupted by a signal (fails with EINTR), 
check_socket_and_wait_for_timeout() is restarted with the same timeout, which 
doesn't respect the contract of the timeout: the operation must timeout if it 
takes more than timeout seconds.

The code must be modified to recompute the timeout, as done in the new 
sock_call() function of Modules/socketmodule.c (issue #23618). At least, the 
timeout must decreases when select()/poll() fails with EINTR.

Currently, the timeout is reset after each read/write/handshake operation. IMO 
the timeout must apply on the total duration of the ssl method, not be reset. 
But changing this may break backward compatibility :-/

Note: if the signal handler raises an exception, the ssl method fails with the 
exception. This issue is specific to signal handlers not raising an exception.

--
messages: 239924
nosy: haypo
priority: normal
severity: normal
status: open
title: PEP 475: handle EINTR in the ssl module
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



[issue23648] PEP 475 meta issue

2015-04-02 Thread STINNER Victor

STINNER Victor added the comment:

New issue #23853: handle EINTR in the ssl module.

--
dependencies: +PEP 475: handle EINTR in the ssl module

___
Python tracker 

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



[issue23853] PEP 475: handle EINTR in the ssl module

2015-04-02 Thread STINNER Victor

STINNER Victor added the comment:

test_ssl_bug.patch: Modify test_handshake_timeout() of test_ssl to show the 
bug: test_handshake_timeout() hangs with the patch (which sends a signal every 
millisecond).

--
keywords: +patch
Added file: http://bugs.python.org/file38809/test_ssl_bug.patch

___
Python tracker 

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



[issue8732] Should urrllib2.urlopen send an Accept-Encoding header?

2015-04-02 Thread Demian Brecht

Demian Brecht added the comment:

This doesn't seem to be an issue in 3.4+, the following headers are injected in 
a call to urlopen():

GET / HTTP/1.1
Accept-Encoding: identity
Host: example.com
User-Agent: Python-urllib/3.4
Connection: close

However, this is not the same behaviour in 2.7:

GET / HTTP/1.0
Host: example.com
User-Agent: Python-urllib/1.17

That said, I wouldn't see this as a bug but a feature request, so it should be 
invalid for 2.7.

Setting this to pending to close unless anyone has any objections or further 
details.

--
nosy: +demian.brecht
status: open -> pending

___
Python tracker 

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



[issue16840] Tkinter doesn't support large integers

2015-04-02 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 42a6449e577c by Serhiy Storchaka in branch '2.7':
Issue #16840: Tkinter now supports 64-bit integers added in Tcl 8.4 and
https://hg.python.org/cpython/rev/42a6449e577c

New changeset a6f4d8fa7ab8 by Serhiy Storchaka in branch '3.4':
Issue #16840: Tkinter now supports 64-bit integers added in Tcl 8.4 and
https://hg.python.org/cpython/rev/a6f4d8fa7ab8

New changeset 9291b28157e1 by Serhiy Storchaka in branch 'default':
Issue #16840: Tkinter now supports 64-bit integers added in Tcl 8.4 and
https://hg.python.org/cpython/rev/9291b28157e1

--
nosy: +python-dev

___
Python tracker 

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



[issue23484] SemLock acquire() keyword arg 'blocking' is invalid

2015-04-02 Thread Davin Potts

Davin Potts added the comment:

@berker:  Sadly, I've read those descriptions in triaging.html more than once 
and that part apparently did not stick in my head.  Hopefully it will now -- 
thanks.

@r.david:  Ok, cool -- I had been mentally associating more significance to one 
versus the other but that helps to understand.

As Berker correctly suspected, I would not have expected something labelled 
"Enhancement" to be allowed into the 2.7 branch so the explanation definitely 
helps.

--

___
Python tracker 

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



[issue20669] OpenBSD: socket.recvmsg tests fail with OSError: [Errno 40] Message too long

2015-04-02 Thread Cédric Krier

Changes by Cédric Krier :


--
nosy: +ced

___
Python tracker 

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



[issue20669] OpenBSD: socket.recvmsg tests fail with OSError: [Errno 40] Message too long

2015-04-02 Thread Jean-Paul Calderone

Changes by Jean-Paul Calderone :


--
nosy:  -exarkun

___
Python tracker 

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



[issue23786] test_unaligned_buffers (test.test_hash.HashEqualityTestCase) ... Fatal Python error: Bus error

2015-04-02 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Just interesting, what is the result of 
str(memoryview(b'abcdefghijklmnopqrstuvwxyz')[1:], 'ascii') with old and new 
toolchains.

--

___
Python tracker 

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



[issue23852] Wrong FD_DIR file name on OpenBSD

2015-04-02 Thread Davin Potts

Changes by Davin Potts :


--
nosy: +davin

___
Python tracker 

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



[issue21526] Support new booleans in Tkinter

2015-04-02 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 77e5623e22dd by Serhiy Storchaka in branch '2.7':
Issue #21526: Skip test_booleans on Tcl < 8.5.
https://hg.python.org/cpython/rev/77e5623e22dd

New changeset 3b8039c37b37 by Serhiy Storchaka in branch '3.4':
Issue #21526: Skip test_booleans on Tcl < 8.5.
https://hg.python.org/cpython/rev/3b8039c37b37

New changeset 8ad98ade3f78 by Serhiy Storchaka in branch 'default':
Issue #21526: Skip test_booleans on Tcl < 8.5.
https://hg.python.org/cpython/rev/8ad98ade3f78

--

___
Python tracker 

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



[issue16840] Tkinter doesn't support large integers

2015-04-02 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 9905fb0b5885 by Serhiy Storchaka in branch '2.7':
Issue #16840: Fixed test_tcl for Tcl < 8.5.
https://hg.python.org/cpython/rev/9905fb0b5885

New changeset 1d2444273b3d by Serhiy Storchaka in branch '3.4':
Issue #16840: Fixed test_tcl for Tcl < 8.5.
https://hg.python.org/cpython/rev/1d2444273b3d

New changeset 2398dba039f3 by Serhiy Storchaka in branch 'default':
Issue #16840: Fixed test_tcl for Tcl < 8.5.
https://hg.python.org/cpython/rev/2398dba039f3

--

___
Python tracker 

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



[issue23466] PEP 461: Inconsistency between str and bytes formatting of integers

2015-04-02 Thread Ethan Furman

Ethan Furman added the comment:

b'%c' is still raising a TypeError.  The error message is fine ("%c requires an 
integer in range(256) or a single byte") but it should be an OverflowError for 
backwards compatibility.

--
resolution: fixed -> 
stage: resolved -> needs patch
status: closed -> open

___
Python tracker 

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



[issue8027] distutils fail to determine c++ linker with unixcompiler if using ccache

2015-04-02 Thread Joshua J Cogliati

Joshua J Cogliati added the comment:

Let me try and explain what is trying to be done in the original code, 
what the fix was, and then discuss some possible better solutions.

Original code:
if target_lang == "c++" and self.compiler_cxx:
linker[0] = self.compiler_cxx[0]

Current code:
if target_lang == "c++" and self.compiler_cxx:
i = 0
if os.path.basename(linker[0]) == "env":
i = 1
while '=' in linker[i]:
i += 1
linker[i] = self.compiler_cxx[i]

Basically, what we have, is two variables, linker, and self.compiler_cxx.

By default on my linux system these are:
linker=['gcc', '-pthread', '-shared']
self.compiler_cxx=['g++', '-pthread']

So under the current code, since self.compiler_cxx[0] != "env"
i=0 so
linker[0] = self.compiler_cxx[0]
so linker=['g++', '-pthread', '-shared']

So the goal is to switch the linker to something that works better with c++.  

In the original code:
linker[0] = self.compiler_cxx[0]
improves things if the first element in the linker variable is the linker 
executable, and the first element in compiler_cxx is a compiler executable, and 
the compiler executable works better at linking c++ code than the c linker 
executable.

Next we switch to the current code.  

I am guessing that Ronald had something like this:
linker=['env','BAR=FOO','gcc', '-pthread', '-shared']
self.compiler_cxx=['env','BAR=FOO','g++', '-pthread']
and so with the current code we end up with i=2, and the linker variable ends 
up with:
linker=['env','BAR=FOO','g++', '-pthread', '-shared']

Now, what is the problem we are encountering with the current code?

Basically, people want to use things like CXX="ccache g++"
So if 
linker=['gcc', '-pthread', '-shared']
self.compiler_cxx=['ccache', 'g++']
we have i=0, 
linker[0]=self.compiler_cxx[0] = 'ccache'
resulting in
linker=['ccache', '-pthread', '-shared']
which will fail, because ccache expects the first argument to be the compiler 
executable (that is 'g++' not '-pthread')

So, how can we fix this?

If the linker can link c++ code, then the optimal solution is to do nothing, 
as in remove the entire 
if target_lang == "c++" and self.compiler_cxx:
   ...
(The fix-distutils-* patches I have created do this solution)

We could special case ccache:
if target_lang == "c++" and self.compiler_cxx:
if os.path.basename(self.compiler_cxx[0]) == "ccache":
linker[0:1] = self.compiler_cxx[0:2]
elif os.path.basename(linker[0]) == "env":
...

We could hope that what we actually want is the entire compiler_cxx:
if target_lang == "c++" and self.compiler_cxx:
linker[0:1] = self.compiler_cxx[:]


Maybe we could special case c++ a little earlier (since linker_exe is just cc 
by default):
if target_desc == CCompiler.EXECUTABLE and target_lang == "c++" and 
self.compiler_cxx:
linker = self.compiler_cxx[:]
elif target_desc == CCompiler.EXECUTABLE:
linker = self.linker_exe[:]
else:
linker = self.linker_so[:]


None of these solutions make me feel awesome.  

The real problem is that we have no way to set the c++ linker.  I don't see any 
variable listed like this Make's implicit variables section.

A secondary problem is that we string concatenate the LDSHARED and LDFLAGS 
(in the line: ldshared = ldshared + ' ' + os.environ['LDFLAGS'] in sysconfig.py)

Another secondary problem is that we don't look for a CXXFLAGS varible, and so 
people stuff parameters into CXX instead.

If the two secondary issues did not exist we could reasonably reliably do 
something like
linker = cxx + ldflags
which might actually work for all the cases that are currently covered and work 
where cxx=['ccache','g++']

The current code is broken, how do we want to fix it?

--

___
Python tracker 

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



[issue23854] qtconsole and all windows based python have issues loading

2015-04-02 Thread Ali Arar

New submission from Ali Arar:

All of the sudden, all windows based python stopped working.  qtconsole and 
spyder.  Also, conda, pip, and easy_setup are issuing error messages.  Below is 
the feedback I am getting.  I uninstalled and reinstalled the package that was 
working perfectly fine.  Also, downloaded Anaconda-2.2.0-Windows-x86_64.exe.  

===
ipython qtconsole:
---
Error in sys.excepthook:
Traceback (most recent call last):
  File "D:\Anaconda\lib\site-packages\IPython\qt\console\qtconsoleapp.py", line 
45, in gui_excepthook
old_excepthook(exctype, value, tb)
TypeError: 'NoneType' object is not callable

Original exception was:
Traceback (most recent call last):
  File "D:\Anaconda\Scripts\ipython-script.py", line 5, in 
sys.exit(start_ipython())
  File "D:\Anaconda\lib\site-packages\IPython\__init__.py", line 120, in 
start_ipython
return launch_new_instance(argv=argv, **kwargs)
  File "D:\Anaconda\lib\site-packages\IPython\config\application.py", line 573, 
in launch_instance
app.initialize(argv)
  File "", line 2, in initialize
  File "D:\Anaconda\lib\site-packages\IPython\config\application.py", line 75, 
in catch_config_error
return method(app, *args, **kwargs)
  File "D:\Anaconda\lib\site-packages\IPython\terminal\ipapp.py", line 321, in 
initialize
super(TerminalIPythonApp, self).initialize(argv)
  File "", line 2, in initialize
  File "D:\Anaconda\lib\site-packages\IPython\config\application.py", line 75, 
in catch_config_error
return method(app, *args, **kwargs)
  File "D:\Anaconda\lib\site-packages\IPython\core\application.py", line 369, 
in initialize
self.parse_command_line(argv)
  File "D:\Anaconda\lib\site-packages\IPython\terminal\ipapp.py", line 316, in 
parse_command_line
return super(TerminalIPythonApp, self).parse_command_line(argv)
  File "", line 2, in parse_command_line
  File "D:\Anaconda\lib\site-packages\IPython\config\application.py", line 75, 
in catch_config_error
return method(app, *args, **kwargs)
  File "D:\Anaconda\lib\site-packages\IPython\config\application.py", line 471, 
in parse_command_line
return self.initialize_subcommand(subc, subargv)
  File "", line 2, in initialize_subcommand
  File "D:\Anaconda\lib\site-packages\IPython\config\application.py", line 75, 
in catch_config_error
return method(app, *args, **kwargs)
  File "D:\Anaconda\lib\site-packages\IPython\config\application.py", line 402, 
in initialize_subcommand
subapp = import_item(subapp)
  File "D:\Anaconda\lib\site-packages\IPython\utils\importstring.py", line 42, 
in import_item
module = __import__(package, fromlist=[obj])
  File "D:\Anaconda\lib\site-packages\IPython\qt\console\qtconsoleapp.py", line 
56, in 
from IPython.qt.console.ipython_widget import IPythonWidget
  File "D:\Anaconda\lib\site-packages\IPython\qt\console\ipython_widget.py", 
line 23, in 
from .frontend_widget import FrontendWidget
  File "D:\Anaconda\lib\site-packages\IPython\qt\console\frontend_widget.py", 
line 25, in 
from .pygments_highlighter import PygmentsHighlighter
  File 
"D:\Anaconda\lib\site-packages\IPython\qt\console\pygments_highlighter.py", 
line 3, in 
from pygments.formatters.html import HtmlFormatter
  File "D:\Anaconda\lib\site-packages\pygments\formatters\__init__.py", line 
19, in 
from pygments.plugin import find_plugin_formatters
  File "D:\Anaconda\lib\site-packages\pygments\plugin.py", line 39, in 
import pkg_resources
  File 
"D:\Anaconda\lib\site-packages\setuptools-14.3-py2.7.egg\pkg_resources\__init__.py",
 line 1366, in 

  File 
"D:\Anaconda\lib\site-packages\setuptools-14.3-py2.7.egg\pkg_resources\__init__.py",
 line 1370, in MarkerEvaluation

AttributeError: 'module' object has no attribute 'python_version'
===

D:\>pip
-
Traceback (most recent call last):
  File "D:\Anaconda\Scripts\pip-script.py", line 3, in 
from pip import main
  File "D:\Anaconda\lib\site-packages\pip\__init__.py", line 13, in 
from pip.utils import get_installed_distributions, get_prog
  File "D:\Anaconda\lib\site-packages\pip\utils\__init__.py", line 22, in 

from pip._vendor import pkg_resources, six
  File "D:\Anaconda\lib\site-packages\pip\_vendor\__init__.py", line 61, in 
load_module
__import__(name)
  File "D:\Anaconda\lib\site-packages\pip\_vendor\pkg_resources\__init__.py", 
line 1316, in 
class MarkerEvaluation(object):
  File "D:\Anaconda\lib\site-packages\pip\_vendor\pkg_resources\__init__.py", 
line 1320, in MarkerEvaluation
'python_full_version': platform.python_version,
AttributeError: 'module' object has no attribute 'python_version'


D:\>conda
--
Traceback (most recent call last):
  File "D:\Anaconda\Scripts\conda-script.py", line 2, in 
from conda.cli import main
  File "D:\Anaconda\lib\site-packages\conda\cli\__init__.py", line 8, in 

from cond

[issue2175] Expat sax parser silently ignores the InputSource protocol

2015-04-02 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 84d49ad9109b by Serhiy Storchaka in branch '2.7':
Issue #2175: Added tests for xml.sax.saxutils.prepare_input_source().
https://hg.python.org/cpython/rev/84d49ad9109b

New changeset fa47897e7889 by Serhiy Storchaka in branch '3.4':
Issue #2175: Added tests for xml.sax.saxutils.prepare_input_source().
https://hg.python.org/cpython/rev/fa47897e7889

New changeset e0292b3ba245 by Serhiy Storchaka in branch 'default':
Issue #2175: Added tests for xml.sax.saxutils.prepare_input_source().
https://hg.python.org/cpython/rev/e0292b3ba245

New changeset 407883c52bf3 by Serhiy Storchaka in branch 'default':
Issue #2175: SAX parsers now support a character stream of InputSource object.
https://hg.python.org/cpython/rev/407883c52bf3

--
nosy: +python-dev

___
Python tracker 

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



[issue9026] argparse subcommands not printed in the same order they were added

2015-04-02 Thread ddve...@ucar.edu

ddve...@ucar.edu added the comment:

You are right, this problem is not coming from python itself, but more from
setuptools and its use by scoop. See
https://github.com/soravux/scoop/issues/16 and
http://stackoverflow.com/questions/29374044/ for details

Regards,
Davide Del Vento,
NCAR Computational & Information Services Laboratory
Consulting Services Software Engineer
http://www2.cisl.ucar.edu/uss/csg/
SEA Chair http://sea.ucar.edu/
office: Mesa Lab, Room 55G
phone:  (303) 497-1233

On Thu, Apr 2, 2015 at 1:45 AM, Ned Deily  wrote:

>
> Ned Deily added the comment:
>
> @ddvento: This issue has been closed and the fixes for it released several
> years ago.  Comments added here will likely be ignored.  If you believe
> there is a problem with current releases (for Python 2, Python 2.7.9 is
> current), please open a new issue and document how to reproduce, including
> on what platform(s) and with which versions of Python.  FWIW, the original
> test case in this issue works correctly with both a 2.7.6 and current 2.7.9
> on the platforms I tried it with.
>
> --
> nosy: +ned.deily
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue1483] xml.sax.saxutils.prepare_input_source ignores character stream in InputSource

2015-04-02 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Fixed in issue2175.

--
resolution:  -> out of date
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

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



[issue2174] xml.sax.xmlreader does not support the InputSource protocol

2015-04-02 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Fixed in issue2175 (in 3.5 only).

--

___
Python tracker 

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



[issue21319] WindowsRegistryFinder never added to sys.meta_path

2015-04-02 Thread Tim Golden

Tim Golden added the comment:

Turns out to be non-issue after all! I was working through the import code for 
other reasons and noticed that the WindowsRegistryFinder was there. I'll spare 
you the complications of debugging the _bootstrap part of import, but basically 
the code in _bootstrap.py:_setup loads the "nt" module directly instead of 
having it masquerade as "os" as it normally does. Therefore os.__name__ is 
indeed "nt" and the WindowsRegistryFinder is added to sys.meta_path

--
resolution:  -> works for me
stage: test needed -> resolved
status: open -> closed

___
Python tracker 

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



[issue23466] PEP 461: Inconsistency between str and bytes formatting of integers

2015-04-02 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

OverflowError is for platform limitations (such as the size of machine word or 
addressed space). When limits are well defined and platform-independent, 
ValueError or may be TypeError are considered as better types. It would be 
better to change OverflowError to ValueError or TypeError in formatting.

--

___
Python tracker 

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



[issue22516] Windows Installer won't - even when using "just for me"option

2015-04-02 Thread J. Morton

J. Morton added the comment:

As the originator, I've noticed that the discussion (while illuminating - and a 
lot more than I expected!) seems to have gone off on several tangents.  I'd 
like to remind everyone that this request is for an unrestricted Windows 
install (e.g. "binary") package of standard/basic python - nothing more.  
Not to dampen the discussion but I see side issues such as impact on other 
O/S's, use of other (non-CPython) distributions, etc. as being outside the 
scope of the request.  While side issues may need to be considered while 
working on the request they should be raised as separate issues, not handled 
under this one.  Also, issues related to how this request affects specific 
"plug ins", e.g. numpy, also seem to be out of scope for this request (since 
users add them after successful installation) and should be handled in a 
similar matter.

My view anyway, YMMV

--
components:  -Windows

___
Python tracker 

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



[issue23854] qtconsole and all windows based python have issues loading

2015-04-02 Thread R. David Murray

R. David Murray added the comment:

This is very unlikely to be a core python bug.  Please post your problem to the 
python-list mailing list, where you are more likely to get help in solving your 
problem.

--
nosy: +r.david.murray
resolution:  -> third party
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue22516] Windows Installer won't - even when using "just for me"option

2015-04-02 Thread Mark Lawrence

Changes by Mark Lawrence :


--
components: +Windows

___
Python tracker 

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



[issue22516] Windows Installer won't - even when using "just for me"option

2015-04-02 Thread R. David Murray

R. David Murray added the comment:

I just reviewed this whole issue.  Steve says that the original issue you 
raised will be resolved in 3.5 (I believe pretty much already has been?).  So 
given the last couple of messages I'm going to re-close this, as a continuing 
discussion here seems to be contra-indicated :)

--
components:  -Windows
resolution: later -> fixed
status: languishing -> closed
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



[issue10590] Parameter type error for xml.sax.parseString(string, ...)

2015-04-02 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 3ac1b21fbb42 by Serhiy Storchaka in branch '2.7':
Issue #10590: Added tests for xml.sax.parse() and xml.sax.parseString().
https://hg.python.org/cpython/rev/3ac1b21fbb42

New changeset ca8666310eb3 by Serhiy Storchaka in branch '3.4':
Issue #10590: Added tests for xml.sax.parse() and xml.sax.parseString().
https://hg.python.org/cpython/rev/ca8666310eb3

New changeset 846c165cf643 by Serhiy Storchaka in branch 'default':
Issue #10590: Added tests for xml.sax.parse() and xml.sax.parseString().
https://hg.python.org/cpython/rev/846c165cf643

--
nosy: +python-dev

___
Python tracker 

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



[issue10590] Parameter type error for xml.sax.parseString(string, ...)

2015-04-02 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

After resolving issue2175 and committing tests that works with current code, 
only minimum of changes are left. Here is a patch that adds support of string 
argument in xml.sax.parseString().

--
components: +Library (Lib) -Unicode
stage: needs patch -> 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



[issue2175] Expat sax parser silently ignores the InputSource protocol

2015-04-02 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

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



[issue10590] Parameter type error for xml.sax.parseString(string, ...)

2015-04-02 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


Added file: http://bugs.python.org/file38810/sax_parse_3.patch

___
Python tracker 

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



[issue21319] WindowsRegistryFinder never added to sys.meta_path

2015-04-02 Thread Eric Snow

Eric Snow added the comment:

Awesome.  Thanks Tim.

--

___
Python tracker 

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



[issue23855] Missing Sanity Check for malloc() in PC/_msi.c

2015-04-02 Thread Bill Parker

New submission from Bill Parker:

Hello All,

   In reviewing code in Python-3.4.3/PC/_msi.c, I found a call to malloc() at 
line 326 in function 'static PyObject* msierror(int status)' in which the call 
is made and assigned to variable 'res', but no check for NULL, indicating 
failure is made afterwards.  The patch below corrects this issue:

--- _msi.c.orig 2015-04-02 15:01:02.882326352 -0700
+++ _msi.c  2015-04-02 15:02:43.382099357 -0700
@@ -324,6 +324,10 @@
 code = MsiRecordGetInteger(err, 1); /* XXX code */
 if (MsiFormatRecord(0, err, res, &size) == ERROR_MORE_DATA) {
 res = malloc(size+1);
+   if (res == NULL) /* malloc() failed, out of memory... */
+   PyErr_SetString(MSIError, "out of memory");
+   return NULL;
+   }
 MsiFormatRecord(0, err, res, &size);
 res[size]='\0';
 }

--
components: Windows
files: _msi.c.patch
keywords: patch
messages: 239948
nosy: dogbert2, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: Missing Sanity Check for malloc() in PC/_msi.c
type: behavior
versions: Python 3.4
Added file: http://bugs.python.org/file38811/_msi.c.patch

___
Python tracker 

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



[issue20718] OpenBSD/AIX: tests passing a file descriptor with sendmsg/recvmsg failures

2015-04-02 Thread Cédric Krier

Changes by Cédric Krier :


--
nosy: +ced

___
Python tracker 

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



[issue16840] Tkinter doesn't support large integers

2015-04-02 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

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



[issue21526] Support new booleans in Tkinter

2015-04-02 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


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



[issue22977] Unformatted “Windows Error 0x%X” exception message on Wine

2015-04-02 Thread Martin Panter

Martin Panter added the comment:

Thanks for fixing the test Victor. The ctypes.pythonapi trick looks like a much 
better way. :)

--

___
Python tracker 

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



[issue20718] OpenBSD/AIX: tests passing a file descriptor with sendmsg/recvmsg failures

2015-04-02 Thread Jean-Paul Calderone

Changes by Jean-Paul Calderone :


--
nosy:  -exarkun

___
Python tracker 

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



[issue6377] distutils compiler switch ignored

2015-04-02 Thread Jean-Paul Calderone

Changes by Jean-Paul Calderone :


--
nosy:  -exarkun

___
Python tracker 

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



[issue18629] future division breaks timedelta division by integer

2015-04-02 Thread Jean-Paul Calderone

Changes by Jean-Paul Calderone :


--
nosy:  -exarkun

___
Python tracker 

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



[issue6555] distutils config file should have the same name on both platforms and all scopes

2015-04-02 Thread Jean-Paul Calderone

Changes by Jean-Paul Calderone :


--
nosy:  -exarkun

___
Python tracker 

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



[issue23817] Consider FreeBSD like any other OS in SOVERSION

2015-04-02 Thread koobs

koobs added the comment:

@haypo, yes, absolutely and no

We will backport to security-only branches ourselves.

--

___
Python tracker 

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



[issue7352] pythonx.y-config --ldflags out of /usr and missing -L

2015-04-02 Thread koobs

koobs added the comment:

@doko, as per the original report by Joel, the issue is:

* Reproducible with --enable-shared (most downstream OS's / packages use this)

Additionally:

* in the python script, not the shell script (by default used by < 3.4)
* Is reproducible in all branches (including default)

See the following test matrix from 'default'


./configure && make


LD_LIBRARY_PATH=. ./python python-config.py --ldflags
-L/usr/local/lib/python3.5/config-3.5m -lpython3.5m -lutil -lm 
-Wl,--export-dynamic

 sh python-config --ldflags
-LNONE/lib/python3.5/config-3.5m -L/mnt/home/user/repos/lib -lpython3.5m  
-lutil -lm  -Wl,--export-dynamic

^--- hmm .. "NONE" ... what?


./configure --prefix=/usr/local && make


LD_LIBRARY_PATH=. ./python python-config.py --ldflags
-L/usr/local/lib/python3.5/config-3.5m -lpython3.5m -lutil -lm 
-Wl,--export-dynamic

sh python-config --ldflags
-L/mnt/home/user/repos/lib/python3.5/config-3.5m -L/mnt/home/user/repos/lib 
-lpython3.5m  -lutil -lm  -Wl,--export-dynamic


./configure --enable-shared && make


LD_LIBRARY_PATH=. ./python python-config.py --ldflags
-lpython3.5m -lutil -lm -Wl,--export-dynamic

sh python-config --ldflags
 -L/mnt/home/user/repos/lib -lpython3.5m  -lutil -lm  -Wl,--export-dynamic


./configure --enable-shared --prefix=/usr/local && make


LD_LIBRARY_PATH=. ./python python-config.py --ldflags
-lpython3.5m -lutil -lm -Wl,--export-dynamic

sh python-config --ldflags
 -L/mnt/home/user/repos/lib -lpython3.5m  -lutil -lm  -Wl,--export-dynamic

While I'm here, update versions.

Note: This issue was originally reported for 2.7, 3.2, 3.3

--
versions: +Python 3.4, Python 3.5 -Python 3.2, Python 3.3

___
Python tracker 

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



  1   2   >