[issue29644] Importing webbrowser outputs a message on stderr

2017-02-24 Thread Nick Coghlan
Nick Coghlan added the comment: I considered that problem of "subprocess invocation as a side-effect of import", but in this case the output is needed by the immediately following "register_X_browsers()" call, as it affects how those browsers get inserted into webbrowser._tryorder. That

[issue29644] Importing webbrowser outputs a message on stderr

2017-02-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I see this because my main desktop is KDE, but optional libkf5config-bin package is not installed. -- ___ Python tracker

[issue29644] Importing webbrowser outputs a message on stderr

2017-02-24 Thread Nick Coghlan
Changes by Nick Coghlan : -- pull_requests: +259 ___ Python tracker ___ ___

[issue24241] webbrowser default browser detection and/or public API for _trylist.

2017-02-24 Thread Nick Coghlan
Changes by Nick Coghlan : -- pull_requests: +258 ___ Python tracker ___ ___

[issue29644] Importing webbrowser outputs a message on stderr

2017-02-24 Thread Nick Coghlan
Nick Coghlan added the comment: Ah, and I think I'm not seeing this locally because I have both Gtk and KDE components installed (my main desktop is KDE, but Firefox and various other components are still Gtk apps). -- ___ Python tracker

[issue9285] Add a profile decorator to profile and cProfile

2017-02-24 Thread Louie Lu
Changes by Louie Lu : -- pull_requests: +257 ___ Python tracker ___ ___ Python-bugs-list

[issue9285] Add a profile decorator to profile and cProfile

2017-02-24 Thread Louie Lu
Louie Lu added the comment: giampaolo: it seems that contextmanager will somehow make a bad return in `trace_dispatch_return`: $ ./python tests.py # logging.fatal('%r %r' % (frame.f_code.co_name, self.cur[-3])) CRITICAL:root:'runblock' '' ('profile', 0, '') CRITICAL:root:'__enter__' ''

[issue29642] Why does unittest.TestLoader.discover still rely on existence of __init__.py files?

2017-02-24 Thread Andrei Fokau
Andrei Fokau added the comment: Docs promise already support for namespace packages, so just a minor clarification was done. -- ___ Python tracker ___

[issue29644] Importing webbrowser outputs a message on stderr

2017-02-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Just stderr. stdout contains the requested value. And I think that an external program shouldn't be ran at import time. It would be better to defer its run until its output is required. -- ___ Python tracker

[issue29644] Importing webbrowser outputs a message on stderr

2017-02-24 Thread Nick Coghlan
Nick Coghlan added the comment: I think an appropriate way of handling this would be to route both stdout and stderr in the subprocess to subprocess.DEVNULL. -- ___ Python tracker

[issue29644] Importing webbrowser outputs a message on stderr

2017-02-24 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Importing webbrowser has a side effect. It outputs a message on stderr. >>> import webbrowser /usr/bin/xdg-settings: 1: /usr/bin/xdg-settings: kreadconfig5: not found This is a regression introduced in issue24241. -- components: Library (Lib)

[issue24241] webbrowser default browser detection and/or public API for _trylist.

2017-02-24 Thread Nick Coghlan
Changes by Nick Coghlan : -- assignee: -> ncoghlan ___ Python tracker ___ ___

[issue24241] webbrowser default browser detection and/or public API for _trylist.

2017-02-24 Thread Nick Coghlan
Nick Coghlan added the comment: After merging this, I belatedly realised that codecov's complaint about the lack of code coverage for the diff was actually valid: now that "preferred" is a public API, it should have a cross-platform test case. That should be a fairly straightforward test to

[issue14243] tempfile.NamedTemporaryFile not particularly useful on Windows

2017-02-24 Thread Eryk Sun
Eryk Sun added the comment: Richard wrote: > while a handle is open with share mode X, you can only reopen > the file if you also use share mode X To clarify, the share mode is not a property of a handle. It's a property of a File object. A handle is a generic reference to any kind of kernel

[issue24241] webbrowser default browser detection and/or public API for _trylist.

