[issue27423] Failed assertions when running test.test_os on Windows

2016-06-30 Thread Steve Dower

Steve Dower added the comment:

The warnings are expected - Python has to be able to handle arbitrarily bad 
parameters/use without crashing, while the CRT assumes that bugs belong to the 
direct caller who needs to fix them. As a result, it will assert and terminate 
for blatantly incorrect operations.

A while back we discussed suppressing these warnings by default to stop people 
worrying, while leaving them enabled for the build bots where those analysing 
the results are more likely to be aware of the intricacies.

Of course, if the assert dialog is actually showing, we have an issue. If it's 
only the printed warning then it's expected.

--

___
Python tracker 

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



[issue27423] Failed assertions when running test.test_os on Windows

2016-06-30 Thread Eryk Sun

Eryk Sun added the comment:

test_os intentionally operates on invalid file descriptors. In the Windows CRT 
this leads to failed assertions, such as from its _VALIDATE_RETURN macro. This 
macro would also call the default invalid parameter handler, which would kill 
the process, but that's disabled in 3.5+ via _Py_BEGIN_SUPPRESS_IPH. That 
leaves the message box for failed assertions in debug builds [1]. On entry, 
support.SuppressCrashReport calls the CRT functions _CrtSetReportMode [2] and 
_CrtSetReportFile [3] to ensure that failed assertions are instead printed to 
stderr. These functions are available in a debug build of the msvcrt module.

[1]: https://msdn.microsoft.com/en-us/library/9sb57dw4.aspx
[2]: https://msdn.microsoft.com/en-us/library/1y71x448.aspx
[3]: https://msdn.microsoft.com/en-us/library/a68f826y.aspx

--

___
Python tracker 

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



[issue1349732] urllib.urlencode provides two features in one param

2016-06-30 Thread Terry J. Reedy

Terry J. Reedy added the comment:

2.7 can get doc changes if a core developer wants to push it.

--
versions:  -Python 2.6

___
Python tracker 

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



[issue26348] activate.fish sets VENV prompt incorrectly

2016-06-30 Thread Vinay Sajip

Changes by Vinay Sajip :


--
status: open -> closed

___
Python tracker 

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



[issue27423] Failed assertions when running test.test_os on Windows

2016-06-30 Thread Emanuel Barry

Emanuel Barry added the comment:

I'm not sure about the patch - sure, the messages might go away, but I find it 
concerning that the assertions are failing to begin with. Of course, it only 
happens when in debug (and this might be a non-issue in practice, I haven't 
checked), but shouldn't we fix this in the C code? As I understand it though, 
that part of code is out of Python's control, so there might not be much we can 
do...

But I'm probably overthinking everything again ;)

--

___
Python tracker 

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



[issue27423] Failed assertions when running test.test_os on Windows

2016-06-30 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
nosy: +haypo

___
Python tracker 

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



[issue27413] Add an option to json.tool to bypass non-ASCII characters.

2016-06-30 Thread Wei-Cheng Pan

Wei-Cheng Pan added the comment:

Use "--no-ensure-ascii" instead.

--
Added file: 
http://bugs.python.org/file43596/json-add-an-option-to-bypass-non-ascii-characters.patch

___
Python tracker 

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



[issue27413] Add an option to json.tool to bypass non-ASCII characters.

2016-06-30 Thread Wei-Cheng Pan

Changes by Wei-Cheng Pan :


Removed file: 
http://bugs.python.org/file43578/json-add-an-option-to-bypass-non-ascii-characters.patch

___
Python tracker 

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



[issue27423] Failed assertions when running test.test_os on Windows

2016-06-30 Thread Eryk Sun

Eryk Sun added the comment:

The attached patch suppresses the failed-assertion message boxes when running 
test_os on a debug build.

--
keywords: +patch
nosy: +eryksun
stage: needs patch -> patch review
Added file: http://bugs.python.org/file43595/issue27423_1.patch

___
Python tracker 

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



[issue26664] Misuse of $ in activate.fish of venv

2016-06-30 Thread Xiang Zhang

Xiang Zhang added the comment:

Since the bug is fixed, we can also close issue26348.

--

___
Python tracker 

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



[issue27425] Tests fail because of git's newline preferences on Windows

2016-06-30 Thread Emanuel Barry

Emanuel Barry added the comment:

I agree, but I wouldn't expect my line ending preferences to make tests fail. I 
think that with the move to GitHub already underway, it's not unreasonable to 
(at least consider to) add a .gitattributes file. Added Brett to nosy since 
he's responsible for PEP 512.

