[issue32338] Save OrderedDict import in re

2017-12-25 Thread Srinivas Reddy T

Change by Srinivas  Reddy T :


--
pull_requests: +4903

___
Python tracker 

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



[issue32360] Save OrderedDict imports in various stdlibs.

2017-12-25 Thread Srinivas Reddy T

Change by Srinivas  Reddy T :


--
pull_requests: +4902

___
Python tracker 

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



[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 through the 
config structs, without *ever* touching the global variables directly.

--

___
Python tracker 

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



[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 of doing that more consistently.

--

___
Python tracker 

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



[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 always add an absolute path, not a relative one)

--

___
Python tracker 

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



[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 
"~/code/mydirectory" added "~/code" to sys.path).

--
resolution:  -> not a bug
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



[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 

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



[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 

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



[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 dictionary, the check `eq(tcl, [C0, f0])` 
would have failed without the sort because `transform_children` would have 
returned `[f0, C0]`.  With the sort in place or with the guarantee insertion 
order, this test doesn't fail.

Thanks!

--
stage: patch review -> test needed

___
Python tracker 

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



[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 
declaration, and hence the degree to which you can actually rely on it at 
runtime.

In most cases, detecting and reporting *violations* of that intent would be in 
the realm of typecheckers rather than the language interpeter, but there'd be 
cases where the interpreter itself could make useful inferences from such a 
declaration (for example, by prohibiting conventional mutation operations, the 
way "frozen=True" does for data classes).

--

___
Python tracker 

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



[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 

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



[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 a copy" question, while I don't especially like 
the notion of adding a dedicated semi-public copy method, I think you're right 
that it may be the best option:

1. Full pickle/copy module support doesn't make sense, since exit stacks are 
inherently stateful - you can't save them to use later, since you'd need to 
repeat the setup steps as well, but we don't keep track of what the setup steps 
actually *were*.

2. `stack.pop_all()` was designed such that if you clone the stack, you ensure 
that the original stack *won't* call the cleanup callbacks any more. If we were 
to add a fully public `stack.copy()` method (or `copy.copy(stack)` support via 
`stack.__copy__()`), then we'd lose that deliberate nudge, and put folks more 
at risk of "double-free" style bugs, where they run the cleanup functions 
multiple times.

3. A for-subclasses-only "self._clone()" API could work as follows:

def _clone(self, new_instance=None):
if new_instance is None:
new_instance = type(self)()
# Clone state here
return new_instance

Then subclasses could override *just* the instance creation part by doing:

def _clone(self):
return super()._clone(self._make_instance())

While also being free to add their own additional state copying code if needed.

--

___
Python tracker 

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



[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 

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



[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 for the parent widget.

There is not ANY way to knok wich value this parameter accept.
Searching "cursor" in the documentation does not find nothing, apart database 
cursor and this page (Tkinter.ttk.Widget).

Thanks,

Alessandro

--
components: Tkinter
messages: 309045
nosy: alex.75
priority: normal
severity: normal
status: open
title: Tkinter.ttk Widget does not define wich option exists to set the cursor
type: resource usage
versions: Python 3.8

___
Python tracker 

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



[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 

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



[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 

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



[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" 
or anything else necessary to fix the bug. I've tested it out and it works.

--
nosy: +Joseph Mitzen

___
Python tracker 

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



[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 

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



[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)
https://github.com/python/cpython/commit/e0aef4f3cd339a405d2a7fbd35a50afa64834f84


--

___
Python tracker 

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



[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 
creating if needed) a standard way to check via importlib.

--

___
Python tracker 

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



[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 compileall, however, you have to pass the legacy flag to avoid
the __pycache__ standard.

What I found strange in the unittest code while trying to resolve this
issue is that, it is relying on hardcoded searches for __init__.py to find
if a module is loadable. I would have imagined that there is a standard why
to answer this question.

Best regards,
Bassem

Bassem Girgis, PhD

Email: brgir...@gmail.com

On Sun, Dec 24, 2017 at 10:53 AM, Serhiy Storchaka 
wrote:

>
> Change by Serhiy Storchaka :
>
>
> --
> stage:  -> test needed
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[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


--

___
Python tracker 

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



[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 

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



[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 

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



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

2017-12-25 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
assignee:  -> serhiy.storchaka

___
Python tracker 

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



[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 

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



[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 

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



[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 discuss later with what we want to replace _log_traceback. I 
don't like that it's a semi-public thing.

--

___
Python tracker 

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



[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 

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



[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)
https://github.com/python/cpython/commit/0cf16f9ea014b17d398ee3971d4976c698533318


--

___
Python tracker 

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



[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

___
Python tracker 

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



[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 

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



[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 

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



[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)
https://github.com/python/cpython/commit/3dfbaf51f0d90646e0414ddbd3b513ee8e5ffe9b


--

___
Python tracker 

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



[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 

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



[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 

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



[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 

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



[issue32422] Reduce lru_cache memory overhead.

2017-12-25 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
type:  -> resource usage

___
Python tracker 

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



[issue32422] Reduce lru_cache memory overhead.

2017-12-25 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

LGTM.

--

___
Python tracker 

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