[issue31555] Windows pyd slower when not loaded via load_dynamic

2017-09-29 Thread Safihre

Change by Safihre :


--
resolution: third party -> 

___
Python tracker 

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



[issue31555] Windows pyd slower when not loaded via load_dynamic

2017-09-29 Thread Safihre

Safihre  added the comment:

No, the difference is not wheel vs setuptools. They both generate the identical 
pyd file. 
The difference is python: if the module is loaded by just being available on 
the path or if the module is loaded via  imp.load_dynamic

I understand if it's closed because it's not python 3, but it's not external 
tool related.

--
status: closed -> open

___
Python tracker 

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



[issue31646] bug in time.mktime

2017-09-29 Thread Kadir Liano

Kadir Liano  added the comment:

time.mktime(time.strptime('09-Mar-14 01:00:00',fmt))
time.mktime(time.strptime('09-Mar-14 02:00:00',fmt))

Both statements produce 1394348400.0 in Win7.  The answers are 1394348400.0 and 
1394352000.0 in Linux which is the correct behavior.

--

___
Python tracker 

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



[issue31647] asyncio: StreamWriter write_eof() after close raises mysterious AttributeError

2017-09-29 Thread twisteroid ambassador

twisteroid ambassador  added the comment:

This issue is somewhat related to issue27223, in that both are caused by using 
self._sock after it has already been assigned None when the connection is 
closed. It seems like Transports in general may need better protection from 
this kind of behavior.

--

___
Python tracker 

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



[issue31647] asyncio: StreamWriter write_eof() after close raises mysterious AttributeError

2017-09-29 Thread twisteroid ambassador

New submission from twisteroid ambassador :

Currently, if one attempts to do write_eof() on a StreamWriter after the 
underlying transport is already closed, an AttributeError is raised:


Traceback (most recent call last):
  File "\scratch_3.py", line 34, in main_coro
writer.write_eof()
  File "C:\Program Files\Python36\lib\asyncio\streams.py", line 300, in 
write_eof
return self._transport.write_eof()
  File "C:\Program Files\Python36\lib\asyncio\selector_events.py", line 808, in 
write_eof
self._sock.shutdown(socket.SHUT_WR)
AttributeError: 'NoneType' object has no attribute 'shutdown'


This is because _SelectorSocketTransport.write_eof() only checks for self._eof 
before calling self._sock.shutdown(), and self._sock has already been assigned 
None after _call_connection_lost().

Compare with StreamWriter.write() after close, which either does nothing or 
logs a warning after 5 attempts; or StreamWriter.drain() after close, which 
raises a ConnectionResetError; or even StreamWriter.close() after close, which 
does nothing.

Trying to do write_eof() after close may happen unintentionally, for example 
when the following sequence of events happen:
* the remote side closes the connection
* the local side attempts to write, so the socket "figures out" the connection 
is closed, and close this side of the socket. Note the write fails silently, 
except when loop.set_debug(True) where asyncio logs "Fatal write error on 
socket transport".
* the local side does write_eof(). An AttributError is raised.

Currently the only way to handle this gracefully is to either catch 
AttributeError or check StreamWriter.transport.is_closing() before write_eof(). 
Neither is pretty.

I suggest making write_eof() after close either do nothing, or raise a subclass 
of ConnectionError. Both will be easier to handle then the current behavior.

Attached repro.

--
components: asyncio
files: asyncio_write_eof_after_close_test.py
messages: 303391
nosy: twisteroid ambassador, yselivanov
priority: normal
severity: normal
status: open
title: asyncio: StreamWriter write_eof() after close raises mysterious 
AttributeError
type: behavior
versions: Python 3.4, Python 3.5, Python 3.6, Python 3.7, Python 3.8
Added file: 
https://bugs.python.org/file47180/asyncio_write_eof_after_close_test.py

___
Python tracker 

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



[issue31646] bug in time.mktime

2017-09-29 Thread Eryk Sun

Eryk Sun  added the comment:

mktime() is the inverse of localtime(). With the given format string, 
strptime() sets tm_isdst to -1, for which mktime will use the system's timezone 
information to determine whether or not it's daylight saving time. You need to 
verify that the time zones are the same. 

For me the results agree in Linux and Windows with the local timezone on both 
systems set to the UK.

9 March (GMT, standard time)

Linux
>>> time.mktime(time.struct_time((2014, 3, 9, 2, 0, 0, 6, 68, 0)))
1394330400.0
>>> time.mktime(time.struct_time((2014, 3, 9, 2, 0, 0, 6, 68, -1)))
1394330400.0

Windows
>>> time.mktime(time.struct_time((2014, 3, 9, 2, 0, 0, 6, 68, 0)))
1394330400.0
>>> time.mktime(time.struct_time((2014, 3, 9, 2, 0, 0, 6, 68, -1)))
1394330400.0

9 August (BST, daylight saving time)

Linux
>>> time.mktime(time.struct_time((2014, 8, 9, 2, 0, 0, 6, 68, 1)))
1407546000.0
>>> time.mktime(time.struct_time((2014, 8, 9, 2, 0, 0, 6, 68, -1)))
1407546000.0

Windows
>>> time.mktime(time.struct_time((2014, 8, 9, 2, 0, 0, 6, 68, 1)))
1407546000.0
>>> time.mktime(time.struct_time((2014, 8, 9, 2, 0, 0, 6, 68, -1)))
1407546000.0

--
nosy: +eryksun

___
Python tracker 

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



[issue26259] Memleak when repeated calls to asyncio.queue.Queue.get is performed, without push to queue.

2017-09-29 Thread Suren Nihalani

Suren Nihalani  added the comment:

@cjrh brought up that this issue is the same as 
https://bugs.python.org/issue31620. I put up a PR there. Can people review that 
and then we can close this?

--
nosy: +snihalani

___
Python tracker 

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



[issue31590] CSV module incorrectly treats escaped newlines as new records if unquoted

2017-09-29 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

I explained on #15927 why I currently see it as an enhancement issue, and 
therefore not appropriate to be backported.  In fact, based on the doc, I am 
puzzled why the line terminator was being escaped.

--

___
Python tracker 

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



[issue15927] csv.reader() does not support escaped newline when quoting=csv.QUOTE_NONE

2017-09-29 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

This issue was 'reopened' by #31590.

I can understand inconsistency as a 'design bug', but design bugs are not code 
bugs, and fixing a design bugs is an enhancement issue, not a behavior issue.