(I think this should be changed before the final announcement that the cpython 
repo is on GitHub, but there's no rush until then; although I'm certainly not 
going to complain if it's done before ;)

--
nosy: +brett.cannon

___
Python tracker 

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



[issue27417] Call CoInitializeEx on startup

2016-06-30 Thread Mark Hammond

Mark Hammond added the comment:

> > This may well break things like pythonwin until they also grow support
> > for the new param 

> I expect that, which is why I'm only proposing it for 3.6 onwards. While
> adding support for a new major version of Python should be fairly cheap,
> it isn't entirely free and so it's the right time to add new complications.

My point with that is that pythonwin is a GUI app rarely started by the 
command-line. It isn't that adding the cmdline support is difficult, more that 
it's difficult for users to specify it. This will be true for any GUI installed 
into the start menu (eg, idle)

> Nikita:
> > COM should be initialized on demand by C modules that need it. They might 
> > need STA or
> > MTA, it's their choice to make.

> And if the C module is the core interpreter (see issue26137 for an example of 
> where
> this would be necessary)? If we require user code to initialize COM, this 
> whole
> proposal is moot as that is the current state of the world and it does not 
> require
> any changes to achieve.

I'd be surprised if issue26137 ended up unconditionally doing a malware scan on 
everything Python ever executes. Thus, I don't see why "I'd like to enable 
calling CoInitializeEx on Python startup for 3.6" is necessary - just 
attempting to initialize it immediately before that feature is invoked would be 
fine and may sidestep the entire issue. Instead of command-line flags to 
control COM initialization we should add new flags to disable these new 
features that require COM (and thus also implicitly control whether COM is 
initialized or not.)

IOW, I think it makes sense for the core to initialize COM immediately before 
it needs to use COM, under the assumption that executing "python" or "python 
myscript.py" isn't going to need to do that by default. I think initializing 
COM by default at process startup on the off-chance that some COM-using feature 
will be invoked is more problematic.

--

___
Python tracker 

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



[issue27425] Tests fail because of git's newline preferences on Windows

2016-06-30 Thread Martin Panter

Martin Panter added the comment:

If it were me, I might try to use a version of Git that doesn’t mess with the 
files. But if this becomes a common problem (esp with the move from Mercurial 
to Git), maybe we can add a “.gitattributes” file 
. We aleady seem to have “.hgeol”.

I presume this is going to affect earlier versions too.

--
components: +Windows
nosy: +martin.panter, paul.moore, steve.dower, tim.golden, zach.ware
versions: +Python 2.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



[issue26665] pip is not bootstrapped by default on 2.7

2016-06-30 Thread Martin Panter

Martin Panter added the comment:

Revision 4fc0154ec84a links here, but actually seems to be discussed in Issue 
26348 and Issue 26664 instead.

--
nosy: +martin.panter

___
Python tracker 

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



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

2016-06-30 Thread tylerjohnhughes

New submission from tylerjohnhughes:

The escape function appears to go through the list in multiple passes, 
replacing characters as it encounters them on each pass, rather than traversing 
the source string and replacing matches in the entities dict. This results in 
invalid escape strings if a replacement value contains one of the replacement 
entities. I've attached a file to reproduce the behavior.

--
components: XML
files: escapetest.py
messages: 269634
nosy: tylerjohnhughes
priority: normal
severity: normal
status: open
title: xml.sax.saxutils.escape doesn't escape multiple characters safely
type: behavior
versions: Python 3.5
Added file: http://bugs.python.org/file43594/escapetest.py

___
Python tracker 

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



[issue27428] Document WindowsRegistryFinder inherits from MetaPathFinder

2016-06-30 Thread Brett Cannon

New submission from Brett Cannon:

Currently the docs claim it inherits from importlib.abc.Finder.

--
assignee: docs@python
components: Documentation
messages: 269633
nosy: brett.cannon, docs@python
priority: normal
severity: normal
status: open
title: Document WindowsRegistryFinder inherits from MetaPathFinder
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



[issue27427] Math tests

2016-06-30 Thread Francisco Couzo

New submission from Francisco Couzo:

I added some tests for the math module.

--
components: Tests
files: test_math.patch
keywords: patch
messages: 269632
nosy: franciscouzo
priority: normal
severity: normal
status: open
title: Math tests
versions: Python 3.6
Added file: http://bugs.python.org/file43593/test_math.patch

___
Python tracker 

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



[issue24379] Add operator.subscript as a convenience for creating slices

2016-06-30 Thread Ivan Levkivskyi

Changes by Ivan Levkivskyi :


--
nosy: +levkivskyi

___
Python tracker 

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



[issue25830] _TypeAlias: Discrepancy between docstring and behavior

2016-06-30 Thread Ivan Levkivskyi

Changes by Ivan Levkivskyi :


--
nosy: +levkivskyi

___
Python tracker 

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



[issue26075] typing.Union unifies types too broadly

2016-06-30 Thread Ivan Levkivskyi

Changes by Ivan Levkivskyi :


--
nosy: +levkivskyi

___
Python tracker 

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



[issue26477] typing forward references and module attributes

2016-06-30 Thread Ivan Levkivskyi

Changes by Ivan Levkivskyi :


--
nosy: +levkivskyi

___
Python tracker 

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



[issue26696] Document collections.abc.ByteString

2016-06-30 Thread Ivan Levkivskyi

Changes by Ivan Levkivskyi :


--
nosy: +levkivskyi

___
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-30 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Here is preliminary patch. It contains leaks, don't worry.

--
keywords: +patch
Added file: http://bugs.python.org/file43592/tkinter_trace_tcl.patch

___
Python tracker 

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



[issue26141] typing module documentation incomplete

2016-06-30 Thread Ivan Levkivskyi

Ivan Levkivskyi added the comment:

I would like to do this (update the typing docs) at some point before 3.6 
beta1. There probably will be some updates to the PEP (it is still 
provisional), and maybe to typing.py soon.

--
nosy: +levkivskyi

___
Python tracker 

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



[issue25958] Implicit ABCs have no means of "anti-registration"

2016-06-30 Thread Ivan Levkivskyi

Changes by Ivan Levkivskyi :


--
nosy: +levkivskyi

___
Python tracker 

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



[issue23951] Update devguide style to use a similar theme as Docs

2016-06-30 Thread Zachary Ware

Zachary Ware added the comment:

Another +1 here, looks good and has some nice improvements.

The patch needs some cleanup, though:

We don't need the extensions [1], the version switcher, or the susp-ignored 
file.

The templates dir needs some cleanup; we don't need the download page at all, 
and the indexsidebar.html template needs to be properly updated for the 
devguide (or removed, but updated would probably be nicer), and 
indexcontent.html can go away.  layout.html could stand some cleanup as well, 
removing the stuff that doesn't apply to the devguide.

rstlint.py can probably stay, it has a few complaints that might be nice to 
fix.  It would be nice to wire it into the Makefile (and make.bat) if it's 
staying.

tools/static/py.png does need to be copied over, though (and currently isn't in 
the patch); it's used in the upper left corner of the page.



With cleanup, though, I'm looking forward to this going in!


[1] it might be interesting to look into what extensions from the regular docs 
could be useful, particularly the 'suspicious' checker

--
stage:  -> patch review

___
Python tracker 

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



[issue26664] Misuse of $ in activate.fish of venv

2016-06-30 Thread Brett Cannon

Brett Cannon added the comment:

I wish it was a two-click fix. It's actually a 
fix-in-3.5-then-test-then-update-Misc/NEWS-then-commit-then-merge-then-verify-again-then-commit-then-push-then-update-the-issue
 (IOW it's about 8 separate steps).

--

___
Python tracker 

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



[issue26664] Misuse of $ in activate.fish of venv

2016-06-30 Thread erdban fed

erdban fed added the comment:

> Activation doesn't "load" the Python interpreter in the venv; all it does is 
> tweak shell variables to put the interpreter in venv early on PATH.

I'm aware.

> You have to realize that ...

I know it's often a thankless task and that mistakes can and do happen.  Not 
prioritising a two-click fix to a regression that was spotted several months in 
advance would - in my book - count as such a mistake.  Okay, you were 
preoccupied with other things - that's fine.  That's a valid excuse.  And if 
you disagree with the importance of it, that's also fine; I'm not gonna argue 
my case further.

--

___
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-30 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

I meant adding API similar to sys.settrace() for specifying a function that 
will be called before executing every Tcl command.

--

___
Python tracker 

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



[issue26664] Misuse of $ in activate.fish of venv

2016-06-30 Thread Tin Tvrtković

Tin Tvrtković added the comment:

Thanks for dealing with this, Brett, your efforts are appreciated. :)

On Thu, Jun 30, 2016 at 9:24 PM Brett Cannon  wrote:

>
> Brett Cannon added the comment:
>
> Activation doesn't "load" the Python interpreter in the venv; all it does
> is tweak shell variables to put the interpreter in venv early on PATH. I
> personally never use the activate.* scripts and simply directly execute the
> Python interpreter, e.g. venv/bin/python. The only other thing the
> activation script does that potentially changes semantics is the setting of
> $PYTHONHOME which can do manually if you need that specific bit of
> functionality.
>
> You have to realize that there are over 5,000 issues open on
> bugs.python.org. We are all volunteers working on Python and we do our
> best to get through issues, but we just don't get to everything on the
> timeframe people prefer. I realize this issue is important to you, but
> basically every reported issue is important to someone so every time we
> prioritize anything over something else we are upsetting someone somewhere.
>
> --
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue27421] PPC64LE Fedora 2.7: certificate for hg.python.org has unexpected fingerprint