2017-02-24 Thread Nick Coghlan
Nick Coghlan added the comment: To summarise the changes that were made during the PR review, here's the eventual commit message for the merged PR: bpo-24241: Improve preferred webbrowser handling (#85) - Add 'preferred' argument to webbrowser.register - Use xdg-settings to

[issue24241] webbrowser default browser detection and/or public API for _trylist.

2017-02-24 Thread Nick Coghlan
Changes by Nick Coghlan : -- resolution: -> fixed stage: needs patch -> resolved status: open -> closed ___ Python tracker ___

[issue14243] tempfile.NamedTemporaryFile not particularly useful on Windows

2017-02-24 Thread Eryk Sun
Eryk Sun added the comment: Nick wrote: > 1. Open the file in the current process > 2. Write content to the file > 3*. Close the file in the current process In step 1, do you mean calling NamedTemporaryFile with delete=False? In that case there's no immediate problem with opening the file

[issue28929] Provide a link from documentation back to its source file

2017-02-24 Thread Mariatta Wijaya
Changes by Mariatta Wijaya : -- pull_requests: +256 ___ Python tracker ___ ___

[issue28929] Provide a link from documentation back to its source file

2017-02-24 Thread Mariatta Wijaya
Changes by Mariatta Wijaya : -- pull_requests: +255 ___ Python tracker ___ ___

[issue28929] Provide a link from documentation back to its source file

2017-02-24 Thread Mariatta Wijaya
Changes by Mariatta Wijaya : -- pull_requests: +254 ___ Python tracker ___ ___

[issue29642] Why does unittest.TestLoader.discover still rely on existence of __init__.py files?

2017-02-24 Thread Mariatta Wijaya
Changes by Mariatta Wijaya : -- versions: -Python 3.4 ___ Python tracker ___ ___

[issue29643] --enable-optimizations compiler flag has no effect

2017-02-24 Thread Alex Wang
Alex Wang added the comment: At least when I last built Python, configure always said that optimizations were not enabled regardless of whether I passed in the flag. >From what it looked like to me, it's because configure uses the $enableval >variable to store the result of the check for

[issue29643] --enable-optimizations compiler flag has no effect

2017-02-24 Thread STINNER Victor
STINNER Victor added the comment: The flag has an effect, I tested it today ;-) Can you please elaborate why you consider that the flag has no effect? -- nosy: +haypo ___ Python tracker

[issue29643] --enable-optimizations compiler flag has no effect

2017-02-24 Thread Alex Wang
Changes by Alex Wang : -- pull_requests: +253 ___ Python tracker ___ ___

[issue29643] --enable-optimizations compiler flag has no effect

2017-02-24 Thread Alex Wang
New submission from Alex Wang: PR submitted here: https://github.com/python/cpython/pull/129 -- components: Build messages: 288535 nosy: awang priority: normal severity: normal status: open title: --enable-optimizations compiler flag has no effect type: behavior versions: Python 2.7,

[issue29642] Why does unittest.TestLoader.discover still rely on existence of __init__.py files?

2017-02-24 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +ezio.melotti, michael.foord, rbcollins stage: -> patch review ___ Python tracker

[issue29642] Why does unittest.TestLoader.discover still rely on existence of __init__.py files?

2017-02-24 Thread Andrei Fokau
Andrei Fokau added the comment: Alright, I made an initial fix in #282. I believe that I still need to update the docs and run it with something big, e.g. Django. -- ___ Python tracker

[issue29642] Why does unittest.TestLoader.discover still rely on existence of __init__.py files?

2017-02-24 Thread Roundup Robot
Changes by Roundup Robot : -- pull_requests: +251 ___ Python tracker ___

[issue29596] Unfinished sentense in howto/clinic.rst

2017-02-24 Thread Steven Rumbalski
Steven Rumbalski added the comment: Truncated sentence was always truncated. Introduced on commit bebf73511a1250fc768bcb7192b5b3c3fd04d8f2 from Issue #20287: Argument Clinic's output is now configurable, allowing delaying its output or even redirecting it to a separate file.

[issue25008] Deprecate smtpd (based on deprecated asyncore/asynchat)

2017-02-24 Thread Barry A. Warsaw
Changes by Barry A. Warsaw : -- resolution: -> fixed stage: needs patch -> resolved status: open -> closed ___ Python tracker ___

