[issue25328] ValueError in smtpd.py __init__() is not raised

2015-10-08 Thread Xiang Zhang

Xiang Zhang added the comment:

I think this is a typo. The raise is left out.

In test_smtpd.py, it only tests the raise condition in SMTPServer but
not STMPChannel.

I add the raise and a corresponding test in SMTPDChannelTest.

--
keywords: +patch
nosy: +xiang.zhang
Added file: http://bugs.python.org/file40725/SMTPChannel_raise_ValueError.patch

___
Python tracker 

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



[issue25350] Stronger type enforcement (feature request)

2015-10-08 Thread John Michael Lafayette

New submission from John Michael Lafayette:

With a lot of languages, I can tell
that the type I am getting is an instance of the declared type I'm assigning it 
to.

Example:
Cat c = Factory.make("cat"
Animal d = Factory.make("dog")

Python:
val c = Factory.make("cat")

Problem with this is that it is not necessarily obvious to the reader what the 
type of c is. I suggest that you provide an option to strengthen python's type 
checking by allowing users to replace val with the expected type of the object 
and then allow the interpreter to check that the real type being assigned is an 
instance of the expected type. An option like -strong for strong typing.

--
messages: 252588
nosy: John Michael Lafayette
priority: normal
severity: normal
status: open
title: Stronger type enforcement (feature request)
type: enhancement

___
Python tracker 

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



[issue5380] pty.read raises IOError when slave pty device is closed

2015-10-08 Thread Márcio

Changes by Márcio :


--
nosy:  -marcio

___
Python tracker 

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



[issue5380] pty.read raises IOError when slave pty device is closed

2015-10-08 Thread Guido van Rossum

Guido van Rossum added the comment:

So maybe we should just close this as won't fix. Whoever wants to use the
master end of a pty had better be prepared for that IOError.

On Thursday, October 8, 2015, Martin Panter  wrote:

>
> Martin Panter added the comment:
>
> My biggest worry about the patch is that it looks like it will mask other
> EIO errors from normal terminals (e.g. perhaps reading from a slave or a
> real serial port can also produce an EIO error that does not mean EOF).
> Another option may be to add a specialized pseudo terminal master wrapper
> class that does the right thing on Linux. But I’m not a pseudo terminal
> expert and don’t really have a strong view about this.
>
> I agree that the “pty” module is rather limited, although the
> documentation does say pty.openpty() is more portable than os.openpty().
> Maybe if Python used posix_openpt(), portability would be less of a problem?
>
> --
>
> ___
> Python tracker >
> 
> ___
>

--

___
Python tracker 

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



[issue5380] pty.read raises IOError when slave pty device is closed

2015-10-08 Thread Martin Panter

Martin Panter added the comment:

My biggest worry about the patch is that it looks like it will mask other EIO 
errors from normal terminals (e.g. perhaps reading from a slave or a real 
serial port can also produce an EIO error that does not mean EOF). Another 
option may be to add a specialized pseudo terminal master wrapper class that 
does the right thing on Linux. But I’m not a pseudo terminal expert and don’t 
really have a strong view about this.

I agree that the “pty” module is rather limited, although the documentation 
does say pty.openpty() is more portable than os.openpty(). Maybe if Python used 
posix_openpt(), portability would be less of a problem?

--

___
Python tracker 

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



[issue25315] Make it clear in the collections Python source code that OrderedDict may be overridden

2015-10-08 Thread Raymond Hettinger

Changes by Raymond Hettinger :


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



[issue25298] Add lock and rlock weakref tests

2015-10-08 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 45903695e86c by Raymond Hettinger in branch 'default':
Issue #25298:  Add lock and rlock weakref tests (Contributed by Nir Soffer).
https://hg.python.org/cpython/rev/45903695e86c

--
nosy: +python-dev

___
Python tracker 

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



[issue25298] Add lock and rlock weakref tests

2015-10-08 Thread Raymond Hettinger

Changes by Raymond Hettinger :


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

___
Python tracker 

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



[issue25228] Regression in cookie parsing with brackets and quotes

2015-10-08 Thread Martin Panter

Martin Panter added the comment:

The str.find() call was kind of what I had in mind. But I don’t feel qualified 
to say whether the fix is good in general. I would have to find out about at 
the Cookie header format, and understand what the security implications are to 
do with lax parsing.

--

___
Python tracker 

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



[issue25344] Enhancement to Logging - Logging Stack

2015-10-08 Thread Adam

Changes by Adam :


--
nosy: +azsorkin

___
Python tracker 

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



[issue25318] Add _PyBytesWriter API to optimize Unicode encoders

2015-10-08 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 9cf89366bbcb by Victor Stinner in branch 'default':
Issue #25318: Avoid sprintf() in backslashreplace()
https://hg.python.org/cpython/rev/9cf89366bbcb

New changeset 0a522f68d275 by Victor Stinner in branch 'default':
Issue #25318: Fix backslashreplace()
https://hg.python.org/cpython/rev/0a522f68d275

New changeset c53dcf1d6967 by Victor Stinner in branch 'default':
Issue #25318: cleanup code _PyBytesWriter
https://hg.python.org/cpython/rev/c53dcf1d6967

--

___
Python tracker 

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



[issue25326] Improve error message for "character buffer objects"

2015-10-08 Thread Raymond Hettinger

Changes by Raymond Hettinger :


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

___
Python tracker 

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



[issue25318] Add _PyBytesWriter API to optimize Unicode encoders

2015-10-08 Thread STINNER Victor

STINNER Victor added the comment:

The FreeBSD 9.x buildbot is grumpy.

http://buildbot.python.org/all/builders/AMD64%20FreeBSD%209.x%203.x/builds/3495/steps/test/logs/stdio

Assertion failed: (start[writer->allocated] == 0), function 
_PyBytesWriter_CheckConsistency, file Objects/bytesobject.c, line 3809.
Fatal Python error: Aborted

Current thread 0x000801807400 (most recent call first):
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd9/build/Lib/test/test_pep277.py", 
line 150 in test_listdir
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd9/build/Lib/unittest/case.py", line 
600 in run
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd9/build/Lib/unittest/case.py", line 
648 in __call__
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd9/build/Lib/unittest/suite.py", 
line 122 in run
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd9/build/Lib/unittest/suite.py", 
line 84 in __call__
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd9/build/Lib/unittest/suite.py", 
line 122 in run
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd9/build/Lib/unittest/suite.py", 
line 84 in __call__
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd9/build/Lib/unittest/runner.py", 
line 176 in run
...

--

___
Python tracker 

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



[issue25326] Improve error message for "character buffer objects"

2015-10-08 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 4d1bd86d3bbd by Raymond Hettinger in branch '2.7':
Issue #25326:  Improve an obscure error message.
https://hg.python.org/cpython/rev/4d1bd86d3bbd

--
nosy: +python-dev

___
Python tracker 

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



[issue25318] Add _PyBytesWriter API to optimize Unicode encoders

2015-10-08 Thread Roundup Robot

Roundup Robot added the comment:

New changeset e9c1404d6bd9 by Victor Stinner in branch 'default':
Issue #25318: Fix compilation error
https://hg.python.org/cpython/rev/e9c1404d6bd9

--

___
Python tracker 

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



[issue25318] Add _PyBytesWriter API to optimize Unicode encoders

2015-10-08 Thread STINNER Victor

STINNER Victor added the comment:

I created the issue #25349 "Use _PyBytesWriter for bytes%args".

--

___
Python tracker 

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



[issue25349] Use _PyBytesWriter for bytes%args

2015-10-08 Thread STINNER Victor

STINNER Victor added the comment:

See also the PEP 461 "Adding % formatting to bytes and bytearray".

FYI bytes % args is tested by test_format (good to know to test quickly 
changes).

--

___
Python tracker 

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



[issue25349] Use _PyBytesWriter for bytes%args

2015-10-08 Thread STINNER Victor

New submission from STINNER Victor:

Attached patch is a work-in-progress patch to use the new private 
_PyBytesWriter API in bytes % args.

The usage of the _PyBytesWriter API will allow further optimization. For 
example, it avoids the creation of a temporary bytes object to format b'%f' % 
1.2.

The _PyBytesWriter API allocates a small buffer of 512 bytes on the stack to 
delay the allocation of the final bytes objects. It can avoid the need to call 
_PyBytes_Resize() completly, or at least reduce the number of calls.

See also the issue #25318 which added the _PyBytesWriter API.

--
files: bytes_format.patch
keywords: patch
messages: 252577
nosy: ethan.furman, haypo, serhiy.storchaka
priority: normal
severity: normal
status: open
title: Use _PyBytesWriter for bytes%args
type: performance
versions: Python 3.6
Added file: http://bugs.python.org/file40724/bytes_format.patch

___
Python tracker 

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



[issue17908] Unittest runner needs an option to call gc.collect() after each test

2015-10-08 Thread Raymond Hettinger

Changes by Raymond Hettinger :


--
nosy: +haypo

___
Python tracker 

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



[issue25344] Enhancement to Logging - Logging Stack

2015-10-08 Thread Raymond Hettinger

Raymond Hettinger added the comment:

This seems like a reasonable use case and is worth considering.

Offhand, I don't see how a user could easily implement this on their own 
without hacking the logging module internals.  What would be needed is some 
support for begin-logging-transaction, a series of normal logging calls, 
followed by either a transaction-commit or transaction-rollback.

--
assignee:  -> vinay.sajip
nosy: +rhettinger

___
Python tracker 

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



[issue25343] Document atomic operations on builtin types

2015-10-08 Thread Raymond Hettinger

Raymond Hettinger added the comment:

> what set() operations are atomic?

The language doesn't make any guarantees about set operation atomicity.  
Different implementations such as PyPy, Jython, and IronPython are free to make 
different choices than CPython.  In general, users should make no assumptions 
about atomicity unless explicitly documented and tested.  The wise course of 
action is to use mutexes when there is any doubt.

FWIW, it is difficult to make blanket statements about the methods on sets 
because the atomicity depends on the objects looked up or stored in the sets 
rather than the set itself.   Aside from trivial calls to __sizeof__ and 
__len__, most set methods potentially call __hash__ or __eq__ on the set 
elements either of which could make a callback into pure python code.  
Likewise, any reference count decrement can potentially make a callback as well.

--
nosy: +rhettinger

___
Python tracker 

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



[issue25318] Add _PyBytesWriter API to optimize Unicode encoders

2015-10-08 Thread Roundup Robot

Roundup Robot added the comment:

New changeset c134eddcb347 by Victor Stinner in branch 'default':
Issue #25318: Move _PyBytesWriter to bytesobject.c
https://hg.python.org/cpython/rev/c134eddcb347

--

___
Python tracker 

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



[issue25318] Add _PyBytesWriter API to optimize Unicode encoders

2015-10-08 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 59f4806a5add by Victor Stinner in branch 'default':
Optimize backslashreplace error handler
https://hg.python.org/cpython/rev/59f4806a5add

--

___
Python tracker 

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



[issue25348] Update pgo_build.bat to use --pgo flag for regrtest

2015-10-08 Thread Brett Cannon

New submission from Brett Cannon:

Should upgrade the command to do what is already occurring in the Makefile for 
consistency.

--
assignee: brett.cannon
components: Windows
messages: 252572
nosy: brett.cannon, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: Update pgo_build.bat to use --pgo flag for regrtest
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



[issue25318] Add _PyBytesWriter API to optimize Unicode encoders

2015-10-08 Thread STINNER Victor

STINNER Victor added the comment:

Oh, I was surprised to see same or worse performances for 
UTF-8/backslashreplace. In fact, I forgot to enable overallocation. With 
overallocation, it is now faster ;-)

