[issue30289] make distclean and Misc/python-config.sh

2017-05-08 Thread Xiang Zhang

Changes by Xiang Zhang :


--
pull_requests: +1600

___
Python tracker 

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



[issue30303] IDLE: Add _utest to textview

2017-05-08 Thread Louie Lu

New submission from Louie Lu:

Relate to #30290, add _utest to textview to support direct unittest.

--
assignee: terry.reedy
components: IDLE
messages: 293228
nosy: louielu, terry.reedy
priority: normal
severity: normal
status: open
title: IDLE: Add _utest to textview
versions: Python 3.7

___
Python tracker 

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



[issue30303] IDLE: Add _utest to textview

2017-05-08 Thread Louie Lu

Changes by Louie Lu :


--
pull_requests: +1601

___
Python tracker 

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



[issue30303] IDLE: Add _utest to textview

2017-05-08 Thread Louie Lu

Changes by Louie Lu :


--
type:  -> enhancement

___
Python tracker 

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



[issue30304] TestCase.assertMultiLineEqual only registered for Unicode strings in 2.7

2017-05-08 Thread Martin Panter

New submission from Martin Panter:

In Mercurial revision 6e5b5d1b6714, the documentation for 
“assertMultiLineEqual” was changed from

This method is used by default when comparing Unicode strings with 
“assertEqual”.

to

This method is used by default when comparing strings with “assertEqual”. 

The new text is misleading because “str” objects are also strings, but the 
default does not apply to “str” objects.

--
assignee: docs@python
components: Documentation, Tests
keywords: easy
messages: 293229
nosy: docs@python, ezio.melotti, martin.panter
priority: normal
severity: normal
stage: needs patch
status: open
title: TestCase.assertMultiLineEqual only registered for Unicode strings in 2.7
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



[issue30260] sock_dealloc() may call __repr__ when socket class is already collected by GC

2017-05-08 Thread Xiang Zhang

Xiang Zhang added the comment:

Checked with asterite's scripts and it crashes in 3.5 but not in 3.6 and 
master. Victor, your patch in #26590 seems the resolution of this failure.

--
nosy: +xiang.zhang
versions:  -Python 3.4

___
Python tracker 

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



[issue30305] python 2.7.13 join issue

2017-05-08 Thread 方文添

New submission from 方文添:

when i use str join , i find some issue,
such as 
str_msg = 'malluin=MTg5Njk2ODIyMA==; Path=/bizmall/; HttpOnly, 
mallkey=9a9b172e5cac49c6b1ef970f4405c5e91712468846bb23c477c852d4987703b074ce9a48b440d92ec7dd1012275c926a41a8e76cd5a0e4b17efa705ab2d42fc85192b6542b218d2ecefc88f0f7cd7c68;
 Path=/bizmall/; HttpOnly, malluin=EXPIRED; Path=/; Expires=Sun, 07-May-2017 
09:49:24 GMT; HttpOnly, mallkey=EXPIRED; Path=/; Expires=Sun, 07-May-2017 
09:49:24 GMT; HttpOnly, payforreadsn=EXPIRED; Path=/; Expires=Sun, 07-May-2017 
09:49:24 GMT; HttpOnly, 
wxtokenkey=b7945ae2cd97e8e5d3029cd7b90a893f68ace0b498b100ff63d61d8bb2a0259c; 
Path=/; HttpOnly, wxticket=3510401828; Path=/; HttpOnly, 
wxticketkey=72a9df89b5c9460ea7507b21f5c6938068ace0b498b100ff63d61d8bb2a0259c; 
Path=/; HttpOnly, 
wap_sid=CJzgxYgHEkBVSXBfZVJUdktUVi1QV0RrSVNTR08wV3poTjE4UEpyVHU1b2JmMFZCaEhqVGVjTHJQRTVzaENzLXhWUnV2cGlFGAQg/BEo7rzXnwswpP7AyAU=;
 Path=/; HttpOnly, 
wap_sid2=CJzgxYgHEnBTM045bVNlZ0xOQmROSVNydEV4UExZZFhma1BpZVI2UVlybXc1WFlpa2NZbXRLLVpnTnl6UldVeGQxSnotbDgtR2tkVTFEek96U3ExU2VWYzQ1cTRiVmc3R0JBZWlMUEU3S1NScG9KTmhubUhBd0FBMKT+wMgF;
 Path=/; HttpOnly, 
pass_ticket=0JAIZfxQAFgv68rxGl33/gZEtmgCTyHk3Jd2pSWZOnQg0u5FKjc3BdNJABTOAyQ+; 
Path=/; HttpOnly'.replace(
'HttpOnly', '').replace(',', '').replace(' ', '')
items = str_msg.split(';')
new_item = ''
for item in items:
if 'wxtokenkey' in item:
new_item = new_item.join((item + ';'))
if 'wxticketkey' in item:
new_item = new_item.join((item + ';'))
if 'wap_sid=' in item:
new_item = new_item.join((item + ';'))
if 'wap_sid2' in item:
new_item = new_item.join((item + ';'))
if 'pass_ticket' in item:
new_item = new_item.join((item + ';'))
print new_item

it would no stop !!!

and such as 
str_msg = 'malluin=MTg5Njk2ODIyMA==; Path=/bizmall/; HttpOnly, 
mallkey=9a9b172e5cac49c6b1ef970f4405c5e91712468846bb23c477c852d4987703b074ce9a48b440d92ec7dd1012275c926a41a8e76cd5a0e4b17efa705ab2d42fc85192b6542b218d2ecefc88f0f7cd7c68;
 Path=/bizmall/; HttpOnly, malluin=EXPIRED; Path=/; Expires=Sun, 07-May-2017 
