[issue18378] locale.getdefaultlocale() fails on Mac OS X with default language set to English

2015-07-25 Thread Ronald Oussoren

Ronald Oussoren added the comment:

ping...

I think the current behavior is a bug in Python and should be fixed in 2.7, 
3.4, 3.5 and default (using Dmitry's patch). 

I'd like to commit the patch, but would like someone else's review of the patch 
before doing so.

--

___
Python tracker 

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



[issue24713] Import docs reference the deprecated imp.reload

2015-07-25 Thread Petr Viktorin

New submission from Petr Viktorin:

In 3.4, `imp.reload` was deprecated in favor of `importlib.reload`.

https://docs.python.org/3/library/imp.html

--
assignee: docs@python
components: Documentation
files: docs.patch
keywords: patch
messages: 247319
nosy: docs@python, encukou, eric.araujo, ezio.melotti, georg.brandl
priority: normal
severity: normal
status: open
title: Import docs reference the deprecated imp.reload
versions: Python 3.4, Python 3.5, Python 3.6
Added file: http://bugs.python.org/file40011/docs.patch

___
Python tracker 

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



[issue14373] C implementation of functools.lru_cache

2015-07-25 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 5345e5ce2eed by Serhiy Storchaka in branch '3.5':
Issue #14373: Fixed segmentation fault when gc.collect() is called during
https://hg.python.org/cpython/rev/5345e5ce2eed

New changeset 9c6d11d22801 by Serhiy Storchaka in branch 'default':
Issue #14373: Fixed segmentation fault when gc.collect() is called during
https://hg.python.org/cpython/rev/9c6d11d22801

--

___
Python tracker 

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



[issue14373] C implementation of functools.lru_cache

2015-07-25 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Thank you Ned.

Is anything left to do with this issue or it can be closed?

--
priority: release blocker -> normal
status: open -> pending

___
Python tracker 

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



[issue18378] locale.getdefaultlocale() fails on Mac OS X with default language set to English

2015-07-25 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
nosy: +serhiy.storchaka
versions: +Python 3.5, Python 3.6 -Python 3.3

___
Python tracker 

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



[issue18378] locale.getdefaultlocale() fails on Mac OS X with default language set to English

2015-07-25 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Needed tests.

With the patch:

$ LC_CTYPE=UTF-8 ./python
>>> import locale
>>> locale.getdefaultlocale()
(None, 'UTF-8')
>>> locale.getpreferredencoding()
'ANSI_X3.4-1968'
>>> locale.getlocale()
(None, None)

$ LC_CTYPE=en_US_UTF-8 ./python
>>> import locale
>>> locale.getdefaultlocale()
('en_US', 'UTF-8')
>>> locale.getpreferredencoding()
'UTF-8'
>>> locale.getlocale()
('en_US', 'UTF-8')

I think getpreferredencoding() and getlocale() should return the UTF-8 encoding.

--

___
Python tracker 

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



[issue18181] PEP447: Add type.__getdescriptor__

2015-07-25 Thread Ronald Oussoren

Ronald Oussoren added the comment:

I've attached a new version of the patch (pep447-2015-07-25.txt). Changes in 
this version of the patch:

1) Works with the current trunk (as in "all tests pass")