I modified the API to put the "stack buffer" inside _PyBytesWriter API 
directly. I also reworked _PyBytesWriter_Alloc() to call  
_PyBytesWriter_Prepare() so _PyBytesWriter_Alloc() now supports overallocation 
as well. It was part of _PyBytesWriter design to support overallocation at the 
first allocation (_PyBytesWriter_Alloc), that's why we have 
_PyBytesWriter_Alloc() *and* _PyBytesWriter_Init(): it's possible to set 
overallocate=1 between init and alloc.

I pushed my change since it didn't kill performances. It's only a little bit 
smaller but on very short encode: less than 500 ns. In other cases, it's the 
same performances or faster.

--

___
Python tracker 

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



[issue25318] Add _PyBytesWriter API to optimize Unicode encoders

2015-10-08 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 1a2175149c5e by Victor Stinner in branch 'default':
Issue #25318: Add _PyBytesWriter API
https://hg.python.org/cpython/rev/1a2175149c5e

--
nosy: +python-dev

___
Python tracker 

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



[issue25347] assert_has_calls output is formatted inconsistently

2015-10-08 Thread Robert Zimmerman

New submission from Robert Zimmerman:

For longer lists of calls, the "Expected" list is printed all on one line while 
the "Actual" list is pprinted and on multiple lines. This makes it hard to do a 
visual compare of which calls are missing/incorrect.

Example:

AssertionError: Calls not found.
Expected: [call(''), call(''), 
call(''), call(''), 
call(''), call(''), 
call('')]
Actual: [call('aaa'),
 call('aaa'),
 call('aaa'),
 call('aaa'),
 call('aaa'),
 call('aaa'),
 call('aaa')]


What I'd expect:

AssertionError: Calls not found.
Expected: [call(''),
 call(''),
 call(''),
 call(''),
 call(''),
 call(''),
 call('')]
Actual: [call('aaa'),
 call('aaa'),
 call('aaa'),
 call('aaa'),
 call('aaa'),
 call('aaa'),
 call('aaa')]

