[issue25653] ctypes+callbacks+fork+selinux = crash

2016-09-03 Thread Armin Rigo

Armin Rigo added the comment:

Attached trivial example.  This gives for me a bus error when run with selinux 
(actually tested by changing the "return 0;" to "return 1;" in 
selinux_enabled_check() file Modules/_ctypes/libffi/src/closures.c).

If you comment out any of the two do_stuff() calls, everything works fine.

--
Added file: http://bugs.python.org/file44353/x.py

___
Python tracker 

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



[issue25653] ctypes+callbacks+fork+selinux = crash

2016-09-03 Thread Armin Rigo

Changes by Armin Rigo :


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



[issue27936] Inconsistent round behavior between float and int

2016-09-03 Thread Raymond Hettinger

Changes by Raymond Hettinger :


--
assignee:  -> rhettinger
resolution:  -> fixed
status: open -> closed
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



[issue27936] Inconsistent round behavior between float and int

2016-09-03 Thread Roundup Robot

Roundup Robot added the comment:

New changeset c3c4d8e4ca1a by Raymond Hettinger in branch '3.5':
Issue 27936: Fix inconsistent round() behavior between float and int
https://hg.python.org/cpython/rev/c3c4d8e4ca1a

--
nosy: +python-dev

___
Python tracker 

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



[issue25653] ctypes+callbacks+fork+selinux = crash

2016-09-03 Thread Christian Heimes

Changes by Christian Heimes :


--
nosy: +christian.heimes

___
Python tracker 

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



[issue25653] ctypes+callbacks+fork+selinux = crash

2016-09-03 Thread Christian Heimes

Christian Heimes added the comment:

Thanks Armin,

I didn't know that your reported the bug in bugs.python.org until today. Last 
year Armin and I spent a good amount of time to analyse the situation. Armin 
was able to come up with a different callback implementation for cffi that that 
does not use W/X memory mappings.

The problem affects mod_wsgi applications on SELinux systems (Fedora, CentOS, 
RHEL). For security reasons SELinux prevents Apache HTTPD to have writeable and 
executable memory pages. FFI callbacks with dynamic closures either require the 
fd workaround (which is buggy) or the application segfaults.

https://bugzilla.redhat.com/show_bug.cgi?id=1277224
https://bugzilla.redhat.com/show_bug.cgi?id=1337141
https://bugzilla.redhat.com/show_bug.cgi?id=1249685

--

___
Python tracker 

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



[issue27923] PEP 467 -- Minor API improvements for binary sequences

2016-09-03 Thread Martin Panter

Martin Panter added the comment:

Sorry Elias for not explaining my commands. xclip was just my way of pasting 
the patch URL from the clipboard (that I copied from Firefox).

It is not clear if we are actually making a DeprecationWarning, or going down 
the road of changing all the stdlib. But if we do, there are a couple of bits 
of Serhiy’s patch that I would rewrite more plainly, e.g. bytearray(b'\0\0') * 
len(...) instead of bytearray(b'\0') * (2 * len(...)).

--

___
Python tracker 

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



[issue19489] move quick search box above TOC

2016-09-03 Thread Berker Peksag

Berker Peksag added the comment:

> Do you mean in addition to the "Quick search" text that is already on the 
> page or do you want to remove that?

The latter. All of the popular browsers (Chrome, Firefox, Edge and even Safari) 
already support the placeholder attribute so I think we can safely ignore IE 8 
:)

> What problems are you thinking of?

Honestly, I can't remember now, but I was talking about old Chrome and Firefox 
versions. Let's ignore my comment for now.

I have two more minor comments:

1. +

   I know this is basically a copy of upstream searchbox.html, but we can 
probably remove ``style="display: none"`` and ``$('.inline-search').show(0);``.

2. +

   inline-search doesn't seem to be necessary here. ``display: inline`` is 
already applied by ``div.related li``.

