[issue28099] Drop Mac OS X Tiger support in Python 3.6

2016-10-20 Thread Ned Deily

Ned Deily added the comment:

With the recent changes (fd9a4bd16587) in Issue28092 to make the dtrace stubs 
static inline, 3.6 once again compiles and links with the Xcode 2.5 gcc4.0 on 
Mac OS X 10.4.  We can look at this again for 3.7.

--
resolution:  -> out of date
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



[issue28092] Build failure for 3.6 on Centos 5.11

2016-10-20 Thread Benjamin Peterson

Benjamin Peterson added the comment:

I changed the dtrace stubs to static inline. Probably should reopen an 
investigation for 3.7. I would like to have exportable inlines.

--
resolution:  -> fixed
status: open -> closed

___
Python tracker 

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



[issue28092] Build failure for 3.6 on Centos 5.11

2016-10-20 Thread Roundup Robot

Roundup Robot added the comment:

New changeset fd9a4bd16587 by Benjamin Peterson in branch '3.6':
mark dtrace stubs as static inline; remove stubs
https://hg.python.org/cpython/rev/fd9a4bd16587

--
nosy: +python-dev

___
Python tracker 

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



[issue18219] csv.DictWriter is slow when writing files with large number of columns

2016-10-20 Thread Mariatta Wijaya

Mariatta Wijaya added the comment:

Thanks, Hugh.
Please check the updated patch :)

--
Added file: http://bugs.python.org/file45168/issue18219v2.patch

___
Python tracker 

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



[issue18219] csv.DictWriter is slow when writing files with large number of columns

2016-10-20 Thread Hugh Brown

Hugh Brown added the comment:

Mariatta:

Yes, that is what I was thinking of.

That takes my 12 execution time down to 10 seconds. (Or, at least, a fix I did 
of this nature had that effect -- I have not timed your patch but it should be 
the same.)

--

___
Python tracker 

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



[issue18219] csv.DictWriter is slow when writing files with large number of columns

2016-10-20 Thread Mariatta Wijaya

Mariatta Wijaya added the comment:

Thanks Hugh,

Are you thinking of something like the following?

class DictWriter:
def __init__(self, f, fieldnames, restval="", extrasaction="raise",
 dialect="excel", *args, **kwds):
self._fieldnames = fieldnames# list of keys for the dict
self._fieldnames_set = set(self._fieldnames)

@property
def fieldnames(self):
return self._fieldnames

@fieldnames.setter
def fieldnames(self, value):
self._fieldnames = value
self._fieldnames_set = set(self._fieldnames)


def _dict_to_list(self, rowdict):
if self.extrasaction == "raise":
wrong_fields = rowdict.keys() - self._fieldnames_set
 
...

If so, I can work on another patch.
Thanks.

--

___
Python tracker 

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



[issue28448] C implemented Future doesn't work on Windows

2016-10-20 Thread INADA Naoki

Changes 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



[issue28448] C implemented Future doesn't work on Windows

2016-10-20 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 6d20d6fe9b41 by INADA Naoki in branch '3.6':
Issue #28448: Fix C implemented asyncio.Future didn't work on Windows
https://hg.python.org/cpython/rev/6d20d6fe9b41

New changeset a9a136c9d857 by INADA Naoki in branch 'default':
Issue #28448: Fix C implemented asyncio.Future didn't work on Windows (merge 
3.6)
https://hg.python.org/cpython/rev/a9a136c9d857

--
nosy: +python-dev

___
Python tracker 

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



[issue18219] csv.DictWriter is slow when writing files with large number of columns

2016-10-20 Thread Hugh Brown

Hugh Brown added the comment:

Fabulous. Looks great. Let's ship!

It is not the *optimal* fix for 3.x platforms. A better fix would calculate the 
set of fieldnames only once in __init__ (or only as often as fieldnames is 
changed).

But I stress that it is a robust change that works in versions 2.7 through 3.x 
for sure. And it is *way* better than the alternative of searching a list.

--

___
Python tracker 

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



[issue28430] asyncio: C implemeted Future cause Tornado test fail

2016-10-20 Thread INADA Naoki

INADA Naoki added the comment:

Test failure in GNS3 seems not relating to this.
It may be fixed via #28492, maybe.

--

___
Python tracker 

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



[issue28492] C implementation of asyncio.Future doesn't set value of StopIteration correctly

2016-10-20 Thread INADA Naoki

INADA Naoki added the comment:

Confirmed, thank you.

--

___
Python tracker 

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



[issue23214] BufferedReader.read1(size) signature incompatible with BufferedIOBase.read1(size=-1)

2016-10-20 Thread Martin Panter

Martin Panter added the comment:

The minus sign might have been deliberate at some stage, but I realize it is 
more accessible etc if it was ASCII -1, so I will change that.

The idea of changing the signature is to avoid people thinking it accepts a 
keyword argument. See e.g. Issue 25030 for seek(offset, whence=SEEK_SET), Issue 
14586 for truncate(size=None).

--
versions: +Python 3.7 -Python 3.6

___
Python tracker 

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



[issue18219] csv.DictWriter is slow when writing files with large number of columns

2016-10-20 Thread Mariatta Wijaya

Mariatta Wijaya added the comment:

Hello, please review my patch.

I used set subtraction to calculate wrong_fields, added more test cases, and 
clarify documentation with regards to extrasaction parameter.

Please let me know if this works.

Thanks :)

--
nosy: +Mariatta
Added file: http://bugs.python.org/file45167/issue18219.patch

___
Python tracker 

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



[issue23214] BufferedReader.read1(size) signature incompatible with BufferedIOBase.read1(size=-1)

2016-10-20 Thread STINNER Victor

STINNER Victor added the comment:

-   .. method:: read1(size=-1)
+   .. method:: read1([size])

I don't understand this change: the default size is documented as -1. Did I 
miss something?

+  If *size* is −1 (the default)

Is the "−" character deliberate in "−1"? I would expected ``-1``.

--

___
Python tracker 

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



[issue28447] socket.getpeername() failure on broken TCP/IP connection

2016-10-20 Thread Georgey

Georgey added the comment:

Hello David,

   Yes I had the same thought with you that the information of socket is lost 
