[issue34561] Replace list sorting merge_collapse()?

2018-09-04 Thread Tim Peters


Tim Peters  added the comment:

A new version of the file models a version of the `powersort` merge ordering 
too.  It clearly dominates timsort and 2-merge in all cases tried, for this 
notion of "cost".

Against it, its code is much more complex, and the algorithm is very far from 
obvious.  The paper "motivates" it but doesn't really explain it in enough 
detail to make most of it clear (but refers to other papers where pieces of it 
are developed).

Curious:  unless a run is the last in an array, powersort never merges it 
immediately upon finding it.  Instead its start and length are used to compute 
a "power", in turn used to decide whether to merge some previous number of 
runs.  A dollar to anyone who can figure out what the heck the "power" 
computation is really doing in less than a full day without reading the paper 
;-)  Then two dollars if you can prove that the "never equal!" assert holds.

It would require timing lots of C code on various cases to see whether the 
possible delay in merging new runs really matters.  It's unclear to me a 
priori, because it buys something too (less memory copying overall).

In any case, just switching to 2-merge would be easy, and that alone is enough 
to squash the contrived "bad cases" for the current approach.  `powersort` 
would too, but may also actually help a bit in ordinary cases.  Or not.

--
Added file: https://bugs.python.org/file47785/runstack.py

___
Python tracker 

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



[issue34563] invalid assert on big output of multiprocessing.Process

2018-09-04 Thread Oleksandr Buchkovskyi


Change by Oleksandr Buchkovskyi :


--
pull_requests: +8528

___
Python tracker 

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



[issue34568] Types in `typing` not anymore instances of `type` or subclasses of "real" types

2018-09-04 Thread Ivan Levkivskyi


Ivan Levkivskyi  added the comment:

It was a deliberate decision. You can find some motivation in PEP 560, and yes 
we used provisional status here. It was a hard decision, but we decided that 
giving up few percent of backwards compatibility is a reasonable price for up 
to 5x performance boost.

