[issue19450] Bug in sqlite in Windows binaries

2016-03-14 Thread Benjamin Peterson

Benjamin Peterson added the comment:

Let's make Windows use the same version as the Mac installer.

--
assignee: benjamin.peterson -> steve.dower

___
Python tracker 

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



[issue22359] Remove incorrect uses of recursive make

2016-03-14 Thread Martin Panter

Martin Panter added the comment:

Here is a patch implementing my idea to make file reneration a separate step, 
not automatically run during the normal build process. But it is sounding like 
other people don’t like this idea, so Xavier’s approach might be less 
controversial even if it is more complicated.

--
Added file: http://bugs.python.org/file42169/separate-regen.patch

___
Python tracker 

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



[issue26533] logging.config does not allow disable_existing_loggers=True

2016-03-14 Thread Patrick Egan

Patrick Egan added the comment:

Used proposed method to solve this bug and implemented the extra kwarg 
disable_existing_loggers to the listen() parameters.

--
keywords: +patch
nosy: +chillydev
Added file: http://bugs.python.org/file42168/Issue#26533.patch

___
Python tracker 

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



[issue22438] eventlet broke by python 2.7.x

2016-03-14 Thread Nick Coghlan

Nick Coghlan added the comment:

Just noting that if we decided to reconsider addressing this upstream for the 
benefit of folks backporting PEP 493, Robert Kuska wrote a patch to restore 
sslwrap for the RHEL/CentOS PEP 466 backport:

* 
https://git.centos.org/blob/rpms!python.git/f63228654ecef84a78c552dac832f4cd939cf584/SPECS!python.spec#L989
* 
https://git.centos.org/blob/rpms!python.git/f63228654ecef84a78c552dac832f4cd939cf584/SOURCES!00221-pep466-backport-sslwrap-c-ssl.patch

--
nosy: +ncoghlan, rkuska

___
Python tracker 

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



[issue23857] Make default HTTPS certificate verification setting configurable

2016-03-14 Thread Nick Coghlan

Nick Coghlan added the comment:

Explicitly noting for anyone considering backporting this change (together with 
PEP 466 & 476) to a long term support release: watch out for 
https://bugs.python.org/issue22438

The RHEL/CentOS backport includes a reimplementation of sslwrap:

* 
https://git.centos.org/blob/rpms!python.git/f63228654ecef84a78c552dac832f4cd939cf584/SPECS!python.spec#L989
* 
https://git.centos.org/blob/rpms!python.git/f63228654ecef84a78c552dac832f4cd939cf584/SOURCES!00221-pep466-backport-sslwrap-c-ssl.patch

--

___
Python tracker 

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



[issue26559] logging.handlers.MemoryHandler flushes on shutdown but not removal

2016-03-14 Thread Ned Deily

Changes by Ned Deily :


--
nosy: +vinay.sajip

___
Python tracker 

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



[issue26562] Large Involuntary context switches during oom-killer

2016-03-14 Thread Damian Myerscough

Damian Myerscough added the comment:

@rbcollins there is nothing else running in the Docker container other than the 
python interpreter. I did an `strace` of the process