--
components: Tests
files: mock_assert_has_calls.patch
keywords: patch
messages: 252569
nosy: michael.foord, rzimmerman
priority: normal
severity: normal
status: open
title: assert_has_calls output is formatted inconsistently
type: enhancement
versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4, Python 3.5, Python 3.6
Added file: http://bugs.python.org/file40723/mock_assert_has_calls.patch

___
Python tracker 

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



[issue25328] ValueError in smtpd.py __init__() is not raised

2015-10-08 Thread Barry A. Warsaw

Barry A. Warsaw added the comment:

On Oct 08, 2015, at 08:44 PM, Mauro S. M. Rodrigues wrote:

>Python 3.5.0+ (3.5:1e99ba6b7c98, Oct  8 2015, 17:12:06) 
>[GCC 4.8.4] on linux
>Type "help", "copyright", "credits" or "license" for more information.
 import smtpd
 smtpd.SMTPServer(("127.0.0.1", 0), 
 ('b',0),enable_SMTPUTF8=True,decode_data=True)
>Traceback (most recent call last):
>  File "", line 1, in 
>  File "/home/maurosr/dev/cpython/Lib/smtpd.py", line 645, in __init__
>raise ValueError("The decode_data and enable_SMTPUTF8"
>ValueError: The decode_data and enable_SMTPUTF8 parameters cannot be set to 
>True at the same time.

That's testing the SMTPServer.__init__() which looks fine.  It's the
SMTPChannel.__init__() that's broken.

--

___
Python tracker 

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



[issue25328] ValueError in smtpd.py __init__() is not raised

2015-10-08 Thread Mauro S. M. Rodrigues

Mauro S. M. Rodrigues added the comment:

Hi Barry, I was testing this and it seems to work, am I doing something wrong 
in order to reproduce it? I've used the same parameters from the unit tests

Python 3.5.0+ (3.5:1e99ba6b7c98, Oct  8 2015, 17:12:06) 
[GCC 4.8.4] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import smtpd
>>> smtpd.SMTPServer(("127.0.0.1", 0), 
>>> ('b',0),enable_SMTPUTF8=True,decode_data=True)
Traceback (most recent call last):
  File "", line 1, in 
  File "/home/maurosr/dev/cpython/Lib/smtpd.py", line 645, in __init__
raise ValueError("The decode_data and enable_SMTPUTF8"
ValueError: The decode_data and enable_SMTPUTF8 parameters cannot be set to 
True at the same time.

--
nosy: +maurosr

___
Python tracker 

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



[issue24177] Add https?_proxy support to http.client

2015-10-08 Thread Demian Brecht

Demian Brecht added the comment:

Yeah, agreed that it should be opt-in, at least until a major release.

I've run into a couple cases where higher level libraries use http.client (or 
httplib) directly, but don't expose the client directly (not that they should 
anyways). Because of that, there are higher level libraries that simply /can't/ 
support http_proxy environment variable because they didn't use a higher level 
abstraction.

Given http.client /does/ implement everything required to support this, I can't 
see it impacting the architecture in any negative way.

--

___
Python tracker 

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



[issue25345] Unable to install Python 3.5 on Windows 10

2015-10-08 Thread eryksun

eryksun added the comment:

Please attach "Python 3.5.0 (32-bit)_*_core_JustForMe.log", if it exists.

According to the log, initially the installer can't create a restore point 
because, I assume, you have the volume shadow copy (VSS) service disabled, i.e. 
the error code is ERROR_SERVICE_DISABLED (0x80070422). That shouldn't derail 
the installation, but it's unusual to disable this service since restore points 
are critically important in case something goes wrong while modifying the 
system.

Next, installing core.msi fails with the error code 
ERROR_INSTALL_ALREADY_RUNNING (0x80070652). This means you had an existing 
installation in progress. Check for running instances of msiexec.exe. If the 
existing installation process is hung, try installing Python 3.5 again after 
rebooting.

--
nosy: +eryksun

___
Python tracker 

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



[issue25346] test_regrtest fails because 'sys' is not imported.

2015-10-08 Thread Steve Dower

New submission from Steve Dower:

Fixed in ee1ef5a97e8f

--
assignee:  -> steve.dower
resolution:  -> fixed
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue25346] test_regrtest fails because 'sys' is not imported.

2015-10-08 Thread Anish Shah

Changes by Anish Shah :


--
components: Tests
files: test_regrtest.patch
keywords: patch
nosy: Anish Shah, python-dev, steve.dower
priority: normal
severity: normal
status: open
title: test_regrtest fails because 'sys' is not imported.
versions: Python 3.6
Added file: http://bugs.python.org/file40722/test_regrtest.patch

___
Python tracker 

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



[issue25345] Unable to install Python 3.5 on Windows 10

2015-10-08 Thread Gowtham Nm

New submission from Gowtham Nm:

I downloaded Python 3.5 version to install on Windows 10. But apparently, the 
installation does not succeed.
I have tried with lower version of Python also, the installation does not 
succeed on Windows 10.

Have attached the logs of the error. I have checked for the particular error 
code (seen in the screenshot attached) in various forums but none worked.

Looking forward to hear from your team.

--
components: Windows
files: Python 3.5.0 (32-bit)_20151008230628.log
messages: 252563
nosy: Gowtham Nm, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: Unable to install Python 3.5 on Windows 10
type: resource usage
versions: Python 3.5
Added file: http://bugs.python.org/file40721/Python 3.5.0 
(32-bit)_20151008230628.log

___
Python tracker 

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



[issue24848] Warts in UTF-7 error handling

2015-10-08 Thread STINNER Victor

STINNER Victor added the comment:

The patch looks good to me.

--

___
Python tracker 

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



[issue25343] Document atomic operations on builtin types

2015-10-08 Thread R. David Murray

R. David Murray added the comment:

I wonder...personally I prefer to program in asyncio style rather than 
threading style, where one doesn't have to worry about atomicity.  Maybe Python 
shouldn't make any atomicity guarantees.

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



[issue25344] Enhancement to Logging - Logging Stack

2015-10-08 Thread R. David Murray

R. David Murray added the comment:

I'm guessing you could write a custom hander that would do that.  It might be 
something more suited for a recipe or pypi package.

--
nosy: +r.david.murray, vinay.sajip

___
Python tracker 

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



[issue25343] Document atomic operations on builtin types

2015-10-08 Thread Brett Cannon

Brett Cannon added the comment:

We actually don't have any guarantees written down because we have never 
formalized them. It was discussed at the PyCon language summit this past year 
-- https://lwn.net/Articles/640177/ -- but it didn't lead to anyone writing a 
proposal to formalize the memory model.

--
nosy: +brett.cannon

___
Python tracker 

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



[issue25157] Installing Python 3.5.0 32bit on Windows 8.1 64bit system gives Error 0x80240017

2015-10-08 Thread eryksun

eryksun added the comment:

> it does not generates any .evtx file