2) Types in C must explicitly set Py_TPFLAGS_GETDESCRIPTOR in tp_flags to 
   enable the tp_getdescriptor slot. 

   This is primarily done avoid crashing when loading a C extension for
   older CPython versions (even if that's not guaranteed to work anyway).

The PEP needs to be updated for the second change, that's next on my list.

--
Added file: http://bugs.python.org/file40012/pep447-2015-07-25.txt

___
Python tracker 

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



[issue24712] Docs page's sidebar vibrates on mouse wheel scroll on Chrome.

2015-07-25 Thread Biwin John

Biwin John added the comment:

The problem exist with the Chrome on Ubuntu, Windows and OSX, but ony with the 
python docs for version 2.7.

Docs for 2.6 use the same sidebar.

But in 2.7 docs, the content of sidebar is positioned with the style added on 
scroll,

style="float: left; margin-right: 0px; width: 202px; top: 13px;"

The top value is calculated on scroll, the same code works with FireFox without 
any problem.

So it might be the way chrome handles the change in values. And we must 
workaround with our code than waiting for Chrome to get fixed.

Needs to be fixed as, 2.7 is the most used version, comes default with most 
distros and chrome is the most used browser (50.25% of 
all)[https://en.wikipedia.org/wiki/Usage_share_of_web_browsers]

Recommendations:
1. Change the sidebar behavior to the 2.6 docs sidebar one.(default top value, 
users can scroll up to see the content)
or.
2. Make the sidebar position:fixed and provide a inner scroll bar.

--

___
Python tracker 

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



[issue24714] Crash with string_at(None)

2015-07-25 Thread Michael Toews

New submission from Michael Toews:

On Debian x64 stable with Python 2.7 and 3.4, the following causes a 
segmentation fault:

from ctypes import string_at
string_at(None)

On Windows 64-bit with Python 2.7 it raises WindowsError and Python 3.3 raises 
OSError, both showing a message "access violation reading 0x", 
but it does not crash.

The above behavior was found when reading a result from a C API that can be 
either a zero-terminated string or NULL.

--
components: ctypes
messages: 247325
nosy: mwtoews
priority: normal
severity: normal
status: open
title: Crash with string_at(None)
type: crash
versions: Python 2.7, 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



[issue18378] locale.getdefaultlocale() fails on Mac OS X with default language set to English

2015-07-25 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Perhaps the better way to solve this issue is to use aliases table. What is the 
LC_CTYPE environment variable set when the default language set to non-English? 
How different native MacOS X command-line programs behave when set LC_CTYPE to 
other encoding (e.g. ASCII, US-ASCII, ISO8859-1, ISO-8859-1, Latin1)? What if 
set it to UTF8 (no minus) or utf-8 (lower case)?

--

___
Python tracker 

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



[issue24714] Crash with string_at(None)

2015-07-25 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
nosy: +amaury.forgeotdarc, belopolsky, meador.inge
versions: +Python 3.5, Python 3.6 -Python 3.3

___
Python tracker 

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



[issue24714] Crash with string_at(None)

2015-07-25 Thread STINNER Victor

STINNER Victor added the comment:

ctypes gives you a raw access to the memory. If you try to read unmapped memory 
areas, the program may or may not crash. Usually, you get a segmentation fault.

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

Python doesn't provide a portable behaviour on segmentation faults.

Note: You can use faulthandler to get the backtrace on segmentation fault.

--
nosy: +haypo
resolution:  -> not a bug

___
Python tracker 

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



[issue24714] Crash with string_at(None)

2015-07-25 Thread STINNER Victor

Changes by STINNER Victor :


--
status: open -> closed

___
Python tracker 

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



[issue24715] Sorting HOW TO: bad example for reverse sort stability

2015-07-25 Thread Jakub Wilk

New submission from Jakub Wilk:

https://docs.python.org/3/howto/sorting.html#odd-and-ends gives the following 
example for reverse sort stability:

>>> data = [('red', 1), ('blue', 1), ('red', 2), ('blue', 2)]
>>> assert sorted(data, reverse=True) == list(reversed(sorted(reversed(data

But here all the keys are different, so the result would be the same even if 
the sort algorithm weren't stable.

You probably wanted to pass to key=itemgetter(0) to both sorted() calls.

--
assignee: docs@python
components: Documentation
messages: 247328
nosy: docs@python, jwilk
priority: normal
severity: normal
status: open
title: Sorting HOW TO: bad example for reverse sort stability

___
Python tracker 

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



[issue24716] Multiple fdopen() on mkstemp() descriptor crashes py27 interpreter

2015-07-25 Thread Thomas Krijnen

New submission from Thomas Krijnen:

Following code crashes my Python 2.7.9 interpreter on Windows:

import os, tempfile
a, b = tempfile.mkstemp()
f = os.fdopen(a, "wb")
f = os.fdopen(a, "wb")
f.write("beer")
f.close()

--
components: Windows
messages: 247329
nosy: Thomas Krijnen, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: Multiple fdopen() on mkstemp() descriptor crashes py27 interpreter
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



[issue18181] PEP447: Add type.__getdescriptor__

2015-07-25 Thread Ronald Oussoren

Ronald Oussoren added the comment:

The attached micro benchmark indicates that method_cache in typeobject.c isn't 
used when using my patch. I'll have too look into that.

Other than that benchmarks results look OK (but: not using the method_cache is 
unacceptable as this most definitely changes performance).

What is kind of scary, but is to be expected I guess, is that a 
__getdescriptor__ method in Python is awfully slow.  I have to look into why 
this is slow, as the slowdown for using Python is significantly worse than I 
expected.

--
Added file: http://bugs.python.org/file40013/pep447-micro-bench.py

___
Python tracker 

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



[issue24716] Multiple fdopen() on mkstemp() descriptor crashes py27 interpreter

2015-07-25 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
nosy: +haypo

___
Python tracker 

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



[issue24713] Import docs reference the deprecated imp.reload

2015-07-25 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 6c713dcce26a by Berker Peksag in branch '3.4':
Issue #24713: Use importlib.reload() in import reference document.
https://hg.python.org/cpython/rev/6c713dcce26a

New changeset afb12ebd96df by Berker Peksag in branch '3.5':
Issue #24713: Use importlib.reload() in import reference document.
https://hg.python.org/cpython/rev/afb12ebd96df

New changeset 5fb7d3238248 by Berker Peksag in branch 'default':
Issue #24713: Use importlib.reload() in import reference document.
https://hg.python.org/cpython/rev/5fb7d3238248

--
nosy: +python-dev

___
Python tracker 

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



[issue24713] Import docs reference the deprecated imp.reload

2015-07-25 Thread Berker Peksag

Berker Peksag added the comment:

Thanks for the report and the patch, Petr.

--
nosy: +berker.peksag
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



[issue18378] locale.getdefaultlocale() fails on Mac OS X with default language set to English

2015-07-25 Thread Ronald Oussoren

Ronald Oussoren added the comment:

The only locale that doesn't include language information is the UTF-8 one, 
there is no locale named "US-ASCII".

See /usr/share/locale on an OSX system.

PS. The more I look at locale.py the more problems I find with it. The code 
makes a unwarranted assumptions about locales that aren't actually true on all 
systems.

For example:

>>> locale.normalize('ja_JP')
'ja_JP.eucJP'


That's not true on OSX, /usr/share/locale/ja_JP/LC_CTYPE is a symlink to 
/usr/share/locale/UTF-8/LC_CTYPE.

AFAIK *all* locale's on OSX use UTF-8.

--

___
Python tracker 

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



[issue2091] file accepts 'rU+' as a mode

2015-07-25 Thread Larry Hastings

Larry Hastings added the comment:

Yeah, considering how long this bug has been sitting around, I think we can 
wait for one more release for the fix.  3.6 please.

--

___
Python tracker 

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



[issue18378] locale.getdefaultlocale() fails on Mac OS X with default language set to English

2015-07-25 Thread Ronald Oussoren

Ronald Oussoren added the comment:

The alias mechanism cannot be used because LC_CTYPE=UTF-8 as the locale doesn't 
imply anything about languages. 

In Linux terms it is more or less equal to "C.UTF-8" or "POSIX.UTF-8", except 
that those two aren't valid locales on OSX.

--

___
Python tracker 

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



[issue24717] python logging handler not used when added after a process is started

2015-07-25 Thread eric

New submission from eric:

If I have interpreted the python3 documentation correctly, regardless of where 
I add the handler to the root logger, my log messages from within a Process 
should be sent to a file. However, this is not the case.

Here is a complete program which demonstrates the problem:

import logging
import logging.handlers

from multiprocessing import Process
from time import sleep

fileHandler = logging.FileHandler( 'mylog.log' )
fileHandler.setLevel( 5 )

logger = logging.getLogger( None )

def process_logger():

print( "process waiting" )
sleep( 5 )
print( 'process start' )

logger = logging.getLogger( None )

for num in range( 1, 10 ):
logger.critical( "critical: %d" % num )
sleep(1)

#
# if this is where the handler is added, the critical messages
# will go to the file
#
logger.addHandler( fileHandler )

processLogger = Process( target=process_logger )
processLogger.start()

#
# if this is where the handler is added, the critical messages
# will not go to the file.
#
#logger.addHandler( fileHandler )

print( "started" )

I am using python 3.4.3 on OS X 10.10.4.

My guess as to why this does not work is that when I start the Process, it 
makes a copy of the current environment and if the handler has not been added 
by that time, the environment the Process is running in won't have it.

I have three questions:

Why do my messages not always end up in the file regardless of where I call 
logger.addHandler?

Should my messages always end up in the file?

If they should not, what is the best solution to the general problem of needed 
to manipulate handlers after a Process has been started?

--
components: Extension Modules
messages: 247336
nosy: ericg97477
priority: normal
severity: normal
status: open
title: python logging handler not used when added after a process is started
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



[issue24718] Specify interpreter when running in IDLE

2015-07-25 Thread Daniel Pope

New submission from Daniel Pope:

I maintain a library called Pygame Zero which allows beginner programmers to 
start writing games without lines of boilerplate importing libraries, creating 
event loops and so on.

To support these features, Pygame Zero provides the 'pgzrun' command:

pgzrun 

[issue18378] locale.getdefaultlocale() fails on Mac OS X with default language set to English

2015-07-25 Thread Ronald Oussoren

Ronald Oussoren added the comment:

Testing this is interesting to say the least due to the dynamic way the module 
interface is built.

Serhiy: are you testing on a Linux machine? On my machine 
getpreferredencoding() returns 'UTF-8' because it hits the CODESET path (which 
ends up calling ``_locale.nl_langinfo(_locale.CODESET)`` and that returns 
UTF-8).

--

___
Python tracker 

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



[issue18378] locale.getdefaultlocale() fails on Mac OS X with default language set to English

2015-07-25 Thread Ronald Oussoren

Ronald Oussoren added the comment:

I've attached a patch with more tests, but I'm not to happy about the new test 
because it too much of a white box test and is therefore fairly fragile w.r.t. 
the actual implementation of the module.

--
Added file: http://bugs.python.org/file40014/issue18378-2015-07-25-py36.txt

___
Python tracker 

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



[issue24279] Update test_base64 to use test.support.script_helper

2015-07-25 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 8e1291cc8b69 by Berker Peksag in branch '3.5':
Issue #24279: Update test_base64 to use test.support.script_helper.
https://hg.python.org/cpython/rev/8e1291cc8b69

New changeset 472f354c70b8 by Berker Peksag in branch 'default':
Issue #24279: Update test_base64 to use test.support.script_helper.
https://hg.python.org/cpython/rev/472f354c70b8

--
nosy: +python-dev

___
Python tracker 

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



[issue13897] Move fields relevant to sys.exc_info out of frame into generator/threadstate

2015-07-25 Thread Mark Shannon

Mark Shannon added the comment:

Updated patch to support exception chaining and to merge cleanly.

--
versions: +Python 3.6 -Python 3.4
Added file: http://bugs.python.org/file40015/exc_info3.patch

___
Python tracker 

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



[issue24279] Update test_base64 to use test.support.script_helper

2015-07-25 Thread Berker Peksag

Berker Peksag added the comment:

Thanks Christie. I've kept get_output() and changed it to return 
assert_python_ok().out.

--
components: +Tests
resolution:  -> fixed
stage:  -> resolved
status: open -> closed
type:  -> enhancement
versions: +Python 3.6

___
Python tracker 

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



[issue24420] Documentation regressions from adding subprocess.run()

2015-07-25 Thread Roundup Robot

Roundup Robot added the comment:

New changeset bedff93d778d by Berker Peksag in branch '3.5':
Issue #24420: Fix documentation regression introduced by f0a00ee094ff.
https://hg.python.org/cpython/rev/bedff93d778d

New changeset 9b17df697a3c by Berker Peksag in branch 'default':
Issue #24420: Fix documentation regression introduced by f0a00ee094ff.
https://hg.python.org/cpython/rev/9b17df697a3c

--
nosy: +python-dev

___
Python tracker 

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



[issue24420] Documentation regressions from adding subprocess.run()

2015-07-25 Thread Berker Peksag

Berker Peksag added the comment:

Thanks Martin.

--
resolution:  -> fixed
stage: commit review -> resolved
status: open -> closed

___
Python tracker 

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



[issue24719] Resourc Leak in cPickle Module

2015-07-25 Thread Pankaj Sharma

New submission from Pankaj Sharma:

Hi,
There is resource leak in cPickle module in function "Pickle_getvalue()". so 
need to free before return .
I have attached patched ,please review it.

Thnaks!

--
components: Extension Modules, Library (Lib)
files: Python-2.7.10-cPickle.patch
keywords: patch
messages: 247345
nosy: benjamin.peterson, pankaj.s01
priority: normal
severity: normal
status: open
title: Resourc Leak in cPickle Module
type: resource usage
versions: Python 2.7
Added file: http://bugs.python.org/file40016/Python-2.7.10-cPickle.patch

___
Python tracker 

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



[issue21697] shutil.copytree() handles symbolic directory incorrectly

2015-07-25 Thread Roundup Robot

Roundup Robot added the comment:

New changeset e807f1d81cb6 by Berker Peksag in branch '3.4':
Issue #21697: shutil.copytree() now correctly handles symbolic links that point 
to directories.
https://hg.python.org/cpython/rev/e807f1d81cb6

New changeset 31f4041b9286 by Berker Peksag in branch '3.5':
Issue #21697: shutil.copytree() now correctly handles symbolic links that point 
to directories.
https://hg.python.org/cpython/rev/31f4041b9286

New changeset 8f65be73eb3a by Berker Peksag in branch 'default':
Issue #21697: shutil.copytree() now correctly handles symbolic links that point 
to directories.
https://hg.python.org/cpython/rev/8f65be73eb3a

--
nosy: +python-dev

___
Python tracker 

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



[issue23496] Steps for Android Native Build of Python 3.4.2

2015-07-25 Thread Cyd Haselton

Cyd Haselton added the comment:

I assume so; I'm using whatever is pulled frommy fork of the git repo.

I've actually run into a different error that occured when i rebuilt to include 
readline support; when I run ./python -m test I;m getting "ImportError: no 
module named _struct found."

Trying to figure that one out first...

--

___
Python tracker 

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



[issue21697] shutil.copytree() handles symbolic directory incorrectly

2015-07-25 Thread Berker Peksag

Berker Peksag added the comment:

Thanks for the patches and testing!

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



[issue18181] PEP447: Add type.__getdescriptor__

2015-07-25 Thread Ronald Oussoren

Ronald Oussoren added the comment:

pep447-2015-07-25-v2.txt changes two things w.r.t. the patch earlier today:

1) The performance problems w.r.t. the method_cache are gone

2) Added code for handling python exceptions other than AttributeError in
   calls to __getdescriptor__. 

   This code requires some tests to make sure the error handling code 
   is correct.

The new patch also adds some more tests, and adds extra MCACHE_STATS counters. 
Those aren't part of the proposal but were helpful to find the problem w.r.t. 
1).

As I mentioned before implementing __getdescriptor__ in Python is bad for 
performance of instances of that metaclass. AFAIK that cannot be helped, doing 
that will just execute a lot more Python code.

--
Added file: http://bugs.python.org/file40017/pep447-2015-07-25-v2.txt

___
Python tracker 

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



[issue19475] Add timespec optional flag to datetime isoformat() to choose the precision

2015-07-25 Thread Alessandro Cucci

Changes by Alessandro Cucci :


--
keywords: +patch
Added file: http://bugs.python.org/file40018/issue19475.patch

___
Python tracker 

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



[issue18181] PEP447: Add type.__getdescriptor__

2015-07-25 Thread Ronald Oussoren

Ronald Oussoren added the comment:

Note: the error handling code for exceptions in __getdescriptor__ definitely 
isn't good enough yet. 

I'm writing tests and am hunting down the problems those tests find. I'm 
getting closer and will post a new version when I think I've found all bugs. 
Probably some time tomorrow.

For now be warned that unexpected exceptions in __getdescriptor__ might crash 
the interpreter, especially when it is used to look for dunder methods.

--

___
Python tracker 

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



[issue24667] OrderedDict.popitem()/__str__() raises KeyError

2015-07-25 Thread Mark Shannon

Mark Shannon added the comment:

The attached test case raises a KeyError for __str__()

--
nosy: +Mark.Shannon
Added file: http://bugs.python.org/file40019/test.py

___
Python tracker 

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



[issue24720] Python install help

2015-07-25 Thread node

New submission from node:

I am trying to install Python 3.5.0b2 on Win 8.1 but cannot get it loaded

http://pastebin.com/hKU2bvds

the error. hoping some one can help.

--
messages: 247352
nosy: node
priority: normal
severity: normal
status: open
title: Python install help
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



[issue24715] Sorting HOW TO: bad example for reverse sort stability

2015-07-25 Thread Raymond Hettinger

Changes by Raymond Hettinger :


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

___
Python tracker 

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



[issue24720] Python install help

2015-07-25 Thread Zachary Ware

Zachary Ware added the comment:

1) your paste appears to be invalid. You can just paste in a message here, or 
attach a screenshot (though text is preferable :))
2) 3.5.0b2 is out of date, try with beta 3 (or beta 4, due out this weekend)