at operating syetem level.

   However, I hope at Python level this kind of information will not be lost.

   Once the socket has been created by incoming connection, the address 
information of 'laddr' and 'raddr' has been known, and print(socket) will show 
them. It is not necessarily lost when the connection is broken. Any static 
method, like assigning an attribute of address to the socket will help.

   To the the least, Python shall not automatically destroy the socket object 
simply because it has been closed by Windows. Otherwise any attempt to record 
the address information of the socket will fail after it is destoyed.

   The error shown in message 278968 has clearly shown that even as a key, the 
socket object cannot function because it is already destroyed.

--
sock_err @ 

Exception in thread Thread-1:
Traceback (most recent call last):
  File "C:/Users/user/Desktop/SelectWinServer.py", line 39, in handle_sock_err
addr_del = sock.getpeername()
OSError: [WinError 10038] 

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Python34\lib\threading.py", line 911, in _bootstrap_inner
self.run()
  File "C:/Users/user/Desktop/SelectWinServer.py", line 67, in run
handle_sock_err(msg[1])
  File "C:/Users/user/Desktop/SelectWinServer.py", line 41, in handle_sock_err
addr_del = socks2addr[sock]
KeyError: 
=

--
resolution: not a bug -> remind
status: closed -> open

___
Python tracker 

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



[issue28495] MagickMock created by patсh annotation refuses to apply function side_effect at second time

2016-10-20 Thread Сергей Варюхин

New submission from Сергей Варюхин:

You can see example in test.py. It should fails with AssertionErorr if mock 
works as expected. But it not fails.

--
components: Library (Lib)
files: test.py
messages: 279098
nosy: Сергей Варюхин
priority: normal
severity: normal
status: open
title: MagickMock created by patсh annotation refuses to apply function 
side_effect at second time
type: behavior
versions: Python 3.4
Added file: http://bugs.python.org/file45166/test.py

___
Python tracker 

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



[issue23214] BufferedReader.read1(size) signature incompatible with BufferedIOBase.read1(size=-1)

2016-10-20 Thread Roundup Robot

Roundup Robot added the comment:

New changeset d4fce64b1c65 by Martin Panter in branch 'default':
Issue #23214: Remove BufferedReader.read1(-1) workaround
https://hg.python.org/cpython/rev/d4fce64b1c65

--

___
Python tracker 

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



[issue26163] FAIL: test_hash_effectiveness (test.test_set.TestFrozenSet)

2016-10-20 Thread Tim Peters

Tim Peters added the comment:

I think Raymond will have to chime in.  I assume this is due to the 
`letter_range` portion of the test suffering hash randomization dealing it a 
bad hand - but the underlying string hash is "supposed to be" strong regardless 
of seed.  The

self.assertGreater(4*u, t)
AssertionError: 124 not greater than 128

failure says 128 distinct sets hashed to only u = 124/4 = 31 distinct values 
across their hashes' last 7 bits, and that's worth complaining about.  It's way 
too many collisions.

It _may_ be a flaw in the set hash, or in the string hash, or just plain bad 
luck, but there's really no way to know which without digging into details.

--
nosy: +tim.peters

___
Python tracker 

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



[issue28430] asyncio: C implemeted Future cause Tornado test fail

2016-10-20 Thread INADA Naoki

INADA Naoki added the comment:

pure Python Future.__iter__ don't use what yield-ed.

def __iter__(self):
if not self.done():
self._asyncio_future_blocking = True
yield self  # This tells Task to wait for completion.
assert self.done(), "yield from wasn't used with future"
return self.result()  # May raise too.