It looks like some of your problems may be solved by 
https://github.com/ilevkivskyi/typing_inspect (use `pip install 
typing_inspect`) that aims at providing cross-version runtime introspection of 
typing objects by carefully wrapping some "hidden" internal API.

There is a plan to include most used part of typing_inspect in typing itself, 
see for example https://github.com/python/typing/issues/570.
(it is hard to give an estimate about when, I really want to do this soon, but 
just don't have time).

--

___
Python tracker 

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



[issue34583] os.stat() wrongfully returns False for symlink on Windows 10 v1803

2018-09-04 Thread Isaac Shabtay


New submission from Isaac Shabtay :

Windows 10 Pro, v1803.
Created a directory: D:\Test
Created a symbolic link to it: C:\Test -> D:\Test

The current user has permissions to access the link, however os.stat() fails:

>>> os.stat('C:\\Test')
Traceback (most recent call last):
  File "", line 1, in 
PermissionError: [WinError 5] Access is denied: 'C:\\Test'

The only change in my system since this has last worked, is that I upgraded to 
v1803 (used to be v1709 up until about a week ago).

--
components: Library (Lib)
messages: 324605
nosy: Isaac Shabtay
priority: normal
severity: normal
status: open
title: os.stat() wrongfully returns False for symlink on Windows 10 v1803
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



[issue34582] VSTS builds should use new YAML syntax and pools

2018-09-04 Thread Roundup Robot


Change by Roundup Robot :


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

___
Python tracker 

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



[issue34582] VSTS builds should use new YAML syntax and pools

2018-09-04 Thread David Staheli


Change by David Staheli :


--
nosy: David Staheli
priority: normal
severity: normal
status: open
title: VSTS builds should use new YAML syntax and pools

___
Python tracker 

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



[issue33083] math.factorial accepts non-integral Decimal instances

2018-09-04 Thread STINNER Victor


STINNER Victor  added the comment:

I agree to not backport the change to 3.7 and older. The change can be seen as 
subtle behaviour change which breaks backward compatibility.

--
status: pending -> 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



[issue34581] Windows : use of __pragma msvc extension without ifdef

2018-09-04 Thread Erik Janssens


Change by Erik Janssens :


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

___
Python tracker 

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



[issue34581] Windows : use of __pragma msvc extension without ifdef

2018-09-04 Thread Erik Janssens


New submission from Erik Janssens :

The socketmodule uses the MSVC extension __pragma.

The use of this extension is not enabled/disable by an #ifdef _MSC_VER.

This prevents compilation with other compilers then MSVC on Windows.

--
components: Extension Modules
messages: 324603
nosy: erikjanss
priority: normal
severity: normal
status: open
title: Windows : use of __pragma msvc extension without ifdef
type: compile error
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



[issue33083] math.factorial accepts non-integral Decimal instances

2018-09-04 Thread Mark Dickinson


Change by Mark Dickinson :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> pending

___
Python tracker 

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



[issue33083] math.factorial accepts non-integral Decimal instances

2018-09-04 Thread Mark Dickinson


Mark Dickinson  added the comment:

The issue description mentions 3.7 and 2.7, but GH-6149 wasn't marked for 
backport. My feeling is that it isn't worth backporting the fix, in which case 
this issue can be closed.

--

___
Python tracker 

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



[issue34563] invalid assert on big output of multiprocessing.Process

2018-09-04 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset e8ca8806a9f47b3bac4ae1c6b8a54c47d1aad8f3 by Victor Stinner (Miss 
Islington (bot)) in branch '3.7':
bpo-34563: Fix for invalid assert on big output of multiprocessing.Process 
(GH-9027) (GH-9064)
https://github.com/python/cpython/commit/e8ca8806a9f47b3bac4ae1c6b8a54c47d1aad8f3


--

___
Python tracker 

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



[issue31226] shutil.rmtree fails when target has an internal directory junction (Windows)

2018-09-04 Thread Terry J. Reedy


Change by Terry J. Reedy :


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



[issue31512] Add non-elevated symlink support for dev mode Windows 10

2018-09-04 Thread Terry J. Reedy


Change by Terry J. Reedy :


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



[issue1654408] Windows installer should split tcl/tk and tkinter install options.

2018-09-04 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

In support of closing this, I note that we have gone the opposite direction on 
Mac, installing current tcl/tk together with _tkinter compiled against the 
tcl/tk being installed.

--
nosy:  -BreamoreBoy

___
Python tracker 

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



[issue34577] imaplib Cyrillic password

2018-09-04 Thread Christian Heimes


Christian Heimes  added the comment:

This is not a bug in Python's imaplib but a limitation of the LDAP protocol. 
It's not possible to enable UTF-8 mode before the session is authenticatd. 
LOGIN supports only ASCII user name and password. You have to use SASL PLAIN 
handshake with AUTHENTICATE, see https://tools.ietf.org/html/rfc6855.html#page-5

--
status:  -> open

___
Python tracker 

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



[issue8110] subprocess.py doesn't correctly detect Windows machines

2018-09-04 Thread Zachary Ware


Change by Zachary Ware :


--
nosy: +giampaolo.rodola, gregory.p.smith
versions: +Python 3.6, Python 3.7, Python 3.8 -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



[issue34561] Replace list sorting merge_collapse()?

2018-09-04 Thread Tim Peters


Tim Peters  added the comment:

"Galloping" is the heart & soul of Python's sorting algorithm.  It's explained 
in detail here:

https://github.com/python/cpython/blob/master/Objects/listsort.txt

The Java fork of the sorting code has had repeated bugs due to reducing the 
size of "the stack" used to hold merge states.  Read the papers already 
referenced for details about that.

There is no "bug" here in the Python version.  It's that the complex code Java 
keeps tripping over ;-) , _could_ (possibly) be replaced by simpler code where 
the max stack size needed is obvious; that (e.g.) 2-merge moves around less 
memory overall in some cases where the current scheme is particularly wasteful 
in this respect; and that Munro & Wild present more ambitious merge-ordering 
schemes that are said to be provably near-optimal in a broader sense than 
2-merge achieves.

--

___
Python tracker 

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



[issue34561] Replace list sorting merge_collapse()?

2018-09-04 Thread Koos Zevenhoven

Koos Zevenhoven  added the comment:

It doesn’t seem like there’s a real problem here, but you seem to suggest there 
would be some useful improvements possible here. I don’t know much about 
sorting algorithms per se. What do you mean by galloping?

--
nosy: +koos.zevenhoven

___
Python tracker 

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



[issue34565] Launcher does not validate major versions

2018-09-04 Thread miss-islington


Change by miss-islington :


--
pull_requests: +8525

___
Python tracker 

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



[issue34565] Launcher does not validate major versions

2018-09-04 Thread Steve Dower


Steve Dower  added the comment:


New changeset 3876af4f7c2ef87db6d2d83efc229955968926dd by Steve Dower (Brendan 
Gerrity) in branch 'master':
bpo-34565: Change a PC/launcher.c comment to accurately describe valid major 
versions. (GH-9037)
https://github.com/python/cpython/commit/3876af4f7c2ef87db6d2d83efc229955968926dd


--

___
Python tracker 

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



[issue34563] invalid assert on big output of multiprocessing.Process

2018-09-04 Thread miss-islington


Change by miss-islington :


--
pull_requests: +8524

___
Python tracker 

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



[issue34563] invalid assert on big output of multiprocessing.Process

2018-09-04 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 266f4904a222a784080e29aad0916849e507515d by Victor Stinner 
(Alexander Buchkovsky) in branch 'master':
bpo-34563: Fix for invalid assert on big output of multiprocessing.Process 
(GH-9027)
https://github.com/python/cpython/commit/266f4904a222a784080e29aad0916849e507515d


--
nosy: +vstinner

___
Python tracker 

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



[issue34575] Python 3.6 compilation fails on AppVeyor: libeay.lib was created with an older compiler

2018-09-04 Thread Steve Dower


Steve Dower  added the comment:

Works on VSTS build. I suspect AppVeyor is caching files between builds, but 
I'm not familiar enough with the configuration to fix that.

--

___
Python tracker 

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



[issue34577] imaplib Cyrillic password

2018-09-04 Thread Nikita Velykanov


Nikita Velykanov  added the comment:

Thank you for fast reply.
Here's full traceback for first case:

Traceback (most recent call last):
  File "some_my_file.py", line 10, in some_function
self.mail.login(login, password)
  File "/usr/lib64/python2.7/imaplib.py", line 518, in login
typ, dat = self._simple_command('LOGIN', user, self._quote(password))
  File "/usr/lib64/python2.7/imaplib.py", line 1083, in _simple_command
return self._command_complete(name, self._command(name, *args))
  File "/usr/lib64/python2.7/imaplib.py", line 870, in _command
self.send('%s%s' % (data, CRLF))
  File "/usr/lib64/python2.7/imaplib.py", line 1191, in send
sent = self.sslobj.write(data)
  File "/usr/lib64/python2.7/ssl.py", line 669, in write
return self._sslobj.write(data)
UnicodeEncodeError: 'ascii' codec can't encode characters in position 30-39: 
ordinal not in range(128)

Full traceback for second case:

Traceback (most recent call last):
  File "some_my_file.py", line 10, in some_function
self.mail.login(login, password)
  File "/usr/lib64/python2.7/imaplib.py", line 518, in login
typ, dat = self._simple_command('LOGIN', user, self._quote(password))
  File "/usr/lib64/python2.7/imaplib.py", line 1083, in _simple_command
return self._command_complete(name, self._command(name, *args))
  File "/usr/lib64/python2.7/imaplib.py", line 852, in _command
data = '%s %s' % (data, self._checkquote(arg))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xd0 in position 1: ordinal 
not in range(128)


But okay, even if encoding depends on target system and it's usually utf-8 so 
why string operations in imaplib are not in usual format but in some other?

--

___
Python tracker 

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



[issue34579] test_embed.InitConfigTests fail on AIX

2018-09-04 Thread Michael Felt


Change by Michael Felt :


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

___
Python tracker 

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



[issue34580] sqlite doc: clarify the scope of the context manager

2018-09-04 Thread Daniel Jakots


New submission from Daniel Jakots :

In my experience, the first encounter for beginners with the context manager is 
with files. The highlighted feature is that you don't need to close the file, 
'with' is going to do it for you.

The sqlite3 documentation talks about the context manager in "12.6.8.3. Using 
the connection as a context manager". The problem in my opinion is that people 
may believe that the context manager may manage the open/close which is not the 
case, reading the Modules/_sqlite/connection.c:pysqlite_connection_exit shows 
that it only does the commit or the rollback.

I'm not sure about the best fix. It can be either (or both) a sentence in the 
description and/or adding at then end of the code snippet "con.close()" to show 
that it still needs to be done.

Thanks!

--
messages: 324591
nosy: vigdis
priority: normal
severity: normal
status: open
title: sqlite doc: clarify the scope of the context manager
type: enhancement

___
Python tracker 

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



[issue34579] test_embed.InitConfigTests fail on AIX

2018-09-04 Thread Michael Felt


Change by Michael Felt :


--
components: +Tests
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



[issue34579] test_embed.InitConfigTests fail on AIX

2018-09-04 Thread Michael Felt


New submission from Michael Felt :

test_init_default_config (test.test_embed.InitConfigTests) ... FAIL
test_init_dev_mode (test.test_embed.InitConfigTests) ... FAIL
test_init_env (test.test_embed.InitConfigTests) ... FAIL
test_init_from_config (test.test_embed.InitConfigTests) ... ok
test_init_global_config (test.test_embed.InitConfigTests) ... FAIL
test_init_isolated (test.test_embed.InitConfigTests) ... FAIL

This seems to be caused because the dump_config() output is not
'(null)' for the keys allocator, program, and pycache_prefix.

When these are 'expected' to be '' (rather than '(null)', all tests pass.

See PR

--
messages: 324590
nosy: Michael.Felt
priority: normal
severity: normal
status: open
title: test_embed.InitConfigTests fail on AIX

___
Python tracker 

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



[issue34578] Pipenv lock : ModuleNotFoundError: No module named '_ctypes'

2018-09-04 Thread Arselon


New submission from Arselon :

I migrated from 3.6.6 to 3.7.
Error during command: pipenv lock (environment was created before successfully):
LOG:
PS C:\Program Files (x86)\Microsoft Visual 
Studio\Shared\Python\repos\DjangoPollsNew> pipenv lock
Locking [dev-packages] dependencies...
Locking [packages] dependencies...
ser\appdata\local\programs\python\python37\lib\site-packages\pipenv\vendor\click\core.py",
 line 8, in 
from .types import convert_type, IntRange, BOOL
  File 
"c:\users\user\appdata\local\programs\python\python37\lib\site-packages\pipenv\vendor\click\types.py",
 line 4, in 
from ._compat import open_stream, text_type, filename_to_ui, \
  File 
"c:\users\user\appdata\local\programs\python\python37\lib\site-packages\pipenv\vendor\click\_compat.py",
 line 536, in 
from ._winconsole import _get_windows_console_stream
  File 
"c:\users\user\appdata\local\programs\python\python37\lib\site-packages\pipenv\vendor\click\_winconsole.py",
 line 16, in 
import ctypes
  File 
"C:\Users\User\AppData\Local\Programs\Python\Python37\Lib\ctypes\__init__.py", 
line 7, in 
from _ctypes import Union, Structure, Array
ModuleNotFoundError: No module named '_ctypes'

What can I do?
I need to create new Pipfile.lock for heroku hosting.
Thanks in advance))

--
components: Library (Lib)
hgrepos: 378
messages: 324589
nosy: Arselon
priority: normal
severity: normal
status: open
title: Pipenv lock : ModuleNotFoundError: No module named '_ctypes'
type: crash
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



[issue26544] platform.libc_ver() returns incorrect version number

2018-09-04 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
pull_requests: +8522

___
Python tracker 

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



[issue26544] platform.libc_ver() returns incorrect version number

2018-09-04 Thread miss-islington


Change by miss-islington :


--
pull_requests: +8521

___
Python tracker 

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



[issue26544] platform.libc_ver() returns incorrect version number

2018-09-04 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset 20a8392cec2967f15ae81633c1775645b3ca40da by Serhiy Storchaka in 
branch '3.7':
[3.7] bpo-26544: Get rid of dependence from distutils in platform. (GH-8356). 
(GH-8970)
https://github.com/python/cpython/commit/20a8392cec2967f15ae81633c1775645b3ca40da


--

___
Python tracker 

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



[issue34577] imaplib Cyrillic password

2018-09-04 Thread Christian Heimes


Christian Heimes  added the comment:

You have cut off the exception message. Please provide a full traceback 
including the exception name and message.

Password algorithms typically handle only bytes. The encoding depends on your 
target system and is usually utf-8.

--
nosy: +christian.heimes

___
Python tracker 

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



[issue34577] imaplib Cyrillic password

2018-09-04 Thread Nikita Velykanov

New submission from Nikita Velykanov :

Let's consider there is an email box with password which contains Cyrillic 
symbols. When loging in

  imaplib.IMAP4_SSL(host, port).login(login, password)

password field is passed as "кириллица" (type is str, not unicode).
Then, I get this traceback:

  File "/usr/lib64/python2.7/imaplib.py", line 518, in login
typ, dat = self._simple_command('LOGIN', user, self._quote(password))
  File "/usr/lib64/python2.7/imaplib.py", line 1083, in _simple_command
return self._command_complete(name, self._command(name, *args))
  File "/usr/lib64/python2.7/imaplib.py", line 870, in _command
self.send('%s%s' % (data, CRLF))
  File "/usr/lib64/python2.7/imaplib.py", line 1191, in send
sent = self.sslobj.write(data)
  File "/usr/lib64/python2.7/ssl.py", line 669, in write
return self._sslobj.write(data)

This is because self._sslobj.write method requires unicode string.

In other case, if password field is passed as u"кириллица" (type unicode, not 
str), I get another traceback:

  File "/usr/lib64/python2.7/imaplib.py", line 518, in login
typ, dat = self._simple_command('LOGIN', user, self._quote(password))
  File "/usr/lib64/python2.7/imaplib.py", line 1083, in _simple_command
return self._command_complete(name, self._command(name, *args))
  File "/usr/lib64/python2.7/imaplib.py", line 852, in _command
data = '%s %s' % (data, self._checkquote(arg))

It's because '%s' % u"some unicode string" doesn't work.

I guess the problem was described in details.
The problem is that two different libraries are using different string types 
but they must be agreed.

--
components: Library (Lib), Unicode
messages: 324586
nosy: Nikita Velykanov, ezio.melotti, vstinner
priority: normal
severity: normal
status: open
title: imaplib Cyrillic password
type: behavior
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



[issue34546] Add encryption support to zipfile

2018-09-04 Thread Roundup Robot


Change by Roundup Robot :


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

___
Python tracker 

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



[issue34549] unittest docs could use another header

2018-09-04 Thread Nick


Nick  added the comment:

Ah, yes! Was searching for one of those helpful "Permalink to this ___" 
options. Didn't even see the link at the top.

Thank you!

--

___
Python tracker 

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



[issue34549] unittest docs could use another header

2018-09-04 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

Are you asking for a separate section grouping together all the assert methods 
from different parts which I think is useful. If you are looking for a better 
link then there is a link in the below text at the start of the page 

> If you are already familiar with the basic concepts of testing, you might 
> want to skip to the list of assert methods.

The text "list of assert methods" links to 
https://docs.python.org/3.7/library/unittest.html#assert-methods which I hope 
is what you are looking for.


Thanks

--
nosy: +xtreak

___
Python tracker 

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



[issue34576] SimpleHTTPServer: warn users on security

2018-09-04 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +xtreak

___
Python tracker 

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



[issue34576] SimpleHTTPServer: warn users on security

2018-09-04 Thread STINNER Victor


STINNER Victor  added the comment:

> The SimpleHTTPServer module has been merged into http.server in Python 3. So 
> we add this to python2 document?

The node should be added to Python 2 and Python 3 documentations.

--

___
Python tracker 

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



[issue26544] platform.libc_ver() returns incorrect version number

2018-09-04 Thread STINNER Victor


STINNER Victor  added the comment:

Thanks for adding tests ;-) It now looks better to me ;-)

--

___
Python tracker 

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



[issue26544] platform.libc_ver() returns incorrect version number

2018-09-04 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset 7917aadb3edb7616d6164c5eaba24df6ac0a5fc6 by Serhiy Storchaka in 
branch 'master':
bpo-26544: Add test for platform._comparable_version(). (GH-8973)
https://github.com/python/cpython/commit/7917aadb3edb7616d6164c5eaba24df6ac0a5fc6


--

___
Python tracker 

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



[issue16438] Numeric operator predecence confusing

2018-09-04 Thread Mark Lawrence


Change by Mark Lawrence :


--
nosy:  -BreamoreBoy

___
Python tracker 

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



[issue8110] subprocess.py doesn't correctly detect Windows machines

2018-09-04 Thread Mark Lawrence


Change by Mark Lawrence :


--
nosy:  -BreamoreBoy

___
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

2018-09-04 Thread Sergey Fedoseev


Change by Sergey Fedoseev :


--
pull_requests: +8519

___
Python tracker 

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



[issue34573] Simplify __reduce__() of set and dict iterators.

2018-09-04 Thread Kristján Valur Jónsson

Kristján Valur Jónsson  added the comment:

Interesting, I'll have a look when I'm back from vacation.

On Tue, 4 Sep 2018, 07:04 Raymond Hettinger,  wrote:

>
> Raymond Hettinger  added the comment:
>
> Also take a look at the other places that have similar logic.  I believe
> these all went in at the same time. See commit
> 31668b8f7a3efc7b17511bb08525b28e8ff5f23a
>
> --
> nosy: +kristjan.jonsson, rhettinger
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue34576] SimpleHTTPServer: warn users on security

2018-09-04 Thread Windson Yang


Windson Yang  added the comment:

The SimpleHTTPServer module has been merged into http.server in Python 3. So we 
add this to python2 document?

--
nosy: +Windson Yang

___
Python tracker 

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



[issue34530] distutils: find_executable() fails if the PATH environment variable is not set

2018-09-04 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 7056ca880bf4ff428dfb2c4eee67919dc43ecd34 by Victor Stinner in 
branch '2.7':
bpo-34530: Fix distutils find_executable() (GH-9049) (GH-9058)
https://github.com/python/cpython/commit/7056ca880bf4ff428dfb2c4eee67919dc43ecd34


--

___
Python tracker 

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



[issue34576] SimpleHTTPServer: warn users on security

2018-09-04 Thread STINNER Victor


New submission from STINNER Victor :

Larry Hastings proposed on the PSRT mailing list to add the following note of 
the SimpleHTTPServer documentation:

Note: SimpleHTTPServer is, as its name implies, a simple HTTP
server.  We provide it as a sample implementation of the Python HTTP
server API.  However, SimpleHTTPServer is neither secure nor
high-performance, and as such you should not use SimpleHTTPServer in
security-sensitive or performance-sensitive applications.

For example, if you create a symbolic link outside the directory served by 
SimpleHTTPServer, SimpleHTTPServer follows symbolic links.

--
components: Library (Lib)
messages: 324577
nosy: vstinner
priority: normal
severity: normal
status: open
title: SimpleHTTPServer: warn users on security
type: security
versions: Python 2.7, 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



[issue34246] Gentoo Refleaks 3.7: test_smtplib has dangling threads

2018-09-04 Thread STINNER Victor


Change by STINNER Victor :


--
nosy: +vstinner

___
Python tracker 

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



[issue34575] Python 3.6 compilation fails on AppVeyor: libeay.lib was created with an older compiler

2018-09-04 Thread STINNER Victor


New submission from STINNER Victor :

Example on my PR:
https://github.com/python/cpython/pull/9057

https://ci.appveyor.com/project/python/cpython/build/3.6build21480/job/lge7r4qknx0t0tlv

LINK : fatal error C1047: The object or library file 
'C:\projects\cpython\PCBuild\win32\libeay.lib' was created with an older 
compiler than other objects; rebuild old objects and libraries 
[C:\projects\cpython\PCbuild\_hashlib.vcxproj]
LINK : fatal error LNK1257: code generation failed 
[C:\projects\cpython\PCbuild\_hashlib.vcxproj]
LINK : fatal error C1047: The object or library file 
'C:\projects\cpython\PCBuild\win32\libeay.lib' was created with an older 
compiler than other objects; rebuild old objects and libraries 
[C:\projects\cpython\PCbuild\_ssl.vcxproj]
LINK : fatal error LNK1257: code generation failed 
[C:\projects\cpython\PCbuild\_ssl.vcxproj]
Command exited with code 1

--
components: Build, Windows
messages: 324576
nosy: paul.moore, steve.dower, tim.golden, vstinner, zach.ware
priority: normal
severity: normal
status: open
title: Python 3.6 compilation fails on AppVeyor: libeay.lib was created with an 
older compiler
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



[issue34530] distutils: find_executable() fails if the PATH environment variable is not set

2018-09-04 Thread miss-islington


miss-islington  added the comment:


New changeset 7aa3eadca2a50ce651ce603d6100b05bb7106f1c by Miss Islington (bot) 
in branch '3.7':
bpo-34530: Fix distutils find_executable() (GH-9049)
https://github.com/python/cpython/commit/7aa3eadca2a50ce651ce603d6100b05bb7106f1c


--
nosy: +miss-islington

___
Python tracker 

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



[issue33613] test_multiprocessing_fork: test_semaphore_tracker_sigint() fails with -W error

2018-09-04 Thread STINNER Victor


STINNER Victor  added the comment:

> Which bug? It's only a failing test.

Linux vendors run the full test suite. If the test suite fails, the build of 
the package fails as well. It's annoying.

--

___
Python tracker 

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



[issue33613] test_multiprocessing_fork: test_semaphore_tracker_sigint() fails with -W error

2018-09-04 Thread Antoine Pitrou


Antoine Pitrou  added the comment:

I don't want to spend hours arguing.  This issue is sufficiently rare and 
unlikely in normal conditions that I don't think we should risk regressions by 
trying to fix it.

--

___
Python tracker 

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



[issue34530] distutils: find_executable() fails if the PATH environment variable is not set

2018-09-04 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +8518

___
Python tracker 

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



[issue33613] test_multiprocessing_fork: test_semaphore_tracker_sigint() fails with -W error

2018-09-04 Thread STINNER Victor


STINNER Victor  added the comment:

By the way, "no user-visible bug is fixed here": I agree that it's not easy to 
trigger manually the bug (when pressing CTRL+C), but I don't see why an user 
couldn't hit this bug. The race condition is now obvious to me.

--

___
Python tracker 

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



[issue33613] test_multiprocessing_fork: test_semaphore_tracker_sigint() fails with -W error

2018-09-04 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Le 04/09/2018 à 11:16, STINNER Victor a écrit :
> 
>> They work fine otherwise.
> 
> The race condition impacts everyone. It's just less likely if your computer 
> is fast enough. The bug is much more likely if you "force" the bad path:

Which bug? It's only a failing test.

--

___
Python tracker 

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



[issue33613] test_multiprocessing_fork: test_semaphore_tracker_sigint() fails with -W error

2018-09-04 Thread STINNER Victor


STINNER Victor  added the comment:

> Please only skip those tests on buildbots.

There is no easy wait to only skip a test on buildbots.

> They work fine otherwise.

The race condition impacts everyone. It's just less likely if your computer is 
fast enough. The bug is much more likely if you "force" the bad path:

diff --git a/Lib/multiprocessing/semaphore_tracker.py 
b/Lib/multiprocessing/semaphore_tracker.py
index 3b50a46ddc..7261b43725 100644
--- a/Lib/multiprocessing/semaphore_tracker.py
+++ b/Lib/multiprocessing/semaphore_tracker.py
@@ -107,6 +107,8 @@ getfd = _semaphore_tracker.getfd
 def main(fd):
 '''Run semaphore tracker.'''
 # protect the process from ^C and "killall python" etc
+import time
+time.sleep(0.5)
 signal.signal(signal.SIGINT, signal.SIG_IGN)
 signal.signal(signal.SIGTERM, signal.SIG_IGN)
 
diff --git a/Lib/test/_test_multiprocessing.py 
b/Lib/test/_test_multiprocessing.py
index 5c625dd495..6f9f7583e2 100644
--- a/Lib/test/_test_multiprocessing.py
+++ b/Lib/test/_test_multiprocessing.py
@@ -4193,7 +4193,6 @@ class TestSemaphoreTracker(unittest.TestCase):
 _multiprocessing.sem_unlink(name1)
 p.terminate()
 p.wait()
-time.sleep(2.0)
 with self.assertRaises(OSError) as ctx:
 _multiprocessing.sem_unlink(name2)
 # docs say it should be ENOENT, but OSX seems to give EINVAL

--

___
Python tracker 

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



[issue33613] test_multiprocessing_fork: test_semaphore_tracker_sigint() fails with -W error

2018-09-04 Thread Antoine Pitrou


Antoine Pitrou  added the comment:

Please only skip those tests on buildbots. They work fine otherwise.

--

___
Python tracker 

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



[issue33613] test_multiprocessing_fork: test_semaphore_tracker_sigint() fails with -W error

2018-09-04 Thread STINNER Victor


STINNER Victor  added the comment:

> If buildbots hurt, I suggest skipping the tests on the buildbots.

Let's do that. Pablo: do you want to write a PR to always skip 
TestSemaphoreTracker with a reference to this issue? Example: skipIf(True, 
"bpo-33613: the test has a race condition").

--

___
Python tracker 

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



[issue34530] distutils: find_executable() fails if the PATH environment variable is not set

2018-09-04 Thread miss-islington


Change by miss-islington :


--
pull_requests: +8517

___
Python tracker 

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



[issue33613] test_multiprocessing_fork: test_semaphore_tracker_sigint() fails with -W error

2018-09-04 Thread Antoine Pitrou


Antoine Pitrou  added the comment:

As I wrote on Github: no user-visible bug is fixed here, and we shouldn't risk 
introducing regressions by backporting those changes.

If buildbots hurt, I suggest skipping the tests on the buildbots.

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



[issue34530] distutils: find_executable() fails if the PATH environment variable is not set

2018-09-04 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 39487196c87e28128ea907a0d9b8a88ba53f68d5 by Victor Stinner in 
branch 'master':
bpo-34530: Fix distutils find_executable() (GH-9049)
https://github.com/python/cpython/commit/39487196c87e28128ea907a0d9b8a88ba53f68d5


--

___
Python tracker 

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



[issue34530] distutils: find_executable() fails if the PATH environment variable is not set

2018-09-04 Thread miss-islington


Change by miss-islington :


--
pull_requests: +8516

___
Python tracker 

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



[issue33613] test_multiprocessing_fork: test_semaphore_tracker_sigint() fails with -W error

2018-09-04 Thread STINNER Victor


STINNER Victor  added the comment:

IMHO the fix should be backported to Python 3.6 and 3.7.

It cannot be backported to 2.7 since 2.7 doesn't have signal.pthread_sigmask().

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



[issue33613] test_multiprocessing_fork: test_semaphore_tracker_sigint() fails with -W error

2018-09-04 Thread miss-islington


Change by miss-islington :


--
pull_requests: +8515

___
Python tracker 

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



[issue33613] test_multiprocessing_fork: test_semaphore_tracker_sigint() fails with -W error

2018-09-04 Thread Antoine Pitrou


Antoine Pitrou  added the comment:


New changeset ec74d187f50a8a48f94eb37023300583fbd644cc by Antoine Pitrou (Pablo 
Galindo) in branch 'master':
bpo-33613, test_semaphore_tracker_sigint: fix race condition (#7850)
https://github.com/python/cpython/commit/ec74d187f50a8a48f94eb37023300583fbd644cc


--

___
Python tracker 

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



[issue34570] Segmentation fault in _PyType_Lookup

2018-09-04 Thread STINNER Victor


STINNER Victor  added the comment:

You can install and enable faulthandler to get the Python traceback where the 
bug occurs. It is likely that the bug comes from a third party C extension.

What are the C extensions used by pybot?

--
nosy: +vstinner

___
Python tracker 

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



[issue34570] Segmentation fault in _PyType_Lookup

2018-09-04 Thread Pablosky


Pablosky  added the comment:

My system is Hp Z4 with 128GB ram. It is not rather problem of lack of memory. 
When I monitored free memory it took at most 30GB when these 20 pybots were 
working.

I wonder if it is possible that these separate programs (pybots) interfere each 
other. I mean that sharing the same modules/libraries cause that situations. 
Maybe one instance is recompiling py module to pyc at the same time when this 
is used by another process. Is it possible?

I have never caught segfault when there was only one instance of pybot.

BTW I caught 3 more different cores. I consider reinstalling my whole system 
(maybe Ubuntu 18.04). Maybe my system is broken.

--

___
Python tracker 

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



[issue16438] Numeric operator predecence confusing

2018-09-04 Thread ron


ron  added the comment:

Any progress on this?

--
nosy: +ronron

___
Python tracker 

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



[issue34569] test__xxsubinterpreters.ShareableTypeTests._assert_values fails on AIX - 32-bit mode

2018-09-04 Thread Michael Felt


Change by Michael Felt :


--
components: +Tests

___
Python tracker 

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



[issue34569] test__xxsubinterpreters.ShareableTypeTests._assert_values fails on AIX - 32-bit mode

2018-09-04 Thread Michael Felt


Michael Felt  added the comment:

64-bit mode, no error.

root@x066:[/data/prj/python/python3-3.8.0]./python -m test -v 
test__xxsubinterpreters
== CPython 3.8.0a0 (heads/master-dirty:d500e5307a, Sep 3 2018, 13:55:44) [C]
== AIX-1-00C291F54C00-powerpc-64bit-COFF big-endian
== cwd: /data/prj/python/python3-3.8.0/build/test_python_16908532
== CPU count: 8
== encodings: locale=ISO8859-1, FS=iso8859-1
Run tests sequentially
0:00:00 [1/1] test__xxsubinterpreters
test_bad_id (test.test__xxsubinterpreters.ChannelIDTests) ... ok
...
test_int (test.test__xxsubinterpreters.ShareableTypeTests) ... ok
test_singletons (test.test__xxsubinterpreters.ShareableTypeTests) ... ok
test_types (test.test__xxsubinterpreters.ShareableTypeTests) ... ok

--
Ran 111 tests in 4.572s

OK (skipped=5)

== Tests result: SUCCESS ==

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



[issue34461] Availability of parsers in etree initializer

2018-09-04 Thread nilanjan roy


nilanjan roy  added the comment:

@serhiy.storchaka: 

If I concur with your comment then probably declaration of *__all__** over xml 
initializer(__init__) is little contradictory - because whenever we declare 
__all__ to enable global-scope means API provides the flexibility to use * 
during package import. Now this is totally depends on developer how the script 
need to optimize/simulate during development. Yes agree * should not be used 
due to high reference of memory usage. But as far __init__.py of xml and python 
convention this should not be explicitly restricted

--

___
Python tracker 

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



[issue34516] httplib sets unbefitting "Host" in request header when requests an ipv6 format url.

2018-09-04 Thread chen wu


chen wu  added the comment:

to fix this, we change the code of our urilib3. before passing params to 
httplib, we set Host in headers if it's ipv6 address.

Thanks so much.

--
resolution: duplicate -> not a bug
stage:  -> resolved
status: pending -> closed

___
Python tracker 

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



[issue24698] get_externals.bat script fails

2018-09-04 Thread Zachary Ware


Zachary Ware  added the comment:

Closing as "out of date"; we no longer use svn to fetch external sources.

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



[issue24401] Windows 8.1 install gives DLL required to complete could not run

2018-09-04 Thread Zachary Ware


Change by Zachary Ware :


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