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

2015-03-19 Thread Joshua J Cogliati
Joshua J Cogliati added the comment: Looking at the patch (3078fdb7cf3d for Issue1488098) it has: if target_lang == "c++" and self.compiler_cxx: -linker[0] = self.compiler_cxx[0] One possibility is that that the problem was: linker[0] = self.compiler_cxx[0]

[issue18828] urljoin behaves differently with custom and standard schemas

2015-03-19 Thread Demian Brecht
Demian Brecht added the comment: urljoin('mailto:foo@', 'bar.com') > 'mailto:bar.com' > > which seems fairly sensible to me. This is where joining arbitrary protocols gets tricky. Does it make sense to merge non-hierarchical protocols such as mailto? My initial reaction is "no" and what

[issue22634] importing _ctypes failed: undefined symbol: ffi_call_win32

2015-03-19 Thread Davin Potts
Davin Potts added the comment: @siyuan: Duping it -- thanks for trying that patch out so quickly! -- superseder: -> ctypes module doesn't build on FreeBSD x86 ___ Python tracker __

[issue22634] importing _ctypes failed: undefined symbol: ffi_call_win32

2015-03-19 Thread Siming Yuan
Siming Yuan added the comment: @davin @lemburg just tested with the provided patch in http://bugs.python.org/issue23042, the partch works. dupe the bug? -- ___ Python tracker _

[issue23703] urljoin() with no directory segments duplicates filename

2015-03-19 Thread Demian Brecht
Demian Brecht added the comment: Nice work tracking down the commit, thanks for that. I've attached a fix. -- keywords: +patch stage: -> patch review Added file: http://bugs.python.org/file38563/issue23703.patch ___ Python tracker

[issue23710] C API doc for PyObject_HEAD is outdated

2015-03-19 Thread Tomi Pieviläinen
New submission from Tomi Pieviläinen: https://docs.python.org/3/c-api/structures.html#c.PyObject_HEAD says that the macro should be used for creating new types and that it has ob_type. Unfortunately at some point (@61466 perhaps) that definition in object.h was changed. This affects other page

[issue23648] PEP 475 meta issue

2015-03-19 Thread STINNER Victor
STINNER Victor added the comment: signal.sigwaitinfo() raises InterruptedError if the wait was interrupted by a signal handler (this handler was for a signal other than one of those in set). IMO we should also retry sigwaitinfo() if it fails with EINTR. -- ___

[issue23708] PEP 475: Add _Py_read() and _Py_write() functions

2015-03-19 Thread STINNER Victor
STINNER Victor added the comment: Oops, there was a bug in FileIO.readall(), fixed in the new patch py_read_write-2.patch. I also commented assert(PyGILState_Check()); to workaround the issue #15751. -- Added file: http://bugs.python.org/file38562/py_read_write-2.patch ___

[issue22634] importing _ctypes failed: undefined symbol: ffi_call_win32

2015-03-19 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: -haypo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pytho

[issue16314] Support xz compression in distutils

2015-03-19 Thread Éric Araujo
Éric Araujo added the comment: Code and doc changes look good. Will you add tests? -- ___ Python tracker ___ ___ Python-bugs-list mai

[issue23708] PEP 475: Add _Py_read() and _Py_write() functions

2015-03-19 Thread STINNER Victor
STINNER Victor added the comment: With py_read_write.patch in debug mode, test_threading crash with an assertion error because of the issue #15751. Currently, it's not possible to call assert(PyGILState_Check()); inside Py_NewInterpreter(), while creating a subinterpreter (ex: _testcapi.run_in

[issue23698] Fix inconsistencies in behaviour and document it correctly for multiprocessing.Manager facade

2015-03-19 Thread Davin Potts
Davin Potts added the comment: No, it's premature to share the start of my patch. Very much agreed on getting that input/insight -- sbt (multiprocessing module maintainer and original author) was added to the nosy list yesterday too. -- ___ Python t

[issue23698] Fix inconsistencies in behaviour and document it correctly for multiprocessing.Manager facade

2015-03-19 Thread Anand B Pillai
Changes by Anand B Pillai : -- title: Fix documentation for multiprocessing.Manager -> Fix inconsistencies in behaviour and document it correctly for multiprocessing.Manager facade ___ Python tracker _

