[issue26200] SETREF adds unnecessary work in some cases

2016-02-08 Thread Raymond Hettinger

Raymond Hettinger added the comment:

> And I had no one voice for separate macros (except my).

Sorry I wasn't in the conversation to back you up.

> I tried to not replace a Py_DECREF with a Py_SETREF 
> in performance critical code (e.g. in PyDict_SetItem).

If you don't mind, I would like to restore the Py_DECREF in deque_ass_item().

--

___
Python tracker 

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



[issue21955] ceval.c: implement fast path for integers with a single digit

2016-02-08 Thread Yury Selivanov

Yury Selivanov added the comment:

> I ran the mpmath test suite with Python 3.6 and with the fastint6 patch. The 
> overall increase when using Python long type was about 1%. When using gmpy2's 
> mpz type, there was a slowdown of about 2%.

> I will run more tests tonight.

Please try to test fastint5 too (fast paths for long & floats, whereas fastint6 
is only focused on longs).

--

___
Python tracker 

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



[issue25776] More compact pickle of iterators etc

2016-02-08 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Updated patch conforms to new tests and to following rule: exhausted iterators 
of mutable sequences can be replaced with iter(()), non-exhausted iterators 
can't.

--
Added file: http://bugs.python.org/file41854/iterators_pickle_2.patch

___
Python tracker 

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



[issue26117] Close directory descriptor in scandir iterator on error

2016-02-08 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 8ec721bb3027 by Serhiy Storchaka in branch '3.5':
Issue #26117: The os.scandir() iterator now closes file descriptor not only
https://hg.python.org/cpython/rev/8ec721bb3027

New changeset ec12fbf449a5 by Serhiy Storchaka in branch 'default':
Issue #26117: The os.scandir() iterator now closes file descriptor not only
https://hg.python.org/cpython/rev/ec12fbf449a5

--
nosy: +python-dev

___
Python tracker 

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



[issue26304] Fix “allows to ” in documentation

2016-02-08 Thread Eric V. Smith

Eric V. Smith added the comment:

I agree that the "to xxx" changes look good. And the handful of other 
corrections look good, too.

I left a review comment with one typo I found.

--
nosy: +eric.smith

___
Python tracker 

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



[issue25776] More compact pickle of iterators etc

2016-02-08 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Ah, I already proposed tests in separate issue.

Raymond, could you please look at patches? The touch the code maintained by 
you: itertools and deque.

--

___
Python tracker 

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



[issue25776] More compact pickle of iterators etc

2016-02-08 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


Removed file: http://bugs.python.org/file41853/iterators_pickle_tests.patch

___
Python tracker 

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



[issue25995] os.walk() consumes a lot of file descriptors

2016-02-08 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
assignee:  -> serhiy.storchaka

___
Python tracker 

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



[issue26117] Close directory descriptor in scandir iterator on error

2016-02-08 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


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



[issue21955] ceval.c: implement fast path for integers with a single digit

2016-02-08 Thread Case Van Horsen

Case Van Horsen added the comment:

mpmath is a library for arbitrary-precision floating-point arithmetic. It uses 
Python's native long type or gmpy2's mpz type for computations. It is available 
at https://pypi.python.org/pypi/mpmath.

The test suite can be run directly from the source tree. The test suite 
includes timing information for individual tests and for the the entire test. 
Sample invocation:

~/src/mpmath-0.19/mpmath/tests$ time py36 runtests.py -local

For example, I've tried to optimize gmpy2's handling of binary operations 
between its mpz type and short Python integers. I've found it to provide useful 
results: improvements that are significant on a micro-benchmark (say 20%) will 
usually cause a small but repeatable improvement. And some improvements that 
looked good on a micro-benchmark would slow down mpmath.

I ran the mpmath test suite with Python 3.6 and with the fastint6 patch. The 
overall increase when using Python long type was about 1%. When using gmpy2's 
mpz type, there was a slowdown of about 2%.

I will run more tests tonight.

--

___
Python tracker 

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



[issue26309] socketserver.BaseServer._handle_request_noblock() don't shutdwon request if verify_request is False

2016-02-08 Thread Aviv Palivoda

New submission from Aviv Palivoda:

When socketserver.BaseServer.verify_request() return False then we do not call 
shutdown_request. If we will take the TCPServer as example we will call 
get_request thus calling socket.accept() and creating a new socket but we will 
not call shutdown_request to close the unused socket.

--
components: Library (Lib)
files: socketserver-shutdown-if-verify-false.patch
keywords: patch
messages: 259861
nosy: palaviv
priority: normal
severity: normal
status: open
title: socketserver.BaseServer._handle_request_noblock() don't shutdwon request 
if verify_request is False
type: resource usage
versions: Python 2.7, Python 3.5, Python 3.6
Added file: 
http://bugs.python.org/file41855/socketserver-shutdown-if-verify-false.patch

___
Python tracker 

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



[issue26039] More flexibility in zipfile interface

2016-02-08 Thread Thomas Kluyver

Thomas Kluyver added the comment:

Thanks Serhiy! I'll keep an eye out for comments on the other patch.

--

___
Python tracker 

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



[issue26305] Make Argument Clinic to generate PEP 7 conforming code

2016-02-08 Thread Martin Panter

Martin Panter added the comment:

FWIW I agree with this change. I left one review comment. I presume the 
important stuff is just in Tools/clinic/clinic.py and the other changes are all 
generated code.

--
nosy: +martin.panter

___
Python tracker 

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



[issue20109] TestProgram is mentioned in the unittest docs but is not documented

2016-02-08 Thread Michael Foord

Michael Foord added the comment:

TestProgram is an abomination, but it has been publicly exposed in unittest 
since forever.