mmap(NULL, 3149824, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
0x7effc2d0c000
munmap(0x7effc300d000, 790528)  = 0


@haypo, this only with Python when it is killed by oom-killer. NodeJS/C++ dont 
show nearly as many involuntary context switches or page faults. I logged the 
bug to see if anyone else has encountered this.

--

___
Python tracker 

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



[issue26565] [ctypes] Add value attribute to non basic pointers.

2016-03-14 Thread Memeplex

New submission from Memeplex:

I know one can do addressof(p.contents), but it's a bit inconsistent that 
c_void_p and c_char_p contain the same information in the value attribute.

--
components: ctypes
messages: 261794
nosy: memeplex
priority: normal
severity: normal
status: open
title: [ctypes] Add value attribute to non basic pointers.
type: enhancement

___
Python tracker 

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



[issue26564] Malloc debug hooks: display memory block traceback on error

2016-03-14 Thread STINNER Victor

New submission from STINNER Victor:

Python implements debug hooks on Python memory allocators:
https://docs.python.org/dev/c-api/memory.html#c.PyMem_SetupDebugHooks

Problem: buffer understand and buffer overflow are only detected when a memory 
block is released, which may occur far from the code responsible to create the 
buffer.

Attached patch dumps the traceback where a memory block was allocated on error 
in malloc debug hooks. The feature requires to enable tracemalloc to record 
tracebacks.


test.py used in below example:

import _testcapi

def f():
_testcapi.pymem_buffer_overflow()

f()



Example:
---
haypo@selma$ ./python -X tracemalloc=5 test.py 
Debug memory block at address p=0x22e8be0: API 'm'
16 bytes originally requested
The 7 pad bytes at p-7 are FORBIDDENBYTE, as expected.
The 8 pad bytes at tail=0x22e8bf0 are not all FORBIDDENBYTE (0xfb):
at tail+0: 0x78 *** OUCH
...
The block was made by call #37240 to debug malloc/realloc.
Data at p: cb cb cb cb cb cb cb cb cb cb cb cb cb cb cb cb

Memory block traceback (most recent call first):
  File "test.py", line 4
  File "test.py", line 6

Fatal Python error: bad trailing pad byte

Current thread 0x7f4a93d9c700 (most recent call first):
  File "test.py", line 4 in f
  File "test.py", line 6 in 
Abandon (core dumped)
---

The patch adds the "Memory block traceback" section.

--
files: pymem_tb.patch
keywords: patch
messages: 261793
nosy: haypo
priority: normal
severity: normal
status: open
title: Malloc debug hooks: display memory block traceback on error
type: enhancement
versions: Python 3.6
Added file: http://bugs.python.org/file42167/pymem_tb.patch

___
Python tracker 

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



[issue25320] unittest loader.py TypeError when code directory contains a socket

2016-03-14 Thread Robert Collins

Robert Collins added the comment:

Thanks for the patch; the test may be redundant but not enough to matter for 
now - and the bug really doth need fixing, so I've applied it as-is.

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



[issue25320] unittest loader.py TypeError when code directory contains a socket

2016-03-14 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 1d72402c1c91 by Robert Collins in branch 'default':
#25320: Handle sockets in directories unittest discovery is scanning.
https://hg.python.org/cpython/rev/1d72402c1c91

--

___
Python tracker 

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



[issue25320] unittest loader.py TypeError when code directory contains a socket

2016-03-14 Thread Roundup Robot

Roundup Robot added the comment:

New changeset efc9836e0c83 by Robert Collins in branch '3.5':
#25320: Handle sockets in directories unittest discovery is scanning.
https://hg.python.org/cpython/rev/efc9836e0c83

--
nosy: +python-dev

___
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-03-14 Thread Jeff Allen

Jeff Allen added the comment:

Here is a patch that improves coverage and addresses the uneven accuracy. 
Required accuracy is now specified in ulps. Mostly, I have choses 1 ulp, since 
this passed for me on an x86 architecture (and also ARM), but this may be too 
ambitious.

I have also responded to the comment relating to erfc:
# XXX Would be better to weaken this test only
# for large x, instead of for all x."

I found I could not contribute the code I used to generate the additional test 
cases in Tools/scripts without failing test_tools. (It complained of a missing 
dependency. The generator uses mpmath.)

--
keywords: +patch
Added file: http://bugs.python.org/file42166/iss26040.patch

___
Python tracker 

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



[issue26249] Change PyMem_Malloc to use pymalloc allocator

2016-03-14 Thread STINNER Victor

STINNER Victor added the comment:

I created the issue #26563 "PyMem_Malloc(): check that the GIL is hold in debug 
hooks".

--

___
Python tracker 

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



[issue26563] PyMem_Malloc(): check that the GIL is hold in debug hooks

2016-03-14 Thread STINNER Victor

Changes by STINNER Victor :


--
title: PyMem_Malloc(): check that the GIL is held in debug hooks -> 
PyMem_Malloc(): check that the GIL is hold in debug hooks

___
Python tracker 

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



[issue26563] PyMem_Malloc(): check that the GIL is held in debug hooks

2016-03-14 Thread STINNER Victor

New submission from STINNER Victor:

With the issue #26558, debug hooks of PyObject_Malloc() now checks that the GIL 
is hold.

I left PyMem_Malloc() unchanged, because I am not 100% sure that it's ok yet to 
implement the same check in PyMem_Malloc(). So I opened this issue.

Python 3 doc explicitly asks that the GIL is hold to call PyMem_Malloc():
https://docs.python.org/dev/c-api/memory.html#memory-interface

Python 2 doc doesn't say anything about the GIL:
https://docs.python.org/2/c-api/memory.html#memory-interface

Usually, functions prefixed by "Py" require the GIL to be hold.

In practice, currently PyMem_Malloc() is implemented with malloc() which is 
thread-safe.

In the issue #26249, I tested numpy, lxml, Pillow and cryptography with all 
debug hooks enabled, including GIL checks in PyMem_Malloc() and 
PyObject_Malloc(). I only found one bug in numpy: 
https://github.com/numpy/numpy/pull/7404

Attached patch changes debug hooks on PyMem_Malloc() to ensure that the GIL is 
hold.

--
files: pymem_gil.patch
keywords: patch
messages: 261787
nosy: haypo
priority: normal
severity: normal
status: open
title: PyMem_Malloc(): check that the GIL is held in debug hooks
versions: Python 3.6
Added file: http://bugs.python.org/file42165/pymem_gil.patch

___
Python tracker 

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



[issue22359] Remove incorrect uses of recursive make

2016-03-14 Thread Martin Panter

Martin Panter added the comment:

Thanks for you work Xavier. Making it conditional on cross compilation is 
another approach I hadn’t thought of. But I am a bit worried at the new 
makefile syntax [ifeq directive and $(findstring) function]. I suspect it is 
Gnu specific, and that Python tries to support other versions of Make as well. 
Koobs: does Free BSD accept this makefile syntax?

Much as I hate the configure.ac stuff, I guess it could be used to enable and 
disable conditional stuff in the makefile, so that might be another option.

Whatever the end solution is, I think we need a big comment in the makefile 
pointing out the quirks and different people’s interests:

* Reliable way to update generated files when necessary
* Shared prerequisites unsafe with recursive concurrent $(MAKE)
* Reasons to avoid regenerating files (not out of date, cross compilation, less 
build steps and prerequisites; see python-dev)
* Building with read-only sources (see revision 67ed8a6905c3, then r87558)

--
keywords:  -easy
stage:  -> patch review
versions:  -Python 3.4

___
Python tracker 

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



[issue17088] ElementTree incorrectly refuses to write attributes without namespaces when default_namespace is used

2016-03-14 Thread Garrett Birkel

Garrett Birkel added the comment:

Just hit up against this namespace bug. Has this patch been abandoned??

--
nosy: +Garrett Birkel

___
Python tracker 

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



[issue26562] Large Involuntary context switches during oom-killer

2016-03-14 Thread Robert Collins

Robert Collins added the comment:

So this test script is making a 65K entry dict, and each item is a new, 
separate 65K string. The strings are allocated in single chunks, so we should 
expect  couple hundred reference count writes total.

AIUI involuntary context switches occur when there is CPU contention. What else 
do you have running? 

Notable Python is taking 3.83 seconds of system time, much more than your other 
tests. You may get some insight from strace -c.

--
nosy: +rbcollins

___
Python tracker 

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



[issue25783] test_traceback.test_walk_stack() fails when run directly (without regrtest)

2016-03-14 Thread Robert Collins

Robert Collins added the comment:

@serhiy, how is that different to what I said?

--

___
Python tracker 

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



[issue26562] Large Involuntary context switches during oom-killer

2016-03-14 Thread STINNER Victor

STINNER Victor added the comment:

I don't understand this issue... I don't see how Python can avoid context 
switches when writing data to memory...

--
nosy: +haypo

___
Python tracker 

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



[issue26562] Large Involuntary context switches during oom-killer

2016-03-14 Thread Damian Myerscough

New submission from Damian Myerscough:

I have been running a simple script inside a Docker container to cause the 
container to trigger oom-killer.

>>> mem = {}
>>> for i in range(65535):
... mem[i] = "A" * 65535

When oom-killer is trigger I see a large number of involuntary context switches 
and major page faults which causes a spike in CPU
and disk.


# /usr/bin/time --verbose python
Python 2.7.9 (default, Mar  1 2015, 12:57:24) 
[GCC 4.9.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> mem = {}
>>> for i in range(65535):
... mem[i] = "A" * 65535
... 
Command terminated by signal 9
Command being timed: "python"
User time (seconds): 0.13
System time (seconds): 3.83
Percent of CPU this job got: 17%
Elapsed (wall clock) time (h:mm:ss or m:ss): 0:22.94
Average shared text size (kbytes): 0
Average unshared data size (kbytes): 0
Average stack size (kbytes): 0
Average total size (kbytes): 0
Maximum resident set size (kbytes): 2096516
Average resident set size (kbytes): 0
Major (requiring I/O) page faults: 33536
Minor (reclaiming a frame) page faults: 524545
Voluntary context switches: 30706
Involuntary context switches: 137852
Swaps: 0
File system inputs: 8499072
File system outputs: 0
Socket messages sent: 0
Socket messages received: 0
Signals delivered: 0
Page size (bytes): 4096
Exit status: 0


I tried the same test using NodeJS/C++ and I could see a lot less involuntary 
context switches and major page faults which indicates this could
be a Python issue.

# /usr/bin/time --verbose ./alloc_forever 1024 5 524288000
initial_alloc_amount: 1024, sleep_duration: 5, alloc_amount: 524288000
memory: 501.07MB
memory: 1001.29MB
memory: 1501.19MB
memory: 2001.09MB
Command terminated by signal 9
Command being timed: "./alloc_forever 1024 5 524288000"
User time (seconds): 0.63
System time (seconds): 0.97
Percent of CPU this job got: 7%
Elapsed (wall clock) time (h:mm:ss or m:ss): 0:21.61
Average shared text size (kbytes): 0
Average unshared data size (kbytes): 0
Average stack size (kbytes): 0
Average total size (kbytes): 0
Maximum resident set size (kbytes): 2096536
Average resident set size (kbytes): 0
Major (requiring I/O) page faults: 11
Minor (reclaiming a frame) page faults: 524178
Voluntary context switches: 17
Involuntary context switches: 284
Swaps: 0
File system inputs: 336
File system outputs: 0
Socket messages sent: 0
Socket messages received: 0
Signals delivered: 0
Page size (bytes): 4096
Exit status: 0

--
messages: 261781
nosy: DamianMyerscough
priority: normal
severity: normal
status: open
title: Large Involuntary context switches during oom-killer
type: resource usage
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



[issue5505] sys.stdin.read() doesn't return after first EOF on Windows

2016-03-14 Thread Berker Peksag

Changes by Berker Peksag :


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



[issue26558] Disable PyGILState_Check() when Py_NewInterpreter() is called and add more checks on the GIL

2016-03-14 Thread Roundup Robot

Roundup Robot added the comment:

New changeset e590c632c9fa by Victor Stinner in branch 'default':
Add more checks on the GIL
https://hg.python.org/cpython/rev/e590c632c9fa

New changeset cde3d986da00 by Victor Stinner in branch 'default':
Check the GIL in PyObject_Malloc()
https://hg.python.org/cpython/rev/cde3d986da00

--

___
Python tracker 

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



[issue15751] Support subinterpreters in the GIL state API

2016-03-14 Thread Roundup Robot

Roundup Robot added the comment:

New changeset e590c632c9fa by Victor Stinner in branch 'default':
Add more checks on the GIL
https://hg.python.org/cpython/rev/e590c632c9fa

--

___
Python tracker 

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



[issue10915] Make the PyGILState API compatible with multiple interpreters

2016-03-14 Thread Roundup Robot

Roundup Robot added the comment:

New changeset e590c632c9fa by Victor Stinner in branch 'default':
Add more checks on the GIL
https://hg.python.org/cpython/rev/e590c632c9fa

--

___
Python tracker 

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



[issue26516] Add PYTHONMALLOC env var and add support for malloc debug hooks in release mode

2016-03-14 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 7534eb7bd57e by Victor Stinner in branch 'default':
Issue #26516: Fix test_capi on AIX
https://hg.python.org/cpython/rev/7534eb7bd57e

--

___
Python tracker 

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



[issue26561] exec function fails to properly assign scope to dict like object

2016-03-14 Thread Alexander Belopolsky

Changes by Alexander Belopolsky :


--
stage:  -> resolved

___
Python tracker 

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



[issue26561] exec function fails to properly assign scope to dict like object

2016-03-14 Thread Alexander Belopolsky

Alexander Belopolsky added the comment:

The SO example works for me with Python 3.5.1:

Python 3.5.1 (default, Mar  8 2016, 12:33:47)
[GCC 4.2.1 Compatible Apple LLVM 7.0.2 (clang-700.1.81)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> global_function = """
... x = "Hello World"
... def print_global_x():
... print(x)
... print_global_x()
... """
>>> import builtins
>>> class TestEnvironment(dict):
... def __init__(self, *args):
... super().__init__(*args)
...
>>> global_env = TestEnvironment()
>>> global_env['__builtins__'] = builtins
>>> exec(global_function, global_env)
Hello World

btomtom5 - a bug report that consists only of an SO link is likely to be 
treated as spam by many issue tracker subscribers.  In the future, please try 
to make your reports self-contained.

--
nosy: +belopolsky
resolution:  -> works for me
status: open -> closed

___
Python tracker 

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



[issue22359] Remove incorrect uses of recursive make

2016-03-14 Thread Xavier de Gaye

Xavier de Gaye added the comment:

This patch improves changeset c2a53aa27cad by allowing cross-compilation:

The following checks have been made:
  * successfull cross-compilation of python3.4 after retrofiting changeset
c2a53aa27cad to python3.4 since I don't have a working cross-compilation
setup for python3.6 at the moment
  * successfull native compilation of python3.6 (default branch)
  * Python/graminit.c is re-generated after touching Parser/pgenmain.c on a
native build

--
nosy: +xdegaye
Added file: http://bugs.python.org/file42164/cross-chgeset-c2a53aa27cad.patch

___
Python tracker 

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



[issue26561] exec function fails to properly assign scope to dict like object

2016-03-14 Thread Brian Tom

New submission from Brian Tom:

http://stackoverflow.com/questions/35993869/passing-a-dictionary-like-object-to-exec-instead-of-dict-object-changes-scope-of

--

___
Python tracker 

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



[issue26561] exec function fails to properly assign scope to dict like object

2016-03-14 Thread Brian Tom

Changes by Brian Tom :


--
nosy: btomtom5
priority: normal
severity: normal
status: open
title: exec function fails to properly assign scope to dict like object
type: behavior
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



[issue26560] Error in assertion in wsgiref.handlers.BaseHandler.start_response

2016-03-14 Thread Peter Inglesby

New submission from Peter Inglesby:

The line:

  assert int(status[:3]),"Status message must begin w/3-digit code"

should be something like:

  assert status[:3].isnumeric(), "Status message must begin w/3-digit code"

--
components: Library (Lib)
messages: 261773
nosy: inglesp
priority: normal
severity: normal
status: open
title: Error in assertion in wsgiref.handlers.BaseHandler.start_response

___
Python tracker 

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



[issue26559] logging.handlers.MemoryHandler flushes on shutdown but not removal

2016-03-14 Thread David Escott

New submission from David Escott:

The documentation suggests using a MemoryHandler object to buffer log messages 
and conditionally output them. 
https://docs.python.org/3/howto/logging-cookbook.html#buffering-logging-messages-and-outputting-them-conditionally

However the documentation does not make clear that this only works because of 
the call to super(MemoryHandler, handler).flush() prior to 
logger.removeHandler(handler).

A direct call to handler.flush(), or simply leaving the handler unflushed until 
process shutdown will result in the messages still being printed, when the 
MemoryHandler calls self.flush() during its shutdown routines.

To be honest this behavior of MemoryHandler doesn't make much sense to me, 
since the MemoryHandler is in fact flushing when flush_level has not been 
satisfied.

I would suggest adding an option to the MemoryHandler "flush_on_close" 
defaulting to True, and then simply constructing the MemoryHandler with that 
option set to False. That would not affect the existing users of the handler, 
but it would result in a tool which would actually match the only example I 
have come across of a MemoryHandler in use online.

--
components: Library (Lib)
messages: 261772
nosy: David Escott
priority: normal
severity: normal
status: open
title: logging.handlers.MemoryHandler flushes on shutdown but not removal
type: behavior
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



[issue17758] test_site fails when the user does not have a home directory

2016-03-14 Thread STINNER Victor

STINNER Victor added the comment:

"Unfixed for 2 years.  How about skipping the test if 
os.makedirs(site.USER_SITE) fails?"

Let's do that ;-)

@Christian: Feel free to open a new issue if you have a solution to not write 
outside temporary directories in test_site ;-)

@doko: Thanks for the bug report! Sorry for the delay :-/ I recall this issue 
because I just saw it on some FreeBSD buildbots.

--
nosy: +haypo
resolution:  -> fixed
status: open -> closed
versions: +Python 3.5, Python 3.6 -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



[issue17758] test_site fails when the user does not have a home directory

2016-03-14 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 1a40ee2bad6a by Victor Stinner in branch '2.7':
Skip test_site if USER_SITE cannot be created
https://hg.python.org/cpython/rev/1a40ee2bad6a

--

___
Python tracker 

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



[issue17758] test_site fails when the user does not have a home directory

2016-03-14 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 0a583e60c406 by Victor Stinner in branch '3.5':
Skip test_site if USER_SITE cannot be created
https://hg.python.org/cpython/rev/0a583e60c406

--
nosy: +python-dev

___
Python tracker 

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



[issue26516] Add PYTHONMALLOC env var and add support for malloc debug hooks in release mode

2016-03-14 Thread Roundup Robot

Roundup Robot added the comment:

New changeset d8d6ec1333e6 by Victor Stinner in branch 'default':
Issue #26516: Fix test_capi on 32-bit system
https://hg.python.org/cpython/rev/d8d6ec1333e6

--

___
Python tracker 

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



[issue26558] Disable PyGILState_Check() when Py_NewInterpreter() is called and add more checks on the GIL

2016-03-14 Thread STINNER Victor

Changes by STINNER Victor :


--
title: Fix PyGILState_Check() with _testcapi.run_in_subinterp() -> Disable 
PyGILState_Check() when Py_NewInterpreter() is called and add more checks on 
the GIL

___
Python tracker 

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



[issue26558] Fix PyGILState_Check() with _testcapi.run_in_subinterp()

2016-03-14 Thread STINNER Victor

STINNER Victor added the comment:

See also issues:

* #10915: Make the PyGILState API compatible with multiple interpreters 
* #15751: Support subinterpreters in the GIL state API

This issue contains is a compromise: it's a workaround until the root issue is 
solve. Since #10915 is open since 2011, I'm not sure that it's possible to fix 
the issue, nor that it's worth :-) To me, subinterpreters still looks like an 
experimental feature.

--
nosy: +pitrou

___
Python tracker 

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



[issue26249] Change PyMem_Malloc to use pymalloc allocator

2016-03-14 Thread STINNER Victor

STINNER Victor added the comment:

> Using the issue #26516 (PYTHONMALLOC=debug), we can check PyGILState_Check() 
> at runtime, but there is currently an issue related to sub-interpreters. The 
> assertion fails in support.run_in_subinterp(), function used by 
> test_threading and test_capi for example.

I created #26558 to implement GIL checks in PyMem_Malloc() and 
PyObject_Malloc().

--

___
Python tracker 

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



[issue26516] Add PYTHONMALLOC env var and add support for malloc debug hooks in release mode

2016-03-14 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 3c3df33f2655 by Victor Stinner in branch 'default':
Issue #26516: Fix test_capi on Windows
https://hg.python.org/cpython/rev/3c3df33f2655

--

___
Python tracker 

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



[issue26558] Fix PyGILState_Check() with _testcapi.run_in_subinterp()

2016-03-14 Thread Roundup Robot

Roundup Robot added the comment:

New changeset c24630367767 by Victor Stinner in branch 'default':
Fix Py_FatalError() if called without the GIL
https://hg.python.org/cpython/rev/c24630367767

--
nosy: +python-dev

___
Python tracker 

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



[issue26558] Fix PyGILState_Check() with _testcapi.run_in_subinterp()

2016-03-14 Thread STINNER Victor

Changes by STINNER Victor :


Added file: http://bugs.python.org/file42163/pymem_gil_check.patch

___
Python tracker 

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



[issue26558] Fix PyGILState_Check() with _testcapi.run_in_subinterp()

2016-03-14 Thread STINNER Victor

STINNER Victor added the comment:

Hum, in fact I prefer to implement GIL check in debug hooks of Python memory 
allocators. So it becomes to get these checks on Python compiled in debug mode.

Patch 2: Don't touch Python memory allocators.

Instead of I wrote a second patch, pymem_gil_check.patch (based on 
gil_check-2.patch).

--

Oh, I forgot to mention that the gil_check patch changes 
PyThreadState_DeleteCurrent(): I reordered instructions to be able call 
PyObject_Free() with the GIL check.

--
Added file: http://bugs.python.org/file42162/gil_check-2.patch

___
Python tracker 

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



[issue26558] Fix PyGILState_Check() with _testcapi.run_in_subinterp()

2016-03-14 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 8a5a0e223559 by Victor Stinner in branch 'default':
Issue #26558: Remove useless check in tracemalloc
https://hg.python.org/cpython/rev/8a5a0e223559

--

___
Python tracker 

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



[issue26558] Fix PyGILState_Check() with _testcapi.run_in_subinterp()

2016-03-14 Thread STINNER Victor

STINNER Victor added the comment:

gil_check.patch: add more checks on the GIL

* PyGILState_Check() now returns 1 (success) before the creation of the GIL and
  after the destruction of the GIL
* Add a flag to disable PyGILState_Check(). Disable PyGILState_Check() when
  Py_NewInterpreter() is called
* Add assert(PyGILState_Check()) to:

  - _Py_dup()
  - _Py_fstat()
  - _Py_read()
  - _Py_write()
  - PyObject_Malloc()
  - PyObject_Calloc()
  - PyObject_Realloc()
  - PyObject_Free()

--
keywords: +patch
Added file: http://bugs.python.org/file42161/gil_check.patch

___
Python tracker 

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



[issue26516] Add PYTHONMALLOC env var and add support for malloc debug hooks in release mode

2016-03-14 Thread STINNER Victor

STINNER Victor added the comment:

test_capi fails on Windows:
http://buildbot.python.org/all/builders/AMD64%20Windows7%20SP1%203.x/builds/7348/steps/test/logs/stdio

Probably a issue with newline characters.

--

___
Python tracker 

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



[issue26558] Fix PyGILState_Check() with _testcapi.run_in_subinterp()

2016-03-14 Thread STINNER Victor

STINNER Victor added the comment:

I created this issue while working on the issue #26249 "Change PyMem_Malloc to 
use pymalloc allocator". I would like to check that application call 
PyObject_Malloc() and PyMem_Malloc() with the GIL held.

--

___
Python tracker 

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



[issue26553] Write HTTP in uppercase

2016-03-14 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

There are occurrences of "http" in lower case in docstrings and comments. The 
same for https and ftp (and may be other abbreviations).

--

___
Python tracker 

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



[issue26553] Write HTTP in uppercase

2016-03-14 Thread Anish Shah

Anish Shah added the comment:

Patch for urllib and httplib in Python 2

--
keywords: +patch
nosy: +anish.shah
Added file: http://bugs.python.org/file42159/issue26553.patch

___
Python tracker 

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



[issue26553] Write HTTP in uppercase

2016-03-14 Thread Anish Shah

Anish Shah added the comment:

Patch for http.client in Python3

--
Added file: http://bugs.python.org/file42160/issue26553-python3.patch

___
Python tracker 

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



[issue26555] string.format(bytes) raise warning

2016-03-14 Thread STINNER Victor

STINNER Victor added the comment:

> Well, it's not what format() is doing now, using str()? :)

Hum, are you sure that you tried Python 3, and not Python 2?

str(bytes) on Python 3 is well defined:

>>> print(str(b'hello'))
b'hello'
>>> print(str('h\xe9llo'.encode('utf8')))
b'h\xc3\xa9llo'

I'm not sure that you expect the b'...' format. Non-ASCII characters are 
escaped as \xHH format.

--

___
Python tracker 

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



[issue26509] spurious ConnectionAbortedError logged on Windows

2016-03-14 Thread Sebastien Bourdeauducq

Sebastien Bourdeauducq added the comment:

Tested it, that works, thanks!

--

___
Python tracker 

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



[issue26555] string.format(bytes) raise warning

2016-03-14 Thread Marco Sulla

Marco Sulla added the comment:

> Using utf8 means guessing the encoding

Well, it's not what format() is doing now, using str()? :)

--

___
Python tracker 

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



[issue26555] string.format(bytes) raise warning

2016-03-14 Thread STINNER Victor

STINNER Victor added the comment:

>> Python 3 doesn't guess the encoding of byte strings anymore

> And I agree, but I think format minilanguage could convert it by default to 
> utf8, ..

Using utf8 means guessing the encoding of a byte string. Python 3 doesn't do 
that anymore, there is no more exception.

--

___
Python tracker 

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



[issue26555] string.format(bytes) raise warning

2016-03-14 Thread Marco Sulla

Marco Sulla added the comment:

> Python 3 doesn't guess the encoding of byte strings anymore

And I agree, but I think format minilanguage could convert it by default to 
utf8, and if something goes wrong raise an error (or try str()). More simple to 
use and robust at the same time.

My 2 cents.

--

___
Python tracker 

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



[issue26558] Fix PyGILState_Check() with _testcapi.run_in_subinterp()

2016-03-14 Thread STINNER Victor

New submission from STINNER Victor:

assert(PyGILState_Check()) cannot be used in functions called by 
Py_NewInterpreter(): the assertion fails.

I propose to add a flag to disable PyGILState_Check() while Py_NewInterpreter() 
is run to be able to add assertions in these functions.

The assertion helps to detect complex bugs like race condition in multithreaded 
applications.

--
messages: 261750
nosy: haypo
priority: normal
severity: normal
status: open
title: Fix PyGILState_Check() with _testcapi.run_in_subinterp()
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



[issue26249] Change PyMem_Malloc to use pymalloc allocator

2016-03-14 Thread STINNER Victor

STINNER Victor added the comment:

pymalloc.patch: Updated patch.

--
Added file: http://bugs.python.org/file42158/pymalloc.patch

___
Python tracker 

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



[issue26516] Add PYTHONMALLOC env var and add support for malloc debug hooks in release mode

2016-03-14 Thread STINNER Victor

STINNER Victor added the comment:

Note: I just checked PYTHONMALLOCSTATS=1 with -X tracemalloc. It looks like it 
works as expected. Tracemalloc hooks are unregistered before stats are 
displayed at exit, _Pymem_PymallocEnabled() returns 1 as expected.

--

___
Python tracker 

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



[issue26516] Add PYTHONMALLOC env var and add support for malloc debug hooks in release mode

2016-03-14 Thread STINNER Victor

STINNER Victor added the comment:

I reworked my patch before pushing it:

* it now respects -E and -I command line options
* I documented changes in Doc/, Misc/NEWS, What's New in Python 3.6, 
Misc/README.valgrind, etc.
* Debug hooks are now also installed when Python is compiled in debug mode 
without pymalloc
* PYTHONMALLOCSTATS is now ignored if the allocator if pymalloc is not used
* PYTHONMALLOC is ignored if it's an empty string

--

___
Python tracker 

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



[issue26516] Add PYTHONMALLOC env var and add support for malloc debug hooks in release mode

2016-03-14 Thread Roundup Robot

Roundup Robot added the comment:

New changeset aa280432e9c7 by Victor Stinner in branch 'default':
Add PYTHONMALLOC env var
https://hg.python.org/cpython/rev/aa280432e9c7

--

___
Python tracker 

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



[issue26557] dictviews methods not present on shelve objects

2016-03-14 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

The shelve object inherits its dict-like methods from UserDict.DictMixin. The 
documentation for UserDict.DictMixin should be updated too.

--
assignee:  -> docs@python
components: +Documentation -Library (Lib)
keywords: +easy
nosy: +docs@python, serhiy.storchaka
stage:  -> needs patch

___
Python tracker 

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



[issue26557] dictviews methods not present on shelve objects

2016-03-14 Thread Michael Crouch

New submission from Michael Crouch:

Shelve types in Python 2.7 don't implement the 'viewkeys', 'viewvalues', and 
'viewitems' methods.

Section 11.4 of the Python Standard Library documentation says that "Shelf 
objects support all methods supported by dictionaries." If those methods can't 
be added to shelves, the documentation should be clarified.

The use case for this was that I wanted an iterator on a shelf that didn't try 
to materialize the entire list (since the shelf is very large and I'd prefer to 
leave most of it on disk).

--
components: Library (Lib)
messages: 261744
nosy: Michael Crouch
priority: normal
severity: normal
status: open
title: dictviews methods not present on shelve objects
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



[issue26555] string.format(bytes) raise warning

2016-03-14 Thread STINNER Victor

STINNER Victor added the comment:

More about Unicode:

* https://docs.python.org/dev/howto/unicode.html
* http://unicodebook.readthedocs.org/
* etc.

--

___
Python tracker 

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



[issue26555] string.format(bytes) raise warning

2016-03-14 Thread STINNER Victor

STINNER Victor added the comment:

> I would that the format minilanguage will convert bytes to string properly.

Sorry, nope, Python 3 doesn't guess the encoding of byte strings anymore. You 
have to decode manually. Example:

"Hello {}".format(b"World".decode('ascii'))

Or format to bytes:

b"Hello {}".format(b"World")

It's not a bug. It's a feature.

--
nosy: +haypo
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



[issue26555] string.format(bytes) raise warning

2016-03-14 Thread Marco Sulla

Marco Sulla added the comment:

I want to clarify more: I do not want to suppress the warning, I would that the 
format minilanguage will convert bytes to string properly.

--

___
Python tracker 

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



[issue26556] Update expat to 2.2.1

2016-03-14 Thread Christian Heimes

New submission from Christian Heimes:

A new version of expat has been released. 2.2.1 addressed CVE-2015-1283.

--
components: Extension Modules, XML
messages: 261741
nosy: benjamin.peterson, christian.heimes, georg.brandl, larry
priority: release blocker
severity: normal
stage: needs patch
status: open
title: Update expat to 2.2.1
type: security
versions: Python 2.7, 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



[issue26555] string.format(bytes) raise warning

2016-03-14 Thread Marco Sulla

New submission from Marco Sulla:

Steps to reproduce

1. create a format_bytes.py with:

"Hello {}".format(b"World")

2. launch it with
python3 -bb format_bytes.py

Result:

Traceback (most recent call last):
  File "format_bytes.py", line 1, in 
"Hello {}".format(b"World")
BytesWarning: str() on a bytes instance



Expected:

No warning

--
components: Interpreter Core
messages: 261739
nosy: marco.sulla
priority: normal
severity: normal
status: open
title: string.format(bytes) raise warning
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



[issue23220] Documents input/output effects of how IDLE runs user code

2016-03-14 Thread Akira Li

Akira Li added the comment:

IDLE can implement functionality similar to what colorama [1] module does on 
Windows: translate ANSI escape character sequences into corresponding GUI 
method calls.

For example, \b might be implemented using a .delete() call, \r using 
.mark_set(), etc.

[1] https://pypi.python.org/pypi/colorama

--
nosy: +akira

___
Python tracker 

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



[issue26554] Missing fclose

2016-03-14 Thread maddin200

New submission from maddin200:

cpython\PC\bdist_wininst\install.c line 2542
missing fclose(logfile);

--
components: Windows
messages: 261737
nosy: maddin200, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: Missing fclose

___
Python tracker 

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



[issue22625] When cross-compiling, don’t try to execute binaries

2016-03-14 Thread Alex Willmer

Alex Willmer added the comment:

On 14 March 2016 at 01:05, Robert Collins  wrote:
> There are three platforms in play: target, host, build.
>
> Host is the platform where what you build should run on.
> build is the platform we are building on.
> target is the platform where the *output* of the build thing itself should 
> run on. Baby steps though: lets assume target==host always.

To be 100% explicit: CPython doesn't need to worry about the third
one, the target platform. That only matters when the thing being
compiled, will itself cross-compile/process binaries at runtime e.g.
gcc, binutils. So if

 - I'm on Linux and
 - I want to compile a gcc that runs on BeOS
 - that in turn compiles binaries for TempleOS

only then would target matter.

--
nosy: +moreati

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

Serhiy Storchaka added the comment:

Deprecation warnings are suppressed, but my attempt to fix test failures failed.

http://buildbot.python.org/all/builders/AMD64%20Windows8%203.x/builds/1832/steps/test/logs/stdio
==
FAIL: test_walk_bottom_up (test.test_os.BytesWalkTests)
--
Traceback (most recent call last):
  File "D:\buildarea\3.x.bolen-windows8\build\lib\test\test_os.py", line 894, 
in test_walk_bottom_up
self.sub2_tree)
AssertionError: Tuples differ: ('@test_4060_tmp\\TEST1\\SUB2', ['broken_link', 
'link'], ['tmp3']) != ('@test_4060_tmp\\TEST1\\SUB2', ['link'], ['broken_link', 
'tmp3'])

First differing element 1:
['broken_link', 'link']
['link']

- ('@test_4060_tmp\\TEST1\\SUB2', ['broken_link', 'link'], ['tmp3'])
? --

+ ('@test_4060_tmp\\TEST1\\SUB2', ['link'], ['broken_link', 'tmp3'])
? ++


==
FAIL: test_walk_prune (test.test_os.BytesWalkTests)
--
Traceback (most recent call last):
  File "D:\buildarea\3.x.bolen-windows8\build\lib\test\test_os.py", line 874, 
in test_walk_prune
self.assertEqual(all[1], self.sub2_tree)
AssertionError: Tuples differ: ('@test_4060_tmp\\TEST1\\SUB2', ['broken_link', 
'link'], ['tmp3']) != ('@test_4060_tmp\\TEST1\\SUB2', ['link'], ['broken_link', 
'tmp3'])

First differing element 1:
['broken_link', 'link']
['link']

- ('@test_4060_tmp\\TEST1\\SUB2', ['broken_link', 'link'], ['tmp3'])
? --

+ ('@test_4060_tmp\\TEST1\\SUB2', ['link'], ['broken_link', 'tmp3'])
? ++


--

In some cases a broken link is considered as a link to regular file, but in 
other cases  is considered as a link to directory.

It is hard to fix this Windows issue without Windows. Needed a help of Windows 
experts.

--
assignee: serhiy.storchaka -> 

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

Changes by Serhiy Storchaka :


--
stage: patch review -> needs patch

___
Python tracker 

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



[issue26494] Double deallocation on iterator exhausting

2016-03-14 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Could anyone please look at the patch? I'm not sure about organizing tests.

--

___
Python tracker 

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



[issue26523] multiprocessing ThreadPool is untested

2016-03-14 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
assignee:  -> pitrou
stage: patch review -> commit review

___
Python tracker 

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



[issue20556] Use specific asserts in threading tests

2016-03-14 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Thank you all for your reviews.

--
assignee:  -> serhiy.storchaka
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



[issue20556] Use specific asserts in threading tests

2016-03-14 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 791d7ef006d3 by Serhiy Storchaka in branch '3.5':
Issue #20556: Used specific assert methods in threading tests.
https://hg.python.org/cpython/rev/791d7ef006d3

New changeset 9f8db4d1e149 by Serhiy Storchaka in branch '2.7':
Issue #20556: Used specific assert methods in threading tests.
https://hg.python.org/cpython/rev/9f8db4d1e149

New changeset b11acba0b785 by Serhiy Storchaka in branch 'default':
Issue #20556: Used specific assert methods in threading tests.
https://hg.python.org/cpython/rev/b11acba0b785

--
nosy: +python-dev

___
Python tracker 

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



[issue9998] ctypes find_library should search LD_LIBRARY_PATH on linux

2016-03-14 Thread Vinay Sajip

Vinay Sajip added the comment:

> find_library() is documented as emulating a build-time linker, not run-time

It may be documented as that, but is emulating a build-time linker the most 
useful thing? In the context of Python binding to external libraries, why is 
build-time linking behaviour better than run-time linking behaviour? This is an 
enhancement request, not a bug request: so if a change was to be applied, the 
documentation could be updated to indicate any change in behaviour.

The use case is that a shared library needed by a Python extension is available 
on LD_LIBRARY_PATH such that a non-ctypes linking operation would find it, but 
ctypes.util.find_library() won't, so a user of the extension (who may not be 
its developer) can't load the extension easily. See also my comment 
http://bugs.python.org/issue9998#msg165806