--
components: +Installation, Windows
nosy: +paul.moore, steve.dower, tim.golden, zach.ware

___
Python tracker 

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



[issue23496] Steps for Android Native Build of Python 3.4.2

2015-07-25 Thread Marco Paolini

Changes by Marco Paolini :


--
nosy: +mpaolini

___
Python tracker 

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



[issue23670] Modifications to support iOS as a cross-compilation target

2015-07-25 Thread Marco Paolini

Changes by Marco Paolini :


--
nosy: +mpaolini

___
Python tracker 

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



[issue24721] The result of calling dict.* methods on OrderedDict is undefined.

2015-07-25 Thread Eric Snow

New submission from Eric Snow:

(see issue24667)

collections.OrderedDict subclasses dict so calling dict's methods on an 
OrderedDict works.  However, neither the pure Python nor the C implementation 
of OrderedDict was written to support doing so.  In fact, both of them 
currently enter an inconsistent state when this happens.  For example:

# Python 3.4 (pure Python implementation)
>>> from collections import OrderedDict
>>> od = OrderedDict([('spam', 1), ('eggs', 2)])
>>> dict.__delitem__(od, 'spam')
>>> str(od)
Traceback (most recent call last):
  File "", line 1, in 
  File "/usr/lib/python3.4/reprlib.py", line 24, in wrapper