09:49:24 GMT; HttpOnly, mallkey=EXPIRED; Path=/; Expires=Sun, 07-May-2017 
09:49:24 GMT; HttpOnly, payforreadsn=EXPIRED; Path=/; Expires=Sun, 07-May-2017 
09:49:24 GMT; HttpOnly, 
wxtokenkey=b7945ae2cd97e8e5d3029cd7b90a893f68ace0b498b100ff63d61d8bb2a0259c; 
Path=/; HttpOnly, wxticket=3510401828; Path=/; HttpOnly, 
wxticketkey=72a9df89b5c9460ea7507b21f5c6938068ace0b498b100ff63d61d8bb2a0259c; 
Path=/; HttpOnly, 
wap_sid=CJzgxYgHEkBVSXBfZVJUdktUVi1QV0RrSVNTR08wV3poTjE4UEpyVHU1b2JmMFZCaEhqVGVjTHJQRTVzaENzLXhWUnV2cGlFGAQg/BEo7rzXnwswpP7AyAU=;
 Path=/; HttpOnly, 
wap_sid2=CJzgxYgHEnBTM045bVNlZ0xOQmROSVNydEV4UExZZFhma1BpZVI2UVlybXc1WFlpa2NZbXRLLVpnTnl6UldVeGQxSnotbDgtR2tkVTFEek96U3ExU2VWYzQ1cTRiVmc3R0JBZWlMUEU3S1NScG9KTmhubUhBd0FBMKT+wMgF;
 Path=/; HttpOnly, 
pass_ticket=0JAIZfxQAFgv68rxGl33/gZEtmgCTyHk3Jd2pSWZOnQg0u5FKjc3BdNJABTOAyQ+; 
Path=/; HttpOnly'.replace(
'HttpOnly', '').replace(',', '').replace(' ', '')
items = str_msg.split(';')
new_item = ''
for item in items:
if 'wxtokenkey' in item:
# new_item = new_item.join((item + ';'))
new_item = new_item.join([item, ';'])
if 'wxticketkey' in item:
new_item = new_item.join([item, ';'])
if 'wap_sid=' in item:
new_item = new_item.join([item, ';'])
if 'wap_sid2' in item:
new_item = new_item.join([item, ';'])
if 'pass_ticket' in item:
new_item = new_item.join([item, ';'])
print new_item

it would be have a str 
and this str is 
pass_ticket=0JAIZfxQAFgv68rxGl33/gZEtmgCTyHk3Jd2pSWZOnQg0u5FKjc3BdNJABTOAyQ+wap_sid2=CJzgxYgHEnBTM045bVNlZ0xOQmROSVNydEV4UExZZFhma1BpZVI2UVlybXc1WFlpa2NZbXRLLVpnTnl6UldVeGQxSnotbDgtR2tkVTFEek96U3ExU2VWYzQ1cTRiVmc3R0JBZWlMUEU3S1NScG9KTmhubUhBd0FBMKT+wMgFwap_sid=CJzgxYgHEkBVSXBfZVJUdktUVi1QV0RrSVNTR08wV3poTjE4UEpyVHU1b2JmMFZCaEhqVGVjTHJQRTVzaENzLXhWUnV2cGlFGAQg/BEo7rzXnwswpP7AyAU=wxticketkey=72a9df89b5c9460ea7507b21f5c6938068ace0b498b100ff63d61d8bb2a0259cwxtokenkey=b7945ae2cd97e8e5d3029cd7b90a893f68ace0b498b100ff63d61d8bb2a0259c;

but i think it should be 

wxtokenkey=b7945ae2cd97e8e5d3029cd7b90a893f68ace0b498b100ff63d61d8bb2a0259c;wxticketkey=72a9df89b5c9460ea7507b21f5c6938068ace0b498b100ff63d61d8bb2a0259c;wap_sid=CJzgxYgHEkBVSXBfZVJUdktUVi1QV0RrSVNTR08wV3poTjE4UEpyVHU1b2JmMFZCaEhqVGVjTHJQRTVzaENzLXhWUnV2cGlFGAQg/BEo7rzXnwswpP7AyAU=;wap_sid2=CJzgxYgHEnBTM045bVNlZ0xOQmROSVNydEV4UExZZFhma1BpZVI2UVlybXc1WFlpa2NZbXRLLVpnTnl6UldVeGQxSnotbDgtR2tkVTFEek96U3ExU2VWYzQ1cTRiVmc3R0JBZWlMUEU3S1NScG9KTmhubUhBd0FBMKT+wMgF;pass_ticket=0JAIZfxQAFgv68rxGl33/gZEtmgCTyHk3Jd2pSWZOnQg0u5FKjc3BdNJABTOAyQ+;

--
components: macOS
messages: 293231
nosy: ned.deily, ronaldoussoren, 方文添
priority: normal
severity: normal
status: open
title: python 2.7.13 join issue
type: behavior
versions: Python 2.7

___
Python tracker 


[issue30305] python 2.7.13 join issue

2017-05-08 Thread Ezio Melotti

Ezio Melotti added the comment:

I think you are misunderstanding how join works.
join is useful when you have a list of strings, and you want to combine them 
together, possibly specifying a separator.  The syntax is 
separator.join(list_of_strings), for example:
>>> '-'.join(['foo', 'bar', 'baz'])
'foo-bar-baz'

What you are doing is: new_item = new_item.join((item + ';'))
Here new_item is the separator, and (item + ';') is a string (a sequence of 
characters), so the separator is added between each character of the string:
>>> '-'.join('foobarbaz')
'f-o-o-b-a-r-b-a-z'