It is not clear to me why, with the specified dialect,  
"writer.writerow(['one\nelement'])" is correct in writing 'one\\\nelement\n'.  
The doc for Dialect.excapechar says "A one-character string used by the writer 
to escape the delimiter if quoting is set to QUOTE_NONE and the quotechar if 
doublequote is False."  Yes, quoting is set to QUOTE_NONE, but \n is the 
lineterminator, not the delimiter (or the quotechar).  It looks to me that 
escaping the lineterminator might be a bug.

In any case, 'one\nelement' and 'one\\\nelement' are each 2 physical lines.  I 
don't see anything in the doc about csv.reader joining physical lines into 
'logical' lines the way that compile() does.

--
nosy: +terry.reedy

___
Python tracker 

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



[issue31601] Availability of utimensat, futimens not checked correctly on macOS

2017-09-29 Thread Ronald Oussoren

Ronald Oussoren  added the comment:

This is true for other symbols as well, when deploying to older releases of 
macOS. 

I have added runtime checking for a number of symbols in the past, that could 
be extended to newer APIs.  

--
On the road, hence brief. 

Op 30 sep. 2017 om 09:17 heeft Terry J. Reedy  het 
volgende geschreven:

> 
> Change by Terry J. Reedy :
> 
> 
> --
> components: +macOS
> nosy: +ned.deily, ronaldoussoren
> title: Availability of utimensat and futimens not checked correctly on macOS 
> -> Availability of utimensat,futimens not checked correctly on macOS
> 
> ___
> Python tracker 
> 
> ___

--
title: Availability of utimensat,futimens not checked correctly on macOS -> 
Availability of utimensat, futimens not checked correctly on macOS

___
Python tracker 

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



[issue31644] bug in datetime.datetime.timestamp

2017-09-29 Thread Kadir Liano

Kadir Liano  added the comment:

The datetime object returned by strptime() does not have tzinfo.  Whatever 
default timezone that was chosen should produce consistent timestamp.  Reading 
a sequential datetime string and converting it to a sequence of timestamp 
results in expected time folding.

datetime.datetime.strptime(dtstr,fmt).timestamp()

--

___
Python tracker 

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



[issue31623] Allow to build MSI installer from the official tarball

2017-09-29 Thread Terry J. Reedy

Change by Terry J. Reedy :


--
components: +Windows
nosy: +paul.moore, steve.dower, tim.golden, zach.ware

___
Python tracker 

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



[issue31613] Localize tkinter.simpledialog.Default buttons as with file dialogs.

2017-09-29 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

I would make such new paremeters keyword-only.

--

___
Python tracker 

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



[issue31613] Localize tkinter.simpledialog.Default buttons as with file dialogs.

2017-09-29 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

Tkinter wraps the tcl/tk gui framework.  The file dialogs and messageboxes are 
provided by tk.  When possible, the file dialogs utilize the native OS file 
dialogs.  The localization is done the by the OS. If the messageboxes are 
localized, then I presume the same is true of them also.

tkinter.simpledialog is a tkinter add-on module written in Python, using tk 
widgets.  SimpleDialog does not have default buttons; they must be supplied in 
the initialization call.  Dialog does provide default *example* buttons.  The 
docstring says "override if you do not want the standard buttons".  

Tk does not provide localized [Ok] and [Cancel] buttons.  AFAIK, Python does 
not provide access to the OS local translations. You will have to provide 
localization yourself.

A reasonable enhancement request might be to add "ok='OK', cancel='Cancel'" to 
the signature of Dialog.__init__ so that a user could pass in local 
translations. These would then be passed on to buttonbox, to be used instead of 
the current hard-coded strings.

--
nosy: +terry.reedy
title: tkinter.simpledialog default buttons (not buttonbox) are not localized, 
unlike all messagebox -> Localize tkinter.simpledialog.Default buttons as with 
file dialogs.
type: behavior -> enhancement
versions: +Python 3.7 -Python 3.5

___
Python tracker 

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



[issue31590] CSV module incorrectly treats escaped newlines as new records if unquoted

2017-09-29 Thread Vaibhav Mallya (mallyvai)

Vaibhav Mallya (mallyvai)  added the comment:

If there's any way this can be documented that would be a big help, at
least. There have been other folks who run into this, and the current
behavior is implicit.

On Sep 29, 2017 5:44 PM, "R. David Murray"  wrote:

R. David Murray  added the comment:

I'm pretty hesitant to make this kind of change in python2.  I'm going to
punt, and let someone else make the decision.  Which means if no one does,
the status quo will win.  Sorry about that.

--

___
Python tracker 

___

--
nosy: +Vaibhav Mallya (mallyvai)

___
Python tracker 

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



[issue31590] CSV module incorrectly treats escaped newlines as new records if unquoted

2017-09-29 Thread R. David Murray

R. David Murray  added the comment:

I'm pretty hesitant to make this kind of change in python2.  I'm going to punt, 
and let someone else make the decision.  Which means if no one does, the status 
quo will win.  Sorry about that.

--

___
Python tracker 

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



[issue31644] bug in datetime.datetime.timestamp

2017-09-29 Thread Eric V. Smith

Eric V. Smith  added the comment:

This is a daylight savings time folding problem. Without a timezone, those are 
in fact the same point in time, at least in my timezone (US Eastern).

If you specify a timezone, you'll see the difference:

datetime.datetime(2014,3,9,2,tzinfo=datetime.timezone(datetime.timedelta(0))).timestamp()
 -> 1394330400.0

datetime.datetime(2014,3,9,3,tzinfo=datetime.timezone(datetime.timedelta(0))).timestamp()
 -> 1394334000.0

These are 3600 seconds, or one hour, apart.

--
nosy: +eric.smith
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



[issue30576] http.server should support HTTP compression (gzip)

2017-09-29 Thread Martin Panter

Martin Panter  added the comment:

Regarding the compressed data generator, it would be better if there were no 
restrictions on the generator yielding empty chunks. This would match how the 
upload “body” parameter for HTTPConnection.request can be an iterator without 
worrying about empty chunks. IMO a chunked encoder should skip empty chunks and 
add the trailer itself, rather than exposing these special requirements to 
higher levels.

--

___
Python tracker 

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



[issue31646] bug in time.mktime

2017-09-29 Thread Kadir Liano

New submission from Kadir Liano :

import time
fmt = '%d-%b-%y %H:%M:%S'
print(time.mktime(time.strptime('09-Mar-14 02:00:00',fmt)))

1394348400.0 in Windows 7, Python 2.7 and 3.6
1394352000.0 in LinuxMint LMDE 2, Python 3.6