result = user_function(self)
  File "/usr/lib/python3.4/collections/__init__.py", line 198, in __repr__
return '%s(%r)' % (self.__class__.__name__, list(self.items()))
  File "/usr/lib/python3.4/_collections_abc.py", line 485, in __iter__
yield (key, self._mapping[key])
KeyError: 'spam'

# Python 3.5 (C implementation)
>>> from collections import OrderedDict
>>> od = OrderedDict([('spam', 1), ('eggs', 2)])
>>> dict.__delitem__(od, 'spam')
>>> str(od)
Traceback (most recent call last):
  File "", line 1, in 
KeyError: 'spam'

This is a consequence of subclassing a builtin type, which typically do not 
have good support for subclassing (e.g. issue10977).

It probably isn't worth making any changes to the code of either OrderedDict 
implementations.  At most I'd recommend a note in the OrderedDict documentation 
indicating that the results of passing an OrderedDict object to dict.* methods 
are undefined.

--
assignee: docs@python
components: Documentation
messages: 247354
nosy: docs@python, eric.snow, rhettinger
priority: low
severity: normal
status: open
title: The result of calling dict.* methods on OrderedDict is undefined.
type: behavior
versions: Python 2.7, Python 3.4, Python 3.5, Python 3.6

___
Python tracker 

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