Start a command prompt; change to the directory that has the MSU, and run it 
with the option "/log:kb2999226.evtx". For me this creates kb2999226.evtx in 
the current directory, which can be converted to XML using wevtutil. If this 
doesn't create a log file, then possibly the .msu file association is 
incorrect. In that case, try running wusa.exe directly, e.g.

"%SystemRoot%\System32\wusa.exe" Windows8.1-KB2999226-x64.msu 
/log:kb2999226.evtx

--

___
Python tracker 

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



[issue25344] Enhancement to Logging - Logging Stack

2015-10-08 Thread David Silverman

New submission from David Silverman:

It would be useful to have the ability to push logs onto a stack. This way you 
can log events to the stack. If an error occurred, you could pop the stack and 
output the log events. If no error occurred, you could pop the stack and 
discard the logs.

An example would be when you call a function it could push logs onto the log 
stack as the function is executing. If an error is encountered, you can 
pop/output the logs to provide more details. But, if no error is encountered, 
the detailed logs can be popped and discarded.

--
components: Library (Lib)
messages: 252557
nosy: dasil...@cisco.com
priority: normal
severity: normal
status: open
title: Enhancement to Logging - Logging Stack
type: enhancement

___
Python tracker 

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



[issue25089] Can't run Python Launcher on Windows

2015-10-08 Thread Steve Dower

Steve Dower added the comment:

Hopefully with the extra logging we'll be able to see if something is failing 
at the point of detection. Any failure here (permissions in registry, etc.) 
will cause the launcher to not be installed on upgrade (which might be the same 
as removing it... I need to spend more time working through the dependencies 
involved here because they are messy).

--

___
Python tracker 

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



[issue25089] Can't run Python Launcher on Windows

2015-10-08 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 1e99ba6b7c98 by Steve Dower in branch '3.5':
Issue #25089: Adds logging to installer for case where launcher is not selected 
on upgrade.
https://hg.python.org/cpython/rev/1e99ba6b7c98

--
nosy: +python-dev

___
Python tracker 

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



[issue5380] pty.read raises IOError when slave pty device is closed

2015-10-08 Thread Guido van Rossum

Guido van Rossum added the comment:

Honestly, Antoine's patch looks reasonable to me (except that the names of the 
test modules perpetuate the confusion that pipes and ptys are similar).

Can someone just port that to 3.6? (The change in semantics is big enough that 
I don't think we should shove it into a bugfix release.)

In other news, the pty.py module is pretty pathetic. Kill or improve? It feels 
like one of those "included" batteries that runs out of juice after 5 minutes.

--

___
Python tracker 

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



[issue25157] Installing Python 3.5.0 32bit on Windows 8.1 64bit system gives Error 0x80240017

2015-10-08 Thread Shirshendu Bhowmick

Shirshendu Bhowmick added the comment:

Installing that update the system says this update is not applicable for your 
computer and it does not generates any .evtx file.

--

___
Python tracker 

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



[issue23919] [Windows] test_os fails several C-level assertions

2015-10-08 Thread Steve Dower

Changes by Steve Dower :


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

___
Python tracker 

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



[issue23919] [Windows] test_os fails several C-level assertions

2015-10-08 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 69c4fa62b608 by Steve Dower in branch '3.5':
Issue #23919: Prevents assert dialogs appearing in the test suite.
https://hg.python.org/cpython/rev/69c4fa62b608

New changeset 62897db9ae51 by Steve Dower in branch 'default':
Issue #23919: Prevents assert dialogs appearing in the test suite.
https://hg.python.org/cpython/rev/62897db9ae51

--
nosy: +python-dev

___
Python tracker 

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



[issue25161] Missing periods at the end of sentences

2015-10-08 Thread TAKASE Arihiro

TAKASE Arihiro added the comment:

And this is an updated patch for 2.7.

--
Added file: http://bugs.python.org/file40720/periods-2.7_v2.patch

___
Python tracker 

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



[issue25342] test_json segfault on OpenBSD

2015-10-08 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Duplicates and related issues: issue25329, issue25222, issue24999, issue22984, 
issue18075, issue12980.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue25161] Missing periods at the end of sentences

2015-10-08 Thread TAKASE Arihiro

TAKASE Arihiro added the comment:

Thank you for reviewing.

This is an updated patch for 3.x.

--
Added file: http://bugs.python.org/file40718/periods_v2.patch

___
Python tracker 

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



[issue24848] Warts in UTF-7 error handling

2015-10-08 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

The difference between 2.7 and 3.x is that 2.7 uses isalnum() in IS_BASE64, and 
3.x test concrete ranges. Therefore depending on platform and locale 2.7 can 
accept wrong bytes as BASE64 characters and return incorrect result. Following 
patch makes 2.7 code the same as 3.x. Tests are changed to fail with large 
probability with unpatched code ('\xe1' is an alnum on almost all 8-bit 
locales).

--
Added file: http://bugs.python.org/file40719/decode_utf7_locale-2.7.patch

___
Python tracker 

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



[issue25342] test_json segfault on OpenBSD

2015-10-08 Thread STINNER Victor

STINNER Victor added the comment:

Stefan Krah added the comment:
> Or did you want to compute it at runtime?  Actually, why not?

I'm asking to adjust the limit at _runtime_. getrlimit() is not
something static, it's common to modify them manually for the current
shell process (and child process), or system-wide.

--

___
Python tracker 

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



[issue25157] Installing Python 3.5.0 32bit on Windows 8.1 64bit system gives Error 0x80240017

2015-10-08 Thread Steve Dower

Steve Dower added the comment:

Shirshendu - any luck with eryksun's suggestions?

--

___
Python tracker 

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



[issue25343] Document atomic operations on builtin types

2015-10-08 Thread Dima Tisnek

New submission from Dima Tisnek:

Please document what builtin type operations are actually atomic.
For example, what set() operations are atomic?

(There are some blogs / tutorials online, but information is outdated and not 
authoritative)

--
messages: 252545
nosy: Dima.Tisnek
priority: normal
severity: normal
status: open
title: Document atomic operations on builtin types
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



[issue25343] Document atomic operations on builtin types

2015-10-08 Thread Dima Tisnek

Changes by Dima Tisnek :


--
assignee:  -> docs@python
components: +Documentation
nosy: +docs@python
type:  -> enhancement

___
Python tracker 

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



[issue5380] pty.read raises IOError when slave pty device is closed

2015-10-08 Thread Xavier de Gaye

Xavier de Gaye added the comment:

TLPI (The Linux Programming Interface book) says about the pty implementation 
on linux, at section 5 of chapter 64:

If we close all file descriptors referring to the pseudoterminal slave, 
then:
a) A read() from the master device fails with the error EIO. (On some other 
UNIX implementations, a read() returns end-of-file in this case.)

and also adds this (which is slightly off topic here):

b)  A write() to the master device succeeds, unless the input queue of the 
slave device is full, in which case the write() blocks. If the slave device is 
subsequently reopened, these bytes can be read.