I also found a regression in search.html. It doesn't show or highlight the 
search
words provided in the URL. Try the following URL to reproduce the problem: 
https://docs.python.org/dev/search.html?q=append

Screenshot from docs.python.org: 
https://dl.dropboxusercontent.com/u/166024/highlight-docs.pyo.png

Screenshor from my local copy with searchbar_in_header.diff3 applied: 
https://dl.dropboxusercontent.com/u/166024/highlight-after.png

--

___
Python tracker 

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



[issue27921] f-strings: do not allow backslashes

2016-09-03 Thread Roundup Robot

Roundup Robot added the comment:

New changeset d7ce127b5c0f by Eric V. Smith in branch 'default':
Closes issue 27921: Disallow backslashes anywhere in f-strings. This is a 
temporary restriction. In 3.6 beta 2, the plan is to again allow backslashes in 
the string parts of f-strings, but disallow them in the expression parts.
https://hg.python.org/cpython/rev/d7ce127b5c0f

--
nosy: +python-dev
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



[issue27948] f-strings: allow backslashes only in the string parts, not in the expression parts

2016-09-03 Thread Eric V. Smith

New submission from Eric V. Smith:

See issue 27921.

Currently (and for 3.6 beta 1), backslashes are not allowed anywhere in 
f-strings. This needs to be changed to allow them in the string parts, but not 
in the expression parts.

Also, require that the start and end of an expression be literal '{' and '}, 
not escapes like '\0x7b' and '\u007d'.

--
assignee: eric.smith
components: Interpreter Core
messages: 274294
nosy: eric.smith
priority: normal
severity: normal
stage: needs patch
status: open
title: f-strings: allow backslashes only in the string parts, not in the 
expression parts
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



[issue27921] f-strings: do not allow backslashes

2016-09-03 Thread Eric V. Smith

Eric V. Smith added the comment:

See issue 27948 for adding backslashes back in to the string parts of an 
f-string.

--

___
Python tracker 

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



[issue27921] f-strings: do not allow backslashes

2016-09-03 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 899ee1e68a8d by Eric V. Smith in branch 'default':
Issue 27921: Remove backslash from another f-string.
https://hg.python.org/cpython/rev/899ee1e68a8d

--

___
Python tracker 

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



[issue27949] Fix description in bytes literal doc

2016-09-03 Thread Xiang Zhang

New submission from Xiang Zhang:

This sentence "bytes with a numeric value of 128 or greater must be expressed 
with escapes" is wrong and not complete. The value needs to be escaped is >= 
127 and < 32.

--
assignee: docs@python
components: Documentation
files: lexical_bytes_literal.patch
keywords: patch
messages: 274297
nosy: docs@python, xiang.zhang
priority: normal
severity: normal
status: open
title: Fix description in bytes literal doc
type: enhancement
versions: Python 3.6
Added file: http://bugs.python.org/file44354/lexical_bytes_literal.patch

___
Python tracker 

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



[issue27949] Fix description in bytes literal doc

2016-09-03 Thread Eric V. Smith

Eric V. Smith added the comment:

While they probably should be entered with escapes, there's no actual technical 
requirement for that.

>From the command line, I can enter a control-A with control-V control-A (this 
>might be different depending on your environment, or if you use an editor). 
>This will enter a literal string containing a single character with value 1.

That gives:

>>> '^A' # ^A is the combination control-V control-A
'\x01'
>>> len('^A')
1
>>> ord('^A')
1
>>> b'^A'
b'\x01'

--
nosy: +eric.smith

___
Python tracker 

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



[issue27949] Fix description in bytes literal doc

2016-09-03 Thread Xiang Zhang

Xiang Zhang added the comment:

Ooh, sorry. It seems I misunderstand the meaning of the sentence. I understand 
the value as the output of repr, I mean b'\x01'. It means how it's created.

Thanks for your reply and sorry for the noise. I close this then.

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



[issue27949] Fix description in bytes literal doc

2016-09-03 Thread Eric V. Smith

Eric V. Smith added the comment:

No problem! Thanks for caring enough to open an issue and submit a patch, even 
if we don't use it.

--
stage:  -> resolved

___
Python tracker 

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



[issue27921] f-strings: do not allow backslashes

2016-09-03 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 80eb6eb57537 by Eric V. Smith in branch 'default':
Issue 27921: Remove backslash from another f-string. I'll revert this change 
before beta 2.
https://hg.python.org/cpython/rev/80eb6eb57537

--

___
Python tracker 

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



[issue27937] logging.getLevelName microoptimization

2016-09-03 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 0986401d0733 by Vinay Sajip in branch 'default':
Fixes #27937: optimise code used in all logging calls.
https://hg.python.org/cpython/rev/0986401d0733

New changeset e4b6faf22e8d by Vinay Sajip in branch '3.5':
Fixes #27937: optimise code used in all logging calls.
https://hg.python.org/cpython/rev/e4b6faf22e8d

New changeset 773c9401735f by Vinay Sajip in branch 'default':
Closes #27937: Merge fix from 3.5.
https://hg.python.org/cpython/rev/773c9401735f

--
nosy: +python-dev
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



[issue27935] logging level FATAL missing in _nameToLevel

2016-09-03 Thread Vinay Sajip

Vinay Sajip added the comment:

As this is an (admittedly small) change in behaviour, I'll apply in 3.6.

--
versions: +Python 3.6 -Python 3.5

___
Python tracker 

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



[issue25653] ctypes+callbacks+fork+selinux = crash

2016-09-03 Thread Armin Rigo

Armin Rigo added the comment:

For completeness:

* the crasher I attached gets a bus error even before calling
  ffi_closure_free().  At that point, only ffi_closure_alloc() has been
  called---in both parent and child.

* stricly speaking, cffi is not fixed: it has the same problem when
  using callbacks like ctypes.  What Christian talks about is an 
  alternative API that we came up with.  It requires the user code to be
  slightly different, and is only available if using a C compiler is
  acceptable; it is not available in the ctypes-like mode.

--

___
Python tracker 

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



[issue27930] logging's QueueListener drops log messages

2016-09-03 Thread Vinay Sajip

Vinay Sajip added the comment:

Removed 3.3 and 3.4 as they are not in scope for non-security issues.

--
versions:  -Python 3.3, Python 3.4

___
Python tracker 

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



[issue27935] logging level FATAL missing in _nameToLevel

2016-09-03 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 85f9f8bf2ec8 by Vinay Sajip in branch 'default':
Closes #27935: returned numeric value for 'FATAL' logging level.
https://hg.python.org/cpython/rev/85f9f8bf2ec8

--
nosy: +python-dev
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



[issue19489] move quick search box above TOC

2016-09-03 Thread Berker Peksag

Berker Peksag added the comment:

> I also found a regression in search.html.

Please ignore this. It doesn't have anything to do with your patch.

--

___
Python tracker 

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



[issue11734] Add half-float (16-bit) support to struct module

2016-09-03 Thread Mark Dickinson

Changes by Mark Dickinson :


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



[issue11734] Add half-float (16-bit) support to struct module

2016-09-03 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 519bde9db8e0 by Mark Dickinson in branch 'default':
Issue #11734: Add support for IEEE 754 half-precision floats to the struct 
module. Original patch by Eli Stevens.
https://hg.python.org/cpython/rev/519bde9db8e0

--
nosy: +python-dev

___
Python tracker 

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



[issue27934] json float encoding incorrect for dbus.Double

2016-09-03 Thread Mark Dickinson

Changes by Mark Dickinson :


--
assignee:  -> mark.dickinson

___
Python tracker 

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



[issue27921] f-strings: do not allow backslashes

2016-09-03 Thread Roundup Robot

Roundup Robot added the comment:

New changeset fd4e4fa75260 by Eric V. Smith in branch 'default':
Issue 27921: Remove backslash from another f-string. I'll revert this change 
before beta 2. I also need to look in to why test_tools/test_unparse fails with 
the files that are now being skipped.
https://hg.python.org/cpython/rev/fd4e4fa75260

--

___
Python tracker 

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



[issue27934] json float encoding incorrect for dbus.Double

2016-09-03 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 86d66a627b77 by Mark Dickinson in branch '2.7':
Issue #27934: Use float.__repr__ instead of plain repr when JSON-encoding an 
instance of a float subclass. Thanks Eddie James.
https://hg.python.org/cpython/rev/86d66a627b77

--
nosy: +python-dev

___
Python tracker 

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



[issue27934] json float encoding incorrect for dbus.Double

2016-09-03 Thread Mark Dickinson

Changes by Mark Dickinson :


--
resolution:  -> fixed
stage: needs patch -> 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



[issue23591] enum: Add Flags and IntFlags

2016-09-03 Thread Vedran Čačić

Vedran Čačić added the comment:

Hmm... so if I read you right:

1) IntFlags is not simply the meet of int and Flags (like IntEnum is the meet 
of int and Enum, https://docs.python.org/3.5/library/enum.html#others)? It 
seems a very different class.

2) (more important) If I give names to 1, 3, 4, and 6, you're in fact saying 
that MyFlags(7) == MyFlags(5) (since 2 is never set)? Seems like succumbing to 
temptation to guess. ;-/ But maybe it's not bad in this case, since there is 
really no ambiguity.

--

___
Python tracker 

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



[issue27731] Opt-out of MAX_PATH on Windows 10

2016-09-03 Thread Steve Dower

Steve Dower added the comment:

Just discovered that this actually requires enabling the group policy for long 
paths - specifically setting 
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem@LongPathsEnabled 
to 1.

Apparently the manifest is also required, but in my testing the manifest is 
ignored and we just get long path support for free. So perhaps we should just 
add a message to file exceptions when the path is >260?

--

___
Python tracker 

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



[issue27731] Opt-out of MAX_PATH on Windows 10

2016-09-03 Thread Steve Dower

Steve Dower added the comment:

More info at 
https://blogs.msdn.microsoft.com/jeremykuhne/2016/07/30/net-4-6-2-and-long-paths-on-windows-10/

--

___
Python tracker 

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



[issue26513] platform.win32_ver() broken in 2.7.11

2016-09-03 Thread Steve Dower

Steve Dower added the comment:

I'll try and get to this during the week. I believe it's a fairly simple fix, 
though it will mean that platform.py diverges between 2.7 and 3.5+.

--
resolution: fixed -> 
stage: resolved -> 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



[issue25405] User install of 3.5 removes py.exe from C:\Windows

2016-09-03 Thread Steve Dower

Steve Dower added the comment:

I believe this issue is fixed (as of 3.5.1), and I don't specifically know what 
I'd do to make it more fixed, so I'm closing this.

Changing the configuration of the launcher is a separate discussion.

--
resolution:  -> out of date
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue27950] Superflous messages when running make

2016-09-03 Thread Xiang Zhang

New submission from Xiang Zhang:

Every time running make I can get such messages:

# Substitution happens here, as the completely-expanded BINDIR
# is not available in configure
sed -e "s,@EXENAME@,/usr/local/bin/python3.6m," < ./Misc/python-config.in 
>python-config.py
# Replace makefile compat. variable references with shell script compat. ones;  
-> 
sed -e 's,\$(\([A-Za-z0-9_]*\)),\$\{\1\},g' < Misc/python-config.sh 
>python-config
# On Darwin, always use the python version of the script, the shell
# version doesn't use the compiler customizations that are provided
# in python (_osx_support.py).
if test `uname -s` = Darwin; then \
cp python-config.py python-config; \
fi

and 

./python -E -S -m sysconfig --generate-posix-vars ;\
if test $? -ne 0 ; then \
echo "generate-posix-vars failed" ; \
rm -f ./pybuilddir.txt ; \
exit 1 ; \
fi