[issue24721] The result of calling dict.* methods on OrderedDict is undefined.

2015-07-25 Thread Raymond Hettinger

Changes by Raymond Hettinger :


--
assignee: docs@python -> rhettinger

___
Python tracker 

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



[issue24667] OrderedDict.popitem()/__str__() raises KeyError

2015-07-25 Thread Eric Snow

Eric Snow added the comment:

@Mark, note that you get the same behavior with the pure Python OrderedDict.  
Calling dict.* methods on an OrderedDict gives you undefined behavior.  I 
expect the same is true for most subclasses of builtin types that override 
builtin methods.

Anyway, the problem with using dict.* methods with OrderedDict is a separate 
issue from the bug with pop/popitem reported here.  I've opened issue24721 to 
address the former.

--

___
Python tracker 

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



[issue24719] Resourc Leak in cPickle Module

2015-07-25 Thread Roundup Robot

Roundup Robot added the comment:

New changeset a789ee93f152 by Benjamin Peterson in branch '2.7':
possible memory leak in error case (closes #24719)
https://hg.python.org/cpython/rev/a789ee93f152

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



[issue24667] OrderedDict.popitem()/__str__() raises KeyError

2015-07-25 Thread Eric Snow

Eric Snow added the comment:

Regarding this bug, it's clear now that the ordered keys and the underlying 
dict are getting out of sync somewhere.  This is either due to a bug in the C 
OrderedDict implementation or the use of the concrete dict C-API (or dict.* 
methods; thanks Mark).  It's undoubtedly the former since the pure Python 
implementation did not have this problem.

I'm hoping to have some time today to identify the source of the problem.

--

___
Python tracker 

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



[issue24721] The result of calling dict.* methods on OrderedDict is undefined.

2015-07-25 Thread Raymond Hettinger

Raymond Hettinger added the comment:

> This is a consequence of subclassing a builtin type

Not really.  This is how subclassing works in general.  Any time you a user 
calls a parent class directly on an instance of subclass, they are bypassing 
whatever the subclass needs to do to maintain its invariants.

class A:
def __init__(self):
self.data = []
def add(self, x):
self.data.append(x)

class B(A):
'Track the number of odds'
def __init__(self):
A.__init__(self)
self.odds = 0
def add(self, x):
A.add(self, x)
self.odds += (x % 2)

b = B()
b.add(1)
b.add(2)
b.add(3)
b.add(4)
A.add(b, 5)
assert b.odds == sum(x%1 for x in b.data), 'OMG, B is broken!'

There is nothing special about OrderedDicts in this regard.  Perhaps there 
should be a FAQ entry regarding the "facts of life" in the world of object 
oriented programming.

--

___
Python tracker 

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



[issue23496] Steps for Android Native Build of Python 3.4.2

2015-07-25 Thread Ryan Gonzalez

Ryan Gonzalez added the comment:

So...I have *no* clue why _struct can't be found.

Can you use gdb to get the segfault backtrace like you did before?

On July 25, 2015 6:56:10 AM CDT, Cyd Haselton  wrote:
>
>Cyd Haselton added the comment:
>
>I assume so; I'm using whatever is pulled frommy fork of the git repo.
>
>I've actually run into a different error that occured when i rebuilt to
>include readline support; when I run ./python -m test I;m getting
>"ImportError: no module named _struct found."
>
>Trying to figure that one out first...
>
>--
>
>___
>Python tracker 
>
>___

--

___
Python tracker 

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



[issue24721] The result of calling dict.* methods on OrderedDict is undefined.

2015-07-25 Thread Eric Snow

Eric Snow added the comment:

Ah, you're right.  I was hung up on issue10977. :)

--

___
Python tracker 

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



[issue24721] The result of calling dict.* methods on OrderedDict is undefined.

2015-07-25 Thread Eric Snow

Eric Snow added the comment:

Feel free to close this, Raymond.

--

___
Python tracker 

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



[issue24722] Python install help

2015-07-25 Thread node

New submission from node:

http://pastebin.com/D5eVxF1b

Sorry, where can I download the latest version? I went to python site and only 
saw this version

--
messages: 247362
nosy: node
priority: normal
severity: normal
status: open
title: Python install help
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



[issue24720] Python install help

2015-07-25 Thread node

node added the comment:

http://pastebin.com/D5eVxF1b

Sorry, try this where to get the latest version pls..

--

___
Python tracker 

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



[issue23496] Steps for Android Native Build of Python 3.4.2

2015-07-25 Thread Cyd Haselton

Cyd Haselton added the comment:

As soon as I build a PIE gdb I can.

And right now, running ./python -m test throws the ImportError...so I'll
need to resolve that first
On Jul 25, 2015 12:38 PM, "Ryan Gonzalez"  wrote:

>
> Ryan Gonzalez added the comment:
>
> So...I have *no* clue why _struct can't be found.
>
> Can you use gdb to get the segfault backtrace like you did before?
>
> On July 25, 2015 6:56:10 AM CDT, Cyd Haselton 
> wrote:
> >
> >Cyd Haselton added the comment:
> >
> >I assume so; I'm using whatever is pulled frommy fork of the git repo.
> >
> >I've actually run into a different error that occured when i rebuilt to
> >include readline support; when I run ./python -m test I;m getting
> >"ImportError: no module named _struct found."
> >
> >Trying to figure that one out first...
> >
> >--
> >
> >___
> >Python tracker 
> >
> >___
>
> --
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue21750] mock_open data is visible only once for the life of the class

