[issue27410] DLL hijacking vulnerability in Python 3.5.2 installer

2016-06-28 Thread Berker Peksag

Changes by Berker Peksag :


--
nosy: +steve.dower

___
Python tracker 

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



[issue17911] traceback: add a new thin class storing a traceback without storing local variables

2016-06-28 Thread Martin Panter

Martin Panter added the comment:

Robert: in issue17911-2.patch (and the eventual commit) you added a check for 
value == 'None' in _format_final_exc_line(). Why was this necessary? I think it 
is the cause of my Issue 27348 regression:

>>> traceback.format_exception(Exception, Exception("One"), None)
['Exception: One\n']
>>> traceback.format_exception(Exception, Exception("None"), None)
['Exception\n']

--
nosy: +martin.panter

___
Python tracker 

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



[issue27348] traceback (and threading) drops exception message

2016-06-28 Thread Martin Panter

Martin Panter added the comment:

I traced this back to revision 73afda5a4e4c (Issue 17911), which includes this 
change to traceback._format_final_exc_line():

-if value is None or not valuestr:
+if value == 'None' or value is None or not valuestr:

--
components: +Library (Lib)
keywords: +3.5regression
title: Non-main thread exception handler drops exception message -> traceback 
(and threading) drops exception message
type:  -> behavior

___
Python tracker 

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



[issue26226] Various test suite failures on Windows

2016-06-28 Thread Emanuel Barry

Emanuel Barry added the comment:

That is good to know, thanks Eryk for the explanation! I also think making 
Python set LC_CTYPE on startup on Windows would be good.