[issue25008] Deprecate smtpd (based on deprecated asyncore/asynchat)

2017-02-24 Thread Barry A. Warsaw
Changes by Barry A. Warsaw : -- pull_requests: +250 ___ Python tracker ___ ___

[issue25008] Deprecate smtpd (based on deprecated asyncore/asynchat)

2017-02-24 Thread Barry A. Warsaw
Changes by Barry A. Warsaw : -- pull_requests: +249 ___ Python tracker ___ ___

[issue25008] Deprecate smtpd (based on deprecated asyncore/asynchat)

2017-02-24 Thread Barry A. Warsaw
Changes by Barry A. Warsaw : -- pull_requests: +248 ___ Python tracker ___ ___

[issue29642] Why does unittest.TestLoader.discover still rely on existence of __init__.py files?

2017-02-24 Thread Andrei Fokau
Andrei Fokau added the comment: Ok, it's actually not so hard to work around (for Python 3.6, at least): import os from unittest import TestLoader class CustomTestLoader(TestLoader): def _find_test_path(self, full_path, pattern, namespace=False): original_isfile = os.path.isfile

[issue26184] Add versionchanged note for error when create_module() is not defined by loaders

2017-02-24 Thread Mariatta Wijaya
Changes by Mariatta Wijaya : -- pull_requests: +247 ___ Python tracker ___ ___

[issue9285] Add a profile decorator to profile and cProfile

2017-02-24 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: The original patch is basically blocked by the cryptic assertion error reported above. It's not clear what it means or how to work around it. -- ___ Python tracker

[issue9285] Add a profile decorator to profile and cProfile

2017-02-24 Thread Guido van Rossum
Changes by Guido van Rossum : -- nosy: -gvanrossum ___ Python tracker ___ ___

[issue29318] Optimize _PyFunction_FastCallDict() for **kwargs

2017-02-24 Thread STINNER Victor
Changes by STINNER Victor : -- resolution: fixed -> rejected ___ Python tracker ___

[issue25008] Deprecate smtpd (based on deprecated asyncore/asynchat)

2017-02-24 Thread Barry A. Warsaw
Changes by Barry A. Warsaw : -- pull_requests: +246 ___ Python tracker ___ ___

[issue29642] Why does unittest.TestLoader.discover still rely on existence of __init__.py files?

2017-02-24 Thread Andrei Fokau
New submission from Andrei Fokau: Hi, As far as I see, unittest.TestLoader doesn't search in PEP-420 packages, i.e. packages without __init__.py files. Is there some motivation behind this, or the loader was just not yet adapted for Implicit Namespace Packages? -- components: Tests

[issue29642] Why does unittest.TestLoader.discover still rely on existence of __init__.py files?

2017-02-24 Thread Barry A. Warsaw
Changes by Barry A. Warsaw : -- nosy: +barry ___ Python tracker ___ ___ Python-bugs-list

[issue29414] Change 'the for statement is such an iterator' in Tutorial

2017-02-24 Thread Marco Buttu
Changes by Marco Buttu : -- pull_requests: +245 ___ Python tracker ___ ___

[issue26532] build fails with address sanitizer

2017-02-24 Thread Jonas Jelten
Changes by Jonas Jelten : -- nosy: +jj ___ Python tracker ___ ___ Python-bugs-list mailing

[issue29640] _PyThreadState_Init and fork race leads to inconsistent key list

2017-02-24 Thread Charalampos Stratakis
Changes by Charalampos Stratakis : -- nosy: +cstratak ___ Python tracker ___ ___

[issue26359] CPython build options for out-of-the box performance

2017-02-24 Thread STINNER Victor
STINNER Victor added the comment: It seems like it's not possible to install Python configured with --enable-optimizations: see my issue #29641, "make install failure when using ./configure --enable-optimizations. -- ___ Python tracker

[issue29641] make install failure when using ./configure --enable-optimizations

2017-02-24 Thread STINNER Victor
Changes by STINNER Victor : -- title: Missing _sysconfig_data when building+installating Python using PGO+LTO -> make install failure when using ./configure --enable-optimizations ___ Python tracker