--
components: Library (Lib)
messages: 303378
nosy: kliano
priority: normal
severity: normal
status: open
title: bug in time.mktime
type: behavior

___
Python tracker 

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



[issue31601] Availability of utimensat, futimens not checked correctly on macOS

2017-09-29 Thread Terry J. Reedy

Change by Terry J. Reedy :


--
components: +macOS
nosy: +ned.deily, ronaldoussoren
title: Availability of utimensat and futimens not checked correctly on macOS -> 
Availability of utimensat,futimens not checked correctly on macOS

___
Python tracker 

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



[issue31594] Make bytes and bytearray maketrans accept dictionaries as first argument as it's done in str

2017-09-29 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

Consistency between bytes and strings is not much of a concern here, or the 
change would have been make for bytes when it was made for strings.  I would 
not approve the request without knowing who chose not to and why.

I think an example like
t = bytes.maketrans(
b'ABCDEVGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz',
b'vcccvcccvcvcvcscscvcccvcccvcvcvcscsc')
is *much* better as it is than as a dict.

--
nosy: +terry.reedy

___
Python tracker 

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



[issue31590] CSV module incorrectly treats escaped newlines as new records if unquoted

2017-09-29 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

In closing #15927, R. David Murray said "Although this is clearly a bug fix, it 
also represents a behavior change that could cause a working program to fail.  
I have therefore only applied it to 3.4, but I'm open to arguments that it 
should be backported." 

David, I'll leave you to evaluate the argument presented.

Vaibhav: in the meanwhile, consider moving your pipeline to 3.x or patching 
your copy of the csv module.  You can put it in sitepackes as csv27.  Or if you 
are distributing code anyway, include your patched copy with it.

--
nosy: +r.david.murray, terry.reedy

___
Python tracker 

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



[issue31591] Closing socket raises AttributeError: 'collections.deque' object has no attribute '_decref_socketios'

2017-09-29 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

reidfaiv: bpo issues are for patching cypthon, including the stdlib and docs.  
Debugging help should be requested on other forums, such as python-list or 
stackoverflow.

On the other hand, segfaults in pure python code that uses *current* python and 
does not use cypes or third party extension modules is of concern to us.  
Because of such concern, there are crash bugs fixed in every new version and 
some maintenance releases.  Upgrading your application from 3.4 to 3.6.3 (or 
soon, 3.7,0) might benefit from the cumulative work and fix your problem.

--
nosy: +terry.reedy

___
Python tracker 

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



[issue31642] None value in sys.modules no longer blocks import

2017-09-29 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

This is a side effect of issue15767. The exception is raised in _find_and_load, 
but it is always silenced in _handle_fromlist.

--

___
Python tracker 

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



[issue31643] test_uuid: test_getnode and test_windll_getnode fail if connected to the Internet via an Android phone

2017-09-29 Thread Ivan Pozdeev

Ivan Pozdeev  added the comment:

Example failure:

==
FAIL: test_windll_getnode (test.test_uuid.TestInternals)
--
Traceback (most recent call last):
  File "C:\Ivan\cpython\lib\test\test_uuid.py", line 501, in test_windll_getnode

self.check_node(node)
  File "C:\Ivan\cpython\lib\test\test_uuid.py", line 449, in check_node
"%s is not an RFC 4122 node ID" % hex)
AssertionError: False is not true :  is not an RFC 4122 node ID

==
FAIL: test_getnode (test.test_uuid.TestUUID)
--
Traceback (most recent call last):
  File "C:\Ivan\cpython\lib\test\test_uuid.py", line 296, in test_getnode
self.assertTrue(0 < node1 < (1 << 48), '%012x' % node1)
AssertionError: False is not true : 

--

___
Python tracker 

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



[issue31645] openssl build fails in win32 if .pl extension is not associated with Perl

2017-09-29 Thread Ivan Pozdeev

Change by Ivan Pozdeev :


--
type:  -> compile error

___
Python tracker 

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



[issue31645] openssl build fails in win32 if .pl extension is not associated with Perl

2017-09-29 Thread Ivan Pozdeev

New submission from Ivan Pozdeev :

build_ssl.py:fix_makefile() removes "PERL=perl" line from 
externals\openssl-1.0.2j\ms\nt.mak .

This results in lots of calls like:

./util/copy-if-different.pl "" ""

(without the leading "perl")

Which opens the file in the program associates with the extension (Notepad by 
default) instead of executing it.

Since build_ssl.py:main():219 adds the found Perl into PATH, "PERL=perl" should 
be safe in all cases and there's no reason to omit it.

--
components: Build
files: 0001-Fix-openssl-failing-if-.pl-extension-is-not-associat.patch
keywords: patch
messages: 303372
nosy: Ivan.Pozdeev
priority: normal
severity: normal
status: open
title: openssl build fails in win32 if .pl extension is not associated with Perl
versions: Python 3.4
Added file: 
https://bugs.python.org/file47179/0001-Fix-openssl-failing-if-.pl-extension-is-not-associat.patch

___
Python tracker 

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



[issue31620] asyncio.Queue leaks memory if the queue is empty and consumers poll it frequently

2017-09-29 Thread Caleb Hattingh

Caleb Hattingh  added the comment:

This looks like a dupe, or at least quite closely related to 
https://bugs.python.org/issue26259. If the PR resolves both issues that one 
should be closed too.

--
nosy: +cjrh

___
Python tracker 

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



[issue31555] Windows pyd slower when not loaded via load_dynamic

2017-09-29 Thread Steve Dower

Steve Dower  added the comment:

The only difference between your two tests is the install tool, and neither 
setuptools nor wheel bugs are tracked here.

--
resolution:  -> third party
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



[issue31574] Add dtrace hook for importlib

2017-09-29 Thread Łukasz Langa

Łukasz Langa  added the comment:

Merged. Thanks! ✨  ✨

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



[issue31574] Add dtrace hook for importlib