UNIX implementations vary widely in their behavior for the last case. On 
some UNIX implementations, write() fails with the error EIO. On other 
implementations, write() succeeds, but the output bytes are discarded (i.e., 
they can’t be read if the slave is reopened). In general, these variations 
don’t present a problem. Normally, the process on the master side detects that 
the slave has been closed because a read() from the master returns end-of-file 
or fails. At this point, the process performs no further writes to the master.

--
nosy: +xdegaye

___
Python tracker 

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



[issue25008] Deprecate smtpd (based on deprecated asyncore/asynchat): write a new smtp server with asyncio

2015-10-08 Thread neic

Changes by neic :


--
nosy: +neic

___
Python tracker 

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



[issue19500] Error when connecting to FTPS servers not supporting SSL session resuming

2015-10-08 Thread Alex Warhawk

Alex Warhawk added the comment:

Thanks for the heads up Christian I'll try enabling client session caching. If 
this does not work I'll try to adapt the patch to only allow session reusing 
within the same context.

--

___
Python tracker 

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



[issue25228] Regression in cookie parsing with brackets and quotes

2015-10-08 Thread Pathangi Jatinshravan

Pathangi Jatinshravan added the comment:

Hi, I've made the change to use str.find() and removed the while loop, can you 
take a look at it?

--
Added file: http://bugs.python.org/file40717/patch.diff

___
Python tracker 

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



[issue20504] cgi.FieldStorage, multipart, missing Content-Length

2015-10-08 Thread STINNER Victor

Changes by STINNER Victor :


--
nosy: +haypo

___
Python tracker 

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



[issue20504] cgi.FieldStorage, multipart, missing Content-Length

2015-10-08 Thread Sebastian Rittau

Sebastian Rittau added the comment:

Is there any progress on this? The fix seems trivial.

--

___
Python tracker 

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



[issue25342] test_json segfault on OpenBSD

2015-10-08 Thread Stefan Krah

Stefan Krah added the comment:

Or did you want to compute it at runtime?  Actually, why not?

--

___
Python tracker 

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



[issue25342] test_json segfault on OpenBSD

2015-10-08 Thread Stefan Krah

Stefan Krah added the comment:

The ratio (1000/8MB) seems to be stable on Linux. Perhaps we could
write a getrlimit program for ./configure to get the stack size and
adjust the recursion limit to keep the ratio the same.

It's just an estimate of course.

--

___
Python tracker 

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



[issue25342] test_json segfault on OpenBSD

2015-10-08 Thread STINNER Victor

STINNER Victor added the comment:

Would it be possible to compute the recursion limit depending on the current 
maximum C stack size? At least estimate it? I guess the sys.getdefaultlimit() 
is 1000 is an arbitrary value. I also know that the effective limit depends on 
the memory allocated on the stack by C functions. Calling a Python function and 
a function implemented in C is different :-/

--
nosy: +haypo

___
Python tracker 

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



[issue25342] test_json segfault on OpenBSD

2015-10-08 Thread Stefan Krah

Stefan Krah added the comment:

It's not noise, we also have problems on Windows with test_json.

In theory we should set Py_DEFAULT_RECURSION_LIMIT in Python/ceval.c
to appropriate values for the default OS stack sizes in order to get
a proper RuntimeError instead of a segfault.

For OpenBSD it's clearly too high for the default.  Could you try
to find a safe value (perhaps 500 instead of 1000) for OpenBSD's
default?

--

___
Python tracker 

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



[issue25338] urllib bypasses all hosts if proxyoverride includes an empty element

2015-10-08 Thread R. David Murray

R. David Murray added the comment:

How does IE itself behave in this case?

Also, we should have a test to go along with the fix.

--
nosy: +r.david.murray
stage:  -> test needed
title: urllib fail to check host whether it should be bypassed -> urllib 
bypasses all hosts if proxyoverride includes an empty element
versions:  -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



[issue25342] test_json segfault on OpenBSD

2015-10-08 Thread Remi Pointel

Remi Pointel added the comment:

It's good when I entered "ulimit -s 8192". Sorry for the noise...

--

___
Python tracker 

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



[issue25342] test_json segfault on OpenBSD

2015-10-08 Thread Stefan Krah

Stefan Krah added the comment:

Try setting the stack size to 8MB (the default on Linux) in login.conf.

--
nosy: +skrah

___
Python tracker 

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



[issue25342] test_json segfault on OpenBSD

2015-10-08 Thread Remi Pointel

Remi Pointel added the comment:

It fails on test_endless_recursion:

$ LD_LIBRARY_PATH=. PYTHONPATH=./Lib/ ./python ./Lib/test/test_json -v

test_endless_recursion (test.test_json.test_recursion.TestPyRecursion) ... zsh: 
segmentation fault (core dumped)

--

___
Python tracker 

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



[issue25336] Segmentation fault on Mavericks consistent crashing of software: Please HELP!!!!!

2015-10-08 Thread CM

New submission from CM:

Process: Python [556]
Path:
/opt/local/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python
Identifier:  Python
Version: 2.7.10 (2.7.10)
Code Type:   X86-64 (Native)
Parent Process:  bash [510]
Responsible: X11.bin [452]
User ID: 502

Date/Time:   2015-10-07 17:01:32.979 -0700
OS Version:  Mac OS X 10.9.5 (13F1096)
Report Version:  11
Anonymous UUID:  34110EFA-E539-3790-15F7-F5AE427C092E

Sleep/Wake UUID: 1444CE38-3698-4FDA-95B9-196B28CB372E

Crashed Thread:  2

Exception Type:  EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x

VM Regions Near 0:
--> 
__TEXT 00010802b000-00010802d000 [8K] r-x/rwx 
SM=COW  
/opt/local/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python

Thread 0:: Dispatch queue: com.apple.main-thread
0   libsystem_kernel.dylib  0x7fff8d24f716 __psynch_cvwait + 10
1   libsystem_pthread.dylib 0x7fff9185dc3b _pthread_cond_wait + 
727
2   org.python.python   0x000108118f51 
PyThread_acquire_lock + 145
3   org.python.python   0x0001080dc74e PyEval_RestoreThread 
+ 62
4   org.python.python   0x000108104f6d PyGILState_Ensure + 
93
5   _gtk.so 0x000108ec4b36 
pygtk_main_watch_check + 50
6   libglib-2.0.0.dylib 0x000108c9efc0 g_main_context_check 
+ 362
7   libglib-2.0.0.dylib 0x000108c9f4ba 
g_main_context_iterate + 388
8   libglib-2.0.0.dylib 0x000108c9f714 g_main_loop_run + 195
9   libgtk-x11-2.0.0.dylib  0x00010918b5db gtk_main + 180
10  _gtk.so 0x000108e7d0ec _wrap_gtk_main + 241
11  org.python.python   0x0001080e1003 PyEval_EvalFrameEx + 
15539
12  org.python.python   0x0001080dd0dd PyEval_EvalCodeEx + 
1725
13  org.python.python   0x0001080e4c89 fast_function + 297
14  org.python.python   0x0001080e04f5 PyEval_EvalFrameEx + 
12709
15  org.python.python   0x0001080dd0dd PyEval_EvalCodeEx + 
1725
16  org.python.python   0x0001080e4c89 fast_function + 297
17  org.python.python   0x0001080e04f5 PyEval_EvalFrameEx + 
12709
18  org.python.python   0x0001080dd0dd PyEval_EvalCodeEx + 
1725
19  org.python.python   0x0001080e4c89 fast_function + 297
20  org.python.python   0x0001080e04f5 PyEval_EvalFrameEx + 
12709
21  org.python.python   0x0001080dd0dd PyEval_EvalCodeEx + 
1725
22  org.python.python   0x0001080dca16 PyEval_EvalCode + 54
23  org.python.python   0x000108106774 PyRun_FileExFlags + 
164
24  org.python.python   0x0001081062f1 
PyRun_SimpleFileExFlags + 769
25  org.python.python   0x00010811c05e Py_Main + 3070
26  libdyld.dylib   0x7fff8f24c5fd start + 1