2016-06-30 Thread Zachary Ware

Changes by Zachary Ware :


--
stage:  -> resolved

___
Python tracker 

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



[issue27421] PPC64LE Fedora 2.7: certificate for hg.python.org has unexpected fingerprint

2016-06-30 Thread STINNER Victor

STINNER Victor added the comment:

David Edelsohn: "I have updated the fingerprint in .hgrc."

Thanks!

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

___
Python tracker 

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



[issue27213] Rework CALL_FUNCTION* opcodes

2016-06-30 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Added comments on Rietveld.

--

___
Python tracker 

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



[issue26137] [idea] use the Microsoft Antimalware Scan Interface

2016-06-30 Thread Paul Moore

Paul Moore added the comment:

Thanks for the explanation. Based on what's been said, I'd have no objections 
to this, on a "you don't pay for what you don't use" basis - i.e., users who 
don't enable AMSI should not pay any cost for its existence.

I'd be extremely happy if Python was viewed as a high-quality option in the 
server management space, so if this helps in that goal, then that's good.

--

___
Python tracker 

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



[issue26665] pip is not bootstrapped by default on 2.7

2016-06-30 Thread Zachary Ware

Changes by Zachary Ware :


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

___
Python tracker 

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



[issue27417] Call CoInitializeEx on startup

2016-06-30 Thread Paul Moore

Paul Moore added the comment:

I presume by "we" you mean "the core"? There's nothing to stop 3rd party code 
using COM APIs.

The only downside to using COM in (user) Python code at the moment is the need 
for a dependency on pywin32 (robust, mature, but a big dependency) or comtypes 
(relatively lightweight, but less mature/well used). Hardly a huge burden.

--

___
Python tracker 

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



[issue26664] Misuse of $ in activate.fish of venv

2016-06-30 Thread Brett Cannon

Brett Cannon added the comment:

Activation doesn't "load" the Python interpreter in the venv; all it does is 
tweak shell variables to put the interpreter in venv early on PATH. I 
personally never use the activate.* scripts and simply directly execute the 
Python interpreter, e.g. venv/bin/python. The only other thing the activation 
script does that potentially changes semantics is the setting of $PYTHONHOME 
which can do manually if you need that specific bit of functionality.

You have to realize that there are over 5,000 issues open on bugs.python.org. 
We are all volunteers working on Python and we do our best to get through 
issues, but we just don't get to everything on the timeframe people prefer. I 
realize this issue is important to you, but basically every reported issue is 
important to someone so every time we prioritize anything over something else 
we are upsetting someone somewhere.

--

___
Python tracker 

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



[issue27415] BaseEventLoop.create_server does not accept port=None

2016-06-30 Thread Marcus Cobden

Marcus Cobden added the comment:

I should add that port=0 is an acceptable workaround

--
type:  -> behavior

___
Python tracker 

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



[issue26664] Misuse of $ in activate.fish of venv

2016-06-30 Thread erdban fed

erdban fed added the comment:

> Two, this is not a release blocker. Python itself continues to function 
> properly with this bug and it doesn't prevent you from working with a venv 
> under fish (but I recognize it's an annoyance).

If you can't load the venv, I think that pretty definitely prevents you from 
working with one.  I'll now have to edit the activation script file manually 
every time I create a new venv until 3.6 is released.  Or revert to 3.5.1.

--

___
Python tracker 

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



[issue16142] ArgumentParser inconsistent with parse_known_args

2016-06-30 Thread Omar Sandoval

Changes by Omar Sandoval :


--
nosy: +Omar Sandoval

___
Python tracker 

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



[issue22724] byte-compile fails for cross-builds

2016-06-30 Thread Xavier de Gaye

Xavier de Gaye added the comment:

> On Android cross-builds, it should be possible to reproduce the failure when 
> the build system and the host system have the same PLATFORM_TRIPLET

I confirm that this is the case. The following backtrace is produced when 
cross-building and installing Android x86_64 on a linux x86_64:

PYTHONPATH=/sdcard/org.bitbucket.pyona/lib/python3.6   \

_PYTHON_PROJECT_BASE=/home/xavier/src/android/pyona/build/python3.6-android-21-x86_64
 _PYTHON_HOST_PLATFORM=linux-x86_64 
PYTHONPATH=/home/xavier/src/android/pyona/build/python3.6-android-21-x86_64/build/lib.linux-x86_64-3.6:/home/xavier/src/packages/android/cpython/Lib:/home/xavier/src/packages/android/cpython/Lib/plat-x86_64-linux-gnu
 python3.6 -Wi /sdcard/org.bitbucket.pyona/lib/python3.6/compileall.py \
-d /sdcard/org.bitbucket.pyona/lib/python3.6 -f \
-x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \
/sdcard/org.bitbucket.pyona/lib/python3.6
Traceback (most recent call last):
  File "/sdcard/org.bitbucket.pyona/lib/python3.6/compileall.py", line 17, in 

import struct
  File "/sdcard/org.bitbucket.pyona/lib/python3.6/struct.py", line 13, in 

from _struct import *
ImportError: libpython3.6m.so.1.0: cannot open shared object file: No such file 
or directory
make[3]: [Makefile:1270: libinstall] Error 1 (ignored)


'python3.6' is the native interpreter built from the same source tree as the 
source tree used for the cross-build. PATH has been set so that this native 
interpreter is run. Running this same command interactively with the native 
interpreter gives the same result:

[xavier@bilboquet python-native]$   
PYTHONPATH=/home/xavier/src/android/pyona/build/python3.6-android-21-x86_64/build/lib.linux-x86_64-3.6:/home/xavier/src/packages/android/cpython/Lib:/home/xavier/src/packages/android/cpython/Lib/plat-x86_64-linux-gnu
 ./python3.6
Python 3.6.0a2+ (default:64ed56fbc5e7+, Jun 27 2016, 10:36:45) 
[GCC 6.1.1 20160602] on linux
Type "help", "copyright", "credits" or "license" for more information.
Traceback (most recent call last):
  File "/home/xavier/config/.pystartup", line 14, in 
import readline
ImportError: libpython3.6m.so.1.0: cannot open shared object file: No such file 
or directory
>>> 


Cross-building and installing Android i686 on a linux x86_64 with the same 
Makefile does not cause the problem.

Adding -E to PYTHON_FOR_BUILD fixes the x86_64 install.

--

___
Python tracker 

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



[issue26664] Misuse of $ in activate.fish of venv

2016-06-30 Thread Brett Cannon

Brett Cannon added the comment:

Two things.

One, sorry for not getting to this before 3.5.1 got out. It simply slipped off 
my radar thanks to various other issues that I've been dealing with. It's 
obviously now fixed.

Two, this is not a release blocker. Python itself continues to function 
properly with this bug and it doesn't prevent you from working with a venv 
under fish (but I recognize it's an annoyance).

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



[issue26664] Misuse of $ in activate.fish of venv

2016-06-30 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 8d7bde14d7a4 by Brett Cannon in branch 'default':
Merge from 3.5 for issue #26664
https://hg.python.org/cpython/rev/8d7bde14d7a4

--
nosy: +python-dev

___
Python tracker 

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



[issue26665] pip is not bootstrapped by default on 2.7

2016-06-30 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 4fc0154ec84a by Brett Cannon in branch '3.5':
Issue #26665: Remove mis-use of ``$`` in activate.fish.
https://hg.python.org/cpython/rev/4fc0154ec84a

--
nosy: +python-dev

___
Python tracker 

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



[issue26664] Misuse of $ in activate.fish of venv

2016-06-30 Thread Brett Cannon

Changes by Brett Cannon :


--
title: find a bug in activate.fish of venv of cpython3.6 -> Misuse of $ in 
activate.fish of venv

___
Python tracker 

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



[issue27422] Deadlock when mixing threading and multiprocessing

2016-06-30 Thread Raymond Hettinger

Raymond Hettinger added the comment:

It is in-fact problem prone (and not just in Python).  The rule is "thread 
after you fork, not before".  Otherwise, the locks used by the thread executor 
will get duplicated across processes.  If one of those processes dies while it 
has the lock, all of the other processes using that lock will deadlock.

--
nosy: +rhettinger

___
Python tracker 

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



[issue26664] find a bug in activate.fish of venv of cpython3.6

2016-06-30 Thread Xiang Zhang

Xiang Zhang added the comment:

I get the same feeling. Add Larry.

--
nosy: +larry

___
Python tracker 

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



[issue23644] g++ module compile fails with ‘_Atomic’ does not name a type

2016-06-30 Thread Martin Ritter

Martin Ritter added the comment:

For me compiling 3.5.2 on GCC 5.2.0 fails when I supply --with-cxx-main=g++ 
with the same "error: ‘_Atomic’ does not name a type" messages.

I'm guessing that --with-cxx-main is probably outdated(?) but at least it 
worked with 3.5.0

--
nosy: +Martin Ritter

___
Python tracker 

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



[issue26664] find a bug in activate.fish of venv of cpython3.6

2016-06-30 Thread erdban fed

erdban fed added the comment:

This bug shipped in 3.5.2.  It should've been a blocker.

--
nosy: +erdban fed

___
Python tracker 

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



[issue26226] Test failures with non-ascii character in hostname on Windows

2016-06-30 Thread Emanuel Barry

Emanuel Barry added the comment:

So I checked to make sure everything re-compiled properly and re-ran tests. 
Now, only a very few fail, and I've opened separate issues for each of them.

test_os: #27423
test_logging: #27424
test_random: #27425
test_sax: #27425
test_strptime: #27426

I'm keeping this one open specifically for the test_uuid failure, which seems 
to be caused by my hostname having non-ascii characters (and this was more or 
less the focus of this issue for a while).

--
title: Various test suite failures on Windows when computer name contains a 
non-ascii character -> Test failures with non-ascii character in hostname on 
Windows

___
Python tracker 

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



[issue26137] [idea] use the Microsoft Antimalware Scan Interface

2016-06-30 Thread Steve Dower

Steve Dower added the comment:

And in case it's not clear, I *totally* recognize that AMSI is not for 
everyone. If you're running in a developer environment, your security is almost 
certainly so lax that it's irrelevant.

However, once you start getting serious about what's deployed on your 
production machines, Python gets ruled out very quickly because it lacks 
features like AMSI. Sysadmins don't want to enable a potential attack tool 
unless it's value drastically outweighs the risks (and on Windows, this is 
generally/currently not true), or there is sufficient insight into the behavior 
and use of the tool.

If we want Python to be seen as a production tool and not just a developer tool 
(which I do), we need to address these concerns.

--

___
Python tracker 

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



[issue27426] Encoding mismatch causes some tests to fail on Windows

2016-06-30 Thread Emanuel Barry

New submission from Emanuel Barry:

Specifically, test_strptime fails:

ss.F.E...
==
ERROR: test_timezone (__main__.StrptimeTests)
--
Traceback (most recent call last):
  File "E:\GitHub\cpython\lib\test\test_strptime.py", line 330, in test_timezone
strp_output = _strptime._strptime_time(strf_output, "%Z")
  File "E:\GitHub\cpython\lib\_strptime.py", line 559, in _strptime_time
tt = _strptime(data_string, format)[0]
  File "E:\GitHub\cpython\lib\_strptime.py", line 365, in _strptime
data_string[found.end():])
ValueError: unconverted data remains:  (heure d?été)

==
FAIL: test_timezone (__main__.LocaleTime_Tests)
--
Traceback (most recent call last):
  File "E:\GitHub\cpython\lib\test\test_strptime.py", line 78, in test_timezone
(timezone, self.LT_ins.timezone))
AssertionError: False is not true : timezone est (heure d?été) not found in 
(frozenset({'utc', 'est', 'gmt'}), frozenset({'est (heure d\x92été)'}))

--
Ran 49 tests in 0.128s

FAILED (failures=1, errors=1, skipped=2)

Eryk Sun explains the cause in http://bugs.python.org/issue26226#msg269462

--
components: Tests, Windows
messages: 269608
nosy: ebarry, eryksun, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
stage: needs patch
status: open
title: Encoding mismatch causes some tests to fail on Windows
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



[issue26137] [idea] use the Microsoft Antimalware Scan Interface

2016-06-30 Thread Steve Dower

Steve Dower added the comment:

> what's to stop the attacker from distributing their own interpreter that just 
> doesn't use AMSI?

AppLocker https://technet.microsoft.com/en-us/library/ee619725.aspx

(In short, restrict which executables can be run on a particular system by 
path/certificate/etc.)

Also a combination of ACLs and the fact that they may not be able to copy files 
onto the system directly anyway - see my post just before yours.

--

___
Python tracker 

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



[issue26894] Readline not aborting line edition on sigint