[issue23698] Fix documentation for multiprocessing.Manager

2015-03-19 Thread Anand B Pillai
Anand B Pillai added the comment: Is your patch uploaded anywhere ? Anyway, before thinking whether this should be a patch or doc fix, one needs multiprocessing module author to possibly comment on the right behaviour expected here. -- ___ Python t

[issue22634] importing _ctypes failed: undefined symbol: ffi_call_win32

2015-03-19 Thread Davin Potts
Davin Potts added the comment: There is now a proposed patch on issue23042 which, having gone through those changes, may well address this issue too. Testing that patch on multiple platforms (including the RHEL variants relevant here) would be much appreciated. Thanks goes to @lemburg for doi

[issue23042] ctypes module doesn't build on FreeBSD x86

2015-03-19 Thread Davin Potts
Changes by Davin Potts : -- stage: -> patch review ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue23042] ctypes module doesn't build on FreeBSD x86

2015-03-19 Thread Davin Potts
Davin Potts added the comment: Attaching a patch which enabled successful compilation of ctypes on FreeBSD 10.1 i386-RELEASE in each of default/3.5, 3.4, and 2.7 branches. This patch attempts to fix the incomplete logic regarding Windows target platforms in the ifdef's inside Modules/_ctypes/l

[issue23648] PEP 475 meta issue

2015-03-19 Thread STINNER Victor
STINNER Victor added the comment: More issues: - Issue #23707: os.urandom() doesn't handle EINTR correctly - Issue #23708: Add _Py_read() and _Py_write() functions - Issue #23709: Refactor ossaudiodev: use _Py_read and _Py_write with the Py_buffer -- dependencies: +PEP 475: Add _Py_rea

[issue23709] Refactor ossaudiodev: use _Py_read and _Py_write with the Py_buffer

2015-03-19 Thread STINNER Victor
STINNER Victor added the comment: Oh, I forgot to mention the advantage of using _Py_read() and _Py_write(): they retry read/write when interrupted by a signal, to support the PEP 475. -- ___ Python tracker __

[issue23707] PEP 475: os.urandom() doesn't handle EINTR correctly

2015-03-19 Thread STINNER Victor
STINNER Victor added the comment: random.patch: fix the issue with the new _Py_read() function added by the issue #23708. -- dependencies: +PEP 475: Add _Py_read() and _Py_write() functions keywords: +patch Added file: http://bugs.python.org/file38560/random.patch _

[issue23700] tempfile.NamedTemporaryFile can close too early if used as iterator

2015-03-19 Thread Paul Moore
Paul Moore added the comment: Cool, no problem. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail

[issue23709] Refactor ossaudiodev: use _Py_read and _Py_write with the Py_buffer

2015-03-19 Thread STINNER Victor
Changes by STINNER Victor : -- dependencies: +PEP 475: Add _Py_read() and _Py_write() functions ___ Python tracker ___ ___ Python-bugs

[issue23708] PEP 475: Add _Py_read() and _Py_write() functions

2015-03-19 Thread STINNER Victor
STINNER Victor added the comment: I created the issue #23709 for the ossaudiodev module: "Refactor ossaudiodev: use _Py_read and _Py_write with the Py_buffer". -- ___ Python tracker ___

[issue23709] Refactor ossaudiodev: use _Py_read and _Py_write with the Py_buffer

2015-03-19 Thread STINNER Victor
New submission from STINNER Victor: Attached patch enhances ossaudiodev to support buffer larger than 2 GB (replace the C int type with C Py_ssize_t). It uses the new _Py_read() and _Py_write() functions added in the issue #23708 with the Py_buffer API. By the way, I don't understand the purpo

[issue23708] PEP 475: Add _Py_read() and _Py_write() functions

2015-03-19 Thread STINNER Victor
STINNER Victor added the comment: select_write.patch: use _Py_write() in the select module. -- Added file: http://bugs.python.org/file38558/select_write.patch ___ Python tracker

[issue23708] PEP 475: Add _Py_read() and _Py_write() functions

2015-03-19 Thread STINNER Victor
New submission from STINNER Victor: To factorize code handling EINTR, I propose add 2 new functions to fileutils.h: _Py_read() and _Py_write(). Attached patch adds these functions and use them in the os and _io modules. The code of the functions is based on the code from the os and _io modules