Thread 1:: Dispatch queue: com.apple.libdispatch-manager
0   libsystem_kernel.dylib  0x7fff8d250662 kevent64 + 10
1   libdispatch.dylib   0x7fff90e99421 _dispatch_mgr_invoke 
+ 239
2   libdispatch.dylib   0x7fff90e99136 _dispatch_mgr_thread 
+ 52

Thread 2 Crashed:
0   org.python.python   0x0001080853af PyObject_Malloc + 79
1   org.python.python   0x00010808 _PyObject_New + 18
2   org.python.python   0x00010811e082 
thread_PyThread_allocate_lock + 18
3   org.python.python   0x0001080e1003 PyEval_EvalFrameEx + 
15539
4   org.python.python   0x0001080dd0dd PyEval_EvalCodeEx + 
1725
5   org.python.python   0x0001080e4c89 fast_function + 297
6   org.python.python   0x0001080e04f5 PyEval_EvalFrameEx + 
12709
7   org.python.python   0x0001080dd0dd PyEval_EvalCodeEx + 
1725
8   org.python.python   0x0001080e4c89 fast_function + 297
9   org.python.python   0x0001080e04f5 PyEval_EvalFrameEx + 
12709
10  org.python.python   0x0001080dd0dd PyEval_EvalCodeEx + 
1725
11  org.python.python   0x0001080e4c89 fast_function + 297
12  org.python.python   0x0001080e04f5 PyEval_EvalFrameEx + 
12709
13  org.python.python   0x0001080dd0dd PyEval_EvalCodeEx + 
1725
14  org.python.python   0x000108068b4c function_call + 364
15  org.python.python   0x000108042fa3 PyObject_Call + 99
16  org.python.python   0x0001080e081d PyEval_EvalFrameEx + 
13517
17  org.python.python   0x0001080dd

[issue25342] test_json segfault on OpenBSD

2015-10-08 Thread Remi Pointel

Changes by Remi Pointel :


--
title: json -> test_json segfault on OpenBSD

___
Python tracker 

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



[issue25342] json

2015-10-08 Thread Remi Pointel

Remi Pointel added the comment:

Sorry I clicked on "create" before adding info in comment.

When I run the test_json suite on OpenBSD, I have a segfault:

$ egdb ./python
GNU gdb (GDB) 7.10
Copyright (C) 2015 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-unknown-openbsd5.8".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
.
Find the GDB manual and other documentation resources online at:
.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ./python...done.
(gdb) set env PYTHONPATH ./Lib
(gdb) set env LD_LIBRARY_PATH .
(gdb) set args ./Lib/test/test_json/
(gdb) r
Starting program: /home/remi/dev/cpython/python ./Lib/test/test_json/
.s..
Program received signal SIGSEGV, Segmentation fault.
0x1dd119cf9e0d in PyEval_EvalFrameEx (f=, throwflag=) at Python/ceval.c:798
(gdb) bt
#0  0x1dd119cf9e0d in PyEval_EvalFrameEx (f=, throwflag=)
at Python/ceval.c:798
#1  0x1dd119dedbe3 in gen_send_ex (gen=0x1dd35dc11c90, arg=None, exc=0) at 
Objects/genobject.c:125
#2  0x1dd119dee6af in _PyGen_Send (gen=0x1dd35dc11c90, arg=None) at 
Objects/genobject.c:223
#3  0x1dd119d0267b in PyEval_EvalFrameEx (
f=Frame 0x1dd32e645c38, for file 
/home/remi/dev/cpython/Lib/json/encoder.py, line 324, in _iterencode_list 
(lst=[], _current_indent_level=0, buf='[', 
newline_indent=None, separator=', ', first=False, value=, chunks=), throwflag=0) at 
Python/ceval.c:2038
#4  0x1dd119dedbe3 in gen_send_ex (gen=0x1dd35dc11c08, arg=None, exc=0) at 
Objects/genobject.c:125
#5  0x1dd119dee6af in _PyGen_Send (gen=0x1dd35dc11c08, arg=None) at 
Objects/genobject.c:223
#6  0x1dd119d0267b in PyEval_EvalFrameEx (f=Frame 0x1dd39a980c38, for file 
/home/remi/dev/cpython/Lib/json/encoder.py, line 427, in _iterencode 
(o=[], _current_indent_level=0), 
throwflag=0) at Python/ceval.c:2038
#7  0x1dd119dedbe3 in gen_send_ex (gen=0x1dd35dc11b80, arg=None, exc=0) at 
Objects/genobject.c:125
#8  0x1dd119dee6af in _PyGen_Send (gen=0x1dd35dc11b80, arg=None) at 
Objects/genobject.c:223
#9  0x1dd119d0267b in PyEval_EvalFrameEx (f=Frame 0x1dd39a980838, for file 
/home/remi/dev/cpython/Lib/json/encoder.py, line 437, in _iterencode 
(o=[], _current_indent_level=0), 
throwflag=0) at Python/ceval.c:2038
#10 0x1dd119dedbe3 in gen_send_ex (gen=0x1dd35dc11af8, arg=None, exc=0) at 
Objects/genobject.c:125
#11 0x1dd119dee6af in _PyGen_Send (gen=0x1dd35dc11af8, arg=None) at 
Objects/genobject.c:223
#12 0x1dd119d0267b in PyEval_EvalFrameEx (
f=Frame 0x1dd3b9e32c38, for file 
/home/remi/dev/cpython/Lib/json/encoder.py, line 324, in _iterencode_list 
(lst=[], _current_indent_level=0, buf='[', 
newline_indent=None, separator=', ', first=False, value=, chunks=), throwflag=0) at 
Python/ceval.c:2038
#13 0x1dd119dedbe3 in gen_send_ex (gen=0x1dd35dc11a70, arg=None, exc=0) at 
Objects/genobject.c:125
#14 0x1dd119dee6af in _PyGen_Send (gen=0x1dd35dc11a70, arg=None) at 
Objects/genobject.c:223
#15 0x1dd119d0267b in PyEval_EvalFrameEx (f=Frame 0x1dd32e645838, for file 
/home/remi/dev/cpython/Lib/json/encoder.py, line 427, in _iterencode 
(o=[], _current_indent_level=0), 
throwflag=0) at Python/ceval.c:2038
#16 0x1dd119dedbe3 in gen_send_ex (gen=0x1dd35dc119e8, arg=None, exc=0) at 
Objects/genobject.c:125
#17 0x1dd119dee6af in _PyGen_Send (gen=0x1dd35dc119e8, arg=None) at 
Objects/genobject.c:223
#18 0x1dd119d0267b in PyEval_EvalFrameEx (f=Frame 0x1dd39a980438, for file 
/home/remi/dev/cpython/Lib/json/encoder.py, line 437, in _iterencode 
(o=[], _current_indent_level=0), 
throwflag=0) at Python/ceval.c:2038
#19 0x1dd119dedbe3 in gen_send_ex (gen=0x1dd35dc11960, arg=None, exc=0) at 
Objects/genobject.c:125
#20 0x1dd119dee6af in _PyGen_Send (gen=0x1dd35dc11960, arg=None) at 
Objects/genobject.c:223
#21 0x1dd119d0267b in PyEval_EvalFrameEx (
f=Frame 0x1dd3b9e32838, for file 
/home/remi/dev/cpython/Lib/json/encoder.py, line 324, in _iterencode_list 
(lst=[], _current_indent_level=0, buf='[', 
newline_indent=None, separator=', ', first=False, value=, chunks=), throwflag=0) at 
Python/ceval.c:2038
#22 0x1dd119dedbe3 in gen_send_ex (gen=0x1dd35dc118d8, arg=None, exc=0) at 
Objects/genobject.c:125
#23 0x1dd119dee6af in _PyGen_Send (gen=0x1dd35dc118d8, arg=None) at 
Objects/genobject.c:223
#24 0x1dd119d0267b in PyEval_EvalFrameEx (f=Frame 0x1dd3b9e32038, for file 
/home/remi/dev/cpython/Lib/json/encode