2016-06-30 Thread Memeplex

Memeplex added the comment:

Martin: I can't reproduce the issue by just importing matplotlib with the TkAgg 
backend into a vanilla python repl. I will try to isolate the problem when I 
have some free time.

--
status: pending -> open

___
Python tracker 

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



[issue27422] Deadlock when mixing threading and multiprocessing

2016-06-30 Thread R. David Murray

R. David Murray added the comment:

Mixing multiprocessing and threading is problem prone in general.  Hopefully 
one of the multiprocessing experts can say if this is a known problem or not...

--
nosy: +devin, r.david.murray, sbt

___
Python tracker 

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



[issue27424] Failures in test.test_logging

2016-06-30 Thread Emanuel Barry

New submission from Emanuel Barry:

Ran the test as 'python -W error -m test.test_logging' on latest 3.6 version. 
No idea what causes this; full traceback attached. Not sure if it's relevant, 
but I'm running Windows 7.

--
components: Library (Lib), Tests
files: test_logging failures.txt
messages: 269602
nosy: ebarry, vinay.sajip
priority: normal
severity: normal
stage: needs patch
status: open
title: Failures in test.test_logging
type: behavior
versions: Python 3.6
Added file: http://bugs.python.org/file43591/test_logging failures.txt

___
Python tracker 

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



[issue27421] PPC64LE Fedora 2.7: certificate for hg.python.org has unexpected fingerprint

2016-06-30 Thread David Edelsohn

David Edelsohn added the comment:

I have updated the fingerprint in .hgrc.

--

___
Python tracker 

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



[issue26137] [idea] use the Microsoft Antimalware Scan Interface

2016-06-30 Thread Zachary Ware

Zachary Ware added the comment:

> But in that case, why hook into exec? The malware author can execute 
> arbitrary Python so doesn't *need* exec.

As I understand it, the malware is distributed in encrypted form (probably 
encrypted differently each time it propagates) so as to be given a green-light 
by anti-malware software, then decrypted and run via exec so that the bad code 
is never actually on disk, and thus never scanned.  Yes, the attacker can run 
arbitrary Python code, but if he just distributed the code in plain text, it 
could be detected and blocked.  The unpacking code is simple and generic enough 
that it can't be blocked.


As far as actually enabling AMSI, I'm +0.  I don't understand it well enough to 
be +1, and I share Paul's concerns about startup overhead.  I'm also unsure 
that AMSI actually affords any protection: what's to stop the attacker from 
distributing their own interpreter that just doesn't use AMSI?

--

___
Python tracker 

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



[issue27423] Failed assertions when running test.test_os on Windows

2016-06-30 Thread Emanuel Barry

New submission from Emanuel Barry:

Running test_os yields a ton (something like 20) failed assertion warnings. The 
attached screenshot is one of them (comes up a few times), but there are 
others. Choosing to Ignore the error makes Python think that the test was 
merely skipped without any error.

I'm not sure where exactly this kind of bug report goes (doesn't seem to be 
Python's fault), but I'm hoping some of the Windows experts can pick this up.

--
components: Tests, Windows
files: test_os failed assertion.png
messages: 269599
nosy: ebarry, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
stage: needs patch
status: open
title: Failed assertions when running test.test_os on Windows
type: crash
versions: Python 3.6
Added file: http://bugs.python.org/file43590/test_os failed assertion.png

___
Python tracker 

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



[issue26137] [idea] use the Microsoft Antimalware Scan Interface

2016-06-30 Thread Steve Dower

Steve Dower added the comment:

> So the malicious payload is the whole python command, not just file.bin

Yeah, sorry that wasn't clear. Many vulnerabilities allow attackers to schedule 
process launches (e.g. via cron/Task Scheduler/etc.) without actually being 
able to add any files to the machine - Stuxnet took advantage of this, for 
example. So if Python is already there, you can schedule "python -c "import 
urllib, base64; exec(...)"" to download->decode->exec arbitrary code without 
touching the file system or network with obvious sources.

(Right now, I understand base64 is sufficient encryption, at least until the 
antimalware companies add signatures for base64-encoded scripts. Even then, the 
slightest customization of the original code is going to break base64 enough to 
avoid detection, whereas the signatures are flexible enough to handle 
variations to source code.)

--

___
Python tracker 

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



[issue27417] Call CoInitializeEx on startup

2016-06-30 Thread Steve Dower

Steve Dower added the comment:

> What about instead of unconditionally calling CoInitializeEx in all cases, 
> add a Py_EnsureCOM(flags) C API function?

This is essentially what CoInitializeEx does anyway - if the flags don't match 
the existing ones, it returns an error. So all we gain is a core function that 
directly calls CoInitializeEx. (I'm not saying that wouldn't be valuable, but 
it's also entirely suitable for a 3rd-party package since it requires 3rd-party 
code to call it.)


> Is there any *other* use case for keeping COM objects (that are created by 
> the core) around?

Haven't found one yet :) IIRC, there's a decent chunk of certificate store APIs 
that are only available via COM, so if we wanted to enable something like 
signed scripts (or possibly even migrate ssl to verify using the right APIs on 
Windows) then we'd probably need it for that. Maybe - though doubtful - it 
would be feasible to only initialize COM around each connection.

Basically all of the new "cool" APIs added since Windows 8 are COM-based too, 
so if we wanted to support launching/interacting with modern-style apps (or 
being embedded in one), or some of the credential support. It's a big 
hypothetical right now, but given the current state is "we can't use COM 
because we don't initialize it", we're definitely missing potential 
opportunities.

If there was an easy way to say "we now initialize COM all the time" then the 
potential would open up, but since it doesn't look like there's an easy way to 
do that we'll have to keen on avoiding the new APIs unless there's sufficient 
value to add the complexity of background threads.

--

___
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 when computer name contains a non-ascii character

2016-06-30 Thread ppperry

Changes by ppperry :


--
title: Various test suite failures on Windows -> Various test suite failures on 
Windows when computer name contains a non-ascii character

___
Python tracker 

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



[issue27417] Call CoInitializeEx on startup

2016-06-30 Thread Paul Moore

Paul Moore added the comment:

> This doesn't work when COM objects have to be kept around. In the AMSI case...

OK, so that's a limitation. Is there any *other* use case for keeping COM 
objects (that are created by the core) around? If not, then like it or not, 
this is a problem for AMSI, not for a general "initialise COM" proposal.

Basically, I'm saying that it's only worth splitting this proposal out from the 
AMSI one if there's a benefit (to offset the costs) for code other than AMSI. 
And there seems to be no such use case.

--

___
Python tracker 

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



[issue27417] Call CoInitializeEx on startup

2016-06-30 Thread Zachary Ware

Zachary Ware added the comment:

What about instead of unconditionally calling CoInitializeEx in all cases, add 
a Py_EnsureCOM(flags) C API function?  The flags param would be any flags that 
the caller must have, would default to 0, and would be combined with 
sys.coinit_flags before calling CoInitializeEx.  If CoInitializeEx had already 
been called, the flags are compared with what were used in the call and an 
error is raised in case of conflict.  Otherwise, CoInitializeEx is called and 
the flags are returned.  It could also be exposed to Python code as 
sys.ensure_com, though in the case of something like AMSI being enabled, 
sys.ensure_com would always either be a no-op or raise an error.


Disclaimer: I know exactly nothing about COM, except what I've read in this 
issue and the AMSI issue.  If this suggestion is unworkable, please ignore it 
entirely!

--

___
Python tracker 

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



[issue27422] Deadlock when mixing threading and multiprocessing

2016-06-30 Thread Martin Ritter

Martin Ritter added the comment:

I attached a gdb backtrace of one of the child processes

--
Added file: http://bugs.python.org/file43589/test_threadfork_backtrace.txt

___
Python tracker 

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



[issue27422] Deadlock when mixing threading and multiprocessing

2016-06-30 Thread Martin Ritter

New submission from Martin Ritter:

When creating a multiprocessing.Process in a threaded environment I get 
deadlocks waiting, I guess waiting for the lock to flush the output.

I attached a minimal example of the problem which hangs for me starting with 4 
threads.

--
files: test_threadfork.py
messages: 269593
nosy: Martin Ritter
priority: normal
severity: normal
status: open
title: Deadlock when mixing threading and multiprocessing
type: crash
versions: Python 3.5
Added file: http://bugs.python.org/file43588/test_threadfork.py

___
Python tracker 

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



[issue26137] [idea] use the Microsoft Antimalware Scan Interface

2016-06-30 Thread Paul Moore

Paul Moore added the comment:

>> I am puzzled as to why "use safe_exec rather than exec" isn't an option

> Because you're going to have a hard time convincing malware authors to use it.

:-) So the malicious payload is the whole python command, not just file.bin. 
OK, fair enough. But in that case, why hook into exec? The malware author can 
execute arbitrary Python so doesn't *need* exec.

As I say, though, I'm not an expert in security threats, so I'm OK with 
accepting that there's a hole here and the proposal plugs it.

--

___
Python tracker 

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



[issue27417] Call CoInitializeEx on startup

2016-06-30 Thread Steve Dower

Steve Dower added the comment:

Mark:
> CoInitialize will load a number of COM DLLs into the process, which isn't 
> free and will have some memory and performance costs for programs that don't 
> use COM. I see around 10 such DLLs loaded.

Very good point. Most of those should already be loaded in the OS, which 
reduces the cost, but it's still not free. Given some other work I've been 
trying to do to reduce footprint, this is definitely a step backwards :(

> This may well break things like pythonwin until they also grow support for 
> the new param 

I expect that, which is why I'm only proposing it for 3.6 onwards. While adding 
support for a new major version of Python should be fairly cheap, it isn't 
entirely free and so it's the right time to add new complications.

> I wonder why we don't just expose it and let it be called manually?

Because that prevents us adding features to the core interpreter that require 
COM before a user could choose to initialize it. Also, that's the current state 
of the world, and this is a proposal to change it - hence I don't want to start 
with that as an assumption since it makes this whole discussion moot :)

Nikita:
> COM should be initialized on demand by C modules that need it. They might 
> need STA or MTA, it's their choice to make.

And if the C module is the core interpreter (see issue26137 for an example of 
where this would be necessary)? If we require user code to initialize COM, this 
whole proposal is moot as that is the current state of the world and it does 
not require any changes to achieve.

> COM using apps are very likely to be GUI apps and need STA main thread. MTA 
> by default makes no sense.

Fair point. CoInitializeEx defaults to MTA, and pythonwin follows this, while 
IronPython defaults to STA (since COM initialization is unavoidable in their 
context), so the default we should use is not obvious. But I will mention that 
there are plenty of ways that COM is useful without writing a GUI app, so I 
don't think we should assume that only GUI apps are going to use it.

> PS. AMSI ...

Your PS is basically answered in issue26137 - I want to keep the discussion of 
the merits of AMSI separate from this issue :)

Paul:
> It seems to me that core code that needs COM can use it by wrapping the code 
> in CoInitializeEx(sys.coinit_flags)...CoUninitialize(). 

This doesn't work when COM objects have to be kept around. In the AMSI case, 
the threading model is irrelevant, but you need to keep reusing the same 
context for each call, which means you can't keep initializing COM (I tried it 
- it crashes, I believe because you get a new memory allocator and/or arena 
each time, but I didn't diagnose the crash thoroughly).


There may be a workaround for cases where we can't keep reinitializing COM (add 
a background non-Python thread and do all the calls from there), but the 
complexity is fairly high and the performance impact is greater. Worth 
investigating further, since the general feeling seems to be against change.

--

___
Python tracker 

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



[issue27421] PPC64LE Fedora 2.7: certificate for hg.python.org has unexpected fingerprint

2016-06-30 Thread R. David Murray

R. David Murray added the comment:

I'll post a message to the buildbots list.

--

___
Python tracker 

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



[issue27421] PPC64LE Fedora 2.7: certificate for hg.python.org has unexpected fingerprint

2016-06-30 Thread R. David Murray

R. David Murray added the comment:

Oh, wait, this is buildbot client side...so the buildbot slave itself needs to 
be updated?

--

___
Python tracker 

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



[issue27421] PPC64LE Fedora 2.7: certificate for hg.python.org has unexpected fingerprint

2016-06-30 Thread R. David Murray

R. David Murray added the comment:

Yeah, looks like the hg server config needs to be updated.  I don't think I can 
do that.

--

___
Python tracker 

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



[issue27421] PPC64LE Fedora 2.7: certificate for hg.python.org has unexpected fingerprint

2016-06-30 Thread Zachary Ware

Changes by Zachary Ware :


--
nosy: +David.Edelsohn, zach.ware

___
Python tracker 

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



[issue27421] PPC64LE Fedora 2.7: certificate for hg.python.org has unexpected fingerprint

2016-06-30 Thread STINNER Victor

STINNER Victor added the comment:

> The EV certificate was updated, according to Donald.  I don't understand the 
> source of the abort, though. It looks like it is coming from hg itself?

I got the error sometimes with Bitbucket when they change their certificate. I 
store Bitbucket certificate fingerprint in my ~/.hgrc configuration file:

[hostfingerprints]
# https://blog.bitbucket.org/2016/05/04/2847/
bitbucket.org = 3f:d3:c5:17:23:3c:cd:f5:2d:17:76:06:93:7e:ee:97:42:21:14:aa