[issue23700] tempfile.NamedTemporaryFile can close too early if used as iterator

2015-03-19 Thread Bohuslav "Slavek" Kabrda
Bohuslav "Slavek" Kabrda added the comment: Thank you! To answer Paul's question: I honestly have no idea why this can't be reproduced on Windows. I managed to reproduce this in 100 % cases on various RPM-flavour Linux distros (Fedora, CentOS, RHEL) as well as on Debian and Ubuntu. --

[issue23700] tempfile.NamedTemporaryFile can close too early if used as iterator

2015-03-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you for your contribution Bohuslav. -- resolution: -> fixed stage: commit review -> resolved status: open -> closed ___ Python tracker

[issue23700] tempfile.NamedTemporaryFile can close too early if used as iterator

2015-03-19 Thread Roundup Robot
Roundup Robot added the comment: New changeset 7fa741fe9425 by Serhiy Storchaka in branch '3.4': Issue #23700: Iterator of NamedTemporaryFile now keeps a reference to https://hg.python.org/cpython/rev/7fa741fe9425 New changeset c84a0b35999a by Serhiy Storchaka in branch 'default': Issue #23700:

[issue23700] tempfile.NamedTemporaryFile can close too early if used as iterator

2015-03-19 Thread Paul Moore
Paul Moore added the comment: Agreed, the test is sufficient documentation. However, I can't make the test fail here (Windows 7, Python 3.4.3): >py ti.py b'spam\n' b'spam\n' b'eggs\n' b'eggs\n' b'beans\n' b'beans\n' >cat ti.py import tempfile def test_iter(): # getting iterator from a temp

[issue22634] importing _ctypes failed: undefined symbol: ffi_call_win32

2015-03-19 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: This is likely also related to issue23042. The precompiler #ifdefs were mixed up, causing Win32 code to be compiled in on other platforms as well. -- nosy: +lemburg ___ Python tracker

[issue22634] importing _ctypes failed: undefined symbol: ffi_call_win32

