[issue28975] os.walk generator giving inconsistent results

2016-12-20 Thread Eric V. Smith

Changes by Eric V. Smith :


--
stage:  -> resolved

___
Python tracker 

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



[issue29025] random.seed() relation to hash() function and its determinism is vague

2016-12-20 Thread Raymond Hettinger

Raymond Hettinger added the comment:

In Python 3.5 and Python 3.6, this is already fixed (decoupled from 
PYTHONHASHSEED).  In Python 2.7, I could backport the fix, add a note to the 
docs, or just let it be (since seeding is turned off by default).  The other 
versions of Python are already inactive.

--
assignee: docs@python -> rhettinger
nosy: +rhettinger
priority: normal -> low

___
Python tracker 

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



[issue29011] No entry Deque in typing.py

2016-12-20 Thread Raymond Hettinger

Changes by Raymond Hettinger :


--
components: +Library (Lib)
keywords: +patch
nosy: +ned.deily
stage:  -> patch review
type:  -> enhancement
versions: +Python 3.5, Python 3.6, Python 3.7
Added file: http://bugs.python.org/file45979/Deque.diff

___
Python tracker 

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



[issue28988] Switch dict and set structures to PyVarObject

2016-12-20 Thread Raymond Hettinger

Raymond Hettinger added the comment:

Please leave the set object patch for me.  I would like to do it a bit 
differently.

--

___
Python tracker 

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



[issue13643] 'ascii' is a bad filesystem default encoding

2016-12-20 Thread Nick Coghlan

Nick Coghlan added the comment:

Also see http://bugs.python.org/issue28180 for a more recent proposal to tackle 
this by coercing the C locale to the C.UTF-8 locale

--
nosy: +ncoghlan

___
Python tracker 

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



[issue19846] Python 3 raises Unicode errors with the C locale

2016-12-20 Thread Nick Coghlan

Nick Coghlan added the comment:

Also see http://bugs.python.org/issue28180 for a more recent proposal to tackle 
this by coercing the C locale to the C.UTF-8 locale

--

___
Python tracker 

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




[issue29014] Python 3.5.2 installer doesn't register IDLE .py extensions on Windows 10

2016-12-20 Thread David

David added the comment:

So I tried changing it to py.exe, and it doesn't load the IDLE: instead, it 
opens up the run command for the program in command prompt. That's not what I 
want it to do. Also, there still is no Edit With IDLE option. And I tried doing 
the ProgID stuff, but none of it worked even after repairing/uninstalling, etc. 

I'm kind of hopeless at this point. Thank you everyone for helping.

--

___
Python tracker 

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



[issue23903] Generate PC/python3.def by scraping headers

2016-12-20 Thread Steve Dower

Steve Dower added the comment:

I just ran into this because PyModule_AddFunctions() was added to the stable 
ABI in 3.5, but was not added to python3.dll.

This is blatantly a compilation error. We _need_ python3.def and the stable ABI 
to be in sync.

I've rerun the script against Python 3.6 and attached it. I'm also going to 
post to python-dev to attract some attention.

I think at this stage we ought to update python3.dll to include everything that 
could be used from the headers. Unfortunately, that means extensions could 
potentially break if built on 3.6.1 and run against 3.6.0, but it's inevitable 
that there will be some breakage and this way it's only temporary.

--
versions: +Python 3.5, Python 3.7
Added file: http://bugs.python.org/file45978/python3def.patch

___
Python tracker 

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



[issue29030] argparse: choices override metavar

2016-12-20 Thread R. David Murray

R. David Murray added the comment:

metavar is, I believe, the intended way to change the default behavior.  
Whether or not this needs better documentation is a separate question :)

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



[issue29030] argparse: choices override metavar

2016-12-20 Thread Cyker Way

New submission from Cyker Way:

Using `choices` option in `argparse` module caused unwanted behavior.

# Without `choices`

parser = argparse.ArgumentParser()
parser.add_argument('length')
parser.print_help()

## Output

usage: demo.py [-h] length

positional arguments:
  length

optional arguments:
  -h, --help  show this help message and exit

# With choices

parser = argparse.ArgumentParser()
parser.add_argument('length', choices=[1,2,3])
parser.print_help()

## Output

usage: demo.py [-h] {1,2,3}

positional arguments:
  {1,2,3}

optional arguments:
  -h, --help  show this help message and exit

I think the doc says ArgumentParser objects use the `dest` value as the “name” 
of each object. And the doc doesn't mention anything about `dest` be changed by 
`choices`. The help text looks ugly when there is a long list of choices.

Currently the problem can be remedied by adding a `metavar` option. But I hope 
it will be fixed in the library itself.

--
components: Library (Lib)
messages: 283713
nosy: cyker
priority: normal
severity: normal
status: open
title: argparse: choices override metavar
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



[issue29014] Python 3.5.2 installer doesn't register IDLE .py extensions on Windows 10

2016-12-20 Thread eryk sun

eryk sun added the comment:

> There's no reason to for IDLE to be a system-level association if 
> the user has not chosen the association

Ok, to clarify, SystemFileAssociations can be defined in either the system or 
user hive. It's fine if the IDLE menu is added this way when it's done just for 
the current user (perhaps with an addition option in the installer). The 
problem is setting it in the system hive for a per-machine install because an 
individual user won't be able to disable the menu.

> I'd rather figure out adding an "Open With" entry for IDLE

As you've suggested before, that requires bundling an idle.exe launcher.

--

___
Python tracker 

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



[issue28932] Fail compile Python 3.6.0rc1 on OpenBSD 6.0

2016-12-20 Thread Ned Deily

Changes by Ned Deily :


--
priority: release blocker -> 

___
Python tracker 

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



[issue29021] Custom functions in sqlite receive None on invalid UTF-8