--

___
Python tracker 

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



[issue27421] PPC64LE Fedora 2.7: certificate for hg.python.org has unexpected fingerprint

2016-06-30 Thread R. David Murray

R. David Murray added the comment:

The EV certificate was updated, according to Donald.  I don't understand the 
source of the abort, though. It looks like it is coming from hg itself?

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



[issue26137] [idea] use the Microsoft Antimalware Scan Interface

2016-06-30 Thread Zachary Ware

Zachary Ware added the comment:

> I am puzzled as to why "use safe_exec rather than exec" isn't an option

Because you're going to have a hard time convincing malware authors to use it.

--

___
Python tracker 

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



[issue27413] Add an option to json.tool to bypass non-ASCII characters.

2016-06-30 Thread R. David Murray

R. David Murray added the comment:

Sorry, yes, that's what I meant.  I think it will make it easier to understand 
and remember if the option uses the same terminology as the function.

--

___
Python tracker 

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



[issue26137] [idea] use the Microsoft Antimalware Scan Interface

2016-06-30 Thread Paul Moore

Paul Moore added the comment:

OK, so a 3rd party module providing a "safe_exec" function would make a good 
proof of concept, I assume. You could probably do that using comtypes or 
pywin32.

I'm not going to try to say what is or isn't a security threat, that's not my 
expertise. But I am puzzled as to why "use safe_exec rather than exec" isn't an 
option, but "use python with the malware scanning option enabled" is. Maybe 
it's like the Powershell execution policy model, though.

I still don't want it to scan my trusted scripts, though. More interpreter 
startup overhead? No thanks.

Anyway, thanks for the clarification. It's early days yet to be debating this 
level of detail, so I'll leave it there.

--

___
Python tracker 

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



[issue26137] [idea] use the Microsoft Antimalware Scan Interface

2016-06-30 Thread Steve Dower

Steve Dower added the comment:

AMSI is intended for local scanners that are entirely on your own machine, so 
code never goes anywhere, and everything that passes through the file system is 
already scanned because of hooks whether you wrote it or not (maybe you're 
thinking of SmartScreen?).

What this would add is scanning at the exec point in:

python -c exec(decrypt(open('file.bin', 'rb')))

Currently, malware scanners don't get to see the decrypted code, and I'm 
assured this is a common pattern for getting malware onto machines (yes, in 
Python).

That said, I fully expect the official releases to require a registry key to 
enable it (can't be env or CLI option or an attacker would just leave it out :) 
). Wouldn't be on for normal use, but would be available for paranoid people.

--

___
Python tracker 

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



[issue23794] http package should support HTTP/2

2016-06-30 Thread Cory Benfield

Cory Benfield added the comment:

It occurs to me that I should update this issue to mention that the HTTP/2 
parser I spoke about above now exists, and has existed for some time, as 
hyper-h2. It's available on PyPI: https://pypi.python.org/pypi/h2

It's fully spec-compliant, and already used as the basis for HTTP/2 
implementations in mitmproxy, Twisted, and hyper itself.

--

___
Python tracker 

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



[issue23794] http package should support HTTP/2

2016-06-30 Thread STINNER Victor

STINNER Victor added the comment:

Even if HTTP2 is a standard, it looks a little bit more complex than HTTP 1.1. 
It would be nice to start with a package on PyPI to keep fast evolution, and 
then wait until the API is stabilized before we put anything in the stdlib.

Or maybe we should start with a "subset" of HTTP2.

By the way, the issue title is "http package should support HTTP/2". Are you 
talking about the http client or client+server? I suggest to start with the 
client.

--
nosy: +haypo

___
Python tracker 

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



[issue16137] Using time.asctime() with an array with negative tm_hour causes Python Crash.

2016-06-30 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Thank you Eryk.

Sad, a simple solution doesn't help. We have returned to the old decision -- 
won't fix.

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



[issue23794] http package should support HTTP/2

2016-06-30 Thread Марк Коренберг

Марк Коренберг added the comment:

Why not to use HTTP parser from Nginx ? I mean write binding using Cython.

AFAIK, Nodejs already done that.

It is fast, and fully spec-compliant http-parser.

--
nosy: +mmarkk

___
Python tracker 

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



[issue27173] Modern Unix key bindings for IDLE

2016-06-30 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Updated patch addresses your comments Terry.

Since CurrentTheme checks that the corresponding section exists, I no longer 
think it is buggy.

--
Added file: http://bugs.python.org/file43587/idle_modern_unix_key_set5.patch

___
Python tracker 

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



[issue27421] PPC64LE Fedora 2.7: certificate for hg.python.org has unexpected fingerprint

2016-06-30 Thread STINNER Victor

New submission from STINNER Victor:

http://buildbot.python.org/all/builders/PPC64LE%20Fedora%202.7/builds/429/steps/hg/logs/stdio

abort: certificate for hg.python.org has unexpected fingerprint 
31:d8:79:0f:ca:b5:c4:76:85:ba:61:84:e7:5b:52:4f:78:7d:38:3e
(check hostfingerprint configuration)

--
components: Build
keywords: buildbot
messages: 269576
nosy: haypo
priority: normal
severity: normal
status: open
title: PPC64LE Fedora 2.7: certificate for hg.python.org has unexpected 
fingerprint
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



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

2016-06-30 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Thanks Raymond.

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

___
Python tracker 

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



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

2016-06-30 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 8f1d3ebdbc56 by Serhiy Storchaka in branch '2.7':
Issue #4945: Improved the documenting of boolean arguments in the json module.
https://hg.python.org/cpython/rev/8f1d3ebdbc56

New changeset 324b061ce220 by Serhiy Storchaka in branch '3.5':
Issue #4945: Improved the documenting of boolean arguments in the json module.
https://hg.python.org/cpython/rev/324b061ce220

New changeset f2d1dba10a0e by Serhiy Storchaka in branch 'default':
Issue #4945: Improved the documenting of boolean arguments in the json module.
https://hg.python.org/cpython/rev/f2d1dba10a0e

--
nosy: +python-dev

___
Python tracker 

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



[issue27079] Bugs in curses.ascii predicates

2016-06-30 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Since screen.getch() can return -1, it looks reasonable to make curses.ascii 
predicates to work with negative integers.

Do you want to open a new issue and write a patch Akira?

--

___
Python tracker 

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



[issue27420] Docs for os.link - say what happens if link already exists

2016-06-30 Thread Niall Mansfield

New submission from Niall Mansfield:

In os.link(source, link_name)

Change
  Create a hard link pointing to source named link_name.

to
  Create a hard link pointing to source named link_name.
  If link_name already exists, OSError is raised.

--
assignee: docs@python
components: Documentation
messages: 269572
nosy: docs@python, python-bugs-uit
priority: normal
severity: normal
status: open
title: Docs for os.link - say what happens if link already exists
type: enhancement
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