I think the comment and if part has no need to prompt to users.

Also running some recipes regarding coverage like run_profile_task will prompt 

: # FIXME: can't run for a cross build

Need to get a fix for this?

--
components: Build
messages: 274316
nosy: ned.deily, xiang.zhang
priority: normal
severity: normal
status: open
title: Superflous messages when running make
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



[issue23591] enum: Add Flags and IntFlags

2016-09-03 Thread Ethan Furman

Ethan Furman added the comment:

> 1) IntFlags is not simply the meet of int and Flags (like IntEnum is the
> meet of int and Enum,
> https://docs.python.org/3.5/library/enum.html#others)?
> It seems a very different class.

No, I think it is.  The differences between Enum and IntEnum are entirely 
because IntEnum members are also ints, so they can do anything an int can do 
(but they lose their IntEnum-ness when non-Enum operations are performed on 
them).  Similarly, the differences between Flag and IntFlag are entirely 
because IntFlag members are also ints, so can do whatever ints can do (and, 
similarly, will lose their IntFlag-ness when non-Flag operations are performed 
on them).

> 2) (more important) If I give names to 1, 3, 4, and 6, you're in fact
> saying that MyFlags(7) == MyFlags(5) (since 2 is never set)?

(I think you messed up your example, as 4 | 1 == 5 and 6 | 1 == 7 -- 2 is never 
a factor.)

Absolutely not.  5 != 7, so the two will never be equal no matter which of Flag 
| IntFlag you are using.

Moreover, if MyFlags is a Flag then MyFlags(impossible_combination) will raise 
an exception.  If MyFlags is an IntFlag then MyFlags(impossible_combination) 
will have the value of  and the repr will show all the 
non-specified bits as base-2 numbers and the specified bits as names.

--

___
Python tracker 

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



[issue27950] Superflous messages when running make

2016-09-03 Thread Xiang Zhang

Changes by Xiang Zhang :


--
keywords: +patch
Added file: http://bugs.python.org/file44355/issue27950.patch

___
Python tracker 

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



[issue27935] logging level FATAL missing in _nameToLevel

2016-09-03 Thread Ondřej Medek

Ondřej Medek added the comment:

Just a comment to the https://hg.python.org/cpython/rev/85f9f8bf2ec8

It's functionality is right. It's just a little bit weird, that two derived 
levels in _nameToLevel: 'FATAL' maps to FATAL, i.e. itself, while 'WARN' maps 
to the WARNING, i.e. to the main level from which is derived.

--

___
Python tracker 

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



[issue27731] Opt-out of MAX_PATH on Windows 10

2016-09-03 Thread Brett Cannon

Brett Cannon added the comment:

SGTM

--

___
Python tracker 

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



[issue26040] Improve coverage and rigour of test.test_math

2016-09-03 Thread Roundup Robot

Roundup Robot added the comment:

New changeset e3dbe8b7279a by Mark Dickinson in branch 'default':
Issue #26040: Improve test_math and test_cmath coverage and rigour. Thanks Jeff 
Allen.
https://hg.python.org/cpython/rev/e3dbe8b7279a

--

___
Python tracker 

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



[issue26040] Improve coverage and rigour of test.test_math

2016-09-03 Thread Mark Dickinson

Mark Dickinson added the comment:

iss26040_v4.patch applied. I'm watching the buildbots; if everything looks good 
there, I'll close the issue.

--

___
Python tracker 

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



[issue27078] Make f'' strings faster than .format: BUILD_STRING opcode?

2016-09-03 Thread Eric V. Smith

Eric V. Smith added the comment:

Left a review comment. I'd like to see this in before 3.6 beta 1.

--

___
Python tracker 

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



[issue27179] subprocess uses wrong encoding on Windows

2016-09-03 Thread Dāvis

Dāvis added the comment:

ping? Could someone review my patch?

--

___
Python tracker 

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



[issue26040] Improve coverage and rigour of test.test_math

