[issue32338] Save OrderedDict import in re

2017-12-25 Thread Srinivas Reddy T
Change by Srinivas Reddy T : -- pull_requests: +4903 ___ Python tracker ___

[issue32360] Save OrderedDict imports in various stdlibs.

2017-12-25 Thread Srinivas Reddy T
Change by Srinivas Reddy T : -- pull_requests: +4902 ___ Python tracker ___

[issue32030] PEP 432: Rewrite Py_Main()

2017-12-25 Thread Nick Coghlan
Nick Coghlan added the comment: _PyCoreConfig.ignore_environment was part of the initial PEP 432 implementation that I wrote. It's that due to the design goal that once the refactoring is complete, an embedding application should be able to control *all* the settings

[issue32374] Document that m_traverse for multi-phase initialized modules can be called with m_state=NULL

2017-12-25 Thread Nick Coghlan
Nick Coghlan added the comment: Yep, the requirement for supporting multiple interpreters is just that you either avoid relying on C global state entirely, or else correctly synchronise access to it. Multi-phase initialisation just provides a few nudges in the direction

[issue32324] [Security] "python3 directory" inserts "directory" at sys.path[0] even in isolated mode

2017-12-25 Thread Nick Coghlan
Nick Coghlan added the comment: (However, the behaviour Steve is describing suggests that sys.path[0] initialisation may have problems on Windows that the test suite isn't picking up - "-I" should *not* add the script directory to the path, and directory execution should

[issue32324] [Security] "python3 directory" inserts "directory" at sys.path[0] even in isolated mode

2017-12-25 Thread Nick Coghlan
Nick Coghlan added the comment: When executing a sys.path entry, you're executing that *entire* entry (whether it's a directory or zipfile). This isn't a bug, and it isn't in conflict with the assurances offered by isolated mode (it would only be a problem if running

[issue28307] Accelerate 'string' % (value, ...) by using formatted string literals

2017-12-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: PR 5012 implements transformation simple format strings containing only %s, %r and %a into f-strings. -- ___ Python tracker

[issue28307] Accelerate 'string' % (value, ...) by using formatted string literals

2017-12-25 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch pull_requests: +4901 stage: -> patch review ___ Python tracker ___

[issue32411] Idlelib.browser: stop sorting dicts created by pyclbr

2017-12-25 Thread Cheryl Sabella
Cheryl Sabella added the comment: Terry, I'm not sure if I phrased my initial question correctly. I've made a pull request to show you what I was thinking. What I had tried to show with the test case change is that, prior to the guarantee of insertion order on the

[issue24991] Define instance mutability explicitly on type objects?

2017-12-25 Thread Nick Coghlan
Nick Coghlan added the comment: Declaring "I intend for instances of this class to be immutable" isn't a fuzzy concept - it's in the same vein as other type hints, like "I intend for this to be a string". The part that's fuzzy is how well Python actually enforces that

[issue32411] Idlelib.browser: stop sorting dicts created by pyclbr

2017-12-25 Thread Cheryl Sabella
Change by Cheryl Sabella : -- keywords: +patch pull_requests: +4900 stage: test needed -> patch review ___ Python tracker ___

[issue32145] Wrong ExitStack Callback recipe

2017-12-25 Thread Nick Coghlan
Nick Coghlan added the comment: Regarding super().__init__(): I added ExitStack to contextlib2 first, so I was thinking in the Py2/3 compatible subset when I wrote the original docs. We can freely change that for the standard library recipes. Regarding the "how to create

[issue32345] EIO from write() is only fatal if print() contains a newline

2017-12-25 Thread STINNER Victor
Change by STINNER Victor : -- nosy: +vstinner ___ Python tracker ___ ___

[issue32426] Tkinter.ttk Widget does not define wich option exists to set the cursor

2017-12-25 Thread Alessandro Piccione
New submission from Alessandro Piccione : In the documentation of Tkinter.ttk Widget it is defined the "cursor" parameter. It is: cursor Specifies the mouse cursor to be used for the widget. If set to the empty string (the default), the cursor is inherited

[issue31584] Documentation Language mixed up

2017-12-25 Thread Julien Palard
Julien Palard added the comment: https://github.com/python/docsbuild-scripts/pull/36 -- ___ Python tracker ___

[issue26133] asyncio: ugly error related to signal handlers at exit if the loop is not closed explicitly

2017-12-25 Thread Andrew Svetlov
Change by Andrew Svetlov : -- pull_requests: +4899 ___ Python tracker ___ ___

[issue29504] blake2: compile error with -march=bdver2

2017-12-25 Thread Joseph Mitzen
Joseph Mitzen added the comment: Is this ever going to get merged? The gentoo bug report link includes a patch that simply removes the nested comments, which is all that is needed to get the code to compile properly on Bulldozer processors. There's no "manual massaging"

[issue31721] assertion failure in FutureObj_finalize() after setting _log_traceback to True

2017-12-25 Thread Yury Selivanov
Change by Yury Selivanov : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue31721] assertion failure in FutureObj_finalize() after setting _log_traceback to True