--

___
Python tracker 

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



[issue26305] Make Argument Clinic to generate PEP 7 conforming code

2016-02-08 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
components: +Argument Clinic

___
Python tracker 

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



[issue25195] mock.ANY doesn't match mock.MagicMock() object

2016-02-08 Thread Andrew Plummer

Changes by Andrew Plummer :


Removed file: http://bugs.python.org/file41847/test_assert_called_with_any.diff

___
Python tracker 

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



[issue25195] mock.ANY doesn't match mock.MagicMock() object

2016-02-08 Thread Andrew Plummer

Changes by Andrew Plummer :


Added file: http://bugs.python.org/file41848/fix_mock_call_ne.patch

___
Python tracker 

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



[issue25195] mock.ANY doesn't match mock.MagicMock() object

2016-02-08 Thread Andrew Plummer

Changes by Andrew Plummer :


Removed file: http://bugs.python.org/file41844/fix_mock_call_ne.patch

___
Python tracker 

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



[issue26304] Fix “allows to ” in documentation

2016-02-08 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


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



[issue24915] Profile Guided Optimization improvements (better training, llvm support, etc)

2016-02-08 Thread Christos Georgiou

Χρήστος Γεωργίου (Christos Georgiou) added the comment:

Perhaps I'm missing something obvious here, but…

…
$(MAKE) build_all_merge_profile
@echo "Rebuilding with profile guided optimizations:"
$(MAKE) clean
$(MAKE) build_all_use_profile
…

the `$(MAKE) clean` does an `rm -rf build`, so it also removes the .gcda for 
the builtin modules.

--
nosy: +tzot

___
Python tracker 

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



[issue26304] Fix “allows to ” in documentation

2016-02-08 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

I have read the patch, and it LGTM. At least it does exactly what is declared 
(and fixes some other minor errors). Thank you Martin.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue26296] colorys rgb_to_hls algorithm error

2016-02-08 Thread Kunal Grover

Kunal Grover added the comment:

This isn't needed. We are taking modulus with 1.0, which already fixes negative 
values of h.

--
nosy: +Kunal Grover

___
Python tracker 

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



[issue26306] Can't create abstract tuple

2016-02-08 Thread Jack Hargreaves

New submission from Jack Hargreaves:

When creating an abstract class, subclassing tuple causes check for 
instantiation of an abstract class to be bypassed. See the associated 
stackoverflow question -- 
http://stackoverflow.com/questions/35267954/mix-in-of-abstract-class-and-namedtuple

from abc import abstractmethod, ABCMeta

class AbstactClass(tuple, metaclass=ABCMeta):

@abstractmethod
def some_method(self):
pass

# following should throw a TypeError, but doesn't
AbstactClass()

--
messages: 259839
nosy: Jack Hargreaves
priority: normal
severity: normal
status: open
title: Can't create abstract tuple
type: behavior
versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4, Python 3.5

___
Python tracker 

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



[issue26045] Improve error message for http.client when posting unicode string

2016-02-08 Thread Martin Panter

Changes by Martin Panter :


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



[issue25698] The copy_reg module becomes unexpectedly empty in test_cpickle

2016-02-08 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Agreed. Here is a patch that makes PyImport_AddModule to use 
PyDict_GetWithError and fail earlier. I think it should be applied in 3.x too.

--
Added file: http://bugs.python.org/file41846/issue25698_fix_add_module.patch

___
Python tracker 

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



[issue25195] mock.ANY doesn't match mock.MagicMock() object

2016-02-08 Thread Andrew Plummer

Andrew Plummer added the comment:

Have added a new diff to just use the default __ne__ implementation rather than 
tuple's.

Have also added a test that targets exactly the reported issue.

--
Added file: http://bugs.python.org/file41847/test_assert_called_with_any.diff

___
Python tracker 

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



[issue26305] Make Argument Clinic to generate PEP 7 conforming code

2016-02-08 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

Proposed patch makes Argument Clinic to generate C code with curly braces as 
strongly preferred by PEP 7.

--
components: Demos and Tools
files: clinic_pep7_braces.patch
keywords: patch
messages: 259836
nosy: brett.cannon, larry, serhiy.storchaka
priority: normal
severity: normal
stage: patch review
status: open
title: Make Argument Clinic to generate PEP 7 conforming code
type: enhancement
versions: Python 3.6
Added file: http://bugs.python.org/file41849/clinic_pep7_braces.patch

___
Python tracker 

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



[issue26045] Improve error message for http.client when posting unicode string

2016-02-08 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 966bd147ccb5 by Martin Panter in branch '3.5':
Issue #26045: Add UTF-8 suggestion to error in http.client
https://hg.python.org/cpython/rev/966bd147ccb5

New changeset 9896ead3cc1d by Martin Panter in branch 'default':
Issue #26045: Merge http.client error addition from 3.5
https://hg.python.org/cpython/rev/9896ead3cc1d

--
nosy: +python-dev

___
Python tracker 

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



[issue26311] Typo in documentation for xml.parsers.expat

2016-02-08 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 1383a260b66d by Martin Panter in branch '3.5':
Issues #26310, #26311: Fix typos in the documentation and code comments
https://hg.python.org/cpython/rev/1383a260b66d

New changeset 8c7a8c7a02b9 by Martin Panter in branch '2.7':
Issues #26310, #26311: Fix typos in the documentation
https://hg.python.org/cpython/rev/8c7a8c7a02b9

--
nosy: +python-dev

___
Python tracker 

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



[issue26200] SETREF adds unnecessary work in some cases

