[issue24960] Can't use lib2to3 with embeddable zip file.

2016-07-03 Thread Nick Coghlan

Nick Coghlan added the comment:

(issue title updated to indicate this appears to be lib2to3 related and added 
Benjamin Peterson to the nosy list)

The build process already generates a _sysconfigdata.py file in order to pass 
along build time details to the sysconfig module in a way that isn't dependent 
on having otherwise build-time only files accessible at runtime.

Doing something similar with a _lib2to3grammar.py file seems like it could be a 
reasonable approach to making lib2to3 zip archive friendly, but I'm not 
familiar enough with pgen2's internals to say how feasible that would be.

--
nosy: +benjamin.peterson
title: Can't use pip or easy_install with embeddable zip file. -> Can't use 
lib2to3 with embeddable zip file.

___
Python tracker 

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



[issue27437] IDLE tests must be able to set user configuration values.

2016-07-03 Thread Terry J. Reedy

Terry J. Reedy added the comment:

I believe this is enough to test the new Unix keys patch #27173.  Will backport 
the test file and StringIO import and the additions to IdleUserConfParser in 
config to support backporting tests for 27173.

--
keywords: +patch
stage: needs patch -> commit review
versions: +Python 2.7, Python 3.5
Added file: http://bugs.python.org/file43619/set_user_cfg.diff

___
Python tracker 

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



[issue27437] IDLE tests must be able to set user configuration values.

2016-07-03 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Message for #27380 deleted and copied there.

--

___
Python tracker 

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



[issue27380] IDLE: add base Query dialog with ttk widgets

2016-07-03 Thread Terry J. Reedy

Terry J. Reedy added the comment:

(Misdirected notice copied here)
New changeset 78a3d3700233 by Terry Jan Reedy in branch 'default':
Issue 27437: Add query.ModuleName and use it for file => Load Module.
https://hg.python.org/cpython/rev/78a3d3700233

--

___
Python tracker 

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



[issue27437] IDLE tests must be able to set user configuration values.

2016-07-03 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
Removed message: http://bugs.python.org/msg269775

___
Python tracker 

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



[issue27437] IDLE tests must be able to set user configuration values.

2016-07-03 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 78a3d3700233 by Terry Jan Reedy in branch 'default':
Issue 27437: Add query.ModuleName and use it for file => Load Module.
https://hg.python.org/cpython/rev/78a3d3700233

--
nosy: +python-dev

___
Python tracker 

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



[issue27380] IDLE: add base Query dialog with ttk widgets

2016-07-03 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Added tests for ModuleName.  Will recheck and push.

--
Added file: http://bugs.python.org/file43618/query4.diff

___
Python tracker 

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



[issue26081] Implement asyncio Future in C to improve performance

2016-07-03 Thread Guido van Rossum

Guido van Rossum added the comment:

We should really try to get this into 3.6.

--Guido (mobile)

--

___
Python tracker 

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



[issue26081] Implement asyncio Future in C to improve performance

2016-07-03 Thread Giampaolo Rodola'

Changes by Giampaolo Rodola' :


--
nosy: +giampaolo.rodola

___
Python tracker 

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



[issue19527] Test failures with COUNT_ALLOCS

2016-07-03 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 5abf6cdcac4d by Serhiy Storchaka in branch '3.5':
Issue #19527: Fixed tests with defined COUNT_ALLOCS.
https://hg.python.org/cpython/rev/5abf6cdcac4d

New changeset e7d84ecdd37d by Serhiy Storchaka in branch 'default':
Issue #19527: Fixed tests with defined COUNT_ALLOCS.
https://hg.python.org/cpython/rev/e7d84ecdd37d

--
nosy: +python-dev

___
Python tracker 

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



[issue23034] Dynamically control debugging output

2016-07-03 Thread Roundup Robot

Roundup Robot added the comment:

New changeset cd911e06bf6c by Serhiy Storchaka in branch 'default':
Issue #23034: The output of a special Python build with defined COUNT_ALLOCS,
https://hg.python.org/cpython/rev/cd911e06bf6c

--
nosy: +python-dev

___
Python tracker 

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



[issue27446] struct: allow per-item byte order

2016-07-03 Thread Zack Weinberg

New submission from Zack Weinberg:

Occasionally one encounters binary formats which do not stick to one byte order 
throughout.  For example, I have a C program that reads and writes  arrays of 
this struct:

```
struct conn_data
{
  uint32_t ipv4_addr; /* read - network byte order - target IPv4 address */
  uint16_t tcp_port;  /* read - network byte order - target TCP port */
  uint16_t errnm; /* write - native byte order - errno code */
  uint64_t elapsed;   /* write - native byte order - elapsed time in ns */
};
```

On little-endian systems, the first and second fields of this struct will be in 
the opposite byte order from the third and fourth.

If the struct module allowed specification of byte order on a per-item basis, 
it would make working with structures of this type simpler.  Hypothetical 
notation:

```
addr, port, errnm, elapsed = struct.unpack("=4s!H=H=Q")
addr = socket.inet_ntoa(addr)
```

instead of what one must do now,

```
addr, port, errnm, elapsed = struct.unpack("=4sHHQ")
addr = socket.inet_ntoa(addr)
port = socket.ntohs(port)
```

To avoid ambiguities and confusion, I would suggest that, if more than one item 
has its own byte-order specifier, _all_ items must have byte-order specifiers 
(with the possible exception of the 1-byte item types?), and that this is not 
allowed in an '@'-mode format.

--
components: Library (Lib)
messages: 269770
nosy: zwol
priority: normal
severity: normal
status: open
title: struct: allow per-item byte order
type: enhancement

___
Python tracker 

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



[issue27444] Python doesn't build due to test_float.py broken on non-IEEE machines

2016-07-03 Thread R. David Murray

R. David Murray added the comment:

I don't have time to tackle it myself; maybe Mark will be interested, but he 
probably doesn't have time either.  Also, he's been known to say he'd like to 
drop support for non-IEEE architectures ;)  I suspect it will be up to someone 
with an investment in the platform, this being a volunteer project.

--

___
Python tracker 

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



[issue27429] xml.sax.saxutils.escape doesn't escape multiple characters safely

2016-07-03 Thread Xiang Zhang

Xiang Zhang added the comment:

Put a not in escape's doc.

--
Added file: http://bugs.python.org/file43617/sax_escape_doc.patch

___
Python tracker 

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



[issue27429] xml.sax.saxutils.escape doesn't escape multiple characters safely

2016-07-03 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
assignee:  -> docs@python
components: +Documentation
nosy: +docs@python
type: behavior -> enhancement

___
Python tracker 

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



[issue27429] xml.sax.saxutils.escape doesn't escape multiple characters safely

2016-07-03 Thread Xiang Zhang

Xiang Zhang added the comment:

I thought of that too. But the doc doesn't tell you that you can not put any 
characters in the entities, so I think we should make the implementation right 
when some unexpected characters are passed in. If you don't like the 
implementation to be changed, I think at least we should declare that in the 
documentation.

--

___
Python tracker 

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



[issue27429] xml.sax.saxutils.escape doesn't escape multiple characters safely

2016-07-03 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

The purpose of xml.sax.saxutils.escape() is escaping characters, that can't be 
used directly in XML: "&", "<", etc. Quotes are escaped in attributes. It 
shouldn't be used for replacing ";", because this character itself is used in 
escapes.

There is no a bug. If use this function correctly it works as expected.

--

___
Python tracker 

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



[issue24960] Can't use pip or easy_install with embeddable zip file.

2016-07-03 Thread fourplusone

fourplusone added the comment:

The problem is indeed that lib2to3 fails to load the Grammar.txt file if it is 
located inside a .zip archive.

I think one way to fix it is using of the "get_data" function of the loader  
https://docs.python.org/3/library/importlib.html#importlib.abc.ResourceLoader.get_data

However, this would make caching the Grammar more difficult, as one cannot 
write back the pickled dict to a zip file

Alternatively one could generate an importable *.pyc file from the grammar 
during the build process

--
nosy: +fourplusone

___
Python tracker 

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



[issue27443] __length_hint__() of bytearray iterator can return negative integer

2016-07-03 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Thanks Raymond.

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



[issue27429] xml.sax.saxutils.escape doesn't escape multiple characters safely

2016-07-03 Thread Xiang Zhang

Xiang Zhang added the comment:

I think this a bug. There should be no override when escape or unescape. Upload 
a patch to fix this.

--
keywords: +patch
nosy: +martin.panter, serhiy.storchaka
Added file: http://bugs.python.org/file43616/issue27429.patch