[issue25342] json

2015-10-08 Thread Stéphane Wirtel

New submission from Stéphane Wirtel:

What the details of this issue?
On 8 Oct 2015, at 13:57, Remi Pointel wrote:

> Changes by Remi Pointel :
>
>
> --
> nosy: rpointel
> priority: normal
> severity: normal
> status: open
> title: json
>
> ___
> Python tracker 
> 
> ___
> ___
> Python-bugs-list mailing list
> Unsubscribe: 
> https://mail.python.org/mailman/options/python-bugs-list/stephane%40wirtel.be

--
nosy: +matrixise

___
Python tracker 

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



[issue25342] json

2015-10-08 Thread Remi Pointel

Changes by Remi Pointel :


--
nosy: rpointel
priority: normal
severity: normal
status: open
title: json

___
Python tracker 

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



[issue19500] Error when connecting to FTPS servers not supporting SSL session resuming

2015-10-08 Thread Christian Heimes

Christian Heimes added the comment:

Thanks for your patch. There might be a simpler way. By default a SSLContext 
only caches server sessions. You can enable client session caching with:

  SSL_CTX_set_session_cache_mode(ctx, SSL_SESS_CACHE_CLIENT)

This may be sufficient for FTP over TLS since both sockets are created from the 
same context.

 
The new patch has a flaw. With the new SSLSession object a user could attempt 
to reuse a SSLSession with a different SSLContext. That's going to break 
OpenSSL.

>From SSL_set_session(3)

NOTES
   SSL_SESSION objects keep internal link information about the session 
cache list, when being inserted into one SSL_CTX object's session cache.  One 
SSL_SESSION object, regardless of its reference count, must therefore only be 
used with one SSL_CTX object (and the SSL objects created from this SSL_CTX 
object).

--

___
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

2015-10-08 Thread Florin Papa

Florin Papa added the comment:

Hi Antoine,

I understand the problem with the small object allocator now. I will have a 
closer look at it and come back with a solution. Thank you for pointing this 
out.

--

___
Python tracker 

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



[issue21475] Support the Sitemap extension in robotparser

2015-10-08 Thread Berker Peksag

Berker Peksag added the comment:

The Crawl-delay part(issue 16099) is now committed.

--
stage:  -> needs patch
title: Support the Sitemap and Crawl-delay extensions in robotparser -> Support 
the Sitemap extension in robotparser
versions: +Python 3.6 -Python 3.5

___
Python tracker 

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



[issue25341] File mode wb+ appears as rb+

2015-10-08 Thread Mahmoud Hashemi

Changes by Mahmoud Hashemi :


--
nosy: +mahmoud

___
Python tracker 

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



[issue19500] Error when connecting to FTPS servers not supporting SSL session resuming

2015-10-08 Thread Alex Warhawk

Alex Warhawk added the comment:

I have re-targeted the patch for 3.6. It is not a 1 to 1 port of the prior one, 
but quite similar.

--
Added file: 
http://bugs.python.org/file40716/implement_ssl_session_reuse_3.6.patch

___
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

2015-10-08 Thread STINNER Victor

STINNER Victor added the comment:

FYI In the discussion of the PEP 445 "Add new APIs to customize Python
memory allocators" it was proposed to add runtime option to choose the
memory allocator. At least for debug purpose, it would help to be able
to use malloc() for *all* Python memory allocations. Would it help to
find more bugs with MPX?

It's not possible to disable our fast allocator for small objects,
disabling it has a high cost on performances (Python would be much
slower).

--

___
Python tracker 

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



[issue16099] robotparser doesn't support request rate and crawl delay parameters

2015-10-08 Thread Berker Peksag

Berker Peksag added the comment:

I've finally committed your patch to default. Thank you for not giving up, 
Nikolay :)

Note that currently the link in the example section doesn't work. I will open a 
new issue for that.

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.6 -Python 3.5

___
Python tracker 

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



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

2015-10-08 Thread Antoine Pitrou

Antoine Pitrou added the comment:

The small object allocator uses large mmap-allocated arenas of 256 KB (IIRC) 
and carves small objects out of it.  So unless the pointer returned by 
PyObject_Malloc() has its bounds set manually using one of the intrinsic 
functions (*), MPX would believe the bounds of small objects are the bounds of 
the 256 KB arenas containing them, right?

(*) I'm assuming __bnd_set_ptr_bounds()

--

___
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

2015-10-08 Thread Florin Papa

Florin Papa added the comment:

No modifications need to be made to the small object allocator. The malloc 
situation was just an example, it does not mean that setting pointer bounds 
occurs only in a malloc call. It also occurs when you declare a static array or 
when you initialize a new pointer:

int *x = (int*)malloc(10 * sizeof(int));
int *y = x; // the bounds for x will be passed on to y

When using "fcheck-pointer-bounds -mmpx" _all_ memory accesses will be 
instrumented.