2017-09-29 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset 3d2b407da048b14ba6e5eb6079722a785d210590 by Łukasz Langa 
(Christian Heimes) in branch 'master':
bpo-31574: importlib dtrace (#3749)
https://github.com/python/cpython/commit/3d2b407da048b14ba6e5eb6079722a785d210590


--

___
Python tracker 

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



[issue31574] Add dtrace hook for importlib

2017-09-29 Thread Łukasz Langa

Łukasz Langa  added the comment:

Amazing!

--

___
Python tracker 

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



[issue31583] 2to3 call for file in current directory yields error

2017-09-29 Thread Terry J. Reedy

Change by Terry J. Reedy :


--
nosy: +benjamin.peterson

___
Python tracker 

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



[issue31581] Reduce the number of imports for functools

2017-09-29 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

An option for deferred imports would be to leave a comment at the top where the 
import would otherwise be.  Example:

# import types, weakref  # Deferred to single_dispatch()

This accomplishes the PEP8 purpose of making all dependencies of the module 
visible at the top.

--
nosy: +terry.reedy

___
Python tracker 

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



[issue11063] Rework uuid module: lazy initialization and add a new C extension

2017-09-29 Thread Łukasz Langa

Łukasz Langa  added the comment:

uuid fails to build for me on master since that change landed:


cpython/Modules/_uuidmodule.c:13:11: error: implicit declaration of function 
'uuid_generate_time_safe' is invalid in C99
  [-Werror,-Wimplicit-function-declaration]
res = uuid_generate_time_safe(out);
  ^
cpython/Modules/_uuidmodule.c:13:11: note: did you mean 
'py_uuid_generate_time_safe'?
cpython/Modules/_uuidmodule.c:8:1: note: 'py_uuid_generate_time_safe' declared 
here
py_uuid_generate_time_safe(void)
^
cpython/Modules/_uuidmodule.c:13:11: warning: this function declaration is not 
a prototype [-Wstrict-prototypes]
res = uuid_generate_time_safe(out);
  ^
1 warning and 1 error generated.


This is on macOS Sierra.

--
nosy: +lukasz.langa

___
Python tracker 

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



[issue31557] tarfile: incorrectly treats regular file as directory

2017-09-29 Thread Terry J. Reedy

Change by Terry J. Reedy :


--
nosy: +lars.gustaebel

___
Python tracker 

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



[issue31641] concurrent.futures.as_completed() no longer accepts arbitrary iterables

2017-09-29 Thread Łukasz Langa

Łukasz Langa  added the comment:

Fix is already landed in 3.6 and master.

--

___
Python tracker 

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



[issue31555] Windows pyd slower when not loaded via load_dynamic

2017-09-29 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

This issue is more likely to get attention if there is a difference in 3.6, or 
even better, 3.7.

--
nosy: +terry.reedy

___
Python tracker 

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



[issue31644] bug in datetime.datetime.timestamp

2017-09-29 Thread Kadir Liano

New submission from Kadir Liano :

datetime.datetime(2014,3,9,2).timestamp() returns 1394352000.0
datetime.datetime(2014,3,9,3).timestamp() returns 1394352000.0

--
components: Library (Lib)
messages: 303362
nosy: kliano
priority: normal
severity: normal
status: open
title: bug in datetime.datetime.timestamp
type: behavior
versions: Python 3.6

___
Python tracker 

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



[issue31641] concurrent.futures.as_completed() no longer accepts arbitrary iterables

2017-09-29 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset 9ef28b6ad3d5aff767e3d852499def8b5ae5ff5d by Łukasz Langa (Miss 
Islington (bot)) in branch '3.6':
[3.6] bpo-31641: Allow arbitrary iterables in 
`concurrent.futures.as_completed()` (GH-3830) (#3831)
https://github.com/python/cpython/commit/9ef28b6ad3d5aff767e3d852499def8b5ae5ff5d


--

___
Python tracker 

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



[issue31643] test_uuid: test_getnode and test_windll_getnode fail if connected to the Internet via an Android phone

2017-09-29 Thread Ivan Pozdeev

New submission from Ivan Pozdeev :

Ethernet emulation for some devices like Android phones' tethering use all-zero 
MAC addresses (which is okay since they don't actually pass Ethernet frames to 
other NICs). This results in a node ID of 0 if I'm currently connected to the 
Net via such a device. Which fails range checks in the corresponding tests.

RFC 4122 doesn't actually have any prohibitions of using a node ID of 0. 
Neither does IEEE 802.3 (or rather, whatever info I gathered on it since the 
standard's text is not freely available) assign any special meaning to an 
all-zero MAC address.

The patch also corrects the check call in test_windll_getnode since the tested 
function always generates UUID from a MAC address.

--
components: Tests
files: 0001-Allow-for-all-zero-MAC-based-node-ID-e.g.-mobile-mod.patch
keywords: patch
messages: 303360
nosy: Ivan.Pozdeev
priority: normal
severity: normal
status: open
title: test_uuid: test_getnode and test_windll_getnode fail if connected to the 
Internet via an Android phone
type: behavior
versions: Python 2.7, Python 3.4, Python 3.5, Python 3.6, Python 3.7, Python 3.8
Added file: 
https://bugs.python.org/file47178/0001-Allow-for-all-zero-MAC-based-node-ID-e.g.-mobile-mod.patch

___
Python tracker 

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



[issue31641] concurrent.futures.as_completed() no longer accepts arbitrary iterables

2017-09-29 Thread Roundup Robot

Change by Roundup Robot :


--
pull_requests: +3814

___
Python tracker 

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



[issue31641] concurrent.futures.as_completed() no longer accepts arbitrary iterables

2017-09-29 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset 574562c5ddb2f0429aab9af762442e6f9a3f26ab by Łukasz Langa in 
branch 'master':
bpo-31641: Allow arbitrary iterables in `concurrent.futures.as_completed()` 
(#3830)
https://github.com/python/cpython/commit/574562c5ddb2f0429aab9af762442e6f9a3f26ab


--

___
Python tracker 

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



[issue31582] Add _pth breadcrumb to sys.path documentation

2017-09-29 Thread Steve Dower

Steve Dower  added the comment:

Sounds like a good idea.

I hope that sys.path initialization is documented as well for POSIX as it is 
for Windows, as that will make this a simple "for X, click here; for Y, click 
here" patch. Otherwise, someone will need to figure out exactly what rules are 
followed so they can be documented.

(Hey Eric - when we get that Python initialization script, we can have one set 
of rules for inferring sys.path on all platforms in easy-to-read Python code :) 
)

--
nosy: +eric.snow
stage:  -> needs patch
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



[issue31641] concurrent.futures.as_completed() no longer accepts arbitrary iterables

2017-09-29 Thread Łukasz Langa

Change by Łukasz Langa :


--
keywords: +patch
pull_requests: +3813

___
Python tracker 

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



[issue31641] concurrent.futures.as_completed() no longer accepts arbitrary iterables

2017-09-29 Thread Ned Deily

Ned Deily  added the comment:

Sounds like we need to get this fixed for 3.6.3 final which is scheduled for 
Monday (3 days).  Or revert the previous fix.

--

___
Python tracker 

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



[issue31642] None value in sys.modules no longer blocks import

2017-09-29 Thread Barry A. Warsaw

Change by Barry A. Warsaw :


--
nosy: +barry

___
Python tracker 

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



[issue31641] concurrent.futures.as_completed() no longer accepts arbitrary iterables

2017-09-29 Thread Łukasz Langa

Change by Łukasz Langa :


--
nosy: +haypo

___
Python tracker 

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



[issue31642] None value in sys.modules no longer blocks import

2017-09-29 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue31642] None value in sys.modules no longer blocks import

2017-09-29 Thread Christian Heimes

Change by Christian Heimes :


--
stage:  -> needs patch
type:  -> behavior

___
Python tracker 

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



[issue31642] None value in sys.modules no longer blocks import

2017-09-29 Thread Christian Heimes

Change by Christian Heimes :


--
nosy: +brett.cannon, eric.snow, ncoghlan

___
Python tracker 

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



[issue31642] None value in sys.modules no longer blocks import

2017-09-29 Thread Christian Heimes

New submission from Christian Heimes :

Since Python 3.6, the blocking of imports is broken for 'from package import 
module' imports.

$ mkdir a
$ touch a/__init__.py a/b.py

>>> import sys
>>> sys.modules['a.b'] = None
>>> from a import b
>>> b is None
True
>>> import a.b
Traceback (most recent call last):
  File "", line 1, in 
ModuleNotFoundError: import of 'a.b' halted; None in sys.modules

Tests with Python 2.7 to master:

$ python2.7 -c "from a import b; print(b)"

$ python2.7 -c "import sys; sys.modules['a.b'] = None; from a import b"
Traceback (most recent call last):
  File "", line 1, in 
ImportError: cannot import name b
$ python2.7 -c "import sys; sys.modules['a.b'] = None; from a import b"
Traceback (most recent call last):
  File "", line 1, in 
ImportError: cannot import name b
$ python3.4 -c "import sys; sys.modules['a.b'] = None; from a import b"
Traceback (most recent call last):
  File "", line 1, in 
ImportError: import of 'a.b' halted; None in sys.modules
$ python3.5 -c "import sys; sys.modules['a.b'] = None; from a import b"
Traceback (most recent call last):
  File "", line 1, in 
ImportError: import of 'a.b' halted; None in sys.modules
$ python3.6 -c "import sys; sys.modules['a.b'] = None; from a import b"
$ ./python -c "import sys; sys.modules['a.b'] = None; from a import b"

--
components: Interpreter Core
keywords: 3.6regression
messages: 303356
nosy: christian.heimes
priority: normal
severity: normal
status: open
title: None value in sys.modules no longer blocks import
versions: Python 3.6, Python 3.7, Python 3.8

___
Python tracker 

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



[issue31641] concurrent.futures.as_completed() no longer accepts arbitrary iterables

2017-09-29 Thread Łukasz Langa

New submission from Łukasz Langa :

bpo-27144 introduced a regression for `as_completed()`: it used to accept 
arbitrary iterables but now requires sequences, otherwise raising an exception 
like:


Traceback (most recent call last):
  File "sandcastle/worker/sandcastle_worker.py", line 1266, in get_work_item
  File "jupiter/jupiter_client.py", line 166, in acquireWork
  File "jupiter/jupiter_client.py", line 241, in _acquire_multiple_async
  File "jupiter/jupiter_client.py", line 336, in _wait_for_responses
  File 
"/usr/local/fbcode/gcc-5-glibc-2.23/lib/python3.6/concurrent/futures/_base.py", 
line 217, in as_completed
total_futures = len(fs)
TypeError: object of type 'map' has no len()


Since `as_completed()` is a very popular function, we need to revert the 
behavior here.

--
assignee: lukasz.langa
keywords: 3.6regression
messages: 303355
nosy: grzgrzgrz3, lukasz.langa, ned.deily, pitrou
priority: release blocker
severity: normal
stage: patch review
status: open
title: concurrent.futures.as_completed() no longer accepts arbitrary iterables
type: behavior
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



[issue31623] Allow to build MSI installer from the official tarball

2017-09-29 Thread Ivan Pozdeev

Ivan Pozdeev  added the comment:

> Assuming 3.4 is packagable using msi and hg is the only problem, I presume 
> you could use an hg-git adapter to get an hg checkout to build from.
An official source tarball, by definition, should be able to be built 
from itself, and contain tools for that. If I take sources from a Git 
repo instead, I'm not building from a tarball. If I must do some 
undocumented magic on the extracted source to build that tools don't do, 
the tools are broken. The current ticket and the attached patch fix the 
tools.

P.S. I didn't include the patch right away 'cuz I was going to make a 
PR. But GitHub doesn't work for me for some reason lately, so attached 
it here after tried and failed.

--
nosy: +__Vano

___
Python tracker 

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



[issue31285] a SystemError and an assertion failure in warnings.warn_explicit()

2017-09-29 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:


New changeset 66c2b9f13ef2197a5212fd58372173124df76467 by Serhiy Storchaka 
(Miss Islington (bot)) in branch '3.6':
[3.6] bpo-31285: Remove splitlines identifier from Python/_warnings.c (GH-3803) 
(#3829)
https://github.com/python/cpython/commit/66c2b9f13ef2197a5212fd58372173124df76467


--

___
Python tracker 

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



[issue31639] http.server and SimpleHTTPServer hang after a few requests

2017-09-29 Thread Matt Pr

Matt Pr  added the comment:

It has been pointed out to me that this issue may be related to chrome making 
multiple requests in parallel.

A test with wget seems to support this.

wget -E -H -k -K -p http://domain1.com:8000/domain1.html

...does not hang, whereas requests from chrome do hang.

On some level I guess I wonder about the usefulness of simple web servers if 
they choke on very basic website requests from modern browsers.

--

___
Python tracker 

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



[issue31602] assertion failure in zipimporter.get_source() in case of a bad zlib.decompress()

2017-09-29 Thread Brett Cannon

Change by Brett Cannon :


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



[issue31602] assertion failure in zipimporter.get_source() in case of a bad zlib.decompress()

2017-09-29 Thread Brett Cannon

Brett Cannon  added the comment:


New changeset 01c6a8859ef2ff5545a87cf537573bd342c848bf by Brett Cannon (Oren 
Milman) in branch 'master':
bpo-31602: Fix an assertion failure in zipimporter.get_source() in case of a 
bad zlib.decompress() (GH-3784)
https://github.com/python/cpython/commit/01c6a8859ef2ff5545a87cf537573bd342c848bf


--

___
Python tracker 

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



[issue31285] a SystemError and an assertion failure in warnings.warn_explicit()

2017-09-29 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

I just missed PR 3803.

--

___
Python tracker 

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



[issue31285] a SystemError and an assertion failure in warnings.warn_explicit()

2017-09-29 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:


New changeset 8b4ff53c440dfcde40fbeb02c5e666c85190528f by Serhiy Storchaka 
(Oren Milman) in branch 'master':
bpo-31285: Remove splitlines identifier from Python/_warnings.c (#3803)
https://github.com/python/cpython/commit/8b4ff53c440dfcde40fbeb02c5e666c85190528f


--

___
Python tracker 

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



[issue31285] a SystemError and an assertion failure in warnings.warn_explicit()

2017-09-29 Thread Roundup Robot

Change by Roundup Robot :


--
pull_requests: +3812

___
Python tracker 

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



[issue28280] Always return a list from PyMapping_Keys/PyMapping_Values/PyMapping_Items

2017-09-29 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

PySequence_List() is the simplest way in C. I don't know whether we need 
special error messages now. But for compatibility keep them.

--

___
Python tracker 

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



[issue31619] Strange error when convert hexadecimal with underscores to int

2017-09-29 Thread Stefan Krah

Stefan Krah  added the comment:

> We see if digits * bits_per_char + PyLong_SHIFT -1 overflows an int?

Yes, but the check is too late: UB can already occur in this calculation
and then all bets are off.


It looks like 'n' was Py_ssize_t in 2.7. :)

--
nosy: +skrah

___
Python tracker 

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



[issue31619] Strange error when convert hexadecimal with underscores to int

2017-09-29 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

The error is raised when the number of underscores is at least (PyLong_SHIFT - 
1) // bits_per_char.

--

___
Python tracker 

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



[issue31619] Strange error when convert hexadecimal with underscores to int

2017-09-29 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
pull_requests: +3811

___
Python tracker 

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



[issue31638] zipapp module should support compression

2017-09-29 Thread Paul Moore

Change by Paul Moore :


--
assignee:  -> paul.moore
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



[issue31638] zipapp module should support compression

2017-09-29 Thread Paul Moore

Paul Moore  added the comment:


New changeset d87b105ca794addf92addb28293c92a7ef4141e1 by Paul Moore (Zhiming 
Wang) in branch 'master':
bpo-31638: Add compression support to zipapp (GH-3819)
https://github.com/python/cpython/commit/d87b105ca794addf92addb28293c92a7ef4141e1


--

___
Python tracker 

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



[issue31640] Document exit() from parse_args

2017-09-29 Thread R. David Murray

R. David Murray  added the comment:

I think this is reasonable, but do note that this is covered in 16.4.4.2, and 
the fact that help exits is actually a property of help, not parse_args.  That 
is, the docs are correct and complete as they stand, but I agree that it would 
be helpful to have the summary include this information as well.

--
nosy: +r.david.murray
versions: +Python 2.7 -Python 3.5, Python 3.6

___
Python tracker 

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



[issue31602] assertion failure in zipimporter.get_source() in case of a bad zlib.decompress()

2017-09-29 Thread Brett Cannon

Change by Brett Cannon :


--
assignee:  -> brett.cannon
nosy: +brett.cannon

___
Python tracker 

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



[issue31638] zipapp module should support compression

2017-09-29 Thread Paul Moore

Paul Moore  added the comment:

Definitely. The reason it uses uncompressed files is simply an oversight on my 
part - I hadn't realised the default for zipfile was uncompressed.

--

___
Python tracker 

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



[issue28280] Always return a list from PyMapping_Keys/PyMapping_Values/PyMapping_Items

2017-09-29 Thread Oren Milman

Oren Milman  added the comment:

I would be happy to write a PR that implements that.

However, i am not sure which way is better to construct a list from the return
value (an iterable, hopefully) of keys() etc.:
- Call PyList_Type() (in each of PyMapping_Keys() etc.) on the iterable, and
  overwrite the error message in case it is a TypeError.
- Write a helper function iterable_as_list(), which uses PyObject_GetIter() and
  PySequence_List(), and call it in each of PyMapping_Keys() etc..
  (iterable_as_list() would receive "keys" etc., so that it would raise the
  appropriate error message, in case of a TypeError.)

ISTM that the first one is simpler, but I am not sure about the performance
difference between them.

--
nosy: +Oren Milman

___
Python tracker 

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



[issue31640] Document exit() from parse_args

2017-09-29 Thread Charles Merriam

New submission from Charles Merriam :

It is unexpected to testers and users to ArgParse that it terminates the 
process; one usually expects an error code.  Fix by modifying documentation to 
section 16.4.4 The parse_args() Method. 

Change the words "Return the populated namespace." to "Return the populated 
namespace, or exit with a status 0 if the help message is printed, or exit with 
status 2 if an invalid argument was parsed."

--
assignee: docs@python
components: Documentation
messages: 303341
nosy: CharlesMerriam, docs@python
priority: normal
severity: normal
status: open
title: Document exit() from parse_args
type: enhancement
versions: Python 3.5, Python 3.6, Python 3.7, Python 3.8

___
Python tracker 

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



[issue15037] curses.unget_wch and test_curses fail when linked with ncurses 5.7 and earlier

2017-09-29 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

It is easy to write a workaround for the first case (but it is not ). The 
workaround for the second case would be too complex. I prefer to skip the test. 
Unfortunately the version of ncurses is not exposed on Python level, thus the 
skipping is OS-specific.

--

___
Python tracker 

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



[issue15037] curses.unget_wch and test_curses fail when linked with ncurses 5.7 and earlier

2017-09-29 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
keywords: +patch
pull_requests: +3810
stage:  -> patch review

___
Python tracker 

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



[issue31619] Strange error when convert hexadecimal with underscores to int

2017-09-29 Thread Nitish

Nitish  added the comment:

>> PR 3816 fixes the symptom, but not the core issue -- an overflow check 
>> depending on undefined behaviour.

> I don't understand this check completely actually. When exactly is an int too 
> large to convert?

We see if digits * bits_per_char + PyLong_SHIFT -1 overflows an int?

--

___
Python tracker 

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



[issue31634] Consider installing wheel in ensurepip by default

2017-09-29 Thread Ned Deily

Change by Ned Deily :


--
nosy: +ned.deily

___
Python tracker 

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



[issue31625] stop using ranlib

2017-09-29 Thread STINNER Victor

STINNER Victor  added the comment:

Thanks ;-)

--

___
Python tracker 

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



[issue31619] Strange error when convert hexadecimal with underscores to int

2017-09-29 Thread Nitish

Nitish  added the comment:

> PR 3816 fixes the symptom, but not the core issue -- an overflow check 
> depending on undefined behaviour.

I don't understand this check completely actually. When exactly is an int too 
large to convert?

--

___
Python tracker 

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



[issue31625] stop using ranlib

2017-09-29 Thread Benjamin Peterson

Benjamin Peterson  added the comment:


New changeset 6fb0e4a6d085ffa4e4a6daaea042a1cc517fa8bc by Benjamin Peterson in 
branch 'master':
explicitly list objects for the ar command (#3824)
https://github.com/python/cpython/commit/6fb0e4a6d085ffa4e4a6daaea042a1cc517fa8bc


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



[issue31638] zipapp module should support compression

2017-09-29 Thread Éric Araujo

Change by Éric Araujo :


--
keywords: +needs review
nosy: +paul.moore
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



[issue31625] stop using ranlib

2017-09-29 Thread Benjamin Peterson

Change by Benjamin Peterson :


--
pull_requests: +3809
stage: resolved -> patch review

___
Python tracker 

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



[issue31634] Consider installing wheel in ensurepip by default

2017-09-29 Thread Éric Araujo

Change by Éric Araujo :


--
nosy: +dstufft, merwok, ncoghlan
versions:  -Python 2.7, Python 3.4, Python 3.5, Python 3.6, Python 3.8

___
Python tracker 

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



[issue31582] Add _pth breadcrumb to sys.path documentation

2017-09-29 Thread Éric Araujo

Change by Éric Araujo :


--
components: +Windows
nosy: +paul.moore, steve.dower, tim.golden, zach.ware

___
Python tracker 

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



[issue31639] http.server and SimpleHTTPServer hang after a few requests

2017-09-29 Thread Matt Pr

New submission from Matt Pr :

Doing a cross domain iframe test.  `domain1.html` has iframe pointing at 
`domain2.html` which has iframe pointing at `domain3.html`.

`domain{1,2,3}.com` are all configured to point at `127.0.0.1` in my 
`/etc/hosts` file.

Loaded up `http://domain1.com:8000/domain1.html` in my browser and it spins 
waiting for domain3 to load.  CTRL-C and then domain3 loads.  CTRL-C again to 
quit.

Google chrome: 61.0.3163.100 (Official Build) (64-bit)

```
$ python --version
Python 2.7.13
$ uname -a
Darwin [hostname-removed] 14.5.0 Darwin Kernel Version 14.5.0: Sun Jun  4 
21:40:08 PDT 2017; root:xnu-2782.70.3~1/RELEASE_X86_64 x86_64
$ brew info python
...
/usr/local/Cellar/python/2.7.13 (3,571 files, 49MB) *
  Poured from bottle on 2017-01-30 at 16:56:40
From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/python.rb
```

```
$ python -m SimpleHTTPServer 8000
Serving HTTP on 0.0.0.0 port 8000 ...
127.0.0.1 - - [29/Sep/2017 17:14:22] "GET /domain1.html HTTP/1.1" 200 -
127.0.0.1 - - [29/Sep/2017 17:14:22] "GET /style.css HTTP/1.1" 200 -
127.0.0.1 - - [29/Sep/2017 17:14:23] "GET /domain2.html HTTP/1.1" 200 -
127.0.0.1 - - [29/Sep/2017 17:14:23] "GET /style.css HTTP/1.1" 200 -
^C
Exception happened during processing of request from ('127.0.0.1', 64315)
Traceback (most recent call last):
  File 
"/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/SocketServer.py",
 line 290, in _handle_request_noblock
self.process_request(request, client_address)
  File 
"/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/SocketServer.py",
 line 318, in process_request
self.finish_request(request, client_address)
  File 
"/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/SocketServer.py",
 line 331, in finish_request
self.RequestHandlerClass(request, client_address, self)
  File 
"/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/SocketServer.py",
 line 652, in __init__
self.handle()
  File 
"/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/BaseHTTPServer.py",
 line 340, in handle
self.handle_one_request()
  File 
"/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/BaseHTTPServer.py",
 line 310, in handle_one_request
self.raw_requestline = self.rfile.readline(65537)
  File 
"/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/socket.py",
 line 480, in readline
data = self._sock.recv(self._rbufsize)
KeyboardInterrupt

127.0.0.1 - - [29/Sep/2017 17:14:26] "GET /domain3.html HTTP/1.1" 200 -
127.0.0.1 - - [29/Sep/2017 17:14:26] "GET /style.css HTTP/1.1" 200 -
^CTraceback (most recent call last):
  File 
"/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py",
 line 174, in _run_module_as_main
"__main__", fname, loader, pkg_name)
  File 
"/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py",
 line 72, in _run_code
exec code in run_globals
  File 
"/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/SimpleHTTPServer.py",
 line 235, in 
test()
  File 
"/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/SimpleHTTPServer.py",
 line 231, in test
BaseHTTPServer.test(HandlerClass, ServerClass)
  File 
"/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/BaseHTTPServer.py",
 line 610, in test
httpd.serve_forever()
  File 
"/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/SocketServer.py",
 line 231, in serve_forever
poll_interval)
  File 
"/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/SocketServer.py",
 line 150, in _eintr_retry
return func(*args)
KeyboardInterrupt
```


Same issue with python3
```
$ python3 --version
Python 3.6.0
$ brew info python3
...
/usr/local/Cellar/python3/3.6.0 (3,611 files, 55.9MB) *
  Poured from bottle on 2017-01-30 at 16:57:16
From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/python3.rb
```

Note only one CTRL-C to exit... but note it didn't server domain3.html...so 
stuck in the same place as before.  With python2 it serves domain3.html after 
hitting the first CTRL-C.  With python3 it never serves it, just quits after 
the CTRL-C and browser is "spinning" waiting for the file.
```
$ python3 -m http.server 8000
Serving HTTP on 0.0.0.0 port 8000 (http://0.0.0.0:8000/) ...
127.0.0.1 - - [29/Sep/2017 18:04:38] "GET /domain1.html HTTP/1.1" 200 -
127.0.0.1 - - [29/Sep/2017 18:04:38] "GET /style.css HTTP/1.1" 200 -
127.0.0.1 - - [29/Sep/2017 18:04:39] "GET /domain2.html HTTP/1.1" 200 -

[issue31638] zipapp module should support compression

2017-09-29 Thread Éric Araujo

Change by Éric Araujo :


--
nosy: +merwok

___
Python tracker 

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



[issue30188] test_nntplib: random EOFError in setUpClass()

2017-09-29 Thread STINNER Victor

STINNER Victor  added the comment:

Recent failure:

http://buildbot.python.org/all/builders/x86%20Gentoo%20Non-Debug%20with%20X%203.x/builds/1080/steps/test/logs/stdio

==
ERROR: test_with_statement (test.test_nntplib.NetworkedNNTP_SSLTests)
--
Traceback (most recent call last):
  File 
"/buildbot/buildarea/3.x.ware-gentoo-x86.nondebug/build/Lib/test/test_nntplib.py",
 line 241, in wrapped
meth(self)
  File 
"/buildbot/buildarea/3.x.ware-gentoo-x86.nondebug/build/Lib/test/test_nntplib.py",
 line 263, in test_with_statement
with self.NNTP_CLASS(self.NNTP_HOST, timeout=TIMEOUT, usenetrc=False) as 
server:
  File "/buildbot/buildarea/3.x.ware-gentoo-x86.nondebug/build/Lib/nntplib.py", 
line 1077, in __init__
self.sock = _encrypt_on(self.sock, ssl_context, host)
  File "/buildbot/buildarea/3.x.ware-gentoo-x86.nondebug/build/Lib/nntplib.py", 
line 292, in _encrypt_on
return context.wrap_socket(sock, server_hostname=hostname)
  File "/buildbot/buildarea/3.x.ware-gentoo-x86.nondebug/build/Lib/ssl.py", 
line 411, in wrap_socket
_session=session
  File "/buildbot/buildarea/3.x.ware-gentoo-x86.nondebug/build/Lib/ssl.py", 
line 822, in __init__
self.do_handshake()
  File "/buildbot/buildarea/3.x.ware-gentoo-x86.nondebug/build/Lib/ssl.py", 
line 1076, in do_handshake
self._sslobj.do_handshake()
  File "/buildbot/buildarea/3.x.ware-gentoo-x86.nondebug/build/Lib/ssl.py", 
line 697, in do_handshake
self._sslobj.do_handshake()
ssl.SSLEOFError: EOF occurred in violation of protocol (_ssl.c:864)

--

___
Python tracker 

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



[issue31625] stop using ranlib

2017-09-29 Thread STINNER Victor

STINNER Victor  added the comment:

Buildbots are unhappy :-( Compilation failed on:

http://buildbot.python.org/all/builders/AMD64%20FreeBSD%20CURRENT%20Debug%203.x/builds/962/steps/compile/logs/stdio

http://buildbot.python.org/all/builders/AMD64%20FreeBSD%20CURRENT%20Non-Debug%203.x/builds/964/steps/compile/logs/stdio

--
nosy: +haypo
resolution: fixed -> 
status: closed -> open

___
Python tracker 

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



[issue31625] stop using ranlib

2017-09-29 Thread Benjamin Peterson

Benjamin Peterson  added the comment:


New changeset d15108a4789aa1e3c12b2890b770550c90a30913 by Benjamin Peterson in 
branch 'master':
stop using ranlib (closes bpo-31625) (#3815)
https://github.com/python/cpython/commit/d15108a4789aa1e3c12b2890b770550c90a30913


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



[issue31285] a SystemError and an assertion failure in warnings.warn_explicit()

2017-09-29 Thread Oren Milman

Change by Oren Milman :


--
pull_requests: +3808

___
Python tracker 

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



[issue29843] errors raised by ctypes.Array for invalid _length_ attribute

2017-09-29 Thread Oren Milman

Change by Oren Milman :


--
pull_requests: +3807

___
Python tracker 

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



[issue31619] Strange error when convert hexadecimal with underscores to int

2017-09-29 Thread Mark Dickinson

Mark Dickinson  added the comment:

There's also the (lesser) issue that we're using C `int`s for things that 
should really be `ssize_t`s. But that can be fixed / changed separately for the 
fix for this issue.

> I'll see if I can find time for a fix this evening (UTC+1).

Yep, sorry; this didn't happen. I blame the children. :-(

--

___
Python tracker 

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



[issue31637] integer overflow in the size of a ctypes.Array

2017-09-29 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
superseder:  -> Do not assume signed integer overflow behavior

___
Python tracker 

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



[issue1621] Do not assume signed integer overflow behavior

2017-09-29 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

Martin, do you mind to create a PR for your ctypes_v2.patch?

--

___
Python tracker 

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



[issue31627] test_mailbox fails if the hostname is empty

2017-09-29 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
versions: +Python 2.7, 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



[issue31627] test_mailbox fails if the hostname is empty

2017-09-29 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
keywords: +patch
pull_requests: +3806
stage:  -> patch review

___
Python tracker 

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



[issue29843] errors raised by ctypes.Array for invalid _length_ attribute

2017-09-29 Thread Segev Finer

Change by Segev Finer :


--
pull_requests: +3805

___
Python tracker 

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



[issue31627] test_mailbox fails if the hostname is empty

2017-09-29 Thread R. David Murray

R. David Murray  added the comment:

A system with no hostname can be considered to be improperly configured, but it 
doesn't look like this would weaken the test, so I think it is OK.

--

___
Python tracker 

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



[issue25351] pyvenv activate script failure with specific bash option

2017-09-29 Thread STINNER Victor

STINNER Victor  added the comment:

The bug has been fixed in Python 3.6 and 3.7 (master), thank you Sorin Sbarnea!

Python 3.4 and 3.5 don't accept bug fixes anymore, only security fixes:
https://devguide.python.org/#status-of-python-branches

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.6, Python 3.7 -Python 3.4, Python 3.5

___
Python tracker 

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



[issue25351] pyvenv activate script failure with specific bash option

2017-09-29 Thread STINNER Victor

STINNER Victor  added the comment:


New changeset a5610e07460a8df4b0923a32d37234cd535ec952 by Victor Stinner (Miss 
Islington (bot)) in branch '3.6':
[3.6] bpo-25351: avoid activate failure on strict shells (GH-3804) (#3820)
https://github.com/python/cpython/commit/a5610e07460a8df4b0923a32d37234cd535ec952


--
nosy: +haypo

___
Python tracker 

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



[issue25351] pyvenv activate script failure with specific bash option

2017-09-29 Thread Roundup Robot

Change by Roundup Robot :


--
pull_requests: +3804

___
Python tracker 

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



  1   2   >