Martin's comment got me wondering, so I'm going to try to see if all modules 
properly got re-compiled, and re-run tests. I'll also run test_distutils 
through the command line to see if it passes. Following that, I'll branch off 
the relevant issues; and hopefully close this one too (I realize that it 
started going in all directions, it's hard to keep track even for me now).

--

___
Python tracker 

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



[issue26226] Various test suite failures on Windows

2016-06-28 Thread Eryk Sun

Eryk Sun added the comment:

time.strftime calls the CRT's strftime function, which the Windows universal 
CRT implements by calling wcsftime and encoding the result. The timezone name 
is actually stored as a char string (tzname), so wcsftime has to decode it via 
mbstowcs. 

The problem is that in the C locale tzname is an ANSI (1252) string while 
mbstowcs simply casts to wchar_t, which is the same as decoding as Latin-1. 
This works fine for "é" (U+00E9). But the right single quote character (U+2019) 
is "\x92" in 1252, and a simple cast maps it to the non-character U+0092. 

When the CRT's strftime encodes this back as an ANSI string, it maps U+0092 to 
the replacement character for 1252, a question mark. Similarly, time.tzname 
decodes the tzname ANSI strings using mbstowcs, with the same mismatch between 
LC_CTYPE and LC_TIME, resulting in the string "Est (heure d\x92été)"

In summary, the problem is that LC_TIME uses ANSI in the C locale, while 
LC_CTYPE uses Latin-1. A workaround (in most cases) is to delay importing the 
time module until after setting LC_CTYPE (also setting LC_TIME should cover all 
cases). For example:

>>> import sys, locale
>>> 'time' in sys.modules
False
>>> locale.setlocale(locale.LC_CTYPE, '')
'French_France.1252'
>>> import time
>>> time.tzname
('Est', 'Est (heure d’été)')
>>> time.strftime('%Z')
'Est (heure d’été)'

Note that Unix Python 3 sets LC_CTYPE at startup, so doing the same on Windows 
would actually improve cross-platform consistency.

--
nosy: +eryksun

___
Python tracker 

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



[issue27410] DLL hijacking vulnerability in Python 3.5.2 installer

2016-06-28 Thread anandbhat

Changes by anandbhat :


Added file: http://bugs.python.org/file43576/Python_3.5.2_64_exe_DLL_Hijack.PNG

___
Python tracker 

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



[issue27410] DLL hijacking vulnerability in Python 3.5.2 installer

2016-06-28 Thread anandbhat

Changes by anandbhat :


Removed file: 
http://bugs.python.org/file43574/Python_3.5.2_64_exe_DLL_Hijack.PNG

___
Python tracker 

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



[issue27410] DLL hijacking vulnerability in Python 3.5.2 installer

2016-06-28 Thread anandbhat

Changes by anandbhat :


Added file: 
http://bugs.python.org/file43575/Python_3.5.2_64_exe_version_DLL_Hijack.PNG

___
Python tracker 

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



[issue27410] DLL hijacking vulnerability in Python 3.5.2 installer

2016-06-28 Thread anandbhat

New submission from anandbhat:

The Python 3.5.2 Windows x86-64 executable installer (MD5: 
4da6dbc8e43e2249a0892d257e977291) downloaded from 
https://www.python.org/ftp/python/3.5.2/python-3.5.2-amd64.exe is vulnerable to 
DLL hijacking.

The installer attempts to load DLLs from the current directory, which in most 
cases, is the Downloads directory. As explained in 
http://blog.opensecurityresearch.com/2014/01/unsafe-dll-loading-vulnerabilities.html
 and https://textslashplain.com/2015/12/18/dll-hijacking-just-wont-die/, 
installers that are vulnerable to DLL hijacking can be used to load untrusted 
and malicious DLLs. A maliciously crafted DLL when dropped into the user's 
Downloads directory will be executed by this installer.

System used for testing: Windows 10

Steps to reproduce:

1. Download a dummy DLL file for this demo -- version.dll -- from 
https://www.dropbox.com/s/3l5qwz7ppevs9za/version.dll?dl=0 and place it in the 
default Downloads directory. Virustotal report for this file: 
https://www.virustotal.com/en/file/29b51fdb8e498ef5d3fe05e924e23fcaffa554d64fb024b042101236028242b0/analysis/1467171188/

2. Download the Python 3.5.2 Windows x86-64 executable installer (MD5: 
4da6dbc8e43e2249a0892d257e977291) from 
https://www.python.org/ftp/python/3.5.2/python-3.5.2-amd64.exe and save it to 
the default Downloads directory (e.g., C:\Users\xxx\Downloads)

3. Attempt to run the downloaded installer.

4. Windows loads version.dll placed in step [1]. This is just one of several 
DLLs that can be exploited.

Attached are screen captures from Process Monitor 
(https://technet.microsoft.com/en-us/sysinternals/processmonitor.aspx) in a 
Windows 10 environment with filters (listed below) that show the DLLs looked 
for by the installer in the Downloads directory.

Process Monitor filters:
Inclusion:

Process Name beginswith python,
Path beginswith 
Operation is Load Image
Operation is CreateImage
Exclusion:

Path endswith .ini
Path contains .exe

--
components: Installation
files: Python_3.5.2_64_exe_DLL_Hijack.PNG
messages: 269461
nosy: anandbhat
priority: normal
severity: normal
status: open
title: DLL hijacking vulnerability in Python 3.5.2 installer
type: security
versions: Python 3.5
Added file: http://bugs.python.org/file43574/Python_3.5.2_64_exe_DLL_Hijack.PNG

___
Python tracker 

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



[issue27409] List socket.SO_*, SCM_*, MSG_*, IPPROTO_* symbols

2016-06-28 Thread Martin Panter

New submission from Martin Panter:

The documentation just says that SO_* etc constants are defined. However when 
people add new ones, they add them as new features to a specific version (not 
backported as bug fixes), but do not alter the documentation at all. IMO it is 
silly adding undocumented features. E.g. Issue 26907 was opened to add (among 
others) SO_PASSCRED, which was already added, undocumented, as part of Issue 
6560.

This patch attempts to indicate which symbols are defined by Python (depending 
on OS availability), and therefore one can deduce if Python does not define a 
particular symbol. It could be adapted to the 2.7 documentation, but I am not 
really motivated for that on my own.

I also remove a redundant definition in the module, and removed a conditional 
because SO_REUSEADDR is required to always be defined according to the test 
suite. These specific changes should only be applied to 3.6.

I also found Issue 1732367, which has a patch documenting each AF_* symbol in a 
little more detail. That patch was never updated nor comitted, but it sounds 
like this kind of addition might be acceptable.

--
assignee: docs@python
components: Documentation
files: socket-const.patch
keywords: patch
messages: 269460
nosy: docs@python, martin.panter
priority: normal
severity: normal
stage: patch review
status: open
title: List socket.SO_*, SCM_*, MSG_*, IPPROTO_* symbols
versions: Python 3.5, Python 3.6
Added file: http://bugs.python.org/file43573/socket-const.patch

___
Python tracker 

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



[issue1732367] Document the constants in the socket module

2016-06-28 Thread Martin Panter

Martin Panter added the comment:

Reopening because the consensus seems to be to update and apply this sort of 
change.

--
nosy: +martin.panter
stage:  -> needs patch
status: closed -> open

___
Python tracker 

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



[issue27408] Document importlib.abc.ExecutionLoader implements get_data()

2016-06-28 Thread Brett Cannon

New submission from Brett Cannon:

The fact that importlib.abc.ExectionLoader.get_data() is implemented is missing 
(or put another way, it isn't documented that get_source() still needs to be 
implemented).

--
assignee: docs@python
components: Documentation
messages: 269458
nosy: brett.cannon, docs@python
priority: normal
severity: normal
stage: needs patch
status: open
title: Document importlib.abc.ExecutionLoader implements get_data()
versions: 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



[issue19802] socket.SO_PRIORITY is missing

2016-06-28 Thread Larry Hastings

Larry Hastings added the comment:

Sorry, this is now too late for 3.4.  3.4 is now in "security fixes only" mode. 
 This is not a security fix, therefore 3.4 is now ineligible.

Since this change was committed to 3.5, it's better to let the historical 
record reflect that.  So I'm changing the version back to 3.5 (and not 3.4).

--
versions: +Python 3.5 -Python 3.4

___
Python tracker 

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



[issue19802] socket.SO_PRIORITY is missing

2016-06-28 Thread Martin Panter

Changes by Martin Panter :


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



[issue22970] asyncio: Cancelling wait() after notification leaves Condition in an inconsistent state

2016-06-28 Thread Jesús Cea Avión

Changes by Jesús Cea Avión :


--
nosy: +jcea

___
Python tracker 

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



[issue27377] Add smarter socket.fromfd()

2016-06-28 Thread Martin Panter

Martin Panter added the comment:

The s.detach() thing isn’t a big deal, but I thought it would simplify the code 
(eliminate the need for the “finally” clause).

I will try to propose a minor documentation update for SO_PASSCRED as a 
starting point for adding the others.

--

___
Python tracker 

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



[issue26226] Various test suite failures on Windows

2016-06-28 Thread Martin Panter

Martin Panter added the comment:

test_distutils: Is the failure the same as before, or changed? Are you testing 
with new code that includes the Issue 27048 fix? It looks like test_distutils 
doesn’t support running directly via “unittest”. Perhaps try “python -m test -W 
test_distutils” or similar if you were previously only trying unittest.

Some of your new failures look like symptoms of running the test suite on 
out-of-date compiled modules. For test_ctypes, see Issue 27343; test_getargs2: 
Issue 26282; test_capi: Issue 26168.

strptime: Maybe the test suite is trying to report a string that contains both 
U+0092 and “é”, but cannot encode U+0092, and uses backslashreplace error 
handler.

--

___
Python tracker 

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



[issue27384] itertools islice consumes items when given negative range

2016-06-28 Thread Raymond Hettinger

Raymond Hettinger added the comment:

"Surprising" is in the eye of the beholder.  Having islice() always consume at 
least "start" number of values seems reasonable enough and it is the documented 
behavior: "If start is non-zero, then elements from the iterable are skipped 
until start is reached. ... If stop is None, then iteration continues until the 
iterator is exhausted, if at all; otherwise, it stops at the specified 
position."  

That covers a lot of cases including the existing consume() recipe and what 
happens to the iterator if it supplies fewer than start elements: 
it=iter('abc'); list(islice(it, 4, 4)); print(list(it)).  Also, to my eyes, the 
current behavior seems like a natural and smooth transition as the arguments 
transition towards cross-over:

>>> from itertools import islice

>>> it = iter('ABCDEFG'); print(list(islice(it, 2, 4)), list(it))
['C', 'D'] ['E', 'F', 'G']
>>> it = iter('ABCDEFG'); print(list(islice(it, 2, 3)), list(it))
['C'] ['D', 'E', 'F', 'G']
>>> it = iter('ABCDEFG'); print(list(islice(it, 2, 2)), list(it))
[] ['C', 'D', 'E', 'F', 'G']
>>> it = iter('ABCDEFG'); print(list(islice(it, 2, 1)), list(it))
[] ['C', 'D', 'E', 'F', 'G']
>>> it = iter('ABCDEFG'); print(list(islice(it, 2, 0)), list(it))
[] ['C', 'D', 'E', 'F', 'G']

>>> it = iter('ABCDEFG'); print(list(islice(it, 0, 2)), list(it))
['A', 'B'] ['C', 'D', 'E', 'F', 'G']
>>> it = iter('ABCDEFG'); print(list(islice(it, 1, 2)), list(it))
['B'] ['C', 'D', 'E', 'F', 'G']
>>> it = iter('ABCDEFG'); print(list(islice(it, 2, 2)), list(it))
[] ['C', 'D', 'E', 'F', 'G']
>>> it = iter('ABCDEFG'); print(list(islice(it, 3, 2)), list(it))
[] ['D', 'E', 'F', 'G']
>>> it = iter('ABCDEFG'); print(list(islice(it, 4, 2)), list(it))
[] ['E', 'F', 'G']

Putting in your suggested optimization to treat start > stop as being fully 
consumed from the outset would have some big disadvantages.  It would break 
existing code relying on the current reasonable and documented behavior of 
always eating at least "start" elements.  And it would incentivize a new and 
weird idiom for "consume" as islice(it, n, 0).

As far as I can tell, the current behavior hasn't been problematic for anyone 
in the almost 15 year history of the itertools module, so it is hard to get 
excited enough about this to want to incur those disadvantages.

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

___
Python tracker 

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



[issue4945] json checks True/False by identity, not boolean value

2016-06-28 Thread Raymond Hettinger

Raymond Hettinger added the comment:

These latest two patches look fine.  Go ahead with them.

--

___
Python tracker 

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



[issue26844] Wrong error message during import

2016-06-28 Thread Brett Cannon

Brett Cannon added the comment:

Should we use __qualname__ instead of __name__?

And I haven't forgotten about your patch, Lev. I'm just occupied trying to get 
feature changes into Python 3.6 as that has a sooner deadline than bug fixes.

--

___
Python tracker 

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



[issue27377] Add smarter socket.fromfd()

2016-06-28 Thread Neil Schemenauer

Neil Schemenauer added the comment:

I've revised the patch based on the second round of comments from Martin.  I've 
removed the ifdef test for CO_TYPE and assumed it is always available.  That 
means fdtype() should be available on all platforms.

I did not change the test as suggested to call s.detach(), I think my test code 
should work okay.  The compare of 'protocol' has been removed from the test.

The duplicate definition of SO_PASSCRED has been removed.  I didn't add the 
constants to the documentation as other constants are only documented on a 
wildcard basis (e.g. SO_*).

--
Added file: http://bugs.python.org/file43572/fromfd2_v3.txt

___
Python tracker 

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



[issue27407] prepare_ssl.py missing in PCBuild folder

2016-06-28 Thread Zachary Ware

Zachary Ware added the comment:

You can also use PC/VS9.0/build_ssl.py which was the progenitor of 
prepare_ssl.py. The project files in PC/VS9.0 will use build_ssl.py by default.

FTR, I'm good with copying prepare_ssl.py to 2.7, and even with ensuring that 
it's 2.7 compatible (it probably already is), but I want it to match between 
branches and it must be Python 3 compatible.

--

___
Python tracker 

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



[issue27383] executuable in distutils triggering microsoft anti virus

2016-06-28 Thread Rob Bairos

Rob Bairos added the comment:

Great. Thanks for the update

On Tue, Jun 28, 2016 at 2:37 PM, Steve Dower  wrote:

>
> Steve Dower added the comment:
>
> FYI the definitions have been updated and I'm no longer seeing the false
> positive.
>
> Definition version: 1.223.2858.0
>
> --
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue27383] executuable in distutils triggering microsoft anti virus

2016-06-28 Thread Steve Dower

Steve Dower added the comment:

FYI the definitions have been updated and I'm no longer seeing the false 
positive.

Definition version: 1.223.2858.0

--

___
Python tracker 

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



[issue27402] Sequence example in typing module documentation does not typecheck

2016-06-28 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 0aec17c8f434 by Guido van Rossum in branch '3.5':
Fix issue #27402: example for typing did not type-check.
https://hg.python.org/cpython/rev/0aec17c8f434

New changeset 57f3514564f6 by Guido van Rossum in branch 'default':
Fix issue #27402: example for typing did not type-check. (Merge 3.5->3.6)
https://hg.python.org/cpython/rev/57f3514564f6

--
nosy: +python-dev

___
Python tracker 

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



[issue27407] prepare_ssl.py missing in PCBuild folder

2016-06-28 Thread Steve Dower

Steve Dower added the comment:

It would need someone to volunteer to port and maintain it. I don't believe any 
of the current team want to maintain two different versions of the script, 
considering we all use Python 3 and have it available when updating the version 
of OpenSSL used.

--

___
Python tracker 

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



[issue27407] prepare_ssl.py missing in PCBuild folder

2016-06-28 Thread George Ge

George Ge added the comment:

I see. Would it be possible to have a version of prepare_ssl.py written in 2.7 
for the official source releases?

--

___
Python tracker 

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



[issue27407] prepare_ssl.py missing in PCBuild folder

2016-06-28 Thread Steve Dower

Steve Dower added the comment:

It can be found at PCbuild/prepare_ssl.py in the default branch.

Copying it into the 2.7 branch wouldn't hurt I guess, and I'm okay with having 
build scripts in there that depend on Python 3 ;)