2016-12-20 Thread Ned Deily

Changes by Ned Deily :


--
nosy: +ghaering

___
Python tracker 

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



[issue29029] Faster positional arguments parsing in PyArg_ParseTupleAndKeywords

2016-12-20 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

Proposed patch speeds up parsing positional arguments in 
PyArg_ParseTupleAndKeywords().

$ ./python -m perf timeit "1 .to_bytes(1, 'little', signed=False)"
Unpatched:  Median +- std dev: 2.01 us +- 0.09 us
Patched:Median +- std dev: 1.23 us +- 0.03 us

Currently names of all passed positional argument are looked up in the kwargs 
dictionary for checking if the argument is passed as positional and keyword 
argument. With the patch this is checked only if there are unhandled keyword 
arguments after parsing keyword arguments that don't passed as positional 
arguments.

The same optimization also is applied to _PyArg_ParseTupleAndKeywordsFast() and 
like, but the effect is much smaller.

The patch also includes tiny refactoring.

--
components: Interpreter Core
files: PyArg_ParseTupleAndKeywords-faster-positional-args-parse.patch
keywords: patch
messages: 283711
nosy: serhiy.storchaka
priority: normal
severity: normal
stage: patch review
status: open
title: Faster positional arguments parsing in PyArg_ParseTupleAndKeywords
type: performance
versions: Python 3.7
Added file: 
http://bugs.python.org/file45977/PyArg_ParseTupleAndKeywords-faster-positional-args-parse.patch

___
Python tracker 

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



[issue24672] shutil.rmtree fails on non ascii filenames

2016-12-20 Thread Steve Dower

Steve Dower added the comment:

Lib/posixpath.py needs a huge amount of work to behave correctly for either 
bytes or Unicode paths. I don't know why Lib/ntpath.py is okay here, but the 
code is different so I suspect it just happens to not need the same conversion.

Switching for each platform is probably the only way, unless you find someone 
willing to go through and make Unicode paths viable on Python 2.7 (this came up 
earlier today on one of the lists).

--

___
Python tracker 

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



[issue29014] Python 3.5.2 installer doesn't register IDLE .py extensions on Windows 10

2016-12-20 Thread Steve Dower

Steve Dower added the comment:

> Steve, you could move the "Edit with IDLE" menu out of the Python.File ProgId 
> to an entry defined in SystemFileAssociations.

I could, but I don't want to. I'd rather figure out adding an "Open With" entry 
for IDLE.

There's no reason to for IDLE to be a system-level association if the user has 
not chosen the association, just as I'd expect any text editor to be opt-in.

--

___
Python tracker 

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



[issue28997] test_readline.test_nonascii fails on Android

2016-12-20 Thread Xavier de Gaye

Changes by Xavier de Gaye :


--
stage: needs patch -> patch review

___
Python tracker 

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



[issue28997] test_readline.test_nonascii fails on Android

2016-12-20 Thread Xavier de Gaye

Xavier de Gaye added the comment:

The test is ok on Android when LANG=en_US.UTF-8.
When LANG is not set, the check made by the first statement in test_nonascii() 
should skip the test but fails to skip it on Android as Py_EncodeLocale() 
always encode to utf8 whatever the locale (same as with darwin).
This patch adds a second check to verify that readline does handle multi bytes 
characters and does skip the test if not. So on Android the test is skipped now 
when LANG is not set.  Another solution would have been to set LANG=en_US.UTF-8 
in the environment of the process forked by run_pty(), but it does not sound 
robust as there may be other setups where readline does not handle multi bytes 
characters.

--
Added file: http://bugs.python.org/file45976/readline_multibyte.patch

___
Python tracker 

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



[issue24672] shutil.rmtree fails on non ascii filenames

2016-12-20 Thread Jason R. Coombs

Jason R. Coombs added the comment:

I'm afraid I need to re-open this issue.

Although passing unicode names to rmtree fixes the issue on Windows systems, it 
causes problems on Linux systems where LC_ALL=C. Consider this script:

#
# encoding: utf-8

from __future__ import unicode_literals

import os
import shutil

os.mkdir('temp')

with open('temp/Слава Україні.html'.encode('utf-8'), 'w'):
pass

print(os.listdir(b'temp')[0])

shutil.rmtree('temp')
#

Invoked thus, a UnicodeDecodeError occurs:

vagrant@trusty:/vagrant$ LC_ALL=C python2.7 issue24672.py 
Слава Україні.html
Traceback (most recent call last):
  File "issue24672.py", line 15, in 
shutil.rmtree('temp')
  File "/usr/lib/python2.7/shutil.py", line 241, in rmtree
fullname = os.path.join(path, name)
  File "/usr/lib/python2.7/posixpath.py", line 80, in join
path += '/' + b
UnicodeDecodeError: 'ascii' codec can't decode byte 0xd0 in position 1: ordinal 
not in range(128)


This is the same error seen trying to rmtree an extraction of Sphinx (a package 
containing an offending non-ascii character)::

vagrant@trusty:/vagrant$ wget 
'https://files.pythonhosted.org/packages/b2/d5/bb4bf7fbc2e6b85d1e3832716546ecd434632d9d434a01efe87053fe5f25/Sphinx-1.5.1.tar.gz'
 -O - | tar xz 
--2016-12-20 19:07:21--  
https://files.pythonhosted.org/packages/b2/d5/bb4bf7fbc2e6b85d1e3832716546ecd434632d9d434a01efe87053fe5f25/Sphinx-1.5.1.tar.gz
Resolving files.pythonhosted.org (files.pythonhosted.org)... 151.101.33.63
Connecting to files.pythonhosted.org 
(files.pythonhosted.org)|151.101.33.63|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 4397246 (4.2M) [binary/octet-stream]
Saving to: ‘STDOUT’