2016-09-03 Thread Mark Dickinson

Mark Dickinson added the comment:

Buildbots seem happy (or at least, no more unhappy than before). Closing.

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



[issue27179] subprocess uses wrong encoding on Windows

2016-09-03 Thread STINNER Victor

STINNER Victor added the comment:

You should take a look at the recent PEP 529 "Change Windows filesystem 
encoding to UTF-8":
https://www.python.org/dev/peps/pep-0529/

--

___
Python tracker 

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



[issue27078] Make f'' strings faster than .format: BUILD_STRING opcode?

2016-09-03 Thread Antti Haapala

Antti Haapala added the comment:

I tried to post a comment on rietveld, but 500 infernal error...

PyUnicode_New(0, 0) will return unicode_empty. If unicode_empty is NULL, then 
it will also initialize it. It would be cleanest if unicode_empty was 
statically created.

NULL cannot be used as the separator argument to `PyUnicode_Join(PyObject 
*separator, PyObject *seq)` to mean an empty string, as it already means ' ' 
(space!).

--

___
Python tracker 

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



[issue27078] Make f'' strings faster than .format: BUILD_STRING opcode?

2016-09-03 Thread Eric V. Smith

Eric V. Smith added the comment:

Of course. Never mind. LGTM.

--

___
Python tracker 

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



[issue27179] subprocess uses wrong encoding on Windows

2016-09-03 Thread Dāvis

Dāvis added the comment:

That is a great PIP, but it will take a lot of time to be implemented and it 
doesn't really solve this issue.

This is different issue than filename/path encoding. Here we need to decode 
binary output from other applications and that for a lot of applications will 
be console's code page but it could be also any other. This isn't issue about 
Unicode paths because application which is located at ASCII path, when we run 
it as a subprocess can return text output in console's code page, OEM, ANSI or 
some other encoding.

My proposed subprocess_fix_encoding_v4fixed.patch fixes this for majority of 
cases and for other cases encoding can be specified.

--

___
Python tracker 

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



[issue27921] f-strings: do not allow backslashes

2016-09-03 Thread Martin Panter

Martin Panter added the comment:

I haven’t looked, but my guess at why test_unparse could fail would be trying 
to generate code for an f-string with control characters in. Maybe it is taking 
stuff like

f'''{x}
{y}
'''

and generating

f'{x}\n{y}\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



[issue27950] Superflous messages when running make

2016-09-03 Thread Martin Panter

Martin Panter added the comment:

I never noticed this because unless I am debugging a build problem I use “make 
-s”, which hides all the commands lines, and lets you see compiler warnings etc 
much easier.

Very briefly testing with Gnu Make and BSD Make, your patch doesn’t seem to do 
anything too disastrous. BTW BSD Make seems to treat the existing python-config 
target comments as Make comments without any output, while Gnu Make treats them 
as shell comments and outputs them.

However it seems that other Make implementations might take your comments in 
the middle of a list of commands as a sign to end the list of commands. See 
:

“An empty or blank line, or a line beginning with '#', may begin a new entry.”

Maybe it would be best to move these comments to before the target rules, with 
clarification, e.g. “Substitution happens [in the first sed command] . . . [The 
second sed command] replaces . . .”

--
nosy: +martin.panter
stage:  -> patch review

___
Python tracker 

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



[issue27179] subprocess uses wrong encoding on Windows

2016-09-03 Thread Steve Dower

Steve Dower added the comment:

I'll take a look during the week. I like parts of the patch but not all of it, 
but while we're inevitably discussing my PEPs it's sure to come up.

--
assignee:  -> steve.dower

___
Python tracker 

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



[issue27364] Deprecate invalid unicode escape sequences

2016-09-03 Thread Martin Panter

Martin Panter added the comment:

Left some comments for invalid_stdlib_escapes_2.patch

--

___
Python tracker 

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



[issue27918] Running test suites without gui but still having windows flash

2016-09-03 Thread Martin Panter