[issue29641] Missing _sysconfig_data when building+installating Python using PGO+LTO

2017-02-24 Thread STINNER Victor
STINNER Victor added the comment: Ok, I confirm that it's possible to compile and install Python using PGO+LTO without --enable-optimizatioins: cd ~/cpython make distclean ||: ./configure --with-lto --prefix=/home/haypo/installed/3.7 make clean make profile-opt make install --

[issue29465] Modify _PyObject_FastCall() to reduce stack consumption

2017-02-24 Thread STINNER Victor
STINNER Victor added the comment: Hum, code to call functions changed a lot recently, and other issues already enhanced the stack usage. I should measure the stack usage to check if it's still worth it. -- ___ Python tracker

[issue29641] Missing _sysconfig_data when building+installating Python using PGO+LTO

2017-02-24 Thread STINNER Victor
STINNER Victor added the comment: The --enable-optimizations option of ./configure was added by the issue #26359 (first named --with-optimizations, it was recalled to --enable-optimizations later). See also: * issue #28032: "never imply --with-lto as part of --with-optimizations" * issue

[issue29641] Missing _sysconfig_data when building+installating Python using PGO+LTO

2017-02-24 Thread STINNER Victor
STINNER Victor added the comment: PGO compilation uses "make profile-removal", maybe my issue is linked to that? I'm sure that PGO compilation + "make install" worked two months, but using: make profile-opt && make install. -- ___ Python tracker

[issue29641] Missing _sysconfig_data when building+installating Python using PGO+LTO

2017-02-24 Thread STINNER Victor
New submission from STINNER Victor: Hi, I compiled Python 3.7 using PGO+LTO with "make && make install", but it seems like it lacks the _sysconfigdata module. Moreover, I don't see any "Makefile" file in the installed directory, so the "~/installed/3.7/bin/python3 -S -m sysconfig

[issue9285] Add a profile decorator to profile and cProfile

2017-02-24 Thread Louie Lu
Louie Lu added the comment: Ping. Is there any reason why this patch doesn't accept? -- nosy: +louielu ___ Python tracker ___

[issue14243] tempfile.NamedTemporaryFile not particularly useful on Windows

2017-02-24 Thread Nick Coghlan
Nick Coghlan added the comment: John: I don't think it would be clutter to have an explicit reminder about that point in the NamedTemporaryFile documentation, so feel free to file a separate enhancement issue for it. -- ___ Python tracker

[issue14243] tempfile.NamedTemporaryFile not particularly useful on Windows

2017-02-24 Thread John Florian
John Florian added the comment: Okay Nick. Thanks for the detailed info. I suspected buffering was a factor, but wasn't certain. Would it be worthwhile pursuing a note in the docs or would that constitute clutter over what should be a standard assumption? I was thrown off course for all the

[issue24905] Allow incremental I/O to blobs in sqlite3

2017-02-24 Thread Aviv Palivoda
Aviv Palivoda added the comment: I am not a DB expert but from a quick search I couldn't find a similar API. I did find a few API's in other programming languages to sqlite blob: 1. https://jgallagher.github.io/rusqlite/rusqlite/blob/index.html 2.

[issue27788] platform module's version number doesn't match its docstring

2017-02-24 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Hmm, not sure why the merge is not showing up on the ticket. Here's the link: https://github.com/python/cpython/commit/6059ce45aa96f52fa0150e68ea655fbfdc25609a -- ___ Python tracker

[issue24905] Allow incremental I/O to blobs in sqlite3

2017-02-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Is there similar API in other databases? -- ___ Python tracker ___ ___

[issue27788] platform module's version number doesn't match its docstring

2017-02-24 Thread Marc-Andre Lemburg
Changes by Marc-Andre Lemburg : -- assignee: -> lemburg resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue27788] platform module's version number doesn't match its docstring

2017-02-24 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: The purpose of __version__ in the platform module is to be able to use it with other Python as well (and then detect which version is available in applications). So I think it's good to keep it around. -- ___

[issue24905] Allow incremental I/O to blobs in sqlite3