--

___
Python tracker 

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



[issue27337] 3.6.0a2 tarball has weird paths

2016-06-28 Thread Ulrich Petri

Ulrich Petri added the comment:

Just as another datapoint: This also breaks installing a2 with pythonz.

--
nosy: +ulope

___
Python tracker 

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



[issue27407] prepare_ssl.py missing in PCBuild folder

2016-06-28 Thread George Ge

New submission from George Ge:

The readme.txt file in the PCBuild folder in Python 2.7.11 and 2.7.12 sources 
both contain instructions on how to configure to build a different OpenSSL 
version using PCbuild\prepare_ssl.py, but this file is missing on both versions.

--
components: Installation, Windows
messages: 269440
nosy: George Ge, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: prepare_ssl.py missing in PCBuild folder
type: compile error
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



[issue23749] asyncio missing wrap_socket (starttls)

2016-06-28 Thread Yury Selivanov

Yury Selivanov added the comment:

> yuri, did you saw guido added review on your patch?

Yes.  There are few more issues with the patch that I want to resolve before 
re-submitting it for another review.  Will do it soon.

--

___
Python tracker 

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



[issue27385] itertools.groupby has misleading doc string

2016-06-28 Thread Raymond Hettinger

Changes by Raymond Hettinger :


Added file: http://bugs.python.org/file43571/groupbydoc.diff