Martin Panter added the comment:

Xiang’s second patch looks okay to me. The flashes occasionally annoy me with X 
windows if I am doing something else and have the Python tests running in the 
background.

I understand deferring the _is_gui_available() call will fix the main problem, 
and the withdraw() call is just an added nicety to avoid unnecessary windows 
when you actually enable -ugui.

--
nosy: +martin.panter
stage:  -> patch review

___
Python tracker 

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



[issue27927] argparse: default propagation of formatter_class from ArgumentParser() to SubParsers

2016-09-03 Thread paul j3

paul j3 added the comment:

http://bugs.python.org/issue21633

also deals with the formatter of subparsers.  I note there that few of 
parameters of the main parser propagate to the subparsers.  

The current design gives the programmer maximum control, at the expense of a 
bit of typing.  If I had to create a large number of subparsers, I might write 
a utility function to take care of the repetitious tasks.

--
nosy: +paul.j3

___
Python tracker 

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



[issue26439] ctypes.util.find_library fails when ldconfig/glibc not available (e.g., AIX)

2016-09-03 Thread Martin Panter

Martin Panter added the comment:

Regarding the regular expressions, I (or someone else unfamiliar with AIX) may 
be able to adjust them if you can explain what you are trying to achieve. Take 
the first one I commented on 

 for example. You added a comment:

# '\[%s_*64\.so\]' % name, -> has either _64 or 64 added to name

As written, this will match many strings including

[___64.so]

However the annotation leads me to belive you want it to match two cases only:

[64.so]
[_64.so]

I do not know whether to fix the annotation (has 64 preceded by any number of 
underscores), or whether to fix the regular expression (_?64).

--

___
Python tracker 

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



[issue16764] Make zlib accept keyword-arguments

2016-09-03 Thread Martin Panter

Changes by Martin Panter :


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



[issue9351] argparse set_defaults on subcommands should override top level set_defaults

2016-09-03 Thread paul j3

paul j3 added the comment:

Another example where the old way would have worked better

http://bugs.python.org/issue27859

--

___
Python tracker 

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



[issue27951] the reply's additional "Re:" is ok

2016-09-03 Thread Seif Elsallamy

Changes by Seif Elsallamy :


--
nosy: saifmega
priority: normal
severity: normal
status: open
title: the reply's additional "Re:" is ok

___
Python tracker 

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



[issue27859] argparse - subparsers does not retain namespace

2016-09-03 Thread paul j3

paul j3 added the comment:

This call used to be

namespace, arg_strings = parser.parse_known_args(arg_strings, namespace)

But in 2014 (2.7.9) http://bugs.python.org/issue9351 was implemented

As noted in the title and comment in the code, the idea was to give more power 
to the defaults set in the subparser.

But as noted in the subsequent posts, the patch has raised some backward 
compatibility issues.

Generally having the action for one argument depend on the value of another 
argument is tricky, because arguments may be parsed in any order. (but there is 
a 'test_argparse.py' case that does that kind of testing).  It is safer to test 
for any interactions after parsing is all done.

Now in the subparser case, there is an order.  Main parser arguments have to 
come first.

I suggested in 9351 a way of allowing both behaviors - use of new namespace or 
use of the existing one.  But as you can see there hasn't been any further 
action in the past 2 years.

--
nosy: +paul.j3

___
Python tracker 

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



[issue27950] Superflous messages when running make

2016-09-03 Thread Xiang Zhang

Xiang Zhang added the comment:

> However it seems that other Make implementations might take your comments in 
> the middle of a list of commands as a sign to end the list of commands.

If this is true then it seems we have to move the comments before the rules. 
Another way that might work is adding @ to silence the comment before the 
comments. But this is really unfriendly to editor highlight.

--

___
Python tracker 

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



[issue27950] Superflous messages when running make

2016-09-03 Thread Xiang Zhang

Xiang Zhang added the comment:

Ooh, sorry. This "Another way that might work is adding @ to silence the 
comment before the comments" should also fall in "However it seems that other 
Make implementations might take your comments in the middle of a list of 
commands as a sign to end the list of commands". I'll search more and if there 
is no other methods, write a patch applying your suggestion.

--

___
Python tracker 

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



[issue27950] Superflous messages when running make

2016-09-03 Thread Martin Panter

Martin Panter added the comment:

I think putting @ in front would be safe. Nobody has complained that “# . 
. .” didn’t work. I expect changing them to “@# . . .” would be no worse. 
I think the Posix page was only talking about comment lines that _don’t_ begin 
with a tab.

At least in Gnu and BSD Makes, the @# option seems to work as desired.

--

___
Python tracker 

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



[issue27950] Superfluous messages when running make

2016-09-03 Thread Martin Panter

Changes by Martin Panter :


--
title: Superflous messages when running make -> Superfluous messages when 
running make

___
Python tracker 

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



[issue27952] Finish converting fixcid.py from regex to re

2016-09-03 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

Tools/scripts/fixcid.py initially used old regex module. In 4727f260f6f8 it was 
converted to using new re module, but not all generated regular expressions 
were converted to new syntax. The script is not working since that time.

--
components: Demos and Tools
messages: 274341
nosy: ezio.melotti, martin.panter, serhiy.storchaka
priority: low
severity: normal
stage: needs patch
status: open
title: Finish converting fixcid.py from regex to re
type: behavior
versions: Python 2.7, Python 3.5, Python 3.6

___
Python tracker 

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



[issue27950] Superfluous messages when running make

2016-09-03 Thread Xiang Zhang

Xiang Zhang added the comment:

That is not ideal. @# can silence the comment but actually it is still not a 
comment. The "# ..." part still will be evaluated by shell.

--

___
Python tracker 

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



[issue23591] enum: Add Flags and IntFlags

2016-09-03 Thread Vedran Čačić

Vedran Čačić added the comment:

Ok, I believe you that you have the interface for IntFlags right (I always did, 
and I apologize if I didn't make it clear from the start). All my questions 
pertain to Flags.

You said what to me seem like two contradictory things:

> Not having 2 named has different consequences for Flag vs IntFlag (although 
> *neither is an error*): Flag: no combination of flags will ever have the 2 
> bit set

> if MyFlags is a Flag then MyFlags(impossible_combination) *will raise an 
> exception.*

Are you saying that after I write

class MyFlags(Flags):
b001 = 1
b011 = 3
b100 = 4
b110 = 6

this is _not_ an error, but if after that I call

print(MyFlags(7))

it _is_ an error? It doesn't seem so bad now I think about it, but I'd like the 
error to be reported before ("3 has bit of value 2 set, but that bit is not a 
member" or something like that).

--

___
Python tracker 

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



[issue27800] Regular expressions with multiple repeat codes

2016-09-03 Thread Martin Panter

Martin Panter added the comment:

Here is a patch for the documentation.

--
keywords: +patch
stage:  -> patch review
Added file: http://bugs.python.org/file44356/multiple-repeat.patch

___
Python tracker 

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



[issue27078] Make f'' strings faster than .format: BUILD_STRING opcode?

2016-09-03 Thread Antti Haapala

Antti Haapala added the comment:

Though it is clean to do like this: let _PyUnicode_JoinArray have `NULL` mean 
empty string, as it is more logical anyway; then PyUnicode_Join itself just 
needs to:

   if (separator == NULL) {
   separator = PyUnicode_FromOrdinal(' ');
   /* check omitted */
   res = _PyUnicode_JoinArray(separator, items, seqlen);
   Py_DECREF(separator);
   }
   else {
  res = _PyUnicode_JoinArray(separator, items, seqlen);
   }

The NULL argument I guess isn't that common to pass to PyUnicode_Join (Python 
code especially would always have to pass in ' ' instead), so this shouldn't 
really affect performance for any case at all.

--

___
Python tracker 

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