2016-02-08 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 3084914245d2 by Raymond Hettinger in branch 'default':
Issue #26200:  The SETREF macro adds unnecessary work in some cases.
https://hg.python.org/cpython/rev/3084914245d2

--
nosy: +python-dev

___
Python tracker 

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



[issue26318] `io.open(fd, ...).name` returns numeric fd instead of None

2016-02-08 Thread Марк Коренберг

New submission from Марк Коренберг:

`io.open(fd, ...).name` returns numeric fd instead of None. This lead to some 
nasty bugs.

In order to bring consistency and make that predictable, please make `.name` 
for that case to return None. (and document it)

--
components: IO, Library (Lib)
messages: 259915
nosy: mmarkk
priority: normal
severity: normal
status: open
title: `io.open(fd, ...).name` returns numeric fd instead of None
type: behavior
versions: 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



[issue26289] Optimize floor division for ints

2016-02-08 Thread Yury Selivanov

Yury Selivanov added the comment:

Also, every other operation for longs (except %, for which I created issue 
#26315) is optimized for single digit longs.  This optimization is also 
important for users of operator.floordiv etc.  Even if we decide to provide a 
fast path in ceval, it's going to be another matter.

--

___
Python tracker 

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



[issue26316] Probable typo in Arg Clinic’s linear_format()

2016-02-08 Thread Larry Hastings

Larry Hastings added the comment:

Yeah, change "curl" to "curly".  If you commit the fix without a test case I'd 
forgive you.  Or I can do it if that makes you nervous.

--

___
Python tracker 

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



[issue26310] Fix typo “variariables” in socketserver.py

2016-02-08 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 1383a260b66d by Martin Panter in branch '3.5':
Issues #26310, #26311: Fix typos in the documentation and code comments
https://hg.python.org/cpython/rev/1383a260b66d

New changeset e2d3c93d8763 by Martin Panter in branch 'default':
Issues #26310, 26311: Merge typo fixes from 3.5
https://hg.python.org/cpython/rev/e2d3c93d8763

New changeset 8c7a8c7a02b9 by Martin Panter in branch '2.7':
Issues #26310, #26311: Fix typos in the documentation
https://hg.python.org/cpython/rev/8c7a8c7a02b9

--
nosy: +python-dev

___
Python tracker 

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



[issue26316] Probable typo in Arg Clinic’s linear_format()

2016-02-08 Thread Martin Panter

New submission from Martin Panter:

The curly bracket separator is assigned to “curl”, but then the previous 
“curly” variable is tested:

https://hg.python.org/cpython/annotate/3.5/Tools/clinic/clinic.py#l202

name, curl, trailing = trailing.partition('}')
if not curly or name not in kwargs:
...

I presume the fix is to assign to “curly”, but I haven’t had a chance to figure 
out how to test it yet.

--
components: Argument Clinic
messages: 259908
nosy: larry, martin.panter
priority: normal
severity: normal
stage: needs patch
status: open
title: Probable typo in Arg Clinic’s linear_format()
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



[issue26310] Fix typo “variariables” in socketserver.py

2016-02-08 Thread Martin Panter

Martin Panter added the comment:

Thankyou for the report. I also took the opportunity to switch the words 
“arbitrary other . . .” around to “other arbitrary . . .”.

--
nosy: +martin.panter

___
Python tracker 

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



[issue26311] Typo in documentation for xml.parsers.expat

2016-02-08 Thread Martin Panter

Martin Panter added the comment:

Thanks for the report :)

--
nosy: +martin.panter
resolution:  -> fixed
stage:  -> resolved
status: open -> closed
versions: +Python 2.7, Python 3.6

___
Python tracker 

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



[issue26310] Fix typo “variariables” in socketserver.py

2016-02-08 Thread Martin Panter

Changes by Martin Panter :


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



[issue25179] PEP 498 f-strings need to be documented

2016-02-08 Thread Martin Panter

Martin Panter added the comment:

Updated with Eric’s suggestions

--
Added file: http://bugs.python.org/file41864/f-strings.v2.patch

___
Python tracker 

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



[issue25985] Use sys.version_info instead of sys.version

2016-02-08 Thread Martin Panter

Martin Panter added the comment:

See also Issue 24916 about more related fixes in Lib/sysconfig.py

--
nosy: +martin.panter

___
Python tracker 

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



[issue24916] In sysconfig, don't rely on sys.version format

2016-02-08 Thread Martin Panter

Martin Panter added the comment:

Issue 25985 also touches the _PY_VERSION_SHORT parts of this.

--
dependencies: +Use sys.version_info instead of sys.version
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



[issue26312] Raise SystemError on programmical errors in PyArg_Parse*()

2016-02-08 Thread Martin Panter

Martin Panter added the comment:

Seems like a reasonable change and patch to me.

--
nosy: +martin.panter

___
Python tracker 

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



[issue25994] File descriptor leaks in os.scandir()

2016-02-08 Thread Martin Panter

Martin Panter added the comment:

I would be in favour of adding a ResourceWarning in 3.6 if the iterator is 
garbage collected without being exhausted. But as Josh says, it might be 
overkill emitting a warning when we already know the iterator has been finished 
and cleaned up.

--

___
Python tracker 

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



[issue26317] Build Problem with GCC + Macintosh OS X 10.11 El Capitain

2016-02-08 Thread Robert P Fischer

New submission from Robert P Fischer:

Changes to OS X 10.11 render GCC's Objective-C compiler useless.  However, I 
want to compile the main part of Python in GCC (because my C++ / Fortran Cython 
modules use GCC).