2017-12-25 Thread Yury Selivanov
Yury Selivanov added the comment: New changeset e0aef4f3cd339a405d2a7fbd35a50afa64834f84 by Yury Selivanov in branch 'master': bpo-31721: Allow Future._log_traceback to only be set to False (#5009)

Re: acircle.getCenter() to (x,y) coordinates in Python

2017-12-25 Thread MRAB
On 2017-12-25 02:42, G Yu wrote: Ah, I get it now. I have to store the acircle.getCenter() in a point Point, and then access Point.getX() and Point.getY() separately. It was just that middle step that I was missing. Thanks so much! It's not strictly true that you _have to_ store the result

[issue32419] Add unittest support for pyc projects

2017-12-25 Thread R. David Murray
R. David Murray added the comment: There may be now, but I don't think there was when unittest was written. Also, if someone decided to use namespace packages for tests for some reason, the current check would also probably fail, so it may be worth looking for (or

[issue32419] Add unittest support for pyc projects

2017-12-25 Thread Bassem Girgis
Bassem Girgis added the comment: Hi Eric, Yes it is like David said. For the projects you don't distribute the code with the deployment package, you end up distributing only pyc files. As of how to get these files, you can make use of py_compile or compileall modules. For

Re: user input string to function

2017-12-25 Thread Nico Vogeli
Am Montag, 25. Dezember 2017 16:56:19 UTC+1 schrieb Chris Angelico: > On Tue, Dec 26, 2017 at 2:04 AM, Nico Vogeli wrote: > > Am Montag, 25. Dezember 2017 15:58:26 UTC+1 schrieb Chris Angelico: > >> On Tue, Dec 26, 2017 at 1:48 AM, Nico Vogeli wrote: >

[issue32422] Reduce lru_cache memory overhead.

2017-12-25 Thread INADA Naoki
INADA Naoki added the comment: New changeset 3070b71e5eedf62e49b8e7dedab75742a5f67ece by INADA Naoki in branch 'master': bpo-32422: Reduce lru_cache memory usage (GH-5008) https://github.com/python/cpython/commit/3070b71e5eedf62e49b8e7dedab75742a5f67ece --

[issue32422] Reduce lru_cache memory overhead.

2017-12-25 Thread INADA Naoki
Change by INADA Naoki : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue28308] Accelerate 'string'.format(value, ...) by using formatted string literals

2017-12-25 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- assignee: -> serhiy.storchaka ___ Python tracker ___

[issue28307] Accelerate 'string' % (value, ...) by using formatted string literals

2017-12-25 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- assignee: -> serhiy.storchaka ___ Python tracker ___

[issue31721] assertion failure in FutureObj_finalize() after setting _log_traceback to True

2017-12-25 Thread Yury Selivanov
Change by Yury Selivanov : -- resolution: wont fix -> stage: resolved -> patch review status: closed -> open ___ Python tracker

[issue31721] assertion failure in FutureObj_finalize() after setting _log_traceback to True

2017-12-25 Thread Yury Selivanov
Change by Yury Selivanov : -- pull_requests: +4898 ___ Python tracker ___ ___

[issue31721] assertion failure in FutureObj_finalize() after setting _log_traceback to True

2017-12-25 Thread Yury Selivanov
Yury Selivanov added the comment: > _log_traceback is a private property and asyncio implementation detail, you > should never touch it. But still, we shouldn't let Python crash if someone sets it. I'll make a PR to fix this the way Oren proposed. Andrew, let's

Re: user input string to function

2017-12-25 Thread Chris Angelico
On Tue, Dec 26, 2017 at 2:04 AM, Nico Vogeli wrote: > Am Montag, 25. Dezember 2017 15:58:26 UTC+1 schrieb Chris Angelico: >> On Tue, Dec 26, 2017 at 1:48 AM, Nico Vogeli wrote: >> > Am Montag, 25. Dezember 2017 14:51:21 UTC+1 schrieb Chris Angelico: >>

[issue32363] Deprecate task.set_result() and task.set_exception()

2017-12-25 Thread Yury Selivanov
Change by Yury Selivanov : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue32363] Deprecate task.set_result() and task.set_exception()