[issue26137] [idea] use the Microsoft Antimalware Scan Interface

2016-06-30 Thread Paul Moore

Paul Moore added the comment:

Strong -1 on anything that scans my locally-written scripts by default. There's 
no reason or justification for that.

Maybe there's a point in having a way to submit an untrusted Python code 
snippet for scanning, but why would that need to be a core service, as opposed 
to a 3rd party module?

--

___
Python tracker 

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



[issue27417] Call CoInitializeEx on startup

2016-06-30 Thread Paul Moore

Paul Moore added the comment:

Hmm, this'll teach me to rely on my memory rather than checking :-)

It seems to me that core code that needs COM can use it by wrapping the code in 
CoInitializeEx(sys.coinit_flags)...CoUninitialize(). That will either work fine 
(I don't know where you got the idea that CoInitializeEx can only be called 
once per thread - AFAICT the the documentation you linked to clearly states 
that's not the case) or it will fail because someone else has initialised the 
thread with an incompatible model. Either try the other model (if you don't 
actually care) or report the issue and stop - it's the user's code that is 
relying on conflicting functions, so let the user decide how to deal with it.

Do you have a use case in mind where something like the above wouldn't work?

BTW, I agree that AMSI sounds like a very weird thing to want to add to the 
Python interpreter - maybe it might make sense to have a special build 
"checking" interpreter that could be used in appropriate circumstances, but I'd 
be very uncomfortable adding something like that to the core binary or making 
it "enabled by default and not be able to be disabled". So that's not a good 
motivating use case for me...

--

___
Python tracker 

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



[issue27416] typo / missing word in docs.python.org/2/library/copy.html

2016-06-30 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 9efe0e718914 by Victor Stinner in branch '2.7':
Issue #27416: clarify copy doc
https://hg.python.org/cpython/rev/9efe0e718914

New changeset 54e9ca0a1639 by Victor Stinner in branch '3.5':
Issue #27416: clarify copy doc
https://hg.python.org/cpython/rev/54e9ca0a1639

--
nosy: +python-dev

___
Python tracker 

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



[issue27416] typo / missing word in docs.python.org/2/library/copy.html

2016-06-30 Thread STINNER Victor

STINNER Victor added the comment:

> Because deep copy copies everything it may copy too much, e.g., 
> administrative data structures that should be shared even between copies.

I agree that the sentence sounds wrong. I applied David's patch, it also helped 
me to understand. Thanks :-)

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

___
Python tracker 

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



[issue23951] Update devguide style to use a similar theme as Docs

2016-06-30 Thread STINNER Victor

STINNER Victor added the comment:

I like the new style. I don't think that it's a big issue if people come to the 
/devguide/ by mistake. They should understand quickly their mistake and search 
for the right documentation.

--
nosy: +haypo

___
Python tracker 

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



[issue27417] Call CoInitializeEx on startup

2016-06-30 Thread Nikita Nemkin

Nikita Nemkin added the comment:

COM should be initialized on demand by C modules that need it. They might need 
STA or MTA, it's their choice to make.

Python core (ceval and builtins) doesn't need COM and shouldn't impose COM 
threading models on any threads it creates. Things like -X:STA are not Python's 
concern at all. Python code (interpreted) can't access COM objects directly, it 
always goes through C modules, which know better.

Also, COM using apps are very likely to be GUI apps and need STA main thread. 
MTA by default makes no sense.

PS. AMSI is insane. In what world would Pyhton interpteter send my code for 
analysis to who knows where and without even an option to disable it (because 
"security")?

--
nosy: +nnemkin

___
Python tracker 

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



[issue23794] http package should support HTTP/2

2016-06-30 Thread Boris Dušek

Changes by Boris Dušek :


--
nosy: +dusek

___
Python tracker 

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



[issue27419] Bugs in PyImport_ImportModuleLevelObject

2016-06-30 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Here is a reproducer for the first bug.

In Python 3.6:

$ ./python import_bug_1.py
1738
738
Fatal Python error: deallocating None

Current thread 0xb7552700 (most recent call first):
Aborted (core dumped)

In Python 3.5:

$ ./python import_bug_1.py
1709
Traceback (most recent call last):
  File "import_bug_1.py", line 10, in 
from .foo import bar
SystemError: Parent module '' not loaded, cannot perform relative import

--
type: behavior -> crash
Added file: http://bugs.python.org/file43586/import_bug_1.py

___
Python tracker 

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



[issue27419] Bugs in PyImport_ImportModuleLevelObject

2016-06-30 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

1. If __package__ is None, and __spec__ is None or not set, and emitting 
ImportWarning raises an error, package is a borrowed reference to None, and it 
is decrefed. As result, the reference count of None is decremented.

2. __import__ is looked in globals or builtins and passed to _find_and_load(), 
_handle_fromlist() or called with highest package name. This doesn't match 
Python implementation. Python implementation uses _gcd_import which implements 
the original __import__, and isn't affected by overriding __import__ in globals 
or builtins.

--
components: Interpreter Core
files: fix-__import__.patch
keywords: patch
messages: 269564
nosy: brett.cannon, eric.snow, ncoghlan, serhiy.storchaka
priority: normal
severity: normal
stage: patch review
status: open
title: Bugs in PyImport_ImportModuleLevelObject
type: behavior
versions: Python 3.5, Python 3.6
Added file: http://bugs.python.org/file43585/fix-__import__.patch

___
Python tracker 

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



[issue23951] Update devguide style to use a similar theme as Docs

2016-06-30 Thread Raymond Hettinger

Raymond Hettinger added the comment:

This has a nice look and feel.

--
nosy: +rhettinger

___
Python tracker 

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



[issue27079] Bugs in curses.ascii predicates

2016-06-30 Thread Akira Li

Akira Li added the comment:

There is an overlapping issue from 2010: "curses.ascii.isblank() function is 
broken. It confuses backspace (BS 0x08) with tab (0x09)" 
http://bugs.python.org/issue9770 

Your patch fixes it too (it should be closed). Note: the patch does not pass 
tests from Lib/test/test_curses_ascii.py attached to issue9770 (even if the 
code: `if char_class_name in ('cntrl', 'punct') test = 
unittest.expectedFailure(test)` is removed) e.g., iscntrl(-1) should be False 
but it returns True:

  $ ./python
  >>> import curses.ascii
  >>> curses.ascii.iscntrl(-1) #XXX expected False
  True

If we ignore negative ints then isblank, ispunct, iscntrl provided in the 
curses_ascii.patch are ok.

--
nosy: +akira

___
Python tracker 

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



[issue27418] Tools/importbench/importbench.py is broken

2016-06-30 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


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



  1   2   >