2015-07-25 Thread Robert Collins

Changes by Robert Collins :


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



[issue2091] file accepts 'rU+' as a mode

2015-07-25 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 1a5bbb31f740 by Robert Collins in branch 'default':
- Issue #2091: error correctly on open() with mode 'U' and '+'
https://hg.python.org/cpython/rev/1a5bbb31f740

--
nosy: +python-dev

___
Python tracker 

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



[issue2091] file accepts 'rU+' as a mode

2015-07-25 Thread Robert Collins

Robert Collins added the comment:

@larry thanks - that was my inclination too. Applied to 3.6

@Serhiy I've not done a warning in 3.4/3.5 because - the behaviour is already 
broken, this patch just catches it a lot earlier (on open rather than 
subsequent operations).

--

___
Python tracker 

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



[issue2091] file accepts 'rU+' as a mode

2015-07-25 Thread Robert Collins

Changes by Robert Collins :


--
resolution:  -> fixed
stage: commit review -> resolved
status: open -> closed

___
Python tracker 

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



[issue24710] Class name hardcoded in TracebackException.from_exception()

2015-07-25 Thread Robert Collins

Robert Collins added the comment:

We can't use from_exception in __init__ because from_exception's job is to look 
up __traceback__, but the legacy API allows arbitrary tb objects which may not 
be exc.__traceback__, and modifying exc.__traceback__ or creating a shim object 
just to be able to use from_exception doesn't make sense to me.