2017-12-25 Thread Yury Selivanov
Yury Selivanov added the comment: New changeset 0cf16f9ea014b17d398ee3971d4976c698533318 by Yury Selivanov in branch 'master': bpo-32363: Disable Task.set_exception() and Task.set_result() (#4923)

Re: user input string to function

2017-12-25 Thread Nico Vogeli
Am Montag, 25. Dezember 2017 15:58:26 UTC+1 schrieb Chris Angelico: > On Tue, Dec 26, 2017 at 1:48 AM, Nico Vogeli wrote: > > Am Montag, 25. Dezember 2017 14:51:21 UTC+1 schrieb Chris Angelico: > >> On Tue, Dec 26, 2017 at 12:36 AM, Nico Vogeli wrote:

Re: user input string to function

2017-12-25 Thread Chris Angelico
On Tue, Dec 26, 2017 at 1:48 AM, Nico Vogeli wrote: > Am Montag, 25. Dezember 2017 14:51:21 UTC+1 schrieb Chris Angelico: >> On Tue, Dec 26, 2017 at 12:36 AM, Nico Vogeli wrote: >> > Hi everybody. First ad foremost, happy Christmas! >> >> Same to you!

Re: user input string to function

2017-12-25 Thread Nico Vogeli
Am Montag, 25. Dezember 2017 14:51:21 UTC+1 schrieb Chris Angelico: > On Tue, Dec 26, 2017 at 12:36 AM, Nico Vogeli wrote: > > Hi everybody. First ad foremost, happy Christmas! > > Same to you! > > > I want to let the use input a function (like x**2) and parse it after

Re: unabe to import /pyd file.

2017-12-25 Thread Matt Wheeler
On Fri, Dec 15, 2017, 09:58 wrote: > Hi, > > I have created one library file > "modified_python_automation_tcl.py"..Inside my library file I have set of > codes as follows. > > import sys > import time > from datetime import datetime > import

Re: user input string to function

2017-12-25 Thread Chris Angelico
On Tue, Dec 26, 2017 at 12:36 AM, Nico Vogeli wrote: > Hi everybody. First ad foremost, happy Christmas! Same to you! > I want to let the use input a function (like x**2) and parse it after that > through code (for my numeric class) > > def newton(x0, s, s2, tol, n =

user input string to function

2017-12-25 Thread Nico Vogeli
Hi everybody. First ad foremost, happy Christmas! I want to let the use input a function (like x**2) and parse it after that through code (for my numeric class) import numpy as np import matplotlib.pyplot as plt import scipy.linalg from sympy.abc import o, h import sympy from sympy import

[issue31721] assertion failure in FutureObj_finalize() after setting _log_traceback to True

2017-12-25 Thread Andrew Svetlov
Andrew Svetlov added the comment: _log_traceback is a private property and asyncio implementation detail, you should never touch it. -- nosy: +asvetlov resolution: -> wont fix stage: -> resolved status: open -> closed

[issue32402] Coverity: CID 1426868/1426867: Null pointer dereferences in textio.c

2017-12-25 Thread INADA Naoki
Change by INADA Naoki : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

Re: Writing a chess-playing AI like Alphago in Python

2017-12-25 Thread caigy84
On Sunday, December 24, 2017 at 1:26:22 PM UTC+8, Steve D'Aprano wrote: > On Sun, 24 Dec 2017 12:20 pm, Cai Gengyang wrote: > > > How many lines of code in Python would it take to create a Go-playing AI > > like AlphaGo ? Estimates ? > > Somewhere between 1 and 1 billion. > > How about you

[issue32372] Optimize out __debug__ at the AST level

2017-12-25 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue32372] Optimize out __debug__ at the AST level

2017-12-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 3dfbaf51f0d90646e0414ddbd3b513ee8e5ffe9b by Serhiy Storchaka in branch 'master': bpo-32372: Move __debug__ optimization to the AST level. (#4925)

[issue32335] Failed Python build on Fedora 27

2017-12-25 Thread Xavier de Gaye
Change by Xavier de Gaye : -- resolution: -> not a bug ___ Python tracker ___ ___

[issue31988] Saving bytearray to binary plist file doesn't work

2017-12-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Fixed in issue32072. -- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Issues with binary plists ___ Python tracker

[issue31983] Officially add Py_SETREF and Py_XSETREF

2017-12-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Since there are objections, it is too early to make this a public C API. -- resolution: -> rejected stage: needs patch -> resolved status: open -> closed ___ Python tracker

[issue32422] Reduce lru_cache memory overhead.

2017-12-25 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- type: -> resource usage ___ Python tracker ___

[issue32422] Reduce lru_cache memory overhead.

2017-12-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: LGTM. -- ___ Python tracker ___ ___