--

___
Python tracker 

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



[issue25311] Add f-string support to tokenize.py

2015-10-08 Thread Eric V. Smith

Eric V. Smith added the comment:

Yes, both 'fr' and 'rf' need to be supported (and all upper/lower variants). 
And in the future, maybe 'fb' (and 'rfb', 'bfr', ...).

Unfortunately, the regex doesn't scale well for all of the combinations.

--

___
Python tracker 

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



[issue16099] robotparser doesn't support request rate and crawl delay parameters

2015-10-08 Thread Roundup Robot

Roundup Robot added the comment:

New changeset dbed7cacfb7e by Berker Peksag in branch 'default':
Issue #16099: RobotFileParser now supports Crawl-delay and Request-rate
https://hg.python.org/cpython/rev/dbed7cacfb7e

--
nosy: +python-dev

___
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

2015-10-08 Thread Antoine Pitrou

Antoine Pitrou added the comment:

> This means that when you perform a malloc, the pointer bounds will be set 
> inside the malloc call, and then passed on to your variable.

For this to be useful in Python, you would have to annotate Python's small 
object allocator to designate it as a malloc()-like function, no?

--

___
Python tracker 

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



[issue21373] robotparser: Automatically call modified function in read()

2015-10-08 Thread Berker Peksag

Berker Peksag added the comment:

This is already fixed by changeset 4ea86cd87f95 in issue 21469 (2.7 and 3.4+). 
Thanks for the report and for the patch.

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



[issue25341] File mode wb+ appears as rb+

2015-10-08 Thread Mark Williams

New submission from Mark Williams:

There is at least one mode in which a file can be opened that cannot be 
represented in its mode attribute: wb+.  This mode instead appears as 'rb+' in 
the mode attribute:

Python 3.5.0 (default, Oct  3 2015, 10:40:38)
[GCC 4.2.1 Compatible FreeBSD Clang 3.4.1 (tags/RELEASE_34/dot1-final 208032)] 
on freebsd10
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> if os.path.exists('some_file'): os.unlink('some_file')
...
>>> with open('some_file', 'r+b') as f: print(f.mode)
...
Traceback (most recent call last):
  File "", line 1, in 
FileNotFoundError: [Errno 2] No such file or directory: 'some_file'
>>> with open('some_file', 'w+b') as f: print(f.mode)
...
rb+
>>> with open('some_file', 'r+b') as f: print(f.mode)
rb+


This means code that interacts with file objects cannot trust the mode of 
binary files.  For example, you can't use tempfile.TemporaryFile (the mode 
argument of which defaults to 'wb+') and GzipFile:


>>> import gzip
>>> from tempfile import TemporaryFile
>>> with TemporaryFile() as f:
... gzip.GzipFile(fileobj=f).write(b'test')
...
Traceback (most recent call last):
  File "", line 2, in 
  File "/usr/local/lib/python3.5/gzip.py", line 249, in write
raise OSError(errno.EBADF, "write() on read-only GzipFile object")
OSError: [Errno 9] write() on read-only GzipFile object


This occurs because without a mode argument passed to its initializer, GzipFile 
checks that the fp object's mode starts with 'w', 'a', or 'x'.

For the sake of completeness/searchability: w+ and r+ are different modes, so 
rb+ and wb+ must be different modes.  Per 
https://docs.python.org/3/library/functions.html#open :

"""
For binary read-write access, the mode 'w+b' opens and truncates the file to 0 
bytes. 'r+b' opens the file without truncation.
"""


I haven't been able to test this on Windows, but I expect precisely the same 
behavior given my understanding of the relevant source.

_io_FileIO___init___impl in _io/fileio.c does the right thing and includes 
O_CREAT and O_TRUNC in the open(2) flags upon seeing 'w' in the mode:

https://hg.python.org/cpython/file/3.5/Modules/_io/fileio.c#l324

this ensures correct interaction with the file system.  But it also sets 
self->readable and self->writable upon seeing '+' in the mode:

https://hg.python.org/cpython/file/3.5/Modules/_io/fileio.c#l341

The open flags are not retained.  Consequently, when the mode attribute is 
accessed and the get_mode calls the mode_string function, the instance has 
insufficient information to differentiate between 'rb+' and 'wb+':

https://hg.python.org/cpython/file/3.5/Modules/_io/fileio.c#l1043

If the FileIO instance did retain the 'flags' variable that's declared and set 
in its initializer, then mode_string could use it to determine the difference 
between wb+ and rb+.

I would be happy to write a patch for this.

--
components: IO, Interpreter Core, Library (Lib)
messages: 252518
nosy: Mark.Williams
priority: normal
severity: normal
status: open
title: File mode wb+ appears as rb+
type: behavior
versions: Python 2.7, Python 3.5, Python 3.6

___
Python tracker 

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



[issue25340] libraries variable in setup.py ignore for multiprocessing module

2015-10-08 Thread Guillaume DAVY

New submission from Guillaume DAVY:

Around line 1455 in setup.py the "libraries" variable is assigned but
seems to be ignored when the Extension object for multiprocessing
is created. This leads to a linking error on my system : "undefined symbol: 
clock_gettime"

--
components: Installation
messages: 252517
nosy: davyg
priority: normal
severity: normal
status: open
title: libraries variable in setup.py ignore for multiprocessing module
type: compile error
versions: Python 2.7

___
Python tracker 

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



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

2015-10-08 Thread Florin Papa

Florin Papa added the comment:

> Is there a runtime cost or does the hardware run the bounds checks in 
> parallel with memory accesses?   Are the bounds set when malloc() is called 
> or elsewhere?  I read the provided links but can't say I fully understand how 
> it works exactly (which memory blocks are protected, where the bounds get 
> set, when the registers are loaded, etc).

There is a runtime cost associated with MPX instrumentation, which is kept to a 
minimum due to the use of hardware instructions and registers. When 
"fcheck-pointer-bounds -mmpx" compilation flags are set, instrumentation is 
enabled for _all_ memory acceses in the code. This means that when you perform 
a malloc, the pointer bounds will be set inside the malloc call, and then 
passed on to your variable. Alternatively, you can manually instrument only 
regions of interest in your code using GCC functions described here [1].

> Also, I'm curious about whether we have direct controls over the bounds.  For 
> example, in a listobject.c or _collections.c object could the bounds be 
> tightened to only include the active data and excluded the unused part of the 
> overallocation?

Please see __bnd_set_ptr_bounds here [1] for bound manipulation. In order to 
have a better understanding of what happens when using MPX, I suggest writing a 
simple C program and look at the assembly code generated (MPX instructions and 
registers begin with bnd). You can use the following steps:

gcc -g -c test.c -O2 -fcheck-pointer-bounds -mmpx
objdump -d -M intel -S test.o


[1] 
https://gcc.gnu.org/wiki/Intel%20MPX%20support%20in%20the%20GCC%20compiler#Compiler_intrinsics_and_attributes

--

___
Python tracker 

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