--

___
Python tracker 

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



[issue26553] Write HTTP in uppercase

2016-03-14 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Could you provide a patch Sudheer?

--
keywords: +easy
nosy: +serhiy.storchaka
stage:  -> needs patch
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



[issue26512] Vocabulary: Using "integral" in library/stdtypes.html

2016-03-14 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Georg, is it possible to make a link from formatted text ``math.trunc(x)`` to 
the math.trunc() function?

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue22854] Documentation/implementation out of sync for IO

2016-03-14 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Nice patch. But it isn't applied cleanly on current tip (perhaps due to 
Argument Clinic). Added comments and questions on Rietveld.

--
nosy: +benjamin.peterson, pitrou, serhiy.storchaka, stutzbach
versions: +Python 3.5, Python 3.6 -Python 3.2, 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



[issue26512] Vocabulary: Using "integral" in library/stdtypes.html

2016-03-14 Thread Julien

Julien added the comment:

I completely agree we're consuming too much time for what it is, sry for that. 
Let's just link to numbers.Integral and close it.

I attached a simple patch for it.

--
Added file: http://bugs.python.org/file42157/stdtypes-integral.patch

___
Python tracker 

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



[issue26553] Write HTTP in uppercase

2016-03-14 Thread Sudheer Satyanarayana

New submission from Sudheer Satyanarayana:

"The Requests package is recommended for a higher-level http client interface."
Change 'http' to uppercase.
https://docs.python.org/2/library/httplib.html
https://docs.python.org/2/library/urllib.html
https://docs.python.org/3/library/http.client.html

--
assignee: docs@python
components: Documentation
messages: 261726
nosy: Sudheer Satyanarayana, docs@python
priority: normal
severity: normal
status: open
title: Write HTTP in uppercase

___
Python tracker 

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



[issue26512] Vocabulary: Using "integral" in library/stdtypes.html

2016-03-14 Thread Raymond Hettinger

Raymond Hettinger added the comment:

Julian, I don't see a bug here and think you've ventured too far into stylistic 
micro-rewordings.   If there is something unintelligible, we'll fix it, but 
this tracker item has lost focus and isn't using people's time efficiently 
(i.e. this isn't a forum for "daily meditations").

--

___
Python tracker 

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