I tried to build Python (via MacPorts) using Clang for Objective-C and GCC for 
C/C++.  The environment upon running ./configure included:

  CC='/Users/rpfische/macports/mpgompi-4.9.3/bin/gcc-mp-4.9'
  CXX='/Users/rpfische/macports/mpgompi-4.9.3/bin/gcc-mp-4.9'
  OBJC='/usr/bin/clang'
  OBJCXX='/usr/bin/clang++'

HOWEVER... the build still tried to use GCC to compile Objective-C, and failed 
miserably:



:info:destroot /Users/rpfische/macports/mpgompi-4.9.3/bin/gcc-mp-4.9 -pipe -Os 
-arch x86_64 -Wno-unused-result -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 
-Wall -Wstrict-prototypes -o FileSettings.o -c ./FileSettings.m
:info:destroot /usr/include/objc/NSObject.h:22:4: error: unknown type name 
'instancetype'
:info:destroot  - (instancetype)self;
:info:destroot ^
...



Log file attached.

--
components: Build
files: log
messages: 259914
nosy: Robert P Fischer
priority: normal
severity: normal
status: open
title: Build Problem with GCC + Macintosh OS X 10.11 El Capitain
versions: Python 3.4
Added file: http://bugs.python.org/file41865/log

___
Python tracker 

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



[issue26311] Typo in documentation for xml.parsers.expat

2016-02-08 Thread Raúl Núñez de Arenas

Raúl Núñez de Arenas added the comment:

My pleasure :)

--

___
Python tracker 

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



[issue26308] Solaris 10 build issues

2016-02-08 Thread Georg Sauthoff

New submission from Georg Sauthoff:

When building on Solaris 10 I had to patch

Modules/_posixsubprocess.c -> dirfd issues
Modules/socketmodule.c -> sethostname declaration
setup.py -> ncurses detection

See the attached patch for details.

I built it like this:

CC=gcc CXX=g++ LDFLAGS="-m64 -L/opt/csw/lib/64 -R/opt/csw/lib/64" 
CPPFLAGS="-I/opt/csw/include -I/opt/csw/include/ncursesw" CFLAGS="-m64 
-D_XOPEN_SOURCE=600 -std=gnu99" CXXFLAGS="-m64" ./configure 
--prefix=/usr/local/python-3.5.1

Note that /opt/csw/ is popular open source repository for Solaris 10; it is the 
first place to go to get relatively recent stuff like gcc 4.9 etc.

The first 2 hunks of the patch aren't very controversial, I guess. The 
Solaris-ncurses detection can be done in several ways, of course.

Also, one could change ncurses package build such that the global CFLAGS 
(especially -D_XOPEN_SOURCE=600) are picked up.

Another variation - the configure could try to detect if _XOPEN_SOURCE=600 is 
supported and - in case it is  - automatically set it.

--
components: Build
files: python-3.5.1-solaris10.diff
keywords: patch
messages: 259852
nosy: gms
priority: normal
severity: normal
status: open
title: Solaris 10 build issues
type: compile error
versions: Python 3.5
Added file: http://bugs.python.org/file41852/python-3.5.1-solaris10.diff

___
Python tracker 

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



[issue25776] More compact pickle of iterators etc

2016-02-08 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


Removed file: http://bugs.python.org/file41207/iterators_pickle.diff

___
Python tracker 

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



[issue25911] Regression: os.walk now using os.scandir() breaks bytes filenames on windows

2016-02-08 Thread STINNER Victor

STINNER Victor added the comment:

> New changeset 5310f94772f4 by Serhiy Storchaka in branch '3.5':
> Issue #25911: Restored support of bytes paths in os.walk() on Windows.
> https://hg.python.org/cpython/rev/5310f94772f4
> 
> New changeset b060af2a58b6 by Serhiy Storchaka in branch 'default':
> Issue #25911: Restored support of bytes paths in os.walk() on Windows.
> https://hg.python.org/cpython/rev/b060af2a58b6

While this change is ok for Python 3.5, I would prefer to *drop* support for 
bytes filenames on Windows. I started a thread on python-dev for that:
https://mail.python.org/pipermail/python-dev/2016-February/143150.html

--

___
Python tracker 

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



[issue25911] Regression: os.walk now using os.scandir() breaks bytes filenames on windows

2016-02-08 Thread STINNER Victor

STINNER Victor added the comment:

Bastien:
> In py3.4 and below we used to be able to use bytes filenames with os.walk(), 
> it’s now impossible under windows due to the limitation of os.scandir().
>
> This issue was reported to Blender tracker 
> (https://developer.blender.org/T47018).

Again, why do you use bytes? Blender only supports Python 3. You must use 
Unicode on all platforms. On Windows, it gives you support of the full Unicode 
character set for free.

--

___
Python tracker 

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



[issue25776] More compact pickle of iterators etc

2016-02-08 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Proposed patch extends tests for pickling iterators of mutable sequences. Now 
tested iterators in different states: initial (no iterated yet), running (in 
the middle of iteration), empty (just the last item was emitted) and exhausted 
(tried to iterate past the end).

--
Added file: http://bugs.python.org/file41853/iterators_pickle_tests.patch

___
Python tracker 

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



[issue26168] Py_BuildValue may leak 'N' arguments on PyTuple_New failure

2016-02-08 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Following patch is written in the style of current code for tuples.

--
Added file: http://bugs.python.org/file41850/pybuildvalue_leak3.patch

___
Python tracker 

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



[issue26117] Close directory descriptor in scandir iterator on error

2016-02-08 Thread STINNER Victor

STINNER Victor added the comment:

> Could anyone please make a review?

Done. Enjoy :-)

--

___
Python tracker 

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