2015-03-19 Thread Davin Potts
Davin Potts added the comment: Comparing this to issue23042, this same behavior appears on i386 releases of FreeBSD 8.3 and 10.1 (the i386-RELEASE means it's 32-bit as opposed to 64-bit build). Given that this issue is being triggered here with -m32 (triggers building of 32-bit binaries) and

[issue23042] ctypes module doesn't build on FreeBSD x86

2015-03-19 Thread Davin Potts
Davin Potts added the comment: Reading issue22634 suggests that perhaps this issue is not limited to FreeBSD -- issue22634 appears to suffer the same behavior on RHEL 6.4 and 5.5 when compiling to 32-bit (the -m32 compiler flag is being used there). --

[issue23700] tempfile.NamedTemporaryFile can close too early if used as iterator

2015-03-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: LGTM. -- assignee: -> serhiy.storchaka stage: patch review -> commit review ___ Python tracker ___ __

[issue23700] tempfile.NamedTemporaryFile can close too early if used as iterator

2015-03-19 Thread Bohuslav "Slavek" Kabrda
Bohuslav "Slavek" Kabrda added the comment: I'm attaching second version of the patch. It now contains link to this bug and a more real test case according to suggestion from the review. One of the reviews of first patch version mentioned that there should be a better explanation of how this i

[issue22181] os.urandom() should use Linux 3.17 getrandom() syscall

2015-03-19 Thread STINNER Victor
STINNER Victor added the comment: Oh, test_os now fails on Linux because os.urandom() doesn't use a file descriptor anymore. The test should be skipped when getrandom() is used. The test is already skipped when getentropy() is used. -- resolution: fixed -> status: closed -> open

[issue23707] PEP 475: os.urandom() doesn't handle EINTR correctly

2015-03-19 Thread STINNER Victor
New submission from STINNER Victor: dev_urandom_python() retries read() if it fails with EINTR, but Python signal handlers are not called: PyErr_CheckSignals() is not called. It's important be able to interrupt a function by a signal, especially if it's blocking. We need maybe a new _Py_read()

[issue4395] Document auto __ne__ generation; provide a use case for non-trivial __ne__

2015-03-19 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis : -- nosy: +Arfrever ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscrib

[issue23001] Accept mutable bytes-like objects

2015-03-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Added versionchanged directives and fixed other documentation. -- Added file: http://bugs.python.org/file38555/accept_mutable_buffers_2.patch ___ Python tracker _

[issue22181] os.urandom() should use Linux 3.17 getrandom() syscall

2015-03-19 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis : -- stage: needs patch -> resolved ___ Python tracker ___ ___ Python-bugs-list mailing

[issue23681] Have -b warn when directly comparing ints and bytes

2015-03-19 Thread Paul Moore
Paul Moore added the comment: LGTM, just one minor comment in review. -- nosy: +paul.moore ___ Python tracker ___ ___ Python-bugs-list

[issue23419] Faster default __reduce__ for classes without __init__

2015-03-19 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: Sorry, I missed the important point: "for classes without __init__" -- ___ Python tracker ___

[issue23419] Faster default __reduce__ for classes without __init__

2015-03-19 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: But isn't the result different? NEWOBJ calls cls.__new__() and __init__ is skipped. REDUCE calls cls(): both __new__ and __init__ are used. -- nosy: +amaury.forgeotdarc ___ Python tracker

[issue23706] pathlib.Path.write_text should include a newline argument

2015-03-19 Thread Ugra Dániel
New submission from Ugra Dániel: The new pathlib.Path [read|write]_[binary|text] methods will be very useful, one thing I miss badly is the newline argument for write_text. In some cases text files need a specific line ending (independent from the platform the code is being executed on.) In my

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

2015-03-19 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: -haypo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python

[issue23703] urljoin() with no directory segments duplicates filename

2015-03-19 Thread Berker Peksag
Changes by Berker Peksag : -- nosy: +orsenthil ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyt

[issue23700] tempfile.NamedTemporaryFile can close too early if used as iterator

2015-03-19 Thread Wolfgang Maier
Changes by Wolfgang Maier : -- nosy: +wolma ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python

[issue23704] Make deques a full MutableSequence by adding index(), insert(), and copy()

2015-03-19 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- assignee: -> rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http

[issue23705] Speed-up deque.__contains__

2015-03-19 Thread Raymond Hettinger
Changes by Raymond Hettinger : Added file: http://bugs.python.org/file38554/deque_contains_timings.txt ___ Python tracker ___ ___ Python-bugs-

[issue20204] pydocs fails for some C implemented classes

2015-03-19 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ _

[issue23705] Speed-up deque.__contains__

2015-03-19 Thread Raymond Hettinger
New submission from Raymond Hettinger: Help deques match the performance of lists for a __contains__ check. Comparative timings are attached. -- assignee: rhettinger components: Library (Lib) files: deque_contains0.diff keywords: patch messages: 238496 nosy: rhettinger priority: normal

[issue18828] urljoin behaves differently with custom and standard schemas

2015-03-19 Thread Martin Panter
Martin Panter added the comment: I opened Issue 23703 about the funny doubled bar.com result. After backing out revision 901e4e52b20a, but with my patch here applied: >>> urljoin('mailto:foo@', 'bar.com') 'mailto:bar.com' which seems fairly sensible to me. A more awkward question is if this be

[issue23325] Turn SIG_DFL and SIG_IGN into functions

2015-03-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Currently the action parameter of signal.signal() can be SIG_DFL, SIG_IGN, or a callable Python object. Would be just a callable Python object. This is simpler. The main benefit is that they will be better look in pydoc output. -- __

[issue23704] Make deques a full MutableSequence by adding index(), insert(), and copy()

2015-03-19 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- components: Library (Lib) files: deque_insert_index_copy3.diff keywords: patch nosy: rhettinger priority: normal severity: normal stage: patch review status: open title: Make deques a full MutableSequence by adding index(), insert(), and copy() type: en

[issue22278] urljoin duplicate slashes

2015-03-19 Thread Martin Panter
Martin Panter added the comment: I opened Issue 23703 for a regression caused by this commit. -- nosy: +vadmium ___ Python tracker ___ ___

[issue23703] urljoin() with no directory segments duplicates filename

2015-03-19 Thread Martin Panter
New submission from Martin Panter: This is a regression caused by revision 901e4e52b20a. Before (e.g. Python 3.4): >>> urljoin('a', 'b') 'b' After: >>> urljoin('a', 'b') 'b/b' This was identified in but is actually caused by the revision committ

<    1   2