I felt no-None value is sent by iter.send(val) wasn't make sense.
But Tornado did it (maybe, for compatibility to Tornado's generator.)

So this patch ignores when non-None value is passed.
Additionally, I moved NEWS entry about C Future from "core and builtin"
section to "library" section.

--
keywords: +patch
stage:  -> commit review
Added file: http://bugs.python.org/file45165/future-iter-send.patch

___
Python tracker 

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



[issue26163] FAIL: test_hash_effectiveness (test.test_set.TestFrozenSet)

2016-10-20 Thread Martin Panter

Martin Panter added the comment:

I just got this failure again today. I think I have seen it once or twice 
before. Is the failure actually indicating a problem with Python, or is the 
test just too strict?

It seems that it may be like a test ensuring that a random.randint(1, 100) is 
never equal to 81: the probability of it failing is low, but not close enough 
to zero to rely on it never failing. On the other hand, a test ensuring that a 
512-bit cryptographic hash doesn’t collide might be valid because the 
probability is low enough.

--
nosy: +martin.panter
versions: +Python 3.7

___
Python tracker 

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



[issue23214] BufferedReader.read1(size) signature incompatible with BufferedIOBase.read1(size=-1)

2016-10-20 Thread Roundup Robot

Roundup Robot added the comment:

New changeset b6886ac88e28 by Martin Panter in branch 'default':
Issue #23214: Implement optional BufferedReader, BytesIO read1() argument
https://hg.python.org/cpython/rev/b6886ac88e28

--
nosy: +python-dev

___
Python tracker 

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



[issue28484] test_capi, test_regrtest fail when multithreading disabled

2016-10-20 Thread Martin Panter

Changes by Martin Panter :


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



[issue28489] Fix comment in tokenizer.c

2016-10-20 Thread Eric V. Smith

Changes by Eric V. Smith :


--
stage:  -> commit review

___
Python tracker 

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



[issue26240] Docstring of the subprocess module should be cleaned up

2016-10-20 Thread Martin Panter

Martin Panter added the comment:

V3 looks good to me

--

___
Python tracker 

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



[issue28471] Python 3.6b2 crashes with "Python memory allocator called without holding the GIL"

2016-10-20 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 2fd92794f775 by Martin Panter in branch '3.6':
Issue #28471: Avoid ResourceWarning by detaching test socket
https://hg.python.org/cpython/rev/2fd92794f775

--

___
Python tracker 

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



[issue28484] test_capi, test_regrtest fail when multithreading disabled

2016-10-20 Thread Roundup Robot

Roundup Robot added the comment:

New changeset b811ec148337 by Martin Panter in branch '3.6':
Issue #28484: Skip tests if GIL is not used or multithreading is disabled
https://hg.python.org/cpython/rev/b811ec148337

--
nosy: +python-dev

___
Python tracker 

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



[issue28494] is_zipfile false positives

2016-10-20 Thread Thomas Waldmann

Thomas Waldmann added the comment:

Note: checking the first bytes of the file (PK..) might be another option.

But this has the "problem" that a self-extracting zip starts with an executable 
that has different first bytes.

So whether this is an option or not depends on whether is_zipfile() should 
return truish for self-extracting ZIP files.

--

___
Python tracker 

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



[issue28494] is_zipfile false positives

2016-10-20 Thread Thomas Waldmann

Thomas Waldmann added the comment:

patch for py2.7

The EOCD structure is at EOF.

It either does not contain a comment (this is what the existing code checks 
first) or it contains a comment of the length that is specified in the 
structure.

The patch checks consistency specified length vs. real length (end of fixed 
part of structure up to EOF). If this does not match, it is likely not a zip 
file, but just a file that happens to have the magic 4 bytes somewhere in its 
last 64kB.

--
keywords: +patch
Added file: http://bugs.python.org/file45164/isz_fail_fix.diff

___
Python tracker 

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



[issue28092] Build failure for 3.6 on Centos 5.11

2016-10-20 Thread Ned Deily

Ned Deily added the comment:

"*** WARNING: renaming "_sqlite3" since importing it failed: 
build/lib.linux-x86_64-3.6/_sqlite3.cpython-36m-x86_64-linux-gnu.so: undefined 
symbol: sqlite3_stmt_readonly"

That's a different issue: most likely you are building with an old version of 
libsqlite3.  See, for example: https://github.com/ghaering/pysqlite/issues/85

--

___
Python tracker 

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



[issue28459] _pyio module broken on Cygwin / setmode not usable

2016-10-20 Thread Masayuki Yamamoto

Masayuki Yamamoto added the comment:

I agree to use setmode() at _pyio module for Cygwin. However, I have two 
reasons that I disagree to the implementation of os.setmode().
First, FreeBSD has another setmode() that operate file permission bits [1]. 
Therefore the implementation of os.setmode() will be confused to those users.
Second, msvcrt.setmode() isn't used almost in standard library, the function is 
just used by _pyio module and subprocess test. Thus I think there aren't much 
need that implements setmode() to os module.

Easy way for a solution of import error on Cygwin, setmode() is implemented on 
_pyio using ctypes. then Cygwin CPython forget setmode().
Otherwise it's hard way, For avoiding confliction to other platforms, I'd 
propose to create the cygwin module. I thought a solution implementing 
imitation msvcrt module, but it is unreasonable because Cygwin doesn't have 
other Windows API.

I tried written the patch of easy way that implements setmode() into _pyio. 
This patch is included parts to succeed import _pyio.

[1] https://www.freebsd.org/cgi/man.cgi?query=setmode&sektion=3

--
components: +Library (Lib)
keywords: +patch
nosy: +masamoto
versions: +Python 3.5, Python 3.6, Python 3.7
Added file: http://bugs.python.org/file45163/cygwin-pyio-setmode.patch

___
Python tracker 

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



[issue28489] Fix comment in tokenizer.c

2016-10-20 Thread Eric V. Smith

Eric V. Smith added the comment:

That's great. Thanks!

--

___
Python tracker 

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



[issue28494] is_zipfile false positives

2016-10-20 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
nosy: +alanmcintyre, serhiy.storchaka, twouters
versions: +Python 3.6, Python 3.7

___
Python tracker 

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



[issue28494] is_zipfile false positives

2016-10-20 Thread Thomas Waldmann

New submission from Thomas Waldmann:

zipfile.is_zipfile has false positives way too easily.

I just have seen it in practive when a MoinMoin wiki site with a lot of pdf 
attachments crashed with 500. This was caused by a valid PDF that just happened 
to contain PK\005\006 somewhere in the middle - this was enough to satisfy 
is_zipfile() and triggered further processing as a zipfile, which then crashed 
with IOError (which was not catched in our code, yet).

I have looked into zipfile code: if the usual EOCD structure (with empty 
comment) is not at EOF, it is suspected that there might be a non-empty comment 
and ~64K before EOF are searched for the PK\005\006 magic. If it is somewhere 
there, it is assumed that the file is a zip, without any further validity check.

Attached is a failure demo that works with at least 2.7 and 3.5.

https://en.wikipedia.org/wiki/Zip_(file_format)

--
components: Library (Lib)
files: isz_fail.py
messages: 279084
nosy: Thomas.Waldmann
priority: normal
severity: normal
status: open
title: is_zipfile false positives
type: behavior
versions: Python 2.7, Python 3.5
Added file: http://bugs.python.org/file45162/isz_fail.py

___
Python tracker 

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



[issue28493] Typo in _asynciomodule.c

2016-10-20 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 03528baa8c2c by Yury Selivanov in branch '3.6':
Issue #28493: Fix typos in _asynciomodule.c
https://hg.python.org/cpython/rev/03528baa8c2c

New changeset 74eb9c51d64e by Yury Selivanov in branch 'default':
Merge 3.6 (issue #28493)
https://hg.python.org/cpython/rev/74eb9c51d64e

--
nosy: +python-dev

___
Python tracker 

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



[issue28493] Typo in _asynciomodule.c

2016-10-20 Thread Yury Selivanov

Yury Selivanov added the comment:

Thanks, Stéphane! Fixed.

--
resolution:  -> fixed
stage:  -> resolved
status: open -> closed
type:  -> enhancement

___
Python tracker 

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



[issue26010] document CO_* constants

2016-10-20 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 761414979de5 by Yury Selivanov in branch '3.6':
Issue #26010: fix typos; rewording
https://hg.python.org/cpython/rev/761414979de5

New changeset 3821599fc74d by Yury Selivanov in branch 'default':
Merge 3.6 (issue #26010)
https://hg.python.org/cpython/rev/3821599fc74d

--

___
Python tracker 

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



[issue28493] Typo in _asynciomodule.c

2016-10-20 Thread Stéphane Wirtel

Stéphane Wirtel added the comment:

sorry, I can't commit it in the default branch, so I pass via an issue for this 
kind of issue.

--

___
Python tracker 

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



[issue28493] Typo in _asynciomodule.c

2016-10-20 Thread Stéphane Wirtel

New submission from Stéphane Wirtel:

a small fix for a typo.

--
assignee: yselivanov
components: Interpreter Core
files: _asynciomodule.diff
keywords: patch
messages: 279079
nosy: matrixise, yselivanov
priority: normal
severity: normal
status: open
title: Typo in _asynciomodule.c
versions: Python 3.7
Added file: http://bugs.python.org/file45161/_asynciomodule.diff

___
Python tracker 

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



[issue28448] C implemented Future doesn't work on Windows

2016-10-20 Thread Yury Selivanov

Yury Selivanov added the comment:

Latest patch looks good.

--

___
Python tracker 

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



[issue28489] Fix comment in tokenizer.c

2016-10-20 Thread Ryan Gonzalez

Ryan Gonzalez added the comment:

Ugh, hit Submit too soon. I meant to say the patch that has 20:13 as the date 
(I should've probably given them different names...).

--

___
Python tracker 

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




[issue28489] Fix comment in tokenizer.c

2016-10-20 Thread Ryan Gonzalez

Ryan Gonzalez added the comment:

@eric.smith How's this instead?

--
Added file: 
http://bugs.python.org/file45160/0001-Fix-comment-in-tokenizer.c.patch

___
Python tracker 

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



[issue26240] Docstring of the subprocess module should be cleaned up

2016-10-20 Thread Tim Mitchell

Tim Mitchell added the comment:

Changes as per Martins review.

--
Added file: http://bugs.python.org/file45159/subprocess3.patch

___
Python tracker 

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



[issue28492] C implementation of asyncio.Future doesn't set value of StopIteration correctly

2016-10-20 Thread Yury Selivanov

Yury Selivanov added the comment:

Inada-san, please take a look at my commit if you have time.

--
resolution:  -> fixed
stage:  -> commit review
status: open -> closed
type:  -> behavior

___
Python tracker 

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



[issue28492] C implementation of asyncio.Future doesn't set value of StopIteration correctly

2016-10-20 Thread Roundup Robot

Roundup Robot added the comment:

New changeset cfe2109ce2c0 by Yury Selivanov in branch '3.6':
Issue #28492: Fix how StopIteration is raised in _asyncio.Future
https://hg.python.org/cpython/rev/cfe2109ce2c0

New changeset 79b9257f3386 by Yury Selivanov in branch 'default':
Merge 3.6 (issue #28492)
https://hg.python.org/cpython/rev/79b9257f3386

--
nosy: +python-dev

___
Python tracker 

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



[issue24381] Got warning when compiling ffi.c on Mac

2016-10-20 Thread Ned Deily

Ned Deily added the comment:

Thank you for the patch!  Now fixed in the bundled versions of libffi for OS X.

--
resolution:  -> fixed
stage: commit review -> resolved
status: open -> closed
versions: +Python 2.7, Python 3.7

___
Python tracker 

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



[issue24381] Got warning when compiling ffi.c on Mac

2016-10-20 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 2b089035a453 by Ned Deily in branch '3.5':
Issue #24381: Avoid unused function warning when building bundled macOS libffi.
https://hg.python.org/cpython/rev/2b089035a453

New changeset c60d41590054 by Ned Deily in branch '3.6':
Issue #24381: merge from 3.5
https://hg.python.org/cpython/rev/c60d41590054

New changeset 59838bede1de by Ned Deily in branch 'default':
Issue #24381: merge from 3.6
https://hg.python.org/cpython/rev/59838bede1de

New changeset cca20d28f348 by Ned Deily in branch '2.7':
Issue #24381: Avoid unused function warning when building bundled macOS libffi.
https://hg.python.org/cpython/rev/cca20d28f348

--
nosy: +python-dev

___
Python tracker 

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



[issue28492] C implementation of asyncio.Future doesn't set value of StopIteration correctly

2016-10-20 Thread Yury Selivanov

New submission from Yury Selivanov:

Specifically when the result of the Future is tuple.

--
components: asyncio
messages: 279070
nosy: gvanrossum, inada.naoki, yselivanov
priority: normal
severity: normal
status: open
title: C implementation of asyncio.Future doesn't set value of StopIteration 
correctly
versions: Python 3.6, Python 3.7

___
Python tracker 

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



[issue28491] Remove bundled libffi for OSX

2016-10-20 Thread Stéphane Wirtel

Stéphane Wirtel added the comment:

On my OSX with El Capitan and HomeBrew

Configuration:

env PKG_CONFIG_PATH=/usr/local/opt/libffi/lib/pkgconfig ./configure 
--prefix=$PWD-build

Compilation:

make

Tests:

./python.exe -c 'import ctypes'

Results:
* No SIGSEGV
* Add a new dependency to pkg-config :/

--

___
Python tracker 

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



[issue25953] re fails to identify invalid numeric group references in replacement strings

2016-10-20 Thread SilentGhost

SilentGhost added the comment:

Updated patch taking Serhiy's comments into account.

There was another case on line 725 for when zero is used as a group number, I'm 
not sure though if it falls within the scope of this issue, so it's not 
included in the current patch.

--
versions:  -Python 3.5
Added file: http://bugs.python.org/file45158/25953_3.diff

___
Python tracker 

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



[issue28491] Remove bundled libffi for OSX

2016-10-20 Thread Ned Deily

Ned Deily added the comment:

Yes, we shouldn't be depending on pkg-config being available.  I am not at all 
keen on adding a dependency on a third-party library supplied by another 
distributor. What I would like to see is: (1) add libffi to the third-party 
libs built and used for the macOS installer build, which also means on all 
supported versions; (2) then, more generally, refactor the third-party lib 
builds (e.g. OpenSSL, SQLite, xz, ncurses, et al, and then libffi) out of the 
installer build script and provide an option to ./configure to allow the 
third-party libs to be built and used in a regular developer build as the 
absence of or lack of updates to them in macOS releases is a growing problem.  
At that point we can get rid of the bundled libffi source.  At the moment, 
AFAIK, the presence of the bundled libffi source is not causing any problems so 
this isn't a critical problem, unlike the case with OpenSSL.

--

___
Python tracker 

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



[issue20825] containment test for "ip_network in ip_network"

2016-10-20 Thread James Schneider

James Schneider added the comment:

Please consider for implementation in 3.6. I'd love it even more for 3.5 but I 
don't think that will happen. With the latest patch, I don't believe there are 
any backwards-incompatible changes, though.

--

___
Python tracker 

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



[issue28491] Remove bundled libffi for OSX

2016-10-20 Thread Chi Hsuan Yen

Chi Hsuan Yen added the comment:

With this change pkg-config becomes mandatory on macOS, too. As Ned has 
mentioned in issue28207, pkg-config is not pre-installed with macOS.

--

___
Python tracker 

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



[issue28491] Remove bundled libffi for OSX

2016-10-20 Thread Stéphane Wirtel

Stéphane Wirtel added the comment:

I will test on my OSX (El Capitan)

--

___
Python tracker 

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



[issue28491] Remove bundled libffi for OSX

2016-10-20 Thread Zachary Ware

New submission from Zachary Ware:

Here's a patch that at least allows _ctypes to be built against a Homebrew 
libffi and pass the test_ctypes.  It is almost certainly not a complete patch, 
but may serve as a basis for something that will actually work.

--
components: Build, ctypes, macOS
files: remove_libffi_osx.diff
keywords: patch
messages: 279063
nosy: Chi Hsuan Yen, matrixise, ned.deily, r.david.murray, ronaldoussoren, 
zach.ware
priority: normal
severity: normal
stage: test needed
status: open
title: Remove bundled libffi for OSX
type: enhancement
versions: Python 3.7
Added file: http://bugs.python.org/file45157/remove_libffi_osx.diff

___
Python tracker 

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



[issue28490] inappropriate OS.Error "Invalid cross-device link"

2016-10-20 Thread Eryk Sun

Changes by Eryk Sun :


--
stage:  -> resolved

___
Python tracker 

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



[issue28490] inappropriate OS.Error "Invalid cross-device link"

2016-10-20 Thread Steve Newcomb

Steve Newcomb added the comment:

Oops.  My bad.  There was a symlink in one of those paths.  The message is 
valid.

--
resolution:  -> not a bug
status: open -> closed

___
Python tracker 

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



[issue18219] csv.DictWriter is slow when writing files with large number of columns

2016-10-20 Thread SilentGhost

Changes by SilentGhost :


--
stage:  -> commit review
versions: +Python 3.5, Python 3.6, Python 3.7 -Python 3.4

___
Python tracker 

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



[issue28490] inappropriate OS.Error "Invalid cross-device link"

2016-10-20 Thread Steve Newcomb

New submission from Steve Newcomb:

os.rename() raises OSError with a misleading message saying "cross-device" when 
no cross-device activity is involved.  

Here, running on Ubuntu 16.04.1 using and ext4 filesystem, both filepaths are 
in the same filesystem, and the error is evidently due to the fact that a file 
already exists at the target path:

(Pdb) os.path.isfile( 
'/persist/nobackup/backupDisks/d38BasLijPupBak/d38-backup.20161020/d38-_,.,_home2_,.,_rack/.Xauthority')
True
(Pdb) os.path.isfile( 
'/persist/nobackup/backupDisks/d38BasLijPupBak/d38-20161020/home2/rack/.Xauthority')
True
(Pdb) os.rename( 
'/persist/nobackup/backupDisks/d38BasLijPupBak/d38-backup.20161020/d38-_,.,_home2_,.,_rack/.Xauthority',
 
'/persist/nobackup/backupDisks/d38BasLijPupBak/d38-20161020/home2/rack/.Xauthor\
ity')
*** OSError: [Errno 18] Invalid cross-device link: 
'/persist/nobackup/backupDisks/d38BasLijPupBak/d38-backup.20161020/d38-_,.,_home2_,.,_rack/.Xauthority'
 -> '/persist/nobackup/backupDisks/d38BasLijPup\
Bak/d38-20161020/home2/rack/.Xauthority'

--
components: IO
messages: 279061
nosy: steve.newcomb
priority: normal
severity: normal
status: open
title: inappropriate OS.Error "Invalid cross-device link"
versions: Python 3.5

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



[issue28489] Fix comment in tokenizer.c

2016-10-20 Thread Eric V. Smith

Eric V. Smith added the comment:

FWIW, in Lib/tokenize.py, it's _all_string_prefixes():

>>> _all_string_prefixes()
set(['', 'FR', 'rB', 'rF', 'BR', 'Fr', 'RF', 'rf', 'RB', 'fr', 'B', 'rb', 'F', 
'Br', 'R', 'U', 'br', 'fR', 'b', 'f', 'Rb', 'Rf', 'r', 'u', 'bR'])

My basic point is that trying to list them all is hard and a maintenance 
problem. So as long as we're not being exhaustive, the comment should just 
state the gist of what the code does.

--

___
Python tracker 

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



[issue28489] Fix comment in tokenizer.c

2016-10-20 Thread Eric V. Smith

Eric V. Smith added the comment:

I'd actually change this to be something like:

Process b"", r"", u"", and the various legal combinations.

There are 24 total combinations when you add upper case. I actually wrote a 
script in Lib/tokenize.py to generate them all. And when I add binary 
f-strings, that number climbs to 80.

--
nosy: +eric.smith

___
Python tracker 

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



[issue28489] Fix comment in tokenizer.c

2016-10-20 Thread Stéphane Wirtel

Stéphane Wirtel added the comment:

Thank you for this patch.

--
nosy: +matrixise
versions: +Python 3.7

___
Python tracker 

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



[issue18219] csv.DictWriter is slow when writing files with large number of columns

2016-10-20 Thread Hugh Brown

Hugh Brown added the comment:

I came across this problem today when I was using a 1000+ column CSV from a 
client. It was taking about 15 minutes to process each file. I found the 
problem and made this change:

# wrong_fields = [k for k in rowdict if k not in self.fieldnames]
wrong_fields = set(rowdict.keys()) - set(self.fieldnames)

And my processing time went down to 12 seconds per file -- a 75x speedup.

It's kind of sad that this change has been waiting for over three years when it 
is so simple. Any chance we could make one of the acceptable code changes and 
release it?

--
nosy: +hughdbrown

___
Python tracker 

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



[issue28489] Fix comment in tokenizer.c

2016-10-20 Thread Ryan Gonzalez

New submission from Ryan Gonzalez:

Attached is a little fix for a comment in tokenizer.c. I noticed that it was 
never updated for the inclusion of f-strings.

--
assignee: docs@python
components: Documentation
files: 0001-Fix-comment-in-tokenizer.c.patch
keywords: patch
messages: 279056
nosy: Ryan.Gonzalez, docs@python
priority: normal
severity: normal
status: open
title: Fix comment in tokenizer.c
versions: Python 3.6
Added file: 
http://bugs.python.org/file45156/0001-Fix-comment-in-tokenizer.c.patch

___
Python tracker 

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



[issue24381] Got warning when compiling ffi.c on Mac

2016-10-20 Thread Stéphane Wirtel

Stéphane Wirtel added the comment:

@zach.ware so in this case, we could merge the patch in 3.6 & 3.7.

--

___
Python tracker 

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



[issue26010] document CO_* constants

2016-10-20 Thread Stéphane Wirtel

Changes by Stéphane Wirtel :


--
status: open -> closed

___
Python tracker 

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



[issue26010] document CO_* constants

2016-10-20 Thread Stéphane Wirtel

Stéphane Wirtel added the comment:

Nice Yury, sorry for the missing versionadded directive.

And now, I have a description for CO_ASYNC_GENERATOR ;-)

--

___
Python tracker 

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



[issue26010] document CO_* constants

2016-10-20 Thread Yury Selivanov

Yury Selivanov added the comment:

Thank you Stephane for bumping this issue up.

I've committed the patch.  I've documented CO_ASYNC_GENERATOR in more detail, 
and I also added "versionadded" tags to CO_COROUTINE and CO_ITERABLE_COROUTINE.

--
resolution:  -> fixed

___
Python tracker 

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



[issue26010] document CO_* constants

2016-10-20 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 681924a9eefd by Yury Selivanov in branch '3.5':
Issue #26010: Document CO_* constants
https://hg.python.org/cpython/rev/681924a9eefd

New changeset 5023c182a8a4 by Yury Selivanov in branch '3.6':
Merge 3.5 + document CO_ASYNC_GENERATOR; issue #26010
https://hg.python.org/cpython/rev/5023c182a8a4

New changeset 3c4833d2fdbe by Yury Selivanov in branch 'default':
Merge 3.6 (issue #26010)
https://hg.python.org/cpython/rev/3c4833d2fdbe

--
nosy: +python-dev

___
Python tracker 

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



[issue28214] Improve exception reporting for problematic __set_name__ attributes

2016-10-20 Thread Stéphane Wirtel

Stéphane Wirtel added the comment:

Serhiy, your patch works fine.

--

___
Python tracker 

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



[issue26010] document CO_* constants

2016-10-20 Thread Stéphane Wirtel

Changes by Stéphane Wirtel :


--
stage: needs patch -> patch review

___
Python tracker 

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



[issue24381] Got warning when compiling ffi.c on Mac

2016-10-20 Thread Zachary Ware

Zachary Ware added the comment:

Correction: #27979 is unrelated to Modules/_ctypes/libffi_osx.  A hypothetical 
(at this point) removal of libffi_osx will be a separate issue.  I think it's 
probably worthwhile to fix this issue.

--
nosy: +zach.ware

___
Python tracker 

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



[issue26010] document CO_* constants

2016-10-20 Thread Stéphane Wirtel

Stéphane Wirtel added the comment:

Hello Yury,

I have updated your patch, with a small description for CO_ASYNC_GENERATOR. I 
need a review for the description.

Stephane

--
Added file: http://bugs.python.org/file45155/issue26010-2.diff

___
Python tracker 

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



[issue24381] Got warning when compiling ffi.c on Mac

2016-10-20 Thread Stéphane Wirtel

Stéphane Wirtel added the comment:

@victor

There are two issues.

1. The bundled version of CFFI is just outdated
2. There is an issue for the removal of libffi_osx 
(http://bugs.python.org/issue27979)

so, we can fix the bundled libcffi or close this issue.

--

___
Python tracker 

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



[issue28474] WinError(): Python int too large to convert to C long

2016-10-20 Thread Eryk Sun

Eryk Sun added the comment:

Kelvin is calling WlanScan [1], which returns an error code that apparently can 
include HRESULT (signed) values cast as DWORD (unsigned) values, including 
0x80342002 (ERROR_NDIS_DOT11_POWER_STATE_INVALID). 

ctypes.FormatError calls FormatMessage [2] with the flag 
FORMAT_MESSAGE_FROM_SYSTEM. About half of the system error codes defined in 
winerror.h consist of COM HRESULT codes. But, to clarify Kelvin's link [3], 
this does not include NTSTATUS values from kernel-mode system calls. NTSTATUS 
values require the ntdll.dll message table.

[1]: https://msdn.microsoft.com/en-us/library/ms706783
[2]: https://msdn.microsoft.com/en-us/library/ms679351
[3]: https://msdn.microsoft.com/en-us/library/cc231196

A workaround in this case is to use the default c_int restype to return the 
error as a signed integer:

>>> ctypes.FormatError(0x80342002 - 2**32)
"The wireless local area network interface is powered down and doesn't
support the requested operation."

A similar workaround works for setting the exit code to an HRESULT or NTSTATUS 
error code:

>>> hex(subprocess.call('python -c "import os; os._exit(0xC001)"'))
Traceback (most recent call last):
  File "", line 1, in 
OverflowError: Python int too large to convert to C long
'0x1'
>>> hex(subprocess.call('python -c "import sys; sys.exit(0xC001)"'))
'0x'

>>> hex(subprocess.call('python -c "import os; os._exit(0xC001 - 
2**32)"'))
'0xc001'
>>> hex(subprocess.call('python -c "import sys; sys.exit(0xC001 - 
2**32)"'))
'0xc001'

--
nosy: +eryksun

___
Python tracker 

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



[issue27593] Deprecate sys._mercurial and create sys._git

2016-10-20 Thread Stéphane Wirtel

Stéphane Wirtel added the comment:

Hi Brett,

With your comment, I have added the modified ./configure.

Here is the last patch including the indentation.

--
Added file: http://bugs.python.org/file45154/issue27593-with-indent-3.7-2.diff

___
Python tracker 

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



[issue27593] Deprecate sys._mercurial and create sys._git

2016-10-20 Thread Ned Deily

Ned Deily added the comment:

I'll get to this one shortly.

--
assignee: brett.cannon -> ned.deily

___
Python tracker 

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



[issue27593] Deprecate sys._mercurial and create sys._git

2016-10-20 Thread Brett Cannon

Brett Cannon added the comment:

The inclusion of changes to ./configure is on purpose since the file is in the 
repository and not everyone has autoconf installed to necessarily re-generate 
the file (and we have had issues with people using really old versions of 
autoconf in the past).

--

___
Python tracker 

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



[issue27755] Retire DynOptionMenu with a ttk Combobox

2016-10-20 Thread Terry J. Reedy

Terry J. Reedy added the comment:

I have not been working on IDLE for the last month, but may get back to it.  
Patched like this can go in any release, not just .0 version releases.  (See 
PEP 434 for why.)

--

___
Python tracker 

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



[issue28488] shutil.make_archive (xxx, zip, root_dir) is adding './' entry to archive which is wrong

2016-10-20 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Thank you for your report Alexander. Yes, this regression was introduced in 
issue24982. Proposed patch fixes it.

--
assignee:  -> serhiy.storchaka
keywords: +patch
stage: needs patch -> patch review
Added file: 
http://bugs.python.org/file45153/shutil_make_archive_zip_curdir.patch

___
Python tracker 

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



[issue27755] Retire DynOptionMenu with a ttk Combobox

2016-10-20 Thread Justin Foo

Justin Foo added the comment:

Is #24781 likely to make it into Python 3.6? Otherwise, would this patch be of 
any benefit in the meantime?

--

___
Python tracker 

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



[issue28092] Build failure for 3.6 on Centos 5.11

2016-10-20 Thread Robin Becker

Robin Becker added the comment:

for what it's worth I tried reverse patching

https://hg.python.org/cpython/rev/63ae310b60ff/

and

https://hg.python.org/cpython/rev/2f77a9f0b9d6/

in the manylinux docker and the make then proceeds fine with one warning at the 
end

*** WARNING: renaming "_sqlite3" since importing it failed: 
build/lib.linux-x86_64-3.6/_sqlite3.cpython-36m-x86_64-linux-gnu.so: undefined 
symbol: sqlite3_stmt_readonly

Following modules built successfully but were removed because they could not be 
imported:
_sqlite3

--

___
Python tracker 

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



[issue28487] missing _math.o target in 2.7 Makefile

2016-10-20 Thread Zachary Ware

Zachary Ware added the comment:

Your HG setup sounds fine, though you may be interested in the 'share' 
extension.  It allows you to share the data store between several checkouts 
such that doing a 'pull' in one checkout makes any new changesets available in 
all checkouts without having to do additional local pulls.

This is a strange issue, though.  The make target for _math.o is here: 
https://hg.python.org/cpython/file/2.7/Makefile.pre.in#l533 and the 
'sharedmods' target depends on it just below there, and it builds fine for me.

What does 'hg summary' give you?

--
nosy: +zach.ware

___
Python tracker 

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



[issue28487] missing _math.o target in 2.7 Makefile

2016-10-20 Thread Skip Montanaro

Skip Montanaro added the comment:

I'm not sure you understood my problem. Starting with

make distclean
./configure
make

the math and cmath modules fail to build  because Modules/_math.o is
missing. It's not a make thing. I did notice the cpython Makefile has a
target for Modules/_math.o and assumed that since it was missing from the
2.7 Makefile, that was the problem, but maybe not. Still, something is
fishy. Can you confirm that having my 2.7 repo depend on my cpython repo
should work? If that's the problem, I'd like to know. It certainly seems to
work for the other branches I build.

S

--

___
Python tracker 

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



[issue27593] Deprecate sys._mercurial and create sys._git

2016-10-20 Thread Stéphane Wirtel

Stéphane Wirtel added the comment:

Hello Brett,

after my review, I propose this patch where I have added the missing indents 
and remove the ./configure file (because this one can be generated by 
autoreconf)

--
nosy: +matrixise
Added file: http://bugs.python.org/file45152/issue27593-with-indent-3.7.diff

___
Python tracker 

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



[issue28447] socket.getpeername() failure on broken TCP/IP connection

2016-10-20 Thread R. David Murray

R. David Murray added the comment:

Unless I'm missing something, this indicates that the problem is that once the 
far end closes, Windows will no longer return the peer name.  

And, unless I'm misreading, the behavior will be the same on Unix.  The man 
page for getpeername says that ENOTCONN is returned if the socket is not 
connected.

This isn't a bug in Python.  Or Windows, though the error message is a bit 
counter-intuitive to a unix programmer.

--
nosy: +r.david.murray
resolution: wont fix -> not a bug
stage: test needed -> 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



[issue28482] test_typing fails if asyncio unavailable

2016-10-20 Thread Guido van Rossum

Guido van Rossum added the comment:

Can you submit this as a PR upstream, to github.com/python/typing?

--

___
Python tracker 

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



[issue27910] Doc/library/traceback.rst — references to tuples should be replaced with new FrameSummary object

2016-10-20 Thread Emanuel Barry

Emanuel Barry added the comment:

This is not a regression, the documentation was just not fully updated when the 
new feature was added. Patch looks good. This should probably be applied to the 
3.5 branch as well.

--
nosy: +ebarry
stage: patch review -> commit review
versions: +Python 3.7

___
Python tracker 

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



[issue28474] WinError(): Python int too large to convert to C long

2016-10-20 Thread Steve Dower

Steve Dower added the comment:

All HRESULT values are, since the topmost bit indicates that it's an error, but 
all the others should be 16-bit positive integers IIRC. I don't think this 
function is meant to work with HRESULTs, but I could be wrong - fairly sure 
it's meant for Win32 error codes, though I'd have to dig into the format 
function it calls.

What function are you calling that produces an HRESULT from GetLastError?

--

___
Python tracker 

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



[issue27910] Doc/library/traceback.rst — references to tuples should be replaced with new FrameSummary object

2016-10-20 Thread Petr Viktorin

Petr Viktorin added the comment:

ping
Anything I can do to move this forward?

--

___
Python tracker 

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



[issue28488] shutil.make_archive (xxx, zip, root_dir) is adding './' entry to archive which is wrong

2016-10-20 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
nosy: +alanmcintyre, serhiy.storchaka, tarek, twouters
stage:  -> needs patch
type:  -> behavior
versions: +Python 3.5, Python 3.6, Python 3.7 -Python 3.4

___
Python tracker 

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



[issue28488] shutil.make_archive (xxx, zip, root_dir) is adding './' entry to archive which is wrong

2016-10-20 Thread Alexander Belchenko

New submission from Alexander Belchenko:

Running shutil.make_archive('a', 'zip', 'subdir') is created wrong and not 
really needed entry "./" which is visible in zipfile.ZipFile.namelist():

['./', 'foo/', 'hello.txt', 'foo/bar.txt']

This "./" affects some (windows) unzip tools which produces warnings/errors 
about this incorrect entry.

This error present in Python 2.7.11-12 and Python 3.4.4 (those I have installed 
right now). But Python 3.3.5 does not have it, maybe because it omits entries 
for directories at all.

I've attached a simple script which illustrates problem. Tested on Windows with 
mentioned python versions.

Can't reproduce on Centos 7.2 with Python 3.4.3 and 2.7.5.

I suppose it could be realted to the change I spot in latest 2.7 changelog:

- Issue #24982: shutil.make_archive() with the "zip" format now adds entries
  for directories (including empty directories) in ZIP file.

--
components: Library (Lib)
files: make-archive-test.py
messages: 279031
nosy: bialix
priority: normal
severity: normal
status: open
title: shutil.make_archive (xxx, zip, root_dir) is adding './' entry to archive 
which is wrong
versions: Python 2.7, Python 3.4
Added file: http://bugs.python.org/file45151/make-archive-test.py

___
Python tracker 

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



[issue28487] missing _math.o target in 2.7 Makefile

2016-10-20 Thread STINNER Victor

STINNER Victor added the comment:

> Unless I have my hg repo dependencies incorrect, this target seems to be 
> missing from the 2.7 Makefile.pre.in:

The math module is compiled by setup.py:

# math library functions, e.g. sin()
exts.append( Extension('math',  ['mathmodule.c'],
   extra_objects=[shared_math],
   depends=['_math.h', shared_math],
   libraries=math_libs) )

--
nosy: +haypo
resolution:  -> not a bug
status: open -> closed

___
Python tracker 

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



[issue28487] missing _math.o target in 2.7 Makefile

2016-10-20 Thread Skip Montanaro

Skip Montanaro added the comment:

Is this perhaps related to the (closed) issue 24421?

--

___
Python tracker 

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



[issue28487] missing _math.o target in 2.7 Makefile

2016-10-20 Thread Skip Montanaro

New submission from Skip Montanaro:

Unless I have my hg repo dependencies incorrect, this target seems to be 
missing from the 2.7 Makefile.pre.in:

# This is shared by the math and cmath modules
Modules/_math.o: Modules/_math.c Modules/_math.h
$(CC) -c $(CCSHARED) $(PY_CORE_CFLAGS) -o $@ $<

My cpython repo pulls from https://hg.python.org/cpython, My 2.7 repo pulls 
from my cpython repo. I have other branches to build older 3.x versions which 
also pull from my cpython repo. The math and cmath modules build fine, though 
they don't seem to have that target either. So perhaps I'm barking up the wrong 
tree.

Either way, 2.7 won't build properly for me unless I explicitly execute

make Modules/_math.o

--
components: Build
messages: 279028
nosy: skip.montanaro
priority: normal
severity: normal
status: open
title: missing _math.o target in 2.7 Makefile
versions: Python 2.7

___
Python tracker 

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



[issue27659] Check for the existence of crypt()

2016-10-20 Thread Xavier de Gaye

Changes by Xavier de Gaye :


--
versions: +Python 3.7 -Python 3.6

___
Python tracker 

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



[issue21955] ceval.c: implement fast path for integers with a single digit

2016-10-20 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 61fcb12a9873 by Victor Stinner in branch 'default':
Issue #21955: Please don't try to optimize int+int
https://hg.python.org/cpython/rev/61fcb12a9873

--
nosy: +python-dev

___
Python tracker 

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



[issue28444] Missing extensions modules when cross compiling python 3.5.2 for arm on Linux

2016-10-20 Thread Xavier de Gaye

Changes by Xavier de Gaye :


--
nosy: +akuchling

___
Python tracker 

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



[issue21955] ceval.c: implement fast path for integers with a single digit

2016-10-20 Thread STINNER Victor

Changes by STINNER Victor :


--
resolution: fixed -> rejected

___
Python tracker 

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



[issue21955] ceval.c: implement fast path for integers with a single digit

2016-10-20 Thread STINNER Victor

STINNER Victor added the comment:

The fatest patch (inline2.patch) has a negligible impact on benchmarks. The 
purpose of an optimization is to make Python faster, it's not the case here, so 
I close the issue.

Using timeit, the largest speedup is 1.29x faster. Using performance, 
spectral_norm is 1.07x faster and pybench.SimpleLongArithmetic is 1.06x faster. 
I consider that spectral_norm and pybench.SimpleLongArithmetic are 
microbenchmarks and so not representative of a real application.

The issue was fun, thank you for playing with me the game of micro-optimization 
;-) Let's move to more interesting optimizations having a larger impact on more 
realistic workloads, like cache global variables, optimizing method calls, 
fastcalls, etc.

--
resolution:  -> fixed
status: open -> closed

___
Python tracker 

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



[issue28486] Wrong end index and subgroup for group match

2016-10-20 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

group(0) returns the whole match. group(1) returns the first captured subgroup.

--
nosy: +serhiy.storchaka
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



  1   2   >