100%[>] 4,397,246   
2.06MB/s   in 2.0s   

2016-12-20 19:07:23 (2.06 MB/s) - written to stdout [4397246/4397246]

vagrant@trusty:/vagrant$ LC_ALL=C python2.7 -c "import shutil; 
shutil.rmtree(u'Sphinx-1.5.1')"
Traceback (most recent call last):
  File "", line 1, in 
  File "/usr/lib/python2.7/shutil.py", line 247, in rmtree
rmtree(fullname, ignore_errors, onerror)
  File "/usr/lib/python2.7/shutil.py", line 247, in rmtree
rmtree(fullname, ignore_errors, onerror)
  File "/usr/lib/python2.7/shutil.py", line 247, in rmtree
rmtree(fullname, ignore_errors, onerror)
  File "/usr/lib/python2.7/shutil.py", line 241, in rmtree
fullname = os.path.join(path, name)
  File "/usr/lib/python2.7/posixpath.py", line 80, in join
path += '/' + b
UnicodeDecodeError: 'ascii' codec can't decode byte 0xcc in position 8: ordinal 
not in range(128)


Is the solution to call rmtree with unicode on Windows, but with bytes when on 
Python 2 and Linux? What else can be done?

--
resolution: wont fix -> 
status: closed -> open

___
Python tracker 

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



[issue29014] Python 3.5.2 installer doesn't register IDLE .py extensions on Windows 10

2016-12-20 Thread eryk sun

eryk sun added the comment:

When you change the association for executing scripts (either via Default 
Programs or the Open with => Choose another app menu), do not "look for another 
app on this PC". Manually associating files with an executable such as py.exe 
creates a ProgId that's only meant for opening data files, i.e. there's no "%*" 
in the template to pass command-line arguments. (Microsoft should provide an 
option here to support passing command-line arguments.)

You have to select "Python" in the listed applications. Explorer lists them 
only by name and icon. There may be multiple entries named "Python". The one 
you're looking for should have a rocket on the icon because it opens using the 
py.exe launcher. Hopefully this should be for the "Python.File" ProgId that's 
configured by Python's installer. 

If switching to it doesn't add the IDLE menu, first confirm that the "ProgId" 
value is "Python.File" in the user choice registry key at the following path: 
"HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.py\UserChoice".
 If not, pick a different "Python" app from the list until the user choice is 
"Python.File". (Microsoft should provide an advanced way to select a ProgId 
explicitly. They took away the ability to edit the UserChoice key, which is 
fine, but they failed to provide an advanced alternative to the dumbed-down app 
list, which is hostile to both power users and developers.) If no entry sets 
the user choice to "Python.File" or if it's set to "Python.File" and there's no 
IDLE menu, then maybe the ProgId itself has been modified or deleted. Try 
repairing your Python installation to fix this.

Steve, you could move the "Edit with IDLE" menu out of the Python.File ProgId 
to an entry defined in SystemFileAssociations. This should normally be 
available regardless of the application the user associates with .py files. 
Here's an example .reg file to add this for a system install of 64-bit 3.5:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\SystemFileAssociations\.py]

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\SystemFileAssociations\.py\shell]


[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\SystemFileAssociations\.py\shell\editwithidle]
"MUIVerb"="&Edit with IDLE"
"Subcommands"=""


[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\SystemFileAssociations\.py\shell\editwithidle\shell]


[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\SystemFileAssociations\.py\shell\editwithidle\shell\edit35]
"MUIVerb"="Edit with IDLE 3.5 (64-bit)"


[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\SystemFileAssociations\.py\shell\editwithidle\shell\edit35\command]
@="\"C:\\Program Files\\Python35\\pythonw.exe\" -m idlelib \"%1\" %*"

--

___
Python tracker 

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



[issue28822] Fix indices handling in PyUnicode_FindChar

2016-12-20 Thread Xiang Zhang

Xiang Zhang added the comment:

Thanks Victor and Serhiy!

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



[issue28945] get_boundary invokes unquote twice

2016-12-20 Thread R. David Murray

R. David Murray added the comment:

The RFC compliance battle in email was lost long ago.  We have to do our best 
to process what we get, and to produce only RFC correct output (unless 
retransmitting without change).  That is Postel's law, and you can't 
successfully process Internet email without following the first part.

I haven't looked at the proposed solution yet.  Not sure when I'll get time, 
since I should try to think and research the questions (why was it done the way 
it is currently done?), which will take quite a bit of time.

--

___
Python tracker 

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



[issue28945] get_boundary invokes unquote twice

2016-12-20 Thread Eric Lafontaine

Eric Lafontaine added the comment:

N.B., I've tried to do the keyword parameter on the get_param inside the 
get_boundary as well as I though it was a good Idea as well, but it was 
breaking some test cases (multiple ones).  So I didn't pursue.

N.B.  I'm guessing (guessing) unquote must've been used for email adresses as 
well i.e. "Eric Lafontaine "

I also didn't had the time to read all answer since yesterday, sorry for not 
adding it to my earlier answer.

--

___
Python tracker 

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



[issue28945] get_boundary invokes unquote twice

2016-12-20 Thread Eric Lafontaine

Eric Lafontaine added the comment:

Hi all,

I hate this proposition.  I feel it's a "victory" for the people who don't want 
to follow RFC standard and allow "triple"-quoting on things that aren't 
supposed to...

Now that my opinion is said, I made 2 test case that should be added to the 
test_email file of the test library to support the change :

_
def test_rfc2231_multiple_quote_boundary(self):
m = '''\
Content-Type: multipart/alternative;
\tboundary*0*="<>')
def test_rfc2231_multiple_quote_boundary2(self):
m = '''\
Content-Type: multipart/alternative;
\tboundary="<>";

'''
msg = email.message_from_string(m)
self.assertEqual(msg.get_boundary(),
 '<>')
___

The problem however does lie within collapse function as you've mentionned 
(because you've taken the code from there haven't you? :P) :
def collapse_rfc2231_value(value, errors='replace',
   fallback_charset='us-ascii'):
if not isinstance(value, tuple) or len(value) != 3:
return value <===removed 
unquote on value

 This doesn't seem to have broken any of the 1580 tests case of test_email 
(Python3.7), but I can't help but to feel weird about it.  Could someone 
explain why we were unquoting there? and why use those weird condition (not 
isintance(value,tuple) or len(value) !=3)?
 
 Regards,
 Eric Lafontaine

--

___
Python tracker 

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



[issue29027] 3.5.2 compile error from ssl related.

2016-12-20 Thread Christian Heimes

Christian Heimes added the comment:

What is your platform, compiler and OpenSSL version?

--

___
Python tracker 

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



[issue29028] Use-After-Free in PyString_FromStringAndSize() of stringobject.c

2016-12-20 Thread dyjakan

New submission from dyjakan:

Recently I started doing some research related to language interpreters
and I've stumbled upon a bug in current Python 2.7. I already contacted PSRT 
and we concluded that this doesn't have security implications.

Repro file looks like this:

```
class Index(object):
def __index__(self):
for c in "foobar"*n:
a.append(c)
return n * 4

for n in range(1, 10, 100):
a = bytearray("test"*n)
buf = buffer(a)
s = buf[:Index():1]
```

If you have ASAN build then you'll see this:

```
==29054== ERROR: AddressSanitizer: heap-use-after-free on address 
0x6004a233 at pc 0x4fab7f bp 0x7ffdbfec0b50 sp 0x7ffdbfec0b48
READ of size 1 at 0x6004a233 thread T0
#0 0x4fab7e (/home/ad/builds/python-2.7-asan/bin/python2.7+0x4fab7e)
#1 0x6bbed4 (/home/ad/builds/python-2.7-asan/bin/python2.7+0x6bbed4)
#2 0x59d998 (/home/ad/builds/python-2.7-asan/bin/python2.7+0x59d998)
#3 0x5b53fe (/home/ad/builds/python-2.7-asan/bin/python2.7+0x5b53fe)
#4 0x5b5a65 (/home/ad/builds/python-2.7-asan/bin/python2.7+0x5b5a65)
#5 0x637eac (/home/ad/builds/python-2.7-asan/bin/python2.7+0x637eac)
#6 0x63b3af (/home/ad/builds/python-2.7-asan/bin/python2.7+0x63b3af)
#7 0x4192d0 (/home/ad/builds/python-2.7-asan/bin/python2.7+0x4192d0)
#8 0x7f6da3cf0f44 (/lib/x86_64-linux-gnu/libc-2.19.so+0x21f44)
#9 0x417c11 (/home/ad/builds/python-2.7-asan/bin/python2.7+0x417c11)
0x6004a233 is located 3 bytes inside of 5-byte region 
[0x6004a230,0x6004a235)
freed by thread T0 here:
#0 0x7f6da49d455f (/usr/lib/x86_64-linux-gnu/libasan.so.0.0.0+0x1555f)
#1 0x6c5388 (/home/ad/builds/python-2.7-asan/bin/python2.7+0x6c5388)
#2 0x5b15fb (/home/ad/builds/python-2.7-asan/bin/python2.7+0x5b15fb)
#3 0x5b53fe (/home/ad/builds/python-2.7-asan/bin/python2.7+0x5b53fe)
#4 0x6f59c2 (/home/ad/builds/python-2.7-asan/bin/python2.7+0x6f59c2)
#5 0x440bc8 (/home/ad/builds/python-2.7-asan/bin/python2.7+0x440bc8)
#6 0x44a712 (/home/ad/builds/python-2.7-asan/bin/python2.7+0x44a712)
#7 0x440bc8 (/home/ad/builds/python-2.7-asan/bin/python2.7+0x440bc8)
#8 0x52afeb (/home/ad/builds/python-2.7-asan/bin/python2.7+0x52afeb)
#9 0x4391ab (/home/ad/builds/python-2.7-asan/bin/python2.7+0x4391ab)
#10 0x5b5d35 (/home/ad/builds/python-2.7-asan/bin/python2.7+0x5b5d35)
#11 0x4ea936 (/home/ad/builds/python-2.7-asan/bin/python2.7+0x4ea936)
#12 0x6bbd20 (/home/ad/builds/python-2.7-asan/bin/python2.7+0x6bbd20)
#13 0x59d998 (/home/ad/builds/python-2.7-asan/bin/python2.7+0x59d998)
#14 0x5b53fe (/home/ad/builds/python-2.7-asan/bin/python2.7+0x5b53fe)
#15 0x5b5a65 (/home/ad/builds/python-2.7-asan/bin/python2.7+0x5b5a65)
#16 0x637eac (/home/ad/builds/python-2.7-asan/bin/python2.7+0x637eac)
#17 0x63b3af (/home/ad/builds/python-2.7-asan/bin/python2.7+0x63b3af)
#18 0x4192d0 (/home/ad/builds/python-2.7-asan/bin/python2.7+0x4192d0)
#19 0x7f6da3cf0f44 (/lib/x86_64-linux-gnu/libc-2.19.so+0x21f44)
previously allocated by thread T0 here:
#0 0x7f6da49d455f (/usr/lib/x86_64-linux-gnu/libasan.so.0.0.0+0x1555f)
#1 0x6c7b3d (/home/ad/builds/python-2.7-asan/bin/python2.7+0x6c7b3d)
#2 0x6ca853 (/home/ad/builds/python-2.7-asan/bin/python2.7+0x6ca853)
#3 0x522ddd (/home/ad/builds/python-2.7-asan/bin/python2.7+0x522ddd)
#4 0x440bc8 (/home/ad/builds/python-2.7-asan/bin/python2.7+0x440bc8)
#5 0x59f1ca (/home/ad/builds/python-2.7-asan/bin/python2.7+0x59f1ca)
#6 0x5b53fe (/home/ad/builds/python-2.7-asan/bin/python2.7+0x5b53fe)
#7 0x5b5a65 (/home/ad/builds/python-2.7-asan/bin/python2.7+0x5b5a65)
#8 0x637eac (/home/ad/builds/python-2.7-asan/bin/python2.7+0x637eac)
#9 0x63b3af (/home/ad/builds/python-2.7-asan/bin/python2.7+0x63b3af)
#10 0x4192d0 (/home/ad/builds/python-2.7-asan/bin/python2.7+0x4192d0)
#11 0x7f6da3cf0f44 (/lib/x86_64-linux-gnu/libc-2.19.so+0x21f44)
Shadow bytes around the buggy address:
  0x0c0093f0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c009400: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c009410: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c009420: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c009430: fa fa fa fa fa fa fa fa fa fa fa fa fa fa 00 04
=>0x0c009440: fa fa fd fa fa fa[fd]fa fa fa fd fa fa fa fd fa
  0x0c009450: fa fa fd fd fa fa fd fa fa fa fd fa fa fa 00 fa
  0x0c009460: fa fa 06 fa fa fa fd fa fa fa fd fa fa fa fd fd
  0x0c009470: fa fa fd fa fa fa fd fa fa fa fd fd fa fa fd fa
  0x0c009480: fa fa fd fd fa fa fd fa fa fa 00 fa fa fa fd fa
  0x0c009490: fa fa fd fa fa fa fd fd fa fa fd fa fa fa fd fa
Shadow byte legend (one shadow byte represents 8 application bytes):
  Addressable:   00
  Partially addressable: 01 02 03 04 05 06 07
  Heap left redzone: fa
  Heap righ redzone: fb
  Freed Heap region: fd
  Stack left redzone:f1
  Stack mid redzone: 

[issue29027] 3.5.2 compile error from ssl related.

2016-12-20 Thread kevin

New submission from kevin:

Download the python version 3.5.2 source code from official web site.
Compile the python code by the following steps:
sudo ./configure
sudo make
sudo make install

but from make, I get the following errors:


/home/boot/tools/Python-3.5.2/Modules/_ssl.c:2582:46: error: dereferencing 
pointer to incomplete type ‘X509_STORE {aka struct x509_store_st}’
 flags = X509_VERIFY_PARAM_get_flags(store->param);
  ^
/home/boot/tools/Python-3.5.2/Modules/_ssl.c: In function 
‘_ssl__SSLContext_load_cert_chain_impl’:
/home/boot/tools/Python-3.5.2/Modules/_ssl.c:2782:48: error: dereferencing 
pointer to incomplete type ‘SSL_CTX {aka struct ssl_ctx_st}’
 pem_password_cb *orig_passwd_cb = self->ctx->default_passwd_callback;
^
/home/boot/tools/Python-3.5.2/Modules/_ssl.c: In function 
‘_ssl__SSLContext_cert_store_stats_impl’:
/home/boot/tools/Python-3.5.2/Modules/_ssl.c:3443:20: error: dereferencing 
pointer to incomplete type ‘X509_OBJECT {aka struct x509_object_st}’
 switch (obj->type) {
^
/home/boot/tools/Python-3.5.2/Modules/_ssl.c:3453:18: error: ‘X509_LU_PKEY’ 
undeclared (first use in this function)
 case X509_LU_PKEY:

then I install the openssl by compiling download code,and the ssl can work, and 
compile python code,the error still exists.
please help me check where I take a mistake.
Thanks a lot.

--
assignee: christian.heimes
components: SSL
messages: 283699
nosy: christian.heimes, kevin.zhai80
priority: normal
severity: normal
status: open
title: 3.5.2 compile error from ssl related.
type: compile error
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



[issue29026] time.time() documentation should mention UTC timezone

2016-12-20 Thread STINNER Victor

STINNER Victor added the comment:

> time.time() is not quite UTC on Unix

Handling time is a complex task, so we should enhance the doc to help users.

If there are multiple cases, we can list them: "time.time() uses UTC timezone 
with or without leap seconds". Maybe with a link to 
https://en.wikipedia.org/wiki/Unix_time ?

--

___
Python tracker 

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



[issue29010] Incorrect description about scope related with inheritance

2016-12-20 Thread woo yoo

woo yoo added the comment:

As for me, i prefer the new description, which is clear and easy to understand.

--

___
Python tracker 

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



[issue29026] time.time() documentation should mention UTC timezone

2016-12-20 Thread Marc-Andre Lemburg

Marc-Andre Lemburg added the comment:

time.time() is not quite UTC on Unix: it usually (*) doesn't include leap 
seconds, which UTC does.

The Wikipedia page has a good definition and explanation:

https://en.wikipedia.org/wiki/Unix_time

(*) "usually" because POSIX defines time() to not include leap seconds, but on 
some older or not quite POSIX compliant Unix systems, leap seconds are included.

--
nosy: +lemburg

___
Python tracker 

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



[issue28945] get_boundary invokes unquote twice

2016-12-20 Thread R. David Murray

R. David Murray added the comment:

I'm pretty sure you are correct in your guess that the utility is used by other 
code that depends on the <> unquoting.

The new email policies (that is, the new header parsing code) probably do a 
better job of this, but get_param and friends haven't been wired up to use them 
when available yet.

--

___
Python tracker 

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



[issue28822] Fix indices handling in PyUnicode_FindChar

2016-12-20 Thread Roundup Robot

Roundup Robot added the comment:

New changeset ce6a6cc3765d by Xiang Zhang in branch 'default':
Issue #28822: Adjust indices handling of PyUnicode_FindChar().
https://hg.python.org/cpython/rev/ce6a6cc3765d

--
nosy: +python-dev

___
Python tracker 

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



[issue29010] Incorrect description about scope related with inheritance

2016-12-20 Thread Brendan Donegan

Brendan Donegan added the comment:

Worth putting them side by side I think:

"The name BaseClassName must be defined in a scope containing the derived class 
definition"

vs.

"BaseClassName must be defined in a namespace accessible from the scope 
containing the derived class definition"

--

___
Python tracker 

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



[issue28968] xml rpc server fails with connection reset by peer error no 104

2016-12-20 Thread R. David Murray

R. David Murray added the comment:

I'm sorry, I don't have time to dig in to this right now.  Hopefully someone 
else can pick it up.  You might try posting on the python-list mailing list, 
there are several core devs who hang out there and might be interested in the 
problem.

--
nosy:  -loewis

___
Python tracker 

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



[issue29010] Incorrect description about scope related with inheritance

2016-12-20 Thread R. David Murray

R. David Murray added the comment:

Would it make it clearer if we said "BaseClassName must be defined in a 
namespace accessible from the scope containing the dervied class definition" ?

--

___
Python tracker 

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



[issue29026] time.time() documentation should mention UTC timezone

2016-12-20 Thread STINNER Victor

New submission from STINNER Victor:

The documentation of the time.time() mentions "epoch" which it doesn't define 
epoch. If I recall correctly, it's January 1st, 1970 on most OS and most 
implementations of Python, except of IronPython which uses a different epoch.

https://docs.python.org/dev/library/time.html#time.time

Moreover, the timezone is not defined. In practice, it's UTC, so it would be 
nice to document it.

I opened this issue because I wasn't sure if time.time() is impacted by DST or 
not. The answer is no. Maybe the behaviour of time.time() on DST should also be 
documentation. Hint: it is not impacted by DST since it uses UTC timezone.

Related question on StackOverflow:
http://stackoverflow.com/questions/32469318/python-time-time-and-daylight-saving-time

--
assignee: docs@python
components: Documentation
messages: 283690
nosy: belopolsky, docs@python, haypo
priority: normal
severity: normal
status: open
title: time.time() documentation should mention UTC timezone
versions: Python 2.7, Python 3.5, Python 3.6, Python 3.7

___
Python tracker 

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



[issue29014] Python 3.5.2 installer doesn't register IDLE .py extensions on Windows 10

2016-12-20 Thread Steve Dower

Steve Dower added the comment:

C:\Windows\py.exe (probably. If you changed from the default options it may be 
elsewhere, but if you Open With on a .py file it should be there)

--

___
Python tracker 

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



[issue29025] random.seed() relation to hash() function and its determinism is vague

2016-12-20 Thread Jakub Mateusz Kowalski

New submission from Jakub Mateusz Kowalski:

2.7 (https://docs.python.org/2/library/random.html#random.seed)
- warning about PYTHONHASHSEED (environmental variable) voiding determinism
- no warning on -R interpreter switch 
- relation to hash() function omitted

2.6 (https://docs.python.org/2.6/library/random.html#random.seed)
3.0 (https://docs.python.org/3.0/library/random.html#random.seed)
3.1 (https://docs.python.org/3.1/library/random.html#random.seed)
3.2 (https://docs.python.org/3.2/library/random.html#random.seed)
3.3 (https://docs.python.org/3.3/library/random.html#random.seed)
3.4 (https://docs.python.org/3.4/library/random.html#random.seed)
- no warning about PYTHONHASHSEED nor -R switch
- relation to hash() function acknowledged

3.5 (https://docs.python.org/3.5/library/random.html#random.seed)
3.6 (https://docs.python.org/3.6/library/random.html#random.seed)
3.7 (https://docs.python.org/3.7/library/random.html#random.seed)
- no warning about PYTHONHASHSEED nor -R switch
- relation to hash() function omitted

--
assignee: docs@python
components: Documentation
messages: 283688
nosy: Jakub.Mateusz.Kowalski, docs@python
priority: normal
severity: normal
status: open
title: random.seed() relation to hash() function and its determinism is vague
versions: Python 2.7, Python 3.3, Python 3.4, Python 3.5, Python 3.6, Python 3.7

___
Python tracker 

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



[issue24165] Free list for single-digits ints

2016-12-20 Thread INADA Naoki

INADA Naoki added the comment:

Performance version: 0.5.0
Python version: 3.7.0a0 (64-bit) revision 31df7d9863f3+
Report on Linux-4.8.0-30-generic-x86_64-with-debian-stretch-sid

Slower (13):
- nbody: 232 ms +- 3 ms -> 241 ms +- 6 ms: 1.04x slower
- unpack_sequence: 118 ns +- 3 ns -> 121 ns +- 0 ns: 1.03x slower
- call_method_slots: 14.7 ms +- 0.1 ms -> 15.1 ms +- 0.4 ms: 1.02x slower
- logging_silent: 724 ns +- 15 ns -> 740 ns +- 8 ns: 1.02x slower
- telco: 22.5 ms +- 0.5 ms -> 22.9 ms +- 0.5 ms: 1.02x slower
- sqlite_synth: 9.69 us +- 0.27 us -> 9.85 us +- 0.20 us: 1.02x slower
- pickle_list: 8.45 us +- 0.11 us -> 8.57 us +- 0.16 us: 1.01x slower
- pickle_dict: 61.5 us +- 0.5 us -> 62.1 us +- 4.1 us: 1.01x slower
- call_method: 15.2 ms +- 0.1 ms -> 15.3 ms +- 0.1 ms: 1.01x slower
- python_startup_no_site: 9.45 ms +- 0.02 ms -> 9.50 ms +- 0.02 ms: 1.00x slower
- call_method_unknown: 17.2 ms +- 0.2 ms -> 17.2 ms +- 0.2 ms: 1.00x slower
- meteor_contest: 197 ms +- 2 ms -> 198 ms +- 2 ms: 1.00x slower
- python_startup: 15.7 ms +- 0.0 ms -> 15.7 ms +- 0.0 ms: 1.00x slower

Faster (35):
- spectral_norm: 284 ms +- 7 ms -> 262 ms +- 10 ms: 1.08x faster
- scimark_sparse_mat_mult: 8.62 ms +- 0.30 ms -> 7.99 ms +- 0.22 ms: 1.08x 
faster
- mako: 45.5 ms +- 0.3 ms -> 43.4 ms +- 0.6 ms: 1.05x faster
- scimark_fft: 691 ms +- 13 ms -> 660 ms +- 13 ms: 1.05x faster
- chameleon: 30.5 ms +- 0.3 ms -> 29.4 ms +- 0.5 ms: 1.04x faster
- scimark_sor: 491 ms +- 9 ms -> 474 ms +- 8 ms: 1.04x faster
- fannkuch: 1.07 sec +- 0.03 sec -> 1.04 sec +- 0.01 sec: 1.04x faster
- crypto_pyaes: 229 ms +- 2 ms -> 222 ms +- 4 ms: 1.03x faster
- hexiom: 23.5 ms +- 0.1 ms -> 22.8 ms +- 0.2 ms: 1.03x faster
- regex_compile: 440 ms +- 5 ms -> 430 ms +- 3 ms: 1.03x faster
- pickle: 24.3 us +- 0.5 us -> 23.7 us +- 0.5 us: 1.02x faster
- unpickle: 31.6 us +- 0.3 us -> 30.9 us +- 0.3 us: 1.02x faster
- xml_etree_generate: 291 ms +- 5 ms -> 284 ms +- 7 ms: 1.02x faster
- xml_etree_process: 249 ms +- 3 ms -> 243 ms +- 4 ms: 1.02x faster
- json_loads: 62.6 us +- 0.8 us -> 61.2 us +- 1.1 us: 1.02x faster
- xml_etree_iterparse: 223 ms +- 6 ms -> 218 ms +- 5 ms: 1.02x faster
- scimark_monte_carlo: 263 ms +- 8 ms -> 257 ms +- 9 ms: 1.02x faster
- raytrace: 1.31 sec +- 0.01 sec -> 1.28 sec +- 0.01 sec: 1.02x faster
- pickle_pure_python: 1.31 ms +- 0.01 ms -> 1.29 ms +- 0.02 ms: 1.02x faster
- unpickle_pure_python: 923 us +- 15 us -> 906 us +- 32 us: 1.02x faster
- chaos: 298 ms +- 2 ms -> 294 ms +- 2 ms: 1.01x faster
- sympy_sum: 207 ms +- 6 ms -> 204 ms +- 6 ms: 1.01x faster
- call_simple: 14.0 ms +- 0.3 ms -> 13.9 ms +- 0.3 ms: 1.01x faster
- regex_v8: 46.0 ms +- 2.1 ms -> 45.5 ms +- 0.7 ms: 1.01x faster
- genshi_text: 88.5 ms +- 0.9 ms -> 87.4 ms +- 1.3 ms: 1.01x faster
- sympy_expand: 1.03 sec +- 0.01 sec -> 1.02 sec +- 0.01 sec: 1.01x faster
- 2to3: 737 ms +- 3 ms -> 730 ms +- 3 ms: 1.01x faster
- sympy_str: 462 ms +- 4 ms -> 458 ms +- 6 ms: 1.01x faster
- unpickle_list: 7.67 us +- 0.32 us -> 7.60 us +- 0.11 us: 1.01x faster
- go: 593 ms +- 3 ms -> 589 ms +- 5 ms: 1.01x faster
- dulwich_log: 153 ms +- 1 ms -> 152 ms +- 1 ms: 1.01x faster
- sqlalchemy_declarative: 311 ms +- 3 ms -> 309 ms +- 3 ms: 1.01x faster
- pathlib: 50.3 ms +- 1.4 ms -> 50.0 ms +- 0.6 ms: 1.01x faster
- django_template: 398 ms +- 3 ms -> 396 ms +- 5 ms: 1.01x faster
- pidigits: 310 ms +- 0 ms -> 308 ms +- 0 ms: 1.00x faster

Benchmark hidden because not significant (16): deltablue, float, genshi_xml, 
html5lib, json_dumps, logging_format, logging_simple, nqueens, regex_dna, 
regex_effbot, richards, scimark_lu, sqlalchemy_imperative, sympy_integrate, 
tornado_http, xml_etree_parse

--

___
Python tracker 

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



[issue29024] Add Kivy entry to Graphic User Interface FAQ

2016-12-20 Thread Alexander Taylor

Changes by Alexander Taylor :


--
type: enhancement -> 

___
Python tracker 

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



[issue29024] Add Kivy entry to Graphic User Interface FAQ

2016-12-20 Thread Alexander Taylor

Changes by Alexander Taylor :


--
assignee: docs@python
components: Documentation
files: gui_faq_kivy.patch
keywords: patch
nosy: docs@python, inclement
priority: normal
severity: normal
status: open
title: Add Kivy entry to Graphic User Interface FAQ
type: enhancement
versions: Python 3.7
Added file: http://bugs.python.org/file45975/gui_faq_kivy.patch

___
Python tracker 

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



[issue29023] Results of random.seed() call with integer argument should be claimed deterministic.

2016-12-20 Thread Jakub Mateusz Kowalski

New submission from Jakub Mateusz Kowalski:

In https://docs.python.org/2/library/random.html#random.seed I can find that 
"If a hashable object is given, deterministic results are only assured when 
PYTHONHASHSEED is disabled."

Both int and long are hashable. However, tests on the random module as well as 
C source code of random_seed (as indicated in 
http://stackoverflow.com/a/41228062/4879688) suggest that behaviour of the 
module is deterministic when seeded with an integer.

--
assignee: docs@python
components: Documentation
messages: 283686
nosy: Jakub.Mateusz.Kowalski, docs@python
priority: normal
severity: normal
status: open
title: Results of random.seed() call with integer argument should be claimed 
deterministic.
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



[issue29022] Aritmetic error

2016-12-20 Thread Berker Peksag

Berker Peksag added the comment:

Thanks for the report, but it works as expected. Please see 
https://docs.python.org/2/tutorial/floatingpoint.html for more information.

--
nosy: +berker.peksag
resolution:  -> not a bug
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



[issue29022] Aritmetic error

2016-12-20 Thread Jacopo

New submission from Jacopo:

$ python
Python 2.7.3 (default, Jun 21 2016, 18:38:19) 
[GCC 4.7.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> 69.90 + 2.90
72.81

--
components: Interpreter Core
messages: 283684
nosy: r00ta
priority: normal
severity: normal
status: open
title: Aritmetic error
type: behavior
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



[issue28971] nntplib is broken when responses are longer than _MAXLINE

2016-12-20 Thread Martin Panter

Martin Panter added the comment:

I will try to come up with something in a few days

--

___
Python tracker 

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



[issue28822] Fix indices handling in PyUnicode_FindChar

2016-12-20 Thread STINNER Victor

STINNER Victor added the comment:

Ignore my request about special direction values. It's not worth it to writ 
tests for that.

PyUnicode_FindChar-v2.patch LGTM.

--

___
Python tracker 

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



[issue28158] Implement LOAD_GLOBAL opcode cache

2016-12-20 Thread INADA Naoki

INADA Naoki added the comment:

memo: http://bugs.python.org/issue26219 may be relating to this.

--

___
Python tracker 

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



[issue28945] get_boundary invokes unquote twice

2016-12-20 Thread bpoaugust

bpoaugust added the comment:

According to RFC822, a quoted-string should only be wrapped in double-quotes. 

So I'm not sure why unquote treats <> as quotes. If it did not, then again this 
issue would not arise.

However maybe utils.unquote is needed by other code that uses <>, so it cannot 
just be updated without further analysis.

--

___
Python tracker 

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



[issue28988] Switch dict and set structures to PyVarObject

2016-12-20 Thread INADA Naoki

INADA Naoki added the comment:

LGTM

--
nosy: +inada.naoki

___
Python tracker 

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



[issue28945] get_boundary invokes unquote twice

2016-12-20 Thread bpoaugust

bpoaugust added the comment:

It looks like a simpler alternative is to just change

boundary = self.get_param('boundary', missing)
to
boundary = self.get_param('boundary', missing, unquote=False)

and let collapse_rfc2231_value do the unquoting

--

___
Python tracker 

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



[issue28932] Fail compile Python 3.6.0rc1 on OpenBSD 6.0

2016-12-20 Thread STINNER Victor

STINNER Victor added the comment:

Thanks Benjamin!

--

___
Python tracker 

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



[issue28999] Use Py_RETURN_NONE and like

2016-12-20 Thread INADA Naoki

INADA Naoki added the comment:

LGTM

--
nosy: +inada.naoki

___
Python tracker 

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



[issue29006] 2.7.13 _sqlite more prone to "database table is locked"

2016-12-20 Thread Armin Rigo

Armin Rigo added the comment:

Tried that, but reverted because on Windows CheckTypeMapUsage() would fail with 
SQLITE_MISUSE ("ProgrammingError: database table is locked").  For now PyPy 
will not implement this 2.7.13 change.  I really suspect you can get the same 
problems on CPython in some cases, as described.

--

___
Python tracker 

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



[issue29021] Custom functions in sqlite receive None on invalid UTF-8

2016-12-20 Thread Ingo Ruhnke

New submission from Ingo Ruhnke:

When a sqlite database contains invalid UTF-8 code in a TEXT column, Python can 
query that data normally when .text_factory is set appropriately. However when 
a custom function is created with .create_function() and applied to that column 
the custom function will receive 'None' as argument instead of the value of the 
column.

The following example demonstrate the issue:

Example:


import sqlite3
import sys
import os

con = sqlite3.connect(":memory:")
con.text_factory = os.fsdecode

con.create_function("py_identity", 1, lambda x: x)

cur = con.cursor()
cur.execute("CREATE TABLE foo(bar TEXT)")

# insert some invalid UTF-8 into the database
cur.execute("INSERT INTO foo(bar) VALUES(cast(? AS TEXT))", [b"\xff"])

# try to call a custom function on the invalid UTF-8
cur.execute("SELECT "
"  typeof(bar), "
"  bar, " # this works
"  py_identity(bar), " # this returns None instead of the content 
of 'bar'
"  cast(py_identity(cast(bar as BLOB)) AS TEXT) " # this works 
around the issue
"FROM foo")

for row in cur:
print(row)

Output:
---

('text', '\udcff', None, '\udcff')


Expected:
-

('text', '\udcff', '\udcff', '\udcff')

--
components: Library (Lib)
messages: 283674
nosy: Ingo Ruhnke
priority: normal
severity: normal
status: open
title: Custom functions in sqlite receive None on invalid UTF-8
type: behavior
versions: Python 3.6

___
Python tracker 

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