2017-02-24 Thread Aviv Palivoda
Aviv Palivoda added the comment: I opened a PR in github. I tagged some other developers if that will not start a discussion on the API I will post in the python-ideas. -- ___ Python tracker

[issue24905] Allow incremental I/O to blobs in sqlite3

2017-02-24 Thread Aviv Palivoda
Changes by Aviv Palivoda : -- pull_requests: +244 ___ Python tracker ___ ___

[issue1230540] sys.excepthook doesn't work in threads

2017-02-24 Thread CyberJacob
CyberJacob added the comment: Just confirmed, this does affect multiprocessing. script to reproduce: import sys, multiprocessing def log_exception(*args): print 'got exception %s' % (args,) sys.excepthook = log_exception def foo(): a = 1 / 0

[issue28747] Expose SSL_CTX_set_cert_verify_callback

2017-02-24 Thread Chi Hsuan Yen
Changes by Chi Hsuan Yen : -- nosy: +Chi Hsuan Yen ___ Python tracker ___ ___

[issue20916] ssl.enum_certificates() will not return all certificates trusted by Windows

2017-02-24 Thread Chi Hsuan Yen
Changes by Chi Hsuan Yen : -- nosy: +Chi Hsuan Yen ___ Python tracker ___ ___

[issue1230540] sys.excepthook doesn't work in threads

2017-02-24 Thread Jacob Mansfield
Jacob Mansfield added the comment: Does this affect threads started with the multiprocessing library as well? -- nosy: +Jacob Mansfield ___ Python tracker

[issue29414] Change 'the for statement is such an iterator' in Tutorial

2017-02-24 Thread Jim Fasarakis-Hilliard
Jim Fasarakis-Hilliard added the comment: Go ahead with making the PR, marco. I'll take a look at it too when you do. -- ___ Python tracker ___

[issue29104] Left bracket remains in format string result when '\' preceeds it

2017-02-24 Thread Jim Fasarakis-Hilliard
Jim Fasarakis-Hilliard added the comment: Serhiy, since review activity has dropped on b.p.o now that the move to github was made, would you like to make this into a pull request to get it reviewed and merged faster? -- ___ Python tracker

[issue29640] _PyThreadState_Init and fork race leads to inconsistent key list

2017-02-24 Thread Ján Stanček
New submission from Ján Stanček: Following crash is sporadically observed in RHEL7 anaconda: (gdb) f 0 #0 PyThread_ReInitTLS () at /usr/src/debug/Python-2.7.5/Python/thread.c:411 411 if (p->id != id) { (gdb) list 406 keymutex = PyThread_allocate_lock(); 407 408 /*

[issue28556] typing.py upgrades

2017-02-24 Thread Ivan Levkivskyi
Changes by Ivan Levkivskyi : -- pull_requests: +243 ___ Python tracker ___ ___

[issue27435] ctypes library loading and AIX - also for 2.7.X (and later)

2017-02-24 Thread Michael Haubenwallner
Michael Haubenwallner added the comment: Let's switch to github-based patches to discuss about: https://github.com/python/cpython/compare/2.7...haubi:issue27435/2.7 For the library search path I prefer to use loadquery(L_GETLIBPATH), available via new _ctypes_aix module now, but also used with

[issue29537] Alternative fix for BUILD_MAP_UNPACK_WITH_CALL opcode in 3.5

2017-02-24 Thread Nick Coghlan
Nick Coghlan added the comment: I updated the PR to cover both Serhiy's change to make the legacy bytecode safe to interpret, and a tweaked version of Petr's change to allow the legacy bytecode to be imported. The main tweaks to the latter were: - more in depth comments explaining the

[issue29634] Reduce deque repeat execution when maxlen exist and size is not 1

2017-02-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: There is an opportunity of further optimisation. For example deque(range(10), maxlen=11) *= 2 copies 10 elements while it is enough to copy just 1 element. But I don't know whether it is worth to optimise this. --

[issue29615] SimpleXMLRPCDispatcher._dispatch mangles tracebacks when invoking RPC calls through _dispatch

2017-02-24 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +loewis, serhiy.storchaka stage: -> patch review type: -> behavior versions: -Python 3.4 ___ Python tracker