___
Python tracker 

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



[issue27444] Python doesn't build due to test_float.py broken on non-IEEE machines

2016-07-03 Thread Greg Stark

Greg Stark added the comment:

I can easily grant you access to mine. It's a bit slow but you can quickly poke 
around with the state in the backtrace which honestly looks to me like it 
should be enough to spot the problem.

There are other options. There's a good emulator at 
http://simh.trailing-edge.com/ and there are other non-ieee platforms out 
there. But installing an OS is a bit of a hassle.

If you're interested send me your email address and preferably a public key or 
something and I'll send you a login.

--

___
Python tracker 

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



[issue27443] __length_hint__() of bytearray iterator can return negative integer

2016-07-03 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 6b084bb6c38b by Serhiy Storchaka in branch '3.5':
Issue #27443: __length_hint__() of bytearray itearator no longer return
https://hg.python.org/cpython/rev/6b084bb6c38b

New changeset 03192909160d by Serhiy Storchaka in branch 'default':
Issue #27443: __length_hint__() of bytearray itearator no longer return
https://hg.python.org/cpython/rev/03192909160d

--
nosy: +python-dev

___
Python tracker 

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



[issue26765] Factor out common bytes and bytearray implementation

2016-07-03 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

I don't know what is wrong with this patch. Backed out just for the case.

--
resolution: fixed -> 
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



[issue26765] Factor out common bytes and bytearray implementation

2016-07-03 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 6c4c0a23fabb by Serhiy Storchaka in branch 'default':
Backed out changeset b0087e17cd5e (issue #26765)
https://hg.python.org/cpython/rev/6c4c0a23fabb

--

___
Python tracker 

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



[issue26765] Factor out common bytes and bytearray implementation

2016-07-03 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 0638047c0c36 by Serhiy Storchaka in branch 'default':
Issue #26765: Fixed parsing Py_ssize_t arguments on 32-bit Windows.
https://hg.python.org/cpython/rev/0638047c0c36

--

___
Python tracker 

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



[issue27442] expose Android API level in sys.implementation

2016-07-03 Thread Xavier de Gaye

Xavier de Gaye added the comment:

Well, issue 16353 has been entered upon attempting to fix issue 16255 (see 
msg173477).

So an alternative exists.  Issue 16353 could be closed as 'wont't fix'. The 
list of locations where '/bin/sh' is hard coded in the standard library in 
msg266084 shows that only the subprocess module and the test suite need to know 
the location of the system shell. So the subprocess module and issue 27027 
could deduct the location of this shell via 
sysconfig.get_config_var('android_api').

--

___
Python tracker 

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



[issue27442] expose Android API level in sys.implementation

2016-07-03 Thread Xavier de Gaye

Xavier de Gaye added the comment:

@Ned
The information that the interpreter is an Android built, is needed in issue 
16353 [1][2]. In msg266135, the corresponding patch adds the 'is_android' 
attribute to the already bloated sys module. I had thought then about using 
sysconfig.get_config_var() as you are suggesting, but this means that the os 
module would need now to import sysconfig on all linux platforms and build this 
big dictionary (about 650 entries on linux).

So it seems that the choice is between:
(1) adding an attribute (is_android or android_api) to the bloated sys module
(2) bloating sys.implementation with platform-specific data

I think that (2) would be better since _android_api is an information about the 
implementation, it tells that in these binaries, such and such features are 
available or not (issue 26857 for example). The drawback is that it would not 
be documented except in Misc/NEWS [2].

@Victor
Do you mean a public attribute of sys.implementation ?
Adding a new sys.implementation required attribute is described in pep 421. In 
that case the attribute name could be 'libc_version' or 'libc'.

[1] msg175006 suggested another approach though, but this seems to be abandoned.
[2] For completeness, Stefan has submitted a feature request to google in 
msg266089.

--
nosy: +skrah

___
Python tracker 

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



[issue23908] Check path arguments of os functions for null character

2016-07-03 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Thank you for noticing this.

--

___
Python tracker 

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



[issue23908] Check path arguments of os functions for null character

2016-07-03 Thread Roundup Robot

Roundup Robot added the comment:

New changeset b0e8a2e7c361 by Serhiy Storchaka in branch '2.7':
Fixed a test for issue23908 with C locale.
https://hg.python.org/cpython/rev/b0e8a2e7c361

--

___
Python tracker 

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