[issue26204] compiler: ignore constants used as statements? (don't emit LOAD_CONST+POP_TOP)

2016-02-08 Thread STINNER Victor

STINNER Victor added the comment:

changeset:   100192:4bdb21380743
tag: tip
user:Victor Stinner 
date:Mon Feb 08 18:17:58 2016 +0100
files:   Lib/test/test_ast.py Lib/test/test_code.py 
Lib/test/test_grammar.py Misc/NEWS Python/compile.c
description:
compiler now ignores constant statements

The compile ignores constant statements and emit a SyntaxWarning warning.

Don't emit the warning for string statement because triple quoted string is a
common syntax for multiline comments.

Don't emit the warning on ellipis neither: 'def f(): ...' is a legit syntax for
abstract functions.

Changes:

* test_ast: ignore SyntaxWarning when compiling test statements. Modify
  test_load_const() to use assignment expressions rather than constant
  expression.
* test_code: add more kinds of constant statements, ignore SyntaxWarning when
  testing that the compiler removes constant statements.
* test_grammar: ignore SyntaxWarning on the statement "1"

--

___
Python tracker 

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



[issue25983] Add tests for multi-argument type()

2016-02-08 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Thanks for your review Brett. I have landed tests in test_builtins.

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



[issue26200] SETREF adds unnecessary work in some cases

2016-02-08 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Oh, sorry, I didn't considered the deque as essential class. Please do. 
Py_SETREF here only saved 3 lines of code.

--

___
Python tracker 

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



[issue26311] Typo in documentation for xml.parsers.expat

2016-02-08 Thread Raúl Núñez de Arenas

New submission from Raúl Núñez de Arenas:

At 
https://docs.python.org/3.5/library/pyexpat.html#module-xml.parsers.expat.model 
the docs say "Content modules are described using nested tuples.

It should say "Content models are described using nested tuples."

I've checked docs for version 3.6.0a and the typo is there, too.

--
components: XML
messages: 259873
nosy: Raúl Núñez de Arenas
priority: normal
severity: normal
status: open
title: Typo in documentation for xml.parsers.expat
versions: Python 3.5

___
Python tracker 

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



[issue26309] socketserver.BaseServer._handle_request_noblock() don't shutdwon request if verify_request is False

2016-02-08 Thread Aviv Palivoda

Aviv Palivoda added the comment:

Had a small mistake in the previous patch (did not notice process_request) call 
shutdown_request.

fixed the patch

--
Added file: 
http://bugs.python.org/file41856/socketserver-shutdown-if-verify-false2.patch

___
Python tracker 

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



[issue26204] compiler: ignore constants used as statements (don't emit LOAD_CONST+POP_TOP)

2016-02-08 Thread STINNER Victor

STINNER Victor added the comment:

I changed my patch to emit a SyntaxWarning. If too many users complain of the 
warning, maybe we can remove it. IMHO it's useful to detect bugs.

--
resolution:  -> fixed
status: open -> closed
title: compiler: ignore constants used as statements? (don't emit 
LOAD_CONST+POP_TOP) -> compiler: ignore constants used as statements (don't 
emit LOAD_CONST+POP_TOP)

___
Python tracker 

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



[issue26310] Fix typo “variariables” in socketserver.py

2016-02-08 Thread Marien

New submission from Marien:

This patch fixes a typo in socketserver.py

--
assignee: docs@python
components: Documentation
files: fix-typo-variariables.patch
keywords: patch
messages: 259869
nosy: docs@python, marienfr
priority: normal
severity: normal
status: open
title: Fix typo “variariables” in socketserver.py
Added file: http://bugs.python.org/file41858/fix-typo-variariables.patch

___
Python tracker 

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



[issue24915] Profile Guided Optimization improvements (better training, llvm support, etc)

2016-02-08 Thread Alecsandru Patrascu

Alecsandru Patrascu added the comment:

Hello and thank you for your feedback. For CPython this does not apply because 
due to the structure of the build system, inside the "build" directory there 
are no PGO profiles saved. You can run find . -name '*.gc??' to see.

--

___
Python tracker 

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



[issue24915] Profile Guided Optimization improvements (better training, llvm support, etc)

2016-02-08 Thread Christos Georgiou

Χρήστος Γεωργίου (Christos Georgiou) added the comment:

There are. (Check issue #26307 that explains this cpio file. This is a x32 
build of Python, because the memory savings are very welcome for the multiple 
worker processes of a project I work on.)

$ cpio -it <_modules.gcda.cpio
build/temp.linux-x86_64-3.5/opt/x32/src/Python-3.5.1/Modules/_multiprocessing/semaphore.gcda
build/temp.linux-x86_64-3.5/opt/x32/src/Python-3.5.1/Modules/_multiprocessing/multiprocessing.gcda
build/temp.linux-x86_64-3.5/opt/x32/src/Python-3.5.1/Modules/_posixsubprocess.gcda
build/temp.linux-x86_64-3.5/opt/x32/src/Python-3.5.1/Modules/_struct.gcda
build/temp.linux-x86_64-3.5/opt/x32/src/Python-3.5.1/Modules/_heapqmodule.gcda
build/temp.linux-x86_64-3.5/opt/x32/src/Python-3.5.1/Modules/_opcode.gcda
build/temp.linux-x86_64-3.5/opt/x32/src/Python-3.5.1/Modules/binascii.gcda
build/temp.linux-x86_64-3.5/opt/x32/src/Python-3.5.1/Modules/_ssl.gcda
build/temp.linux-x86_64-3.5/opt/x32/src/Python-3.5.1/Modules/arraymodule.gcda
build/temp.linux-x86_64-3.5/opt/x32/src/Python-3.5.1/Modules/_pickle.gcda
build/temp.linux-x86_64-3.5/opt/x32/src/Python-3.5.1/Modules/_randommodule.gcda
build/temp.linux-x86_64-3.5/opt/x32/src/Python-3.5.1/Modules/_hashopenssl.gcda
build/temp.linux-x86_64-3.5/opt/x32/src/Python-3.5.1/Modules/_lzmamodule.gcda
build/temp.linux-x86_64-3.5/opt/x32/src/Python-3.5.1/Modules/grpmodule.gcda
build/temp.linux-x86_64-3.5/opt/x32/src/Python-3.5.1/Modules/socketmodule.gcda
build/temp.linux-x86_64-3.5/opt/x32/src/Python-3.5.1/Modules/selectmodule.gcda
build/temp.linux-x86_64-3.5/opt/x32/src/Python-3.5.1/Modules/_math.gcda
build/temp.linux-x86_64-3.5/opt/x32/src/Python-3.5.1/Modules/mathmodule.gcda
build/temp.linux-x86_64-3.5/opt/x32/src/Python-3.5.1/Modules/_datetimemodule.gcda
build/temp.linux-x86_64-3.5/opt/x32/src/Python-3.5.1/Modules/resource.gcda
build/temp.linux-x86_64-3.5/opt/x32/src/Python-3.5.1/Modules/zlibmodule.gcda
build/temp.linux-x86_64-3.5/opt/x32/src/Python-3.5.1/Modules/unicodedata.gcda
build/temp.linux-x86_64-3.5/opt/x32/src/Python-3.5.1/Modules/_testcapimodule.gcda

--

___
Python tracker 

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



[issue25983] Add tests for multi-argument type()

2016-02-08 Thread Roundup Robot

Roundup Robot added the comment:

New changeset f9bd6ddb6ba4 by Serhiy Storchaka in branch '2.7':
Issue #25983: Added tests for multi-argument type().
https://hg.python.org/cpython/rev/f9bd6ddb6ba4

New changeset 0e7aabe76159 by Serhiy Storchaka in branch '3.5':
Issue #25983: Added tests for multi-argument type().
https://hg.python.org/cpython/rev/0e7aabe76159

New changeset f494052eb476 by Serhiy Storchaka in branch 'default':
Issue #25983: Added tests for multi-argument type().
https://hg.python.org/cpython/rev/f494052eb476

--
nosy: +python-dev

___
Python tracker 

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



[issue26204] compiler: ignore constants used as statements? (don't emit LOAD_CONST+POP_TOP)

2016-02-08 Thread Roundup Robot

Roundup Robot added the comment:

New changeset a0d053899ff8 by Victor Stinner in branch 'default':
Simplify main() of test_ast
https://hg.python.org/cpython/rev/a0d053899ff8

New changeset bcf27fa55632 by Victor Stinner in branch 'default':
Replace noop constant statement with expression
https://hg.python.org/cpython/rev/bcf27fa55632

--
nosy: +python-dev

___
Python tracker 

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



[issue26117] Close directory descriptor in scandir iterator on error

2016-02-08 Thread STINNER Victor

STINNER Victor added the comment:

Thanks for the fix Serhiy ;-)

--

___
Python tracker 

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



[issue25994] File descriptor leaks in os.scandir()

2016-02-08 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Proposed patch adds the close() methon and the support of the context manager 
protocol for the os.scandir class.

--
keywords: +patch
stage:  -> patch review
versions:  -Python 3.5
Added file: http://bugs.python.org/file41857/scandir_close.patch

___
Python tracker 

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



[issue26314] interned strings are stored in a dict, a set would use less memory

2016-02-08 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
nosy: +rhettinger

___
Python tracker 

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



[issue26288] Optimize PyLong_AsDouble for single-digit longs

2016-02-08 Thread Yury Selivanov

Yury Selivanov added the comment:

I'm not sure why this issue is open... Closing it.

--
status: open -> closed

___
Python tracker 

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



[issue26182] Deprecation warnings for the future async and await keywords

2016-02-08 Thread Yury Selivanov

Yury Selivanov added the comment:

Assigning the issue to myself to make sure it won't be forgotten before it's 
too late.  Anish or Marco, feel free to propose a patch.

--
assignee:  -> yselivanov
stage:  -> needs patch
versions:  -Python 3.5

___
Python tracker 

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



[issue26289] Optimize floor division for ints

2016-02-08 Thread Yury Selivanov

Yury Selivanov added the comment:

Serhiy, Victor, thanks for the review. Attaching an updated version of the 
patch.

--
Added file: http://bugs.python.org/file41860/floor_div_2.patch

___
Python tracker 

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



[issue26307] no PGO for built-in modules with `make profile-opt`

2016-02-08 Thread Alecsandru Patrascu

Alecsandru Patrascu added the comment:

Thank you for noticing and signaling this issue. Since I proposed the PGO 
patches, I will fix it in another patch, as I don't want it to break any builds.

--

___
Python tracker 

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



[issue26314] interned strings are stored in a dict, a set would use less memory

2016-02-08 Thread Maciej Szulik

Changes by Maciej Szulik :


--
nosy: +maciej.szulik

___
Python tracker 

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



[issue26312] Raise SystemError on programmical errors in PyArg_Parse*()

2016-02-08 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

For now programmical errors with the use of PyArg_ParseTuple() cause raising 
SystemError. But some programmical errors with the use of 
PyArg_ParseTupleAndKeywords() cause raising RuntimeError. I think that 
SystemError is the correct exception type.

Proposed patch replaces RuntimeError with SystemError in 
PyArg_ParseTupleAndKeywords(). This change shouldn't break any code (except 
CPython tests for PyArg_ParseTupleAndKeywords()), because this exception never 
raised if PyArg_Parse*() functions are used correctly.

--
components: Interpreter Core
files: pyarg_parse_error.patch
keywords: patch
messages: 259877
nosy: serhiy.storchaka
priority: normal
severity: normal
stage: patch review
status: open
title: Raise SystemError on programmical errors in PyArg_Parse*()
type: enhancement
versions: Python 3.6
Added file: http://bugs.python.org/file41859/pyarg_parse_error.patch

___
Python tracker 

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



[issue26314] interned strings are stored in a dict, a set would use less memory

2016-02-08 Thread Gregory P. Smith

New submission from Gregory P. Smith:

The implementation of string interning uses a dict [1].  It would consume less 
memory and be a bit simpler if it used a set.

Identifier strings in a program are interned.  If you have a large program with 
a lot of code, this makes for a large dictionary.

Experimenting with changing this to use a set on 2.7 found ~22k savings on an 
interactive interpreter startup.  Measuring it on a huge application showed a 
few hundred k saved.

[1]: https://hg.python.org/cpython/file/3.5/Objects/unicodeobject.c#l1579

--
messages: 259885
nosy: gregory.p.smith, nnorwitz
priority: low
severity: normal
stage: needs patch
status: open
title: interned strings are stored in a dict, a set would use less memory
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



[issue26182] Deprecation warnings for the future async and await keywords

2016-02-08 Thread STINNER Victor

STINNER Victor added the comment:

Can you please mention the python version in the title?

--

___
Python tracker 

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



[issue26307] no PGO for built-in modules with `make profile-opt`

2016-02-08 Thread Alecsandru Patrascu

Changes by Alecsandru Patrascu :


--
nosy: +alecsandru.patrascu

___
Python tracker 

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



[issue26182] Deprecation warnings for the future async and await keywords in Python 3.6

2016-02-08 Thread Brett Cannon

Changes by Brett Cannon :


--
title: Deprecation warnings for the future async and await keywords -> 
Deprecation warnings for the future async and await keywords in Python 3.6

___
Python tracker 

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



[issue26204] compiler: ignore constants used as statements (don't emit LOAD_CONST+POP_TOP)

2016-02-08 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 15531b10976c by Victor Stinner in branch 'default':
compiler: don't emit SyntaxWarning on const stmt
https://hg.python.org/cpython/rev/15531b10976c

--

___
Python tracker 

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



[issue24915] Profile Guided Optimization improvements (better training, llvm support, etc)

2016-02-08 Thread Christos Georgiou

Χρήστος Γεωργίου (Christos Georgiou) added the comment:

First, let's make sure we're on the same page.

- These files are created during the `$(MAKE) run_profile_task` stage.
- They get removed during the `$(MAKE) clean` stage, along with the build 
directory.
- The build directory gets recreated during the `$(MAKE) build_all_use_profile` 
stage, without any .gcda files this time.

So you won't see these files after a successful build *if* you haven't taken 
measures to ensure they are saved during the build process. I save these files 
to a cpio file *before* `make clean` runs and restore them right afterwards.
I suggest you modify `Makefile.pre.in` to include similar commands to the ones 
I mention in issue #23607 to verify whether your system creates these files or 
not.

Now, for the info you required:

It's a system running Ubuntu 14.04 64-bit with gcc 4.8.4. It's a build of 
Python with the `-mx32` flag, along with all required libraries for the needs 
of a specific project. (I think that the `-mx32` flag is not important to our 
discussion here though.) It isn't a cross-compilation.

--

___
Python tracker 

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



[issue24915] Profile Guided Optimization improvements (better training, llvm support, etc)

2016-02-08 Thread Alecsandru Patrascu

Alecsandru Patrascu added the comment:

That's interesting. Even on CPython3, I still don't see any gcda's inside the 
build directory, nor the tree structure you are seeing there. Can you please 
give me a couple of details regarding your environment (os, distribution, gcc 
version, 32/64 bit, cross compilation, etc)? 

If this is a general issue, I can add another patch to fix it.

--

___
Python tracker 

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



[issue25985] Use sys.version_info instead of sys.version

2016-02-08 Thread Andrew Plummer

Andrew Plummer added the comment:

On a related note, I think that 
https://hg.python.org/cpython/file/tip/Makefile.pre.in#l571 should get the same 
treatment.

--
nosy: +aplummer

___
Python tracker 

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



[issue26204] compiler: ignore constants used as statements (don't emit LOAD_CONST+POP_TOP)

2016-02-08 Thread Georg Brandl

Georg Brandl added the comment:

Shouldn't the message be "constant statement ignored"?  The current wording 
reads strange to me.

--
nosy: +georg.brandl

___
Python tracker 

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



[issue26313] ssl.py _load_windows_store_certs fails if windows cert store is empty

2016-02-08 Thread Jonathan Kamens

New submission from Jonathan Kamens:

In ssl.py:

def _load_windows_store_certs(self, storename, purpose):
certs = bytearray()
for cert, encoding, trust in enum_certificates(storename):
# CA certs are never PKCS#7 encoded 
if encoding == "x509_asn":
if trust is True or purpose.oid in trust:
certs.extend(cert)
self.load_verify_locations(cadata=certs)
return certs

The line right before the return statement will raise an exception if certs is 
empty.

It should be protected with "if certs:" as it is elsewhere in this file.

--
components: Windows
messages: 259880
nosy: Jonathan Kamens, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: ssl.py _load_windows_store_certs fails if windows cert store is empty
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



[issue26204] compiler: ignore constants used as statements (don't emit LOAD_CONST+POP_TOP)

2016-02-08 Thread John Mark Vandenberg

Changes by John Mark Vandenberg :


--
nosy: +jayvdb

___
Python tracker 

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



[issue25985] Use sys.version_info instead of sys.version

2016-02-08 Thread SilentGhost

SilentGhost added the comment:

> On a related note, I think that 
> https://hg.python.org/cpython/file/tip/Makefile.pre.in#l571 should get the 
> same treatment.

Agree, that should be included in the patch.

--
nosy: +SilentGhost

___
Python tracker 

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



[issue24915] Profile Guided Optimization improvements (better training, llvm support, etc)

2016-02-08 Thread Alecsandru Patrascu

Alecsandru Patrascu added the comment:

For my responses, I modified locally the Makefile so that it will not remove 
the build directory and any of the gcda files. I will make some more tests 
tomorrow, but i think that this problem will solve simpler if the removal of 
the build directory is deleted and all the profile info is kept.

--

___
Python tracker 

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



[issue26204] compiler: ignore constants used as statements (don't emit LOAD_CONST+POP_TOP)

2016-02-08 Thread STINNER Victor

STINNER Victor added the comment:

> Shouldn't the message be "constant statement ignored"?  The current wording 
> reads strange to me.

I removed the warning ;)

--

___
Python tracker 

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



[issue26110] Speedup method calls 1.2x

2016-02-08 Thread Leonardo Santagada

Changes by Leonardo Santagada :


--
nosy: +santagada

___
Python tracker 

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



[issue25300] Enable Intel MPX (Memory protection Extensions) feature

2016-02-08 Thread Antoine Pitrou

Antoine Pitrou added the comment:

For the record, the llvm-dev is currently having a discussion thread about MPX. 
Some of the feedback is a bit critical:
http://lists.llvm.org/pipermail/llvm-dev/2016-February/094828.html

Also this quite comprehensive report:
https://github.com/google/sanitizers/wiki/AddressSanitizerIntelMemoryProtectionExtensions

--

___
Python tracker 

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



[issue26289] Optimize floor division for ints

2016-02-08 Thread Yury Selivanov

Yury Selivanov added the comment:

There is no drastic difference on where you implement the fast path.  I'd 
implement all specializations/optimizations in longobject.c and optimize ceval 
to call slots directly.  That way, the implact on ceval performance would be 
minimal.

--

___
Python tracker 

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



[issue26315] Optimize mod division for ints

2016-02-08 Thread Yury Selivanov

New submission from Yury Selivanov:

The attached patch implements fast path for modulo division of single digit 
longs.

Some timeit micro-benchmarks: 

-m timeit -s "x=22331" "x%2;x%3;x%4;x%5;x%6;x%7;x%8;x%99;x%100;"
with patch: 0.213 usec
without patch: 0.602 usec

--
assignee: yselivanov
components: Interpreter Core
files: mod_div.patch
keywords: patch
messages: 259897
nosy: haypo, serhiy.storchaka, yselivanov
priority: normal
severity: normal
stage: patch review
status: open
title: Optimize mod division for ints
type: performance
versions: Python 3.6
Added file: http://bugs.python.org/file41861/mod_div.patch

___
Python tracker 

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



[issue26289] Optimize floor division for ints

2016-02-08 Thread Yury Selivanov

Changes by Yury Selivanov :


Added file: http://bugs.python.org/file41862/floor_div_3.patch

___
Python tracker 

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



[issue25994] File descriptor leaks in os.scandir()

2016-02-08 Thread STINNER Victor

STINNER Victor added the comment:

Context manager protocol, close() method: it looks more and more like a file. 
In this case, I suggest to emit a ResourceWarning in the destructor if it's not 
closed explicitly. It mean that the scandir() must always be used with "with" 
or at least that close() is always closed.

We probably need to update the code to be more explicitly on that.

--

___
Python tracker 

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



[issue26315] Optimize mod division for ints

2016-02-08 Thread STINNER Victor

STINNER Victor added the comment:

See also issue #21955.

--

___
Python tracker 

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



[issue26289] Optimize floor division for ints

2016-02-08 Thread Yury Selivanov

Changes by Yury Selivanov :


--
assignee:  -> yselivanov

___
Python tracker 

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



[issue26314] interned strings are stored in a dict, a set would use less memory

2016-02-08 Thread Gregory P. Smith

Gregory P. Smith added the comment:

Here's an example patch against 2.7 by nnorwitz that we're currently testing.

--
keywords: +needs review, patch
Added file: http://bugs.python.org/file41863/interned_set_27.diff

___
Python tracker 

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



[issue26314] interned strings are stored in a dict, a set would use less memory

2016-02-08 Thread Josh Rosenberg

Josh Rosenberg added the comment:

Presumably it would involve using private set APIs to make this work, right? 
Since normally you can't look up the actual value in a set, just check for 
existence?

--
nosy: +josh.r

___
Python tracker 

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



[issue25994] File descriptor leaks in os.scandir()

2016-02-08 Thread Josh Rosenberg

Josh Rosenberg added the comment:

Adding a ResourceWarning even if the generator is run to completion? That 
seems... dev hostile. I mean, yes, probably best to document it as best 
practice to use with with statement, but something simple like `files = 
sorted(os.scandir('.'), key=lambda x: x.stat().st_mtime)` to get files ordered 
by modification time (which cleanly runs the generator to exhaustion 
immediately) should not be raising ResourceWarning in 3.6 when it didn't do so 
in 3.5, and has minimal risk of leaking in any event.

--
nosy: +josh.r

___
Python tracker 

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



[issue24294] DeprecationWarnings should be visible by default in the interactive REPL

2016-02-08 Thread John Mark Vandenberg

Changes by John Mark Vandenberg :


--
nosy: +jayvdb

___
Python tracker 

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