new_item will grow bigger and bigger, and since you keep adding it between each 
character of the item, Python will soon run out of memory:
>>> 'newitem'.join('foobarbaz')
'fnewitemonewitemonewitembnewitemanewitemrnewitembnewitemanewitemz'

You probably want to add the items to a new list, and after the for loop you 
just need to do '; '.join(new_list_of_items), or, if you want a ; at the end, 
you can add (item + ';') to the list and then use ' '.join(new_list_of_items).

I also suggest you to use the interactive interpreter to experiment with join.

--
nosy: +ezio.melotti
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



[issue29979] cgi.parse_multipart is not consistent with FieldStorage

2017-05-08 Thread Senthil Kumaran

Senthil Kumaran added the comment:


New changeset cc3fa204d357be5fafc10eb8c2a80fe0bca998f1 by Senthil Kumaran 
(Pierre Quentel) in branch 'master':
bpo-29979: Rewrite cgi.parse_multipart to make it consistent with FieldStorage 
(#991)
https://github.com/python/cpython/commit/cc3fa204d357be5fafc10eb8c2a80fe0bca998f1


--

___
Python tracker 

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



[issue29979] cgi.parse_multipart is not consistent with FieldStorage

2017-05-08 Thread Senthil Kumaran

Changes by Senthil Kumaran :


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



[issue30306] release arguments of contextmanager

2017-05-08 Thread Martin Teichmann

New submission from Martin Teichmann:

The arguments of a function which was decorated to be a context manager are 
stored inside the context manager, and are thus kept alive.

This is a memory leak.

Example:

@contextmanager
def f(a):
do_something_with(a)
a = None  # should release the memory
yield

if this is now called with something big, say

with f(something_really_huge):
pass

then this something_really_huge is kept alive during the with statement, even 
though the function explicitly let go of it.

--
components: Library (Lib)
messages: 293234
nosy: Martin.Teichmann
priority: normal
severity: normal
status: open
title: release arguments of contextmanager
type: resource usage
versions: Python 3.7

___
Python tracker 

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



[issue30306] release arguments of contextmanager

2017-05-08 Thread Raymond Hettinger

Changes by Raymond Hettinger :


--
assignee:  -> ncoghlan
nosy: +ncoghlan

___
Python tracker 

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



[issue30306] release arguments of contextmanager

2017-05-08 Thread Martin Teichmann

Changes by Martin Teichmann :


--
pull_requests: +1602

___
Python tracker 

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



[issue30291] Allow windows launcher to specify bit lengths with & without minor version

2017-05-08 Thread Steve Dower

Steve Dower added the comment:

The actual change I want here is to support Company/Tag pairs as defined in PEP 
514. There is no suffix on 64-bit CPython tags, so interpreting "-64" is going 
outside the PEP.

I'd also be okay with a strict mode that requires -32 for 32-bit interpreters, 
rather than assuming the language version is close enough. Perhaps a "-only" 
flag or suffix?

--

___
Python tracker 

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



[issue30251] Windows Visual Studio solution does not have an install target

2017-05-08 Thread Steve Dower

Steve Dower added the comment:

Visual Studio has some deployment concepts, but for multi-project solutions 
like ours you would generally have a separate project. It's a build tool, not 
an install tool, and mixing the concepts is generally a bad idea.

For building an installer, these projects are in tools/msi.

For doing a quick layout, we could write a script to simply copy files around. 
There are scripts in Tools/msi that do some of this already that could be 
adapted.

--

___
Python tracker 

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



[issue30251] Windows Visual Studio solution does not have an install target

2017-05-08 Thread Steve Dower

Changes by Steve Dower :


--
versions: +Python 3.7 -Python 3.6

___
Python tracker 

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



[issue25435] Wrong function calls and referring to not removed concepts in descriptor HowTo (documentation)

2017-05-08 Thread Marco Buttu

Marco Buttu added the comment:

I also noticed that the howto differentiates between objects and classes:

"The details of invocation depend on whether obj is an object or a class."

I think it is misleading, because a class is actually an object.  IMHO is 
better to differentiate between classes and non-classes objects:

"The details of invocation depend on whether obj is a class or not."

--
nosy: +marco.buttu

___
Python tracker 

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



[issue30217] Missing entry for the tilde (~) operator in the Index

2017-05-08 Thread Marco Buttu

Marco Buttu added the comment:

Thanks Eric.  I think the reference should be added here, as we do for the 
other operators:

https://docs.python.org/3/library/stdtypes.html#bitwise-operations-on-integer-types

--
nosy: +marco.buttu

___
Python tracker 

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



[issue30217] Missing entry for the tilde (~) operator in the Index

2017-05-08 Thread Marco Buttu

Changes by Marco Buttu :


--
pull_requests: +1603

___
Python tracker 

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



[issue30291] Allow windows launcher to specify bit lengths with & without minor version

2017-05-08 Thread Steve Dower

Steve Dower added the comment:

With a few more minutes thought, being able to nicely support PEP 514 here 
might be too much for this poor launcher to handle, so it may just be best to 
do that as a separate tool. (In particular, the matching rules would have to 
change from "enter a Python version" to "enter some convenient search pattern 
as a command line option", and that's a non-trivial change.)

Given that, I'm in favour of this change. When Eryk says the code is good (and 
the CLA notice comes through), I'll merge it.

--

___
Python tracker 

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



[issue30291] Allow windows launcher to specify bit lengths with & without minor version

2017-05-08 Thread Steve Dower

Changes by Steve Dower :


--
assignee:  -> steve.dower

___
Python tracker 

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



[issue26543] imaplib noop Debug

2017-05-08 Thread Kostis Anagnostopoulos

Kostis Anagnostopoulos added the comment:

That is a show-stopper, and the patch works fine.
Should I submit a PR with a special test-case with debug >= 3 just for this?

--
nosy: +ankostis

___
Python tracker 

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



[issue30217] Missing entry for the tilde (~) operator in the Index

2017-05-08 Thread Eric Lebigot

Eric Lebigot added the comment:

Good reference.

Another one would be 
https://docs.python.org/3/reference/expressions.html#unary-arithmetic-and-bitwise-operations,
 which explicitly indicates that it only makes sense for integer types (which 
is useful to keep in mind, as one may think that it could somehow apply to 
floating point numbers as well).

The one at 
https://docs.python.org/3.6/reference/datamodel.html#object.__invert__ is also 
important for learning that it is related to __invert__().

--
nosy: +Eric Lebigot

___
Python tracker 

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



[issue29956] math.exp documentation is misleading

2017-05-08 Thread Alexander Belopolsky

Changes by Alexander Belopolsky :


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



[issue30262] Don't expose sqlite3 Cache and Statement

2017-05-08 Thread Aviv Palivoda

Aviv Palivoda added the comment:

I am not sure how to raise the deprecation waning in this case. We use both the 
Cache and Statement objects as part of the sqlite3 module internal flow. How 
can I only warn the user when he creates this classes directly and not when the 
sqlite3 module uses them?

--

___
Python tracker 

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



[issue26543] imaplib noop Debug

2017-05-08 Thread R. David Murray

R. David Murray added the comment:

That sounds reasonable, if the debug output doesn't pollute the test run output.

--

___
Python tracker 

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



[issue30230] Move quick test in PyObject_IsSubClass outside of PyType_CheckExact guard

2017-05-08 Thread Jim Fasarakis-Hilliard

Jim Fasarakis-Hilliard added the comment:

Additional question, are tests required to check this behavior? (Also, bumping)

--

___
Python tracker 

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



[issue29447] Add/check os.PathLike support for the tempfile module's 'dir' arguments

2017-05-08 Thread Brett Cannon

Brett Cannon added the comment:

The key thing with the docs is that it doesn't say anywhere "takes a string 
path" or a "path as a string" or something else that suggests path-like objects 
don't work. If you want to clearly state that path-like objects are acceptable 
that is fine as well.

As for the bytes/str parts, path-like objects that return bytes should work, 
but only if everything is str or bytes as passed into the function (e.g. mixing 
the types should not be expected to work).

--

___
Python tracker 

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



[issue30307] https://docs.python.org/3/tutorial/introduction.html#strings Section 3.1.2 doc issue

2017-05-08 Thread rohit singh

New submission from rohit singh:

The documentation says:

>>> '"Isn\'t," she said.'
'"Isn\'t," she said.'

It should be:

>>> '"Isn\'t," she said.'
'"Isn't," she said.'

--
assignee: docs@python
components: Documentation
messages: 293246
nosy: docs@python, rohit singh
priority: normal
severity: normal
status: open
title: https://docs.python.org/3/tutorial/introduction.html#strings Section 
3.1.2 doc issue
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



[issue30307] https://docs.python.org/3/tutorial/introduction.html#strings Section 3.1.2 doc issue

2017-05-08 Thread Raymond Hettinger

Changes by Raymond Hettinger :


--
assignee: docs@python -> Mariatta
nosy: +Mariatta

___
Python tracker 

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



[issue29447] Add/check os.PathLike support for the tempfile module's 'dir' arguments

2017-05-08 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

If tempfile doesn't have special code for supporting path-like objects, and 
nothing in the documentation points that path-like objects don't work, then the 
documentation doesn't need changes. This is just a consequence of implementing 
PEP 519 in low-level functions.

If tempfile._infer_return_type will treat *all* path-like objects as str, this 
is a bug.

--

___
Python tracker 

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



[issue4963] mimetypes.guess_extension result changes after mimetypes.init()

2017-05-08 Thread David Hess

David Hess added the comment:

Concur with @sivert – the result of guess_extension() is non-deterministic 
between mimetypes module initialization.

$ python
Python 3.4.3 (default, Nov 17 2016, 01:08:31) 
[GCC 4.8.4] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> 
$ python -c 'import mimetypes;print(mimetypes.guess_extension("image/jpeg"))'
.jpe
$ python -c 'import mimetypes;print(mimetypes.guess_extension("image/jpeg"))'
.jpe
$ python -c 'import mimetypes;print(mimetypes.guess_extension("image/jpeg"))'
.jpe
$ python -c 'import mimetypes;print(mimetypes.guess_extension("image/jpeg"))'
.jpeg
$ python -c 'import mimetypes;print(mimetypes.guess_extension("image/jpeg"))'
.jpeg
$ python -c 'import mimetypes;print(mimetypes.guess_extension("image/jpeg"))'
.jpe
$ python -c 'import mimetypes;print(mimetypes.guess_extension("image/jpeg"))'
.jpg
$

--
nosy: +dhess

___
Python tracker 

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



[issue4963] mimetypes.guess_extension result changes after mimetypes.init()

2017-05-08 Thread David Hess

David Hess added the comment:

And the underlying problem causing this:

$ python -c 'import 
mimetypes;print(mimetypes.guess_all_extensions("image/jpeg"))'
['.jpeg', '.jpg', '.jpe']
$ python -c 'import 
mimetypes;print(mimetypes.guess_all_extensions("image/jpeg"))'
['.jpg', '.jpe', '.jpeg']
$ python -c 'import 
mimetypes;print(mimetypes.guess_all_extensions("image/jpeg"))'
['.jpg', '.jpeg', '.jpe']
$ python -c 'import 
mimetypes;print(mimetypes.guess_all_extensions("image/jpeg"))'
['.jpe', '.jpg', '.jpeg']
$ python -c 'import 
mimetypes;print(mimetypes.guess_all_extensions("image/jpeg"))'
['.jpeg', '.jpg', '.jpe']
$ 

If the module can't know which extension is preferred, perhaps guess_extension 
should just be deprecated and the results of guess_all_extensions sorted on 
return?

At least that would give us some determinism to work with.

--

___
Python tracker 

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



[issue30193] Support the buffer protocol in json.loads()

2017-05-08 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

The proposed patch doesn't work with all objects supporting the buffer 
protocol, for example it doesn't work with array.array('u', '\ufeff[1,2,3]'). 
This is easy to fix. But I'm not sure that it is worth to complicate the code 
for adding support of the buffer protocol.

--

___
Python tracker 

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



[issue30193] Support the buffer protocol in json.loads()

2017-05-08 Thread Raymond Hettinger

Changes by Raymond Hettinger :


--
assignee:  -> bob.ippolito

___
Python tracker 

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



[issue30193] Support the buffer protocol in json.loads()

2017-05-08 Thread Nikolay Kim

Nikolay Kim added the comment:

I am fine with any decision. close with "won't fix" is fine too

--

___
Python tracker 

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



[issue25435] Wrong function calls and referring to not removed concepts in descriptor HowTo (documentation)

2017-05-08 Thread Raymond Hettinger

Raymond Hettinger added the comment:

> I think it is misleading, because a class is actually an object.

This is only misleading *after* you know all the interesting details about 
Python and metaclasses.  Prior to that, it is a reasonable and important 
distinction that I don't want to get lost in weasel words.   The calls from 
object.__getattribute__ are different that those from type.__getattribute__.  
Likewise, data and non-data descriptors can only be described in terms of 
objects versus classes.  Lastly, descriptors only work when stored in a class, 
if you store them in instances, they don't get invoked.

--

___
Python tracker 

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



[issue30308] Add code coverage for argument in random.shuffle

2017-05-08 Thread Cheryl Sabella

New submission from Cheryl Sabella:

Added test cases for `random` argument in random.shuffle for code coverage.

Two interesting results (documented within test cases):
1.  In the docs, `random` is defined as a function returning a float in the 
range [0, 1), but negative floats could be returned and shuffle worked using 
slice notation.
2.  A dictionary with sequential numeric keys could be shuffled.

--
components: Tests
messages: 293253
nosy: csabella
priority: normal
severity: normal
status: open
title: Add code coverage for argument in random.shuffle
type: enhancement
versions: Python 3.7

___
Python tracker 

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



[issue30308] Add code coverage for argument in random.shuffle

2017-05-08 Thread Cheryl Sabella

Changes by Cheryl Sabella :


--
pull_requests: +1604

___
Python tracker 

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



[issue30308] Add code coverage for argument in random.shuffle

2017-05-08 Thread Cheryl Sabella

Cheryl Sabella added the comment:

Add Mark Dickinson and Raymond Hettinger to nosy list per Brett's suggestion on 
core-mentorship.

--
nosy: +mark.dickinson, rhettinger

___
Python tracker 

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



[issue30310] tkFont.py assumes that all font families are encoded as ascii in Python 2.7

2017-05-08 Thread Marc Culler

New submission from Marc Culler:

And that is a very bad assumption. On Windows 10 in the Japanese locale the 
default TkFixedFont has family u'\uff2d\uff33 \u30b4\u30b7\u30c3\u30af' (a 
transliteration of MS Gothic).

The error occurs on line 51:

 47 def _set(self, kw):
 48 options = []
 49 for k, v in kw.items():
 50 options.append("-"+k)
 51 options.append(str(v))
 52 return tuple(options)

I will attach a screenshot showing the crash on a Japanese Windows 10 system, 
running in the Python 2.7 command line application.

--
components: Tkinter
messages: 293256
nosy: culler
priority: normal
severity: normal
status: open
title: tkFont.py assumes that all font families are encoded as ascii in Python 
2.7
type: crash
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



[issue30310] tkFont.py assumes that all font families are encoded as ascii in Python 2.7

2017-05-08 Thread Marc Culler

Changes by Marc Culler :


Added file: http://bugs.python.org/file46851/JapanesePythonBug.png

___
Python tracker 

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



[issue29823] mimetypes guesses XSL mimetype when passed an XML file

2017-05-08 Thread Martin Panter

Changes by Martin Panter :


--
resolution:  -> duplicate
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



[issue30273] The coverage job is broken: distutils build_ext fails on None

2017-05-08 Thread Brett Cannon

Changes by Brett Cannon :


--
assignee:  -> haypo

___
Python tracker 

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



[issue30262] Don't expose sqlite3 Cache and Statement

2017-05-08 Thread R. David Murray

R. David Murray added the comment:

I don't do much with the C API, but since your goal is to remove them from the 
PyMODINIT_FUNC, I would think you could replace those entries with calls to 
wrapper functions that issue the deprecation and then call the real function.

--

___
Python tracker 

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



[issue4963] mimetypes.guess_extension result changes after mimetypes.init()

2017-05-08 Thread R. David Murray

R. David Murray added the comment:

@dhess: do you want to work on the OrderedDict + correctly ordered hardcoded 
lists solution?

--

___
Python tracker 

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



[issue4963] mimetypes.guess_extension result changes after mimetypes.init()

2017-05-08 Thread R. David Murray

Changes by R. David Murray :


--
stage: test needed -> needs patch
versions: +Python 3.6, Python 3.7 -Python 2.7, 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



[issue26543] imaplib noop Debug

2017-05-08 Thread Kostis Anagnostopoulos

Changes by Kostis Anagnostopoulos :


--
pull_requests: +1605

___
Python tracker 

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



[issue30308] Add code coverage for argument in random.shuffle

2017-05-08 Thread Raymond Hettinger

Changes by Raymond Hettinger :


--
assignee:  -> rhettinger

___
Python tracker 

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



[issue30308] Add code coverage for argument in random.shuffle

2017-05-08 Thread Raymond Hettinger

Raymond Hettinger added the comment:

* Why not use unittest.mock to test the *random* argument for shuffle?

* Try to avoid direct calls to _randbelow().  That method is a non-public 
implementation detail subject to change.

* Also please don't make test_random.py depend on secrets which itself depends 
on random.py.

--

___
Python tracker 

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



[issue30300] asyncio.Controller

2017-05-08 Thread Nathaniel Smith

Nathaniel Smith added the comment:

Looks interesting! What's the advantage over running the server and the test in 
the same loop? The ability to use blocking operations in the tests, and to 
re-use an expensive-to-start server over multiple tests? (I've mostly used 
threads in tests to run blocking code for interoperability testing, and kept 
the async code in the main thread, so this is a bit novel to me.)

--
nosy: +njs

___
Python tracker 

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



[issue4963] mimetypes.guess_extension result changes after mimetypes.init()

2017-05-08 Thread Martin Panter

Martin Panter added the comment:

I suggest to discuss the non-determinism problem in Issue 1043134 (about 
determining a canonical extension for each content type). I understood this bug 
(Issue 4963) is about the behaviour of repeated initialization of the same 
instance of mimetypes.

BTW an ordered dictionary wouldn’t help with duplicate dictionary keys; see 
guess_extension("application/excel").

--
nosy: +martin.panter

___
Python tracker 

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



[issue4963] mimetypes.guess_extension result changes after mimetypes.init()

2017-05-08 Thread Martin Panter

Martin Panter added the comment:

I understand hash randomization was added after this bug was opened. Here is a 
demonstration with “video/mp4”, which only has the extension “.mp4” built in. 
But my /etc/mime.types file lists “mp4 mp4v mpg4”, so after the second 
initialization the behaviour changes:

PYTHONHASHSEED=0 python3.5 -c 'from mimetypes import *; 
print(guess_all_extensions("video/mp4")); init(); 
print(guess_all_extensions("video/mp4"))'
['.mp4', '.mp4v', '.mpg4']
['.mpg4', '.mp4', '.mp4v']

The first extension is always “.mp4”, regardless of hash randomization, due to 
the built-in list. But after re-initialization, the first extension depends on 
the order in the internal dictionary.

Using an ordered dictionary may work as a bug fix, but the whole initialization 
logic is so complex and it would be good to simplify it in the long term.

--

___
Python tracker 

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



[issue29505] Submit the re, json, & csv modules to oss-fuzz testing

2017-05-08 Thread Gregory P. Smith

Gregory P. Smith added the comment:

you can list me as a oss-fuzz contact.  use my work email address.

simplejson is worthy but as both it and the python standard library ship 
separately people use both so they both ultimately deserve fuzzing and fixing 
on their own so I'd add it to CPython as well.

--

___
Python tracker 

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



[issue30300] asyncio.Controller

2017-05-08 Thread Barry A. Warsaw

Barry A. Warsaw added the comment:

On May 08, 2017, at 11:06 PM, Nathaniel Smith wrote:

>Looks interesting! What's the advantage over running the server and the test
>in the same loop? The ability to use blocking operations in the tests, and to
>re-use an expensive-to-start server over multiple tests?

So, the ability to re-use expensive-to-start servers is definitely one of the
advantages.  I use nose2's layers, but test fixtures would fall into the same
category.

As for running the server and tests in the same loop; I haven't tried that,
but it seems like it would be more complicated to set up (maybe that's
dependent on the code under test).  More important is that I want to block the
tests until the server starts up.  I'm not sure (haven't tried) whether that's
possible when running them all in the same loop.