This patch looks good, and I'm applying to 3.6. It has no functional impact 
(except for perhaps weird mocking corner cases, but as its a pure class that 
shouldn't be needed), so I'm leaving it out of 3.5, since i'm not 100% sure 
where the move to a new repo is at, and its not worth figuring that out.

--

___
Python tracker 

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



[issue24710] Class name hardcoded in TracebackException.from_exception()

2015-07-25 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 1be4d7388279 by Robert Collins in branch 'default':
Issue #24710: Use cls in TracebackException.from_exception.
https://hg.python.org/cpython/rev/1be4d7388279

--
nosy: +python-dev

___
Python tracker 

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



[issue24710] Class name hardcoded in TracebackException.from_exception()

2015-07-25 Thread Robert Collins

Changes by Robert Collins :


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



[issue24710] Class name hardcoded in TracebackException.from_exception()

2015-07-25 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

We can use from_exception() in __init__ because in both cases first three 
arguments of TracebackException() are type(e), e, e.__traceback__. Without this 
change changing from_exception() makes less sense.

Here is a patch.

--
Added file: http://bugs.python.org/file40020/classmethod_2.patch

___
Python tracker 

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



[issue2091] file accepts 'rU+' as a mode

2015-07-25 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Perhaps the 'U' mode should just raise an exception in 3.6.

--

___
Python tracker 

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



[issue24651] Mock.assert* API is in user namespace

2015-07-25 Thread Robert Collins

Robert Collins added the comment:

Some great points raised here.

Yes, we'd need .calls and .returnvalue and so on all made accessible via 
another route, and that would be a less direct spelling.

e.g. a_mock.returnvalue = 3
-> 
# function
set_returnvalue(a_mock, 3)
or
# separate object to get at the mock housekeeping vs the mocked interface
mocki(a_mock).returnvalue = 3

etc.

None of which make me want to say 'wow thats a great api'.

I wouldn't want to advocate for a patch for this unless:
 - it would feel as convenient to use as the current API does
 - it would be possible to be both forward and backwards compatible with the 
existing API indefinitely: There are lots of users of mock, and offering a 
[presumably] improved API is not worth turning all that code into an instant 
sea-anchor: if we're going to change this, we need to do so in a -very- 
graceful fashion, because unlike e.g. the mock_open things that only affect 
some users of mock, this would (if done poorly) break every user ever.

For clarity, I have no plans to write such a patch at this time, though if 
someone did come up with a proof of concept I'd happily review it, and dig up 
Michael to get his thoughts *if and only if* it met the two constraints above.

I'm not sure of the right bug tracker state to say 'this is a maybe, maintainer 
isn't enthused about it'.

--

___
Python tracker 

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



[issue24651] Mock.assert* API is in user namespace

2015-07-25 Thread Robert Collins

Changes by Robert Collins :


--
priority: normal -> low

___
Python tracker 

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



[issue12750] datetime.strftime('%s') should respect tzinfo

2015-07-25 Thread Robert Collins

Robert Collins added the comment:

Moving this back to patch needed: the patch was reviewed by a committer and 
changes requested.

--
nosy: +rbcollins
stage: commit review -> patch review

___
Python tracker 

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



[issue24710] Class name hardcoded in TracebackException.from_exception()

2015-07-25 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


Removed file: http://bugs.python.org/file40020/classmethod_2.patch

___
Python tracker 

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



[issue24710] Class name hardcoded in TracebackException.from_exception()

2015-07-25 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


Added file: http://bugs.python.org/file40021/classmethod_2.patch

___
Python tracker 

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



[issue15989] Possible integer overflow of PyLong_AsLong() results

2015-07-25 Thread Robert Collins

Robert Collins added the comment:

@serhiy - I'm a little confused about the state of this patch. It seems like 
you need more review?

--
nosy: +rbcollins

___
Python tracker 

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



[issue15989] Possible integer overflow of PyLong_AsLong() results

2015-07-25 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Yes, it would be good if other's pair of eyes will look on the patch.

--

___
Python tracker 

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



[issue10388] spwd returning different value depending on privileges

2015-07-25 Thread Robert Collins

Robert Collins added the comment:

Too late for 3.5 for this IMO.

--
nosy: +rbcollins
versions: +Python 3.6 -Python 3.5

___
Python tracker 

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



[issue18787] Misleading error from getspnam function of spwd module

2015-07-25 Thread Robert Collins

Robert Collins added the comment:

Sounds like we want something analogous to 
http://bugs.python.org/file33404/fix_error_message_getspall_v2.patch for this 
bug. Moving to patch needed.

It looks like it would be easily tested too, so I'd like to see a test too 
please.

--
nosy: +rbcollins
stage: test needed -> needs patch

___
Python tracker 

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



[issue10388] spwd returning different value depending on privileges

2015-07-25 Thread Robert Collins

Robert Collins added the comment:

The man page for setspent says this:
"The functions that return a pointer return NULL if no more entries are 
available or if an error occurs during processing.  The functions  which
   have int as the return value return 0 for success and -1 for failure, 
with errno set to indicate the cause of the error.

   For the nonreentrant functions, the return value may point to static 
area, and may be overwritten by subsequent calls to these functions.

   The reentrant functions return zero on success.  In case of error, an 
error number is returned.

"

-> that is, setspent's interaction with errno is undefined, at least on Linux. 
I'm a little worried about whether this may pickup false errors as a result.

--

___
Python tracker 

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



[issue10388] spwd returning different value depending on privileges

2015-07-25 Thread Robert Collins

Robert Collins added the comment:

I'm moving this back to patch review - it needs a test, particularly because of 
the question I have around setspent.

--
stage: commit review -> patch review

___
Python tracker 

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



[issue20544] Use specific asserts in operator tests

2015-07-25 Thread Robert Collins

Robert Collins added the comment:

Looks sane to me. Should go in 3.6 if we're going to do this or get closed to 
remove cognitive overhead in the issue tracker. No point backporting this to 
older releases.

--
nosy: +rbcollins
versions: +Python 3.6 -Python 2.7, Python 3.4, Python 3.5

___
Python tracker 

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



[issue24710] Class name hardcoded in TracebackException.from_exception()

2015-07-25 Thread Robert Collins

Robert Collins added the comment:

Oh I see, - different things could have been meant but that application will 
work.

But - please don't use self.from_exception: its a class method, so 
TracebackException.from_exception(...) is the right spelling.

--

___
Python tracker 

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



[issue20544] Use specific asserts in operator tests

2015-07-25 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Backporting this to older releases is needed to help backporting future tests. 
We should keep tests consistent if possible.

--

___
Python tracker 

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



[issue24710] Class name hardcoded in TracebackException.from_exception()

2015-07-25 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

self.from_exception() works as well.

--

___
Python tracker 

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



[issue24710] Class name hardcoded in TracebackException.from_exception()

2015-07-25 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


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

___
Python tracker 

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



[issue24722] Python install help

2015-07-25 Thread Zachary Ware

Changes by Zachary Ware :


--
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> Python install help

___
Python tracker 

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



[issue24715] Sorting HOW TO: bad example for reverse sort stability

2015-07-25 Thread Raymond Hettinger

Changes by Raymond Hettinger :


--
keywords: +patch
Added file: http://bugs.python.org/file40022/reverse_stablity.diff

___
Python tracker 

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



[issue23926] skipitem() in getargs.c still supports 'w' and 'w#', and shouldn't

2015-07-25 Thread Joe Jevnik

Joe Jevnik added the comment:

bumping so that we don't forget about this.

--

___
Python tracker 

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



[issue24712] Docs page's sidebar vibrates on mouse wheel scroll on Chrome.

2015-07-25 Thread Ned Deily

Changes by Ned Deily :


--
nosy: +georg.brandl

___
Python tracker 

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



[issue24717] python logging handler not used when added after a process is started

2015-07-25 Thread Ned Deily

Changes by Ned Deily :


--
nosy: +vinay.sajip

___
Python tracker 

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



[issue12006] strptime should implement %G, %V and %u directives

2015-07-25 Thread Alexander Belopolsky

Alexander Belopolsky added the comment:

Reverting to "needs patch" stage because there are still issues to be ironed 
out.

--
stage: commit review -> needs patch
versions: +Python 3.6 -Python 3.5

___
Python tracker 

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



[issue20544] Use specific asserts in operator tests

2015-07-25 Thread Raymond Hettinger

Raymond Hettinger added the comment:

I don't think kind of shallow changes to the test suite should be backported.  
They probably shouldn't have been done at all.  When you change code, the tests 
are a safety net.  When you change tests, you have almost no safety net at all. 
 If the original test was developed using test-driven-development or for a 
bug-fix, then it was demonstrated to have failed at one time.  But when 
pointlessly refactored, the revised tests have no longer been demonstrated to 
actually detect to original underlying bug.  

If the whole point of "specific asserts" is to have better error messages on a 
failure, then we should wait until there is an actual failure to make the 
change.  Otherwise, this reduced the reliability of the test suite with zero 
benefit.  Most of these tests will never become broken (I can't recall the last 
time any of them failed) and if they did, their existing message would suffice.

Another reason this should be done is Guido's notion of "holistic refactoring". 
 The idea is that someone shouldn't travel through modules making shallow 
changes.  That work should be deferred to the module maintainer to be done in 
the course of normal deeply thought out work on the module.

The last reason these kind of changes shouldn't be made is that undoes work by 
the person who originally wrote it, making the code less familiar to them when 
they come back.  For example, most of the tests for sets are written in a way 
that reflects how I was thinking about the problem when I wrote it.  If someone 
comes through and renames the variables, rewraps the lines, switches the choice 
of assertions, etc.  Then they make it more difficult to recover the original 
line of thinking by the designer.  Put another way, no one likes to have code 
they're written needlessly scrambled around.  If there is a real bug fix, then 
yes.  Otherwise, shallow wholesale search and replace missions should be 
approached reluctantly.

--

___
Python tracker 

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



[issue24710] Class name hardcoded in TracebackException.from_exception()

2015-07-25 Thread Robert Collins

Robert Collins added the comment:

I know it 'works', I just think its not appropriate here.

--

___
Python tracker 

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



[issue20544] Use specific asserts in operator tests

2015-07-25 Thread Robert Collins

Robert Collins added the comment:

So, is this specific patch ok to apply, or are we going to reject it? I don't 
particularly care either way, but having this issue open and stalled just adds 
cognitive load to working with the bug tracker.

FWIW I agree that it should not be backported.

--

___
Python tracker 

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



[issue24720] Python install help

2015-07-25 Thread Steve Dower

Steve Dower added the comment:

Are you being promoted for administrative privileges? Unfortunately there's no 
way around requiring them to install the C Runtime update, so if you are 
blocked from applying Windows Updates to your machine unfortunately there's no 
good way around this.

Alternatively, do you have VS 2015 final release installed? This may be an 
error due to attempting to downgrade (3.5.0b3 was built with a prerelease 
version of VS), though it shouldn't be failing because of that.

--

___
Python tracker 

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



[issue20544] Use specific asserts in operator tests

2015-07-25 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Everyone except Raymond seems to agree the patch is a good think, so it should 
probably be applied.

--

___
Python tracker 

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



[issue24721] The result of calling dict.* methods on OrderedDict is undefined.

2015-07-25 Thread Raymond Hettinger

Changes by Raymond Hettinger :


--
resolution:  -> not a bug
status: open -> closed

___
Python tracker 

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



[issue24667] OrderedDict.popitem()/__str__() raises KeyError

2015-07-25 Thread Larry Hastings

Larry Hastings added the comment:

It produces the same exception under Python 3.4, too.

--
nosy: +larry

___
Python tracker 

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



[issue24613] array.fromstring Use After Free

2015-07-25 Thread John Leitch

John Leitch added the comment:

Attached is a patch that updates array.fromstring to throw a ValueError when 
self is passed. It also updates the unit tests to cover this new behavior.

--
Added file: 
http://bugs.python.org/file40023/array.fromstring-Use-After-Free.patch

___
Python tracker 

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



[issue24667] OrderedDict.popitem()/__str__() raises KeyError

2015-07-25 Thread Fabian

Fabian added the comment:

Really this bug and not the one mentioned by Mark? I've been using 3.4(.3) 
since we use requests (and therefore urllib3) which happened a few months ago. 
I also can't remember any failure on a Python 3.4 Travis build.

--

___
Python tracker 

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



[issue24717] python logging handler not used when added after a process is started

2015-07-25 Thread Vinay Sajip

Vinay Sajip added the comment:

This is not a bug - it's how processes work on POSIX. Multiprocessing on POSIX 
generally uses the fork system call, which happens when you create a another 
process via the Process(...) call. At this point, the created process is a copy 
of the original process. When you add the handler *before* the Process(...) 
call, the copy also has the handler already added, so process_logger (which is 
called in the copy) will behave as expected. When you add the handler after the 
Process(...) call, the handler has not been added in the copy, so 
process_logger (which is called in the copy) will not behave as expected.

To avoid this sort of problem, ensure that logging is configured as desired in 
each process (normally, this means doing the logging configuration in code 
which is called (directly or indirectly) from the target=XXX callable which is 
passed to Process.

--
resolution:  -> not a bug
status: open -> closed

___
Python tracker 

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



[issue24645] logging.handlers.QueueHandler should not lock when handling a record

2015-07-25 Thread Vinay Sajip

Changes by Vinay Sajip :


--
resolution:  -> not a bug
status: open -> closed

___
Python tracker 

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



[issue24619] async/await parser issues

2015-07-25 Thread Larry Hastings

Changes by Larry Hastings :


--
status: open -> closed

___
Python tracker 

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



[issue24635] test_typing is flaky

2015-07-25 Thread Larry Hastings

Larry Hastings added the comment:

Deferring for beta 4.  We should still fix before release.  Preferably before 
RC1 depending on the availability of Certain Persons.

--
nosy: +larry
priority: release blocker -> deferred blocker

___
Python tracker 

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



  1   2   >