___
Python tracker 

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



[issue27385] itertools.groupby has misleading doc string

2016-06-28 Thread Raymond Hettinger

Raymond Hettinger added the comment:

That's okay.  I'm taking care of both in this issue.

--

___
Python tracker 

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



[issue26226] Various test suite failures on Windows

2016-06-28 Thread Emanuel Barry

Emanuel Barry added the comment:

About the strptime failure - it seems time.strftime returns "Est (heure d?été)" 
while _strptime.LocaleTime().timezone has "est (heure d\x92été)". I don't know 
why it's like that, but neither are correct - the character that goes there is 
a single quote ('). I'm also puzzled by the fact that 'é' appears properly 
despite not being ASCII.

--

___
Python tracker 

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



[issue26226] Various test suite failures on Windows

2016-06-28 Thread Emanuel Barry

Emanuel Barry added the comment:

Some of the tests that used to fail are now passing, however some are still 
failing (and new ones are also failing now).

Tests that are still failing:

test_code_module (TestInteractiveConsole; test_ps1 and test_ps2 failed)
test_codecencodings_iso2022 (blame git for changing line endings; will open a 
new issue about this)

New failures:

test_capi (_testcapi doesn't have test_buildvalue_N)
test_codecencodings_jp (passes when I run it by itself... ?)
test_ctypes (AssertionError: "phi" does not match "duplicate values for field 
'???'")
test_decimal (will open a new issue for that one, there are over 300 lines of 
failures/errors)
test_distutils (env changed, also no tests run when I try to run it by itself)
test_getargs2 (fails on import with 'from _testcapi import 
getargs_positional_only_and_keywords as getargs'; ImportError: cannot import 
name 'getargs_positional_only_and_keywords')

Tests previously hung up after that point. The tests continue now, so here are 
more failures:

test_logging (socket timeout)
test_os (many failed C++ assertions! [Visual C++ Runtime library] Will open a 
new issue about that)
test_random (line endings mismatch)
test_sax (again line endings mismatch)
test_sqlite (sqlite3.test.dbapi.CursorTests.CheckLastRowIDOnReplace fails with 
self.cu.lastrowid =! 1 [it's None])
test_strptime (that's a DST issue: AssertionError: False is not true : timezone 
est (heure d?été) not found in (frozenset({'gmt', 'est', 'utc'}), 
frozenset({'est (heure d\x92été)'})))
test_uuid (sounds like it's related to my hostname having non-ASCII characters)
test_warnings ('__main__' != '' [I'm running tests via the interactive prompt, 
this might be why])
test_xml_etree_c ('Windows fatal error: stack overflow' in the test that makes 
sure recursive repr doesn't overflow [but it doesn't fail when I run it 
individually, apparently])

I'll spawn new issues for the more serious/specific ones, but unless you'd 
rather have one issue per failure, I'd like to keep this one open (for now at 
least).

@R. David: 4 skips, but no failures in the email tests, so at least there's 
that!

--

___
Python tracker 

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



[issue27385] itertools.groupby has misleading doc string

2016-06-28 Thread R. David Murray

R. David Murray added the comment:

Please open a separate issue for that problem.

--
nosy: +r.david.murray

___
Python tracker 

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



[issue27385] itertools.groupby has misleading doc string

2016-06-28 Thread Josh Rosenberg

Josh Rosenberg added the comment:

While you're fixing, the docstring should say "groupby(iterable, key=None)", 
not "groupby(iterable[, keyfunc])"; the functions accepts the key function by 
name, and the name is key, not keyfunc. And it can be passed explicitly as None 
(equivalent to not passing it at all), so the [, keyfunc] approach that 
indicates it's positional only and can't be explicitly passed as a default is 
wrong. Gets a little confusing because it also returns a "key", but the 
argument is definitely named "key", so we can't go calling it "keyfunc".

Mind you, seems like this could also be fixed by just Clinic-ifying it.

--
nosy: +josh.r

___
Python tracker 

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



[issue12319] [http.client] HTTPConnection.request not support "chunked" Transfer-Encoding to send data

2016-06-28 Thread Rolf Krahl

Rolf Krahl added the comment:

Martin, I'm almost through with your comments.  There is however one item that 
I need some feedback on: You asked for more documentation on the new 
EncodingError exception.  This was introduced by Demian.  It is raised when the 
Transfer-encoding header set by the caller is invalid.  I'm not sure about 
this.  What is the purpose of the HTTPException tree of exceptions in 
http.client?  Is this ought to be a collection of all kinds of exceptions 
raised in http.client or should a (child of) HTTPException indicate that an 
exception occurred while talking to the HTTP server?  In the latter case, the 
EncodingError class as introduced now would be just wrong.  Maybe we should 
raise a ValueError instead?

--

___
Python tracker 

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



[issue27406] subprocess.Popen() hangs in multi-threaded code

2016-06-28 Thread R. David Murray

R. David Murray added the comment:

This is a duplicate of issue 20318.  The advice is to use subprocess32.

--
nosy: +r.david.murray
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> subprocess.Popen can hang in threaded applications in Python 2

___
Python tracker 

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



[issue27406] subprocess.Popen() hangs in multi-threaded code

2016-06-28 Thread Kristján Valur Jónsson

New submission from Kristján Valur Jónsson:

On a quad-core raspberrypi, i have experienced that subprocess.Popen() 
sometimes does not return immediatelly, but only much later, when an unrelated 
process has exited.
Debugging the issue, I find the parent process hanging in 
# Wait for exec to fail or succeed; possibly raising exception
# Exception limited to 1M
data = _eintr_retry_call(os.read, errpipe_read, 1048576)

This behaviour is consistent with the problem described in pipe_cloexec():


def pipe_cloexec(self):
"""Create a pipe with FDs set CLOEXEC."""
# Pipes' FDs are set CLOEXEC by default because we don't want them
# to be inherited by other subprocesses: the CLOEXEC flag is removed
# from the child's FDs by _dup2(), between fork() and exec().
# This is not atomic: we would need the pipe2() syscall for that.
r, w = os.pipe()
self._set_cloexec_flag(r)
self._set_cloexec_flag(w)
return r, w

In short:  It appears that occasionally the pipe FD is leaked to a different 
subprocess (started on a separate thread) before the cloexec flags can be set.  
This causes the parent process to wait until that other instance of the file 
descriptor is closed, i.e. when that other unrelated process exits.

I currently have a workaround which involves using a threading.Lock() around 
the call.

This is not very nice, however.  Also, there is #Issue12196 which could be 
backported to 2.7 to address this problem.

--
components: Interpreter Core
messages: 269432
nosy: kristjan.jonsson
priority: normal
severity: normal
status: open
title: subprocess.Popen() hangs in multi-threaded code
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



[issue26226] Various test suite failures on Windows

2016-06-28 Thread R. David Murray

R. David Murray added the comment:

It looks like this issue can be closed, but a new one should be opened for 
dealing with the newline issue under git on windows.  However, I'm surprised 
there weren't failures in the email tests.  Although I've been moving the email 
tests away from depending on data on the disk being in DOS format, I think 
there are some compat32 tests that still do so.

--
nosy: +r.david.murray

___
Python tracker 

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



[issue27350] Compact and ordered dict

2016-06-28 Thread INADA Naoki

INADA Naoki added the comment:

Anyone can review this by Python 3.6a3 ?

--

___
Python tracker 

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



[issue27141] Fix collections.UserList shallow copy

2016-06-28 Thread Bar Harel

Bar Harel added the comment:

Are the patch and tests good?

--

___
Python tracker 

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



[issue26971] python v3.5.1: sys.paths not respecting DESTDIRS and DESTSHARED

2016-06-28 Thread Xavier de Gaye

Xavier de Gaye added the comment:

Johannes, what are the values of CONFIG_ARGS and libdir in the config.log of 
your Linux SuSE.

--
nosy: +xdegaye

___
Python tracker 

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



[issue21134] Segfault when stringifying UnicodeEncodeError (or UnicodeDecodeError) created with __new__()

2016-06-28 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

What is the bug here (except fixed segfault)?

--

___
Python tracker 

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



[issue27405] Ability to trace Tcl commands executed by Tkinter

2016-06-28 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

For debugging purpose it would be helpful to have an ability to show all Tcl 
commands executed by Tkinter. In particular it would be helpful for testing 
wherever some issue is Tkinter issue or Tcl/Tk issue.

I'm working on a patch, but there is a design question about an interface.

In simplest case you set the debug property of Tk instance to True and all Tcl 
commands are printed to stdout or stderr in the form ready for executing with 
Tcl/Tk interpreter. You also can set the module global tkinter.debug to True, 
and this will affect all new Tk instances (as with tkinter.wantobjects).

But maybe there is a need in larger customization? For example specifying the 
command that accepts every Tcl command as a string or a tuple?

--
components: Tkinter
messages: 269425
nosy: serhiy.storchaka, terry.reedy
priority: normal
severity: normal
status: open
title: Ability to trace Tcl commands executed by Tkinter
type: enhancement
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



[issue21134] Segfault when stringifying UnicodeEncodeError (or UnicodeDecodeError) created with __new__()

2016-06-28 Thread STINNER Victor

STINNER Victor added the comment:

> Since there was no complains on this issue, I think it can be closed.

I have a complain: we should not ignore bugs. IMO an exception must be raised.

--
status: pending -> open

___
Python tracker 

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



[issue26226] Various test suite failures on Windows

2016-06-28 Thread STINNER Victor

STINNER Victor added the comment:

It looks like all issues are now fixed in the default branch, no? Can we close 
this issue?

--

___
Python tracker 

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



[issue27025] More human readable generated widget names

2016-06-28 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

I'm working on a patch that allows to trace all Tcl commands passed from 
Tkinter, and a number of ".`" in widget names looks not nice.

--

___
Python tracker 

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



[issue26226] Various test suite failures on Windows

2016-06-28 Thread Martin Panter

Martin Panter added the comment:

Regarding the files getting messed up in Lib/test/cjkencodings, IMO the 
solution is to not configure Git to mess with newlines in files. ;) But perhaps 
a reasonable workaround might be to rename the relevant files to something like 
*.txt.bin. Perhaps that will bypass whatever logic Git uses.

--
nosy: +martin.panter

___
Python tracker 

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



[issue21134] Segfault when stringifying UnicodeEncodeError (or UnicodeDecodeError) created with __new__()

2016-06-28 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

An empty string is the result of str() on an instance created with __new__ for 
all standard exceptions except SyntaxError (str() returnns 'None' for the 
latter, and this looks as a bug). Since there was no complains on this issue, I 
think it can be closed.

--
status: open -> pending

___
Python tracker 

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



[issue27085] Make it possible to select return type for os.listdir

2016-06-28 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
resolution:  -> rejected
status: open -> closed

___
Python tracker 

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



[issue27255] More opcode predictions

2016-06-28 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

OK, I'm only +0 on adding these predictions and fine with status quo. The ratio 
28:1 looks compelling to me, but all this is not enough important.

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



[issue23395] _thread.interrupt_main() errors if SIGINT handler in SIG_DFL, SIG_IGN

2016-06-28 Thread STINNER Victor

STINNER Victor added the comment:

> It seems to be against the current HEAD -- is there a chance that this will 
> be backported to 2.7 (which is what I need to use)?

Yes, I will fix Python 2.7 and 3.5, I will just make 
PyErr_SetInterruptWithErr() private (rename to _PyErr_SetInterruptWithErr()).

--

___
Python tracker 

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