One other use case I have is for the LMTP server in Mailman 3.  The controller
turns out to be useful based on the start/stop framework for MM3 "runners".
That's probably strictly doable without the controller, but it's convenient,
readable, and a nice reuse.

--

___
Python tracker 

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



[issue30299] Display the bytecode when compiled a regular expression in debug mode

2017-05-08 Thread Jonathan Goble

Changes by Jonathan Goble :


--
nosy: +Jonathan Goble

___
Python tracker 

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



[issue30311] random.shuffle pointlessly shuffles dicts

2017-05-08 Thread Steven D'Aprano

New submission from Steven D'Aprano:

According to the documentation, random.shuffle() should accept a sequence. But 
it also accepts dicts, in which case it does nothing, expensively:

py> x = dict.fromkeys(range(10**6))
py> random.shuffle(x)
py> str(x)[:55] + "...}"
'{0: None, 1: None, 2: None, 3: None, 4: None, 5: None, ...}'


I'm not sure if it is better to explicitly test for and reject dicts and 
mappings, or just document that sorting dicts will apparently succeed while 
doing nothing.

Do we want to support sorting OrderedDicts? That at least makes sense, since 
they have an order, but again shuffle() seemingly works but actually does 
nothing.

I lean towards explicitly testing for dicts and raising.

--
messages: 293265
nosy: rhettinger, steven.daprano
priority: normal
severity: normal
status: open
title: random.shuffle pointlessly shuffles dicts
type: behavior
versions: Python 3.7

___
Python tracker 

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



[issue30311] random.shuffle pointlessly shuffles dicts

2017-05-08 Thread Martin Panter

Martin Panter added the comment:

It is also pointless to shuffle a list object repeating the same item, but that 
is no reason to add a special case. Is there a real problem with allowing 
dictionaries and OrderedDict? It seems to behave sensibly if you give each item 
a unique value:

>>> D = {i: i * 100 for i in range(5)}
>>> D
{0: 0, 1: 100, 2: 200, 3: 300, 4: 400}
>>> shuffle(D)
>>> D
{0: 300, 1: 100, 2: 200, 3: 0, 4: 400}

--
nosy: +martin.panter

___
Python tracker 

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



[issue30181] Correct the parsing of a test case docstring.

2017-05-08 Thread Roundup Robot

Changes by Roundup Robot :


--
pull_requests: +1606

___
Python tracker 

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



[issue30181] Correct the parsing of a test case docstring.

2017-05-08 Thread Brian May

Brian May added the comment:

I made an attempt at a PR. Unfortunately some of the tests appear to fail on 
some environments, and the messages produced don't exactly clarify why.

--

___
Python tracker 

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



[issue30311] random.shuffle pointlessly shuffles dicts

2017-05-08 Thread Tim Peters

Tim Peters added the comment:

Generally speaking, trying to shuffle a dict D already blows up, unless D's 
keys are the integers range(len(D)).  In that case, D is indistinguishable from 
a list in the sense that both map range(N) to values via __getitem__.  
`shuffle()` does no type checks whatsoever now, and will shuffle any object 
that maps range(N) to values.

Fine by me the way it is.

--
nosy: +tim.peters

___
Python tracker 

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



[issue30289] make distclean and Misc/python-config.sh

2017-05-08 Thread Xiang Zhang

Xiang Zhang added the comment:


New changeset fa5abac1e6cd74979557d5a6f960a55f40a10b0e by Xiang Zhang in branch 
'master':
bpo-30289: remove Misc/python-config.sh when make distclean (#1498)
https://github.com/python/cpython/commit/fa5abac1e6cd74979557d5a6f960a55f40a10b0e


--
nosy: +xiang.zhang

___
Python tracker 

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



[issue30289] make distclean and Misc/python-config.sh

2017-05-08 Thread Xiang Zhang

Changes by Xiang Zhang :


--
pull_requests: +1608

___
Python tracker 

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



[issue30181] Correct the parsing of a test case docstring.

2017-05-08 Thread Brian May

Brian May added the comment:

Me getting confused at the newline in the comparison output.

--

___
Python tracker 

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



[issue30289] make distclean and Misc/python-config.sh

2017-05-08 Thread Xiang Zhang

Xiang Zhang added the comment:


New changeset 410d75ab71e2db0fdc8b2016600a3d3d4830f38e by Xiang Zhang in branch 
'3.6':
bpo-30289: remove Misc/python-config.sh when make distclean (#1498) (#1506)
https://github.com/python/cpython/commit/410d75ab71e2db0fdc8b2016600a3d3d4830f38e


--

___
Python tracker 

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



[issue30289] make distclean and Misc/python-config.sh

2017-05-08 Thread Xiang Zhang

Xiang Zhang added the comment:

Thanks for your report!

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



[issue30306] release arguments of contextmanager

2017-05-08 Thread Nick Coghlan

Nick Coghlan added the comment:

Nice catch. This behaviour is an artifact of the ContextDecorator support in 
_GeneratorContextManager, where context managers created with `@contextmanager` 
can be used as function decorators (implicitly wrapping them in a with 
statement) as well as directly in with statements: to handle the 
ContextDecorator case, the original arguments are stored on the 
_GeneratorContextManager instance, which has the side effect of keeping those 
arguments referenced for the whole of the with statement body (due to the 
reference to the instance from the bound __exit__ method).

Martin's initial patch just unconditionally deletes those attributes in 
__enter__, which is technically correct, but *looks* wrong when reading the 
code (understanding why it's correct requires understanding the private 
_recreate_cm API used for collaboration between ContextDecorator and 
_GeneratorContextManager, and the fact that that relationship is a bit weird 
and convoluted is the main reason it's private in the first place).

My recommendation on the PR for a more self-obviously correct fix is to do the 
following:

- add a new "allow_recreation=True" flag parameter to 
`_GeneratorContextManager.__init__` that controls whether or not the CM 
recreation attributes get set or not
- pass `False` for that argument in `_recreate_cm` so they get set to None 
instead
- update `__enter__` to set them to None if they're not already None

The practical effect is the same as Martin's original patch, but the more 
explicit version should make it easier for readers to see what is going on 
(i.e. even when recreation is allowed during construction, the intent is that 
for any given instance, you will only ever call either __enter__() *or* 
_recreate_cm(), and once you do call __enter__(), that's it - the only 
permitted call after that point on that particular instance is __exit__()).

--

___
Python tracker 

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



[issue29990] Range checking in GB18030 decoder

2017-05-08 Thread Xiang Zhang

Xiang Zhang added the comment:


New changeset 9da408d15bdef624a5632182cb4edf98001fa82f by Xiang Zhang in branch 
'master':
bpo-29990: Fix range checking in GB18030 decoder (#1495)
https://github.com/python/cpython/commit/9da408d15bdef624a5632182cb4edf98001fa82f


--

___
Python tracker 

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



[issue29990] Range checking in GB18030 decoder

2017-05-08 Thread Xiang Zhang

Changes by Xiang Zhang :


--
pull_requests: +1609

___
Python tracker 

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



[issue29990] Range checking in GB18030 decoder

2017-05-08 Thread Xiang Zhang

Changes by Xiang Zhang :


--
pull_requests: +1610

___
Python tracker 

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



[issue29990] Range checking in GB18030 decoder

2017-05-08 Thread Xiang Zhang

Changes by Xiang Zhang :


--
pull_requests: +1611

___
Python tracker 

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



[issue29990] Range checking in GB18030 decoder

2017-05-08 Thread Xiang Zhang

Xiang Zhang added the comment:


New changeset f5f7870d9322b46ab87c45b2c4c46f6b10ecbd70 by Xiang Zhang in branch 
'3.5':
bpo-29990: Fix range checking in GB18030 decoder (#1495) (#1508)
https://github.com/python/cpython/commit/f5f7870d9322b46ab87c45b2c4c46f6b10ecbd70


--

___
Python tracker 

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



[issue29990] Range checking in GB18030 decoder

2017-05-08 Thread Xiang Zhang

Xiang Zhang added the comment:


New changeset 72e1b61da0920c5607481304879e039b63e2a3d5 by Xiang Zhang in branch 
'3.6':
bpo-29990: Fix range checking in GB18030 decoder (#1495) (#1507)
https://github.com/python/cpython/commit/72e1b61da0920c5607481304879e039b63e2a3d5


--

___
Python tracker 

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



[issue29990] Range checking in GB18030 decoder

2017-05-08 Thread Xiang Zhang

Changes by Xiang Zhang :


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



[issue29990] Range checking in GB18030 decoder

2017-05-08 Thread Xiang Zhang

Xiang Zhang added the comment:


New changeset 4e7457b85316e6591a4f0c3a4d0807bfdf7a2bea by Xiang Zhang in branch 
'2.7':
bpo-29990: Fix range checking in GB18030 decoder (#1509)
https://github.com/python/cpython/commit/4e7457b85316e6591a4f0c3a4d0807bfdf7a2bea


--

___
Python tracker 

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



[issue29990] Range checking in GB18030 decoder

2017-05-08 Thread Xiang Zhang

Xiang Zhang added the comment:

Thanks Ma Lin for finding the problem! Don't know why you close the PR but 
anyway, we solve it finally.

--

___
Python tracker 

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



[issue30297] Recursive starmap causes Segmentation fault

2017-05-08 Thread Sebastian Noack

Sebastian Noack added the comment:

Thanks for your response, both of you. All you said, make sense.

Just for the record, I wouldn't necessarily expect 200k nested iterators to 
work. Even if it could be made work, I guess it would use way too much memory. 
But a RuntimeError would be much preferable over a crash.

For the code above, the fix would be to just immediately convert the iterator 
returned by starmap() to a list. But in the end, regardless of this additional 
operation, it didn't perform well, so that I tossed that code, and used 
openssl's PBKDF2 implementation through the ctypes module.

Still, I'm somewhat concerned that code like this, will cause an unexpected 
crash that cannot be handled, dependent on run time variables. Could this 
perhaps even provide a security vulnerability? It seems to be a buffer 
overflow, after all.

--

___
Python tracker 

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



[issue21261] Teach IDLE to Autocomplete dictionary keys

2017-05-08 Thread Louie Lu

Changes by Louie Lu :


--
pull_requests: +1612

___
Python tracker 

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



[issue24932] Use proper command line parsing in _testembed

2017-05-08 Thread Nick Coghlan

Nick Coghlan added the comment:

Based on the latest round of PEP 538 review, the related test case that 
currently relies on _testembed is going to be able to be simplified to just 
setting LC_ALL=C when calling the subprocess (the amount of code it's letting 
me delete from the draft patch is further persuading me that changing the env 
var updates from "LC_ALL & LANG" to "LC_CTYPE & LANG" is the right call).

That means that change will also eliminate the dependence on this test suite 
enhancement for backports.

--

___
Python tracker 

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



[issue21261] Teach IDLE to Autocomplete dictionary keys

2017-05-08 Thread Louie Lu

Louie Lu added the comment:

In this PR, it will complete dictionary key with string, int, and others.

for example:

d = {'long_key': 10, 'short_key': 20, 30: 40, (((1, 2), 3, 4), 5): 50}
d['lo  -> d['long_key'
d[(((1 -> d[(((1, 2), 3, 4), 5)
d[3-> d[30

The problem is, autocomplete_w can't figure the original key is string or 
others, so this will be possible:

d[long -> d[long_key]
d[shor -> d[short_key]

--
nosy: +louielu

___
Python tracker 

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



[issue30311] random.shuffle pointlessly shuffles dicts

2017-05-08 Thread Raymond Hettinger

Raymond Hettinger added the comment:

I concur with Tim.  These are just duck-typing facts of life.

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



[issue21261] Teach IDLE to Autocomplete dictionary keys

2017-05-08 Thread Raymond Hettinger

Raymond Hettinger added the comment:

Would it be safer/simpler to just autocomplete string keys.

--

___
Python tracker 

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



[issue30291] Allow windows launcher to specify bit lengths with & without minor version

2017-05-08 Thread Steve Barnes

Steve Barnes added the comment:

CLA Now showing on profile.
Minor change to help message, (Defaults to matching 64 bit installation), 
pushed to hopefully auto-update the CLA flag.

--

___
Python tracker 

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