[issue24939] Remove unicode_format.h from stringlib

2015-08-26 Thread Eric V. Smith

Eric V. Smith added the comment:

Actually, int.__format__, etc. are not in this file. So that's good.

The things that are in this file but are unrelated to unicodeobject.c are the 
support routines for implementing string.Formatter. I think I'll move those 
elsewhere, as a first step.

--

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



[issue22241] strftime/strptime round trip fails even for UTC datetime object

2015-08-26 Thread Guido van Rossum

Guido van Rossum added the comment:

OK, I guess we can change stdlib datetime.timezone.utc's str() to 'UTC'. Make 
sure to update both the C and the Python version, and the tests, and the docs. 
It's going to have to go into 3.6.

--
nosy: +gvanrossum

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



[issue24938] Measure if _warnings.c is still worth having

2015-08-26 Thread Brett Cannon

Brett Cannon added the comment:

Here are the benchmark results of freezing warnings.py as _frozen_warnings 
(very quick hack which doesn't use _frozen_warnings is attached). Basically -S 
slows down by about 3% and normal startup has no measurable impact. Not sure if 
that's worth it to simplify the warnings code or not.


INFO:root:Automatically selected timer: perf_counter
INFO:root:Skipping benchmark bzr_startup; not compatible with Python 3.6
INFO:root:Skipping benchmark hg_startup; not compatible with Python 3.6
Running normal_startup...
INFO:root:Running `../cpython/default/python.exe -c ` 1000 times
INFO:root:Running `../cpython/pristine/python.exe -c ` 1000 times
Running startup_nosite...
INFO:root:Running `../cpython/default/python.exe -S -c ` 2000 times
INFO:root:Running `../cpython/pristine/python.exe -S -c ` 2000 times

Report on Darwin Bretts-MacBook-Pro.local 14.5.0 Darwin Kernel Version 14.5.0: 
Wed Jul 29 02:26:53 PDT 2015; root:xnu-2782.40.9~1/RELEASE_X86_64 x86_64 i386
Total CPU cores: 4

### startup_nosite ###
Min: 0.311247 - 0.317280: 1.02x slower
Avg: 0.316682 - 0.325945: 1.03x slower
Significant (t=-17.89)
Stddev: 0.00326 - 0.00403: 1.2360x larger

The following not significant results are hidden, use -v to show them:
normal_startup.

--
keywords: +patch
Added file: http://bugs.python.org/file40269/issue24938.diff

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



[issue24913] deque.index() overruns deque boundary

2015-08-26 Thread Raymond Hettinger

Raymond Hettinger added the comment:

Larry, this may need to go into 3.5 if there is still an opportunity.

--
assignee: rhettinger - larry
nosy: +larry
priority: low - high
title: newblock() Uninitialized Variable - deque.index() overruns deque 
boundary
versions: +Python 3.6

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



[issue24913] newblock() Uninitialized Variable

2015-08-26 Thread Raymond Hettinger

Changes by Raymond Hettinger raymond.hettin...@gmail.com:


Added file: http://bugs.python.org/file40258/fix_deque_overrun.diff

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



[issue24941] classproperty

2015-08-26 Thread Thomas Guettler

New submission from Thomas Guettler:

Quoting Guido van Rossum Aug 20 2015. Thread Properties for classes possible?

https://mail.python.org/pipermail/python-ideas/2015-August/035354.html

{{{
 think it's reasonable to propose @classproperty as a patch to CPython. It
needs to be C code. Not sure about the writable version. The lazy=True part
is not appropriate for th he stdlib (it's just a memoize pattern).
}}}

The solution I use at the moment:

{{{
# From http://stackoverflow.com/a/5192374/633961
class classproperty(object):
def __init__(self, f):
self.f = f
def __get__(self, obj, owner):
return self.f(owner)
}}}

According to Terry Jan Reedy the next step is to find
someone to translate this to C.

Sorry, my C knowledge is limited. Can anybody help?

--
messages: 249182
nosy: guettli
priority: normal
severity: normal
status: open
title: classproperty

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



[issue9262] IDLE: Use tabbed shell and edit windows

2015-08-26 Thread Mark Roseman

Mark Roseman added the comment:

Have attached uitabs.py.  From the header comments:

Standalone 'tabs' widget to switch between multiple different views.

Unlike the Tkinter ttk.Notebook widget, this widget is suitable for
displaying a potentially large number of tabs, as might be found in a
tabbed editor. If there are too many tabs to show based on the available
width, the remainder can be viewed via a popup menu on the last tab.

Tabs can be rearranged by dragging, closed, or new tabs added. Each tab
can have a title which is displayed in the tab, a tooltip for when the
mouse hovers over the tab, and a 'dirty' indicator that can be used to
indicate files needing to be saved.

The appearance and behaviour of the tabs is strongly influenced by the
TextMate editor on Mac OS X.

Implementation is via a single Tkinter canvas.

Unlike many other tabbed widgets, this widget does not take care of
actually switching content being displayed; this is left to the caller.

A UITabsObserver (see below) must be provided to the widget, and is
used to notify the caller when changes are made that must be reflected
in other parts of the user interface.

--
Added file: http://bugs.python.org/file40264/uitabs.py

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



[issue24915] Profile Guided Optimization improvements (better training, llvm support, etc)

2015-08-26 Thread Alecsandru Patrascu

Changes by Alecsandru Patrascu alecsandru.patra...@intel.com:


Added file: http://bugs.python.org/file40268/python3.6-pgo-v04.patch

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



[issue24915] Profile Guided Optimization improvements (better training, llvm support, etc)

2015-08-26 Thread Alecsandru Patrascu

Changes by Alecsandru Patrascu alecsandru.patra...@intel.com:


Added file: http://bugs.python.org/file40267/python2.7-pgo-v04.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24915
___
___
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-08-26 Thread Ryan Gonzalez

Ryan Gonzalez added the comment:

I don't think so. I believe that switch is just to enable writing gdb 
extensions in Python.

On August 26, 2015 9:34:29 AM CDT, Cyd Haselton rep...@bugs.python.org wrote:

Cyd Haselton added the comment:

UPDATE:
Still working on the test_hash issue; not making much progress

QUESTION
Does gdb have to be configured with the --with-python switch in order
to debug the python binary correctly?

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23496
___

--

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



[issue17942] IDLE Debugger: Improve GUI

2015-08-26 Thread Mark Roseman

Mark Roseman added the comment:

Have attached debugpanel.py, implementing a ttk-based mockup of one possible 
redesign of the debugger UI, as seen in 
http://bugs.python.org/file40234/newtabs.png

--
Added file: http://bugs.python.org/file40266/debugpanel.py

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



[issue9262] IDLE: Use tabbed shell and edit windows

2015-08-26 Thread Mark Roseman

Mark Roseman added the comment:

Have attached newTabExtension.py, which is Roger's tab extension, hacked to use 
uitabs.py instead of the UI previously built into that extension.

--
Added file: http://bugs.python.org/file40265/newTabExtension.py

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



[issue24915] Profile Guided Optimization improvements (better training, llvm support, etc)

2015-08-26 Thread Alecsandru Patrascu

Changes by Alecsandru Patrascu alecsandru.patra...@intel.com:


Removed file: http://bugs.python.org/file40263/python3.6-pgo-v04.patch

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



[issue24915] Profile Guided Optimization improvements (better training, llvm support, etc)

2015-08-26 Thread Alecsandru Patrascu

Changes by Alecsandru Patrascu alecsandru.patra...@intel.com:


Removed file: http://bugs.python.org/file40262/python2.7-pgo-v04.patch

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



[issue24934] django_v2 benchmark not working in Python 3.6

2015-08-26 Thread Brett Cannon

Brett Cannon added the comment:

LGTM on a cursory glance. Hopefully someone will have time to try the patch out 
and then commit it if everything works out.

--
stage:  - commit review

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



[issue24941] Add classproperty as builtin class

2015-08-26 Thread Erik Bray

Erik Bray added the comment:

A read-only classproperty is fairly trivial to implement in pure Python and has 
been done.

A good reason to have a classproperty implementation in CPython would be to 
support settable/deleteable classproperties.  The problem is that can't be done 
with the descriptor protocol on its own without a custom metaclass.  
classproperty would have to somehow be special-cased, perhaps in type_setattro, 
say.  I don't know if that can just be done lightly.

Otherwise I don't see the advantage of adding a classproperty type to CPython?

--
nosy: +erik.bray

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



[issue22241] strftime/strptime round trip fails even for UTC datetime object

2015-08-26 Thread Alexander Belopolsky

Changes by Alexander Belopolsky alexander.belopol...@gmail.com:


--
assignee:  - belopolsky
stage:  - needs patch
type: enhancement - behavior
versions: +Python 3.6 -Python 3.5

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



[issue4735] An error occurred during the installation of assembly

2015-08-26 Thread Jakub Czaplicki

Jakub Czaplicki added the comment:

Such issues are most likely caused by pending windows update that requires 
machine reboot. This would explain Shereef's comment in msg133158.

--
nosy: +Jakub Czaplicki

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



[issue24942] Remove domain from ipaddress.reverse_pointer property and add method

2015-08-26 Thread Lee Clemens

New submission from Lee Clemens:

To lookup info from Cymru (https://www.team-cymru.org/IP-ASN-mapping.html#dns) 
the domain needs to be changed. Although I have not personally seen any, there 
may also be cases where dropping the domain altogether would be helpful.

So I am wondering if the @property should return the 'bare' reversed address 
and a new function be added to append the version-appropriate domain as the 
default or an optional arg as a convenience?

Ref: https://bugs.python.org/issue20480

--
components: Library (Lib)
messages: 249217
nosy: leeclemens
priority: normal
severity: normal
status: open
title: Remove domain from ipaddress.reverse_pointer property and add method
versions: Python 3.5

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



[issue24942] Remove domain from ipaddress.reverse_pointer property and add method

2015-08-26 Thread Lee Clemens

Changes by Lee Clemens j...@leeclemens.net:


--
type:  - enhancement

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



[issue24788] HTTPException is derived from Exception instead of IOError

2015-08-26 Thread Pastafarianist

Pastafarianist added the comment:

My bad then.

How do we proceed with introducing a change to the standard library?

--

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



[issue23630] support multiple hosts in create_server/start_server

2015-08-26 Thread Yury Selivanov

Yury Selivanov added the comment:

Left some feedback in the code review.

I have a question about the api: so we allow to pass a set of hosts to 
create_server, but why do we have only a single port?

--

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



[issue23630] support multiple hosts in create_server/start_server

2015-08-26 Thread Yury Selivanov

Yury Selivanov added the comment:

 Here is a new patch, with modifications according to your review Victor.

Could you please generate the patch with 'hg diff', so that code review works 
with it.

--

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



[issue24933] socket.recv(size, MSG_TRUNC) returns more than size bytes

2015-08-26 Thread Andrey Wagin

Andrey Wagin added the comment:

There is the same behavior for python 3.4
 sks[1].send(basdfasdfsadfasdfsdfsadfsdfasdfsdfasdfsadfa)
42
 sks[0].recv(1, socket.MSG_PEEK | socket.MSG_TRUNC)
b'a\x00Nx\x94\x7f\x00\x00sadfasdfsdfsadfsdfasdfsdfasdfsadfa'


--
versions: +Python 3.4

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



[issue24933] socket.recv(size, MSG_TRUNC) returns more than size bytes

2015-08-26 Thread Andrey Wagin

Changes by Andrey Wagin ava...@gmail.com:


--
type:  - security

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



[issue23630] support multiple hosts in create_server/start_server

2015-08-26 Thread Yann Sionneau

Yann Sionneau added the comment:

Ah yes, sorry about that.
Here is a new patch.
However, I worked on these sources: https://github.com/python/asyncio which now 
I understand was not the correct repository, but I added a 
tests_require=netifaces in the setup.py, where can I add this dependency in 
the CPython repository architecture?
Thanks!

--
Added file: http://bugs.python.org/file40271/multibind2.patch

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



[issue5319] stdout error at interpreter shutdown fails to return OS error status

2015-08-26 Thread Robert Collins

Robert Collins added the comment:

def main():
   try:
   thing()
   except SomethingChanged:
   exit(1)
   except BinaryDiff:
   exit(2)
   except:
   exit(3)

This is the sort of pattern e.g. 'diff' has. 

Should exit(3) there become exit(1) ? exit(1) means 'succeeded and there were 
changes'. So no, 3,for this app, means 'broke entirely'.

Exiting with '1' is also poor/confusing for this app. So perhaps we should pick 
something rarely used - like 255. But anyhow the same logic applies: if an app 
signals 'error' with a different code, we shouldn't change the apps 'error' 
signal to be something else when we detect an error.

But OTOH preserving a non-zero not-error code when an error occurs is also 
wrong.

So I think, on reflection:
 1) pick an unusual code. Not 1. Not 77 (automake test skip code). Maybe 255? 
https://www.freebsd.org/cgi/man.cgi?query=sysexitssektion=3apropos=0manpath=FreeBSD+10.2-RELEASE
 defines some codes we should avoid as well.
 2) We document that python itself may cause this exit code to be used and that 
apps written in python should never use that code
 3) we use your patch as it is - on shutdown error force it to this chosen 
value.

What do you think?

--

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



[issue2786] Names in function call exception should have class names, if they're methods

2015-08-26 Thread Nick Coghlan

Nick Coghlan added the comment:

With __qualname__ being mutable, I agree that adding __code__.co_qualname 
wouldn't be a substitute for that. Instead, similar to the relationship between 
__name__ and __code__.co_name, they would start out the same, but the function 
attribute may change later (e.g. through the use of functools.wraps).

However, that also highlights why we need to use the compile time qualname in 
the traceback, rather than the runtime one: because we currently use the 
compile time name from the code object rather than the runtime name from the 
function.

A test case to demonstrate that:

 def f():
... 1/0
... 
 import functools
 @functools.wraps(f)
... def g():
... return f()
... 
 g()
Traceback (most recent call last):
  File stdin, line 1, in module
  File stdin, line 3, in g
  File stdin, line 2, in f
ZeroDivisionError: division by zero
 g.__qualname__
'f'
 g.__name__
'f'

Note that g still appears in the relevant traceback line, even though both 
__name__ and __qualname__ have been updated to refer to f. For a traceback we 
want to know where the source of the function actually lives, not where it 
claims to be from for human introspection purposes.

As far as the comparison to __module__ goes, I think that's a different case - 
we couldn't add that to the code object even if we wanted to, because the 
compiler doesn't know the module name, it only knows the file name. It's also 
possible to take an already compiled python file, move it to a different 
directory, and have the module name change due to the new location in the 
package hierarchy. __qualname__ is different as, like __name__, it's entirely 
local to the module and hence available to the compiler at compile time.

--

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



[issue2786] Names in traceback should have class names, if they're methods

2015-08-26 Thread Antoine Pitrou

Changes by Antoine Pitrou pit...@free.fr:


--
nosy: +gvanrossum

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



[issue24934] django_v2 benchmark not working in Python 3.6

2015-08-26 Thread Florin Papa

Florin Papa added the comment:

I have modified the patch to introduce django_v3 to the benchmark suite and 
deprecate django_v2 for Python 3.6 and up. In order for django_v3 to work, the 
latest django release must be present in lib/Django-1.8.

Django-1.8 is attached as a zip file because the patch would be too large if it 
included all these files. In order for the modifications to work, extract the 
archive to lib/Django-1.8 .

Thank you,
Florin

--
Added file: http://bugs.python.org/file40259/django_v3.patch

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



[issue24934] django_v2 benchmark not working in Python 3.6

2015-08-26 Thread Florin Papa

Changes by Florin Papa florin.p...@intel.com:


Added file: http://bugs.python.org/file40260/Django-1.8.zip

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



[issue2786] Names in traceback should have class names, if they're methods

2015-08-26 Thread Antoine Pitrou

Antoine Pitrou added the comment:

The reason I didn't put __qualname__ on code objects is that code objects don't 
have a __module__ either. That information, up to now, belongs on the module.

Conceptually, a code object could very well be used by multiple functions 
living in different modules. Now, in practice, I'm not sure that happens 
(except when constructing function objects on your own, which is not a terribly 
supported usecase I think).

Also, Ben makes a very point about being able to change a __qualname__. In 
particular, the user should *still* be able to change a function's __qualname__ 
even if it's technically stored on the code object.

--

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



[issue24912] The type of cached objects is mutable

2015-08-26 Thread Mark Shannon

Mark Shannon added the comment:

Eek! indeed :)

I intend to track down the cause of this on Monday, and hopefully come up with 
a fix, unless anyone beats me to it. 

Does anyone know if there is another issue for this?

--

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



[issue24294] DeprecationWarnings should be visible by default in the interactive REPL

2015-08-26 Thread Nick Coghlan

Nick Coghlan added the comment:

The only way for this change to *break* something is if:

1. They're turning warnings into errors, or are otherwise sensitive to a 
deprecation warning being emitted
2. They're running code programmatically by way of an interactive REPL path

I think we're far more likely to break something else messing about with TTY 
detection, than we are keeping things as simple as we can and saying that if 
folks are running code as if they're a human rather than like a computer, then 
they're going to get the same deprecation warnings we want a human to see. *If* 
we get significant bug reports about that during the 3.6 alpha/beta cycle, 
*then* we can potentially consider limiting it to cases with an actual TTY. I 
just don't want us to borrow trouble and make this unnecessarily hard to test 
in the process.

--

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



[issue2786] Names in function call exception should have class names, if they're methods

2015-08-26 Thread Nick Coghlan

Nick Coghlan added the comment:

Hmm, I'd made the same mistake Martin did - I was looking at the tracebacks 
moreso than at the exception message itself. Looking at the argument unpacking 
exception message in the context of the test case above, that also uses 
__code__.co_name rather than the runtime function name:

 g(1)
Traceback (most recent call last):
  File stdin, line 1, in module
TypeError: g() takes 0 positional arguments but 1 was given

In this case though, I think that's arguably a problem, as we probably want 
error messages (unlike tracebacks) to include the intended for human 
consumption name, but they currently don't, they expose the name of the 
wrapper function if it's actually constraining its arguments rather than 
passing them through for subsequent validation:

 def make_wrapper(f):
... @functools.wraps(f)
... def wrapper():
... return f()
... return wrapper
... 
 @make_wrapper
... def g():
... return f()
... 
 g(1)
Traceback (most recent call last):
  File stdin, line 1, in module
TypeError: wrapper() takes 0 positional arguments but 1 was given

That makes me more inclined towards a solution like Daniil's patch, but the 
growing signature of PyEval_Code* still bothers me. Perhaps we could collect 
the various runtime state arguments up into a PyEvalScope struct and make the 
new API PyEval_EvalCodeInScope(PyObject *code, PyObject *scope)?

--

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



[issue5319] stdout error at interpreter shutdown fails to return OS error status

2015-08-26 Thread Martin Panter

Martin Panter added the comment:

Thanks for the hints Robert. I will definitely add that defs entry.

I’m a bit unsure about preserving an existing non-zero exit status. It seems a 
slightly more complicated and unexpected way of do it to me. But I cannot 
remember why I was originally interested in this issue. Do you have a use case 
where keeping the exit status  1 would be good?

Also need to add some entries to What’s New.

--

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



[issue5319] stdout error at interpreter shutdown fails to return OS error status

2015-08-26 Thread Martin Panter

Martin Panter added the comment:

I guess I like setting the status to 1 because it matches the status already 
used by the default exception handling, the value when you raise 
SystemExit(error message), and the value used for most internal errors. 
However I did discover that the exit status is 2 if you give Python wrong CLI 
arguments or there is an OS error opening a script file.

I’m still rather unsure, only weakly in favour of my original proposal. Maybe 
see if anyone else has an opinion?

--

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



[issue2786] Names in function call exception should have class names, if they're methods

2015-08-26 Thread Martin Panter

Martin Panter added the comment:

Note to self: this is about changing the name in an exception message, not in 
the back-trace of call sites that triggered an exception :)

--
title: Names in traceback should have class names, if they're methods - Names 
in function call exception should have class names, if they're methods

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



[issue24913] deque.index() overruns deque boundary

2015-08-26 Thread Raymond Hettinger

Changes by Raymond Hettinger raymond.hettin...@gmail.com:


Added file: http://bugs.python.org/file40261/fix_deque_overrun2.diff

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



[issue5319] stdout error at interpreter shutdown fails to return OS error status

2015-08-26 Thread Robert Collins

Robert Collins added the comment:

Right. So I think one could also propose that the default exception handling 
should also change to this new number, but it is a different situation - 
programs don't conflict with that - they allow it to bubble up, but this 
situation is outside its control.

CLI handling of Python itself is clearly outside both situations and there's no 
need to reevaluate it now.

--

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



[issue24294] DeprecationWarnings should be visible by default in the interactive REPL

2015-08-26 Thread R. David Murray

R. David Murray added the comment:

Matthias: just print it and let the doctest pass.  That's consistent with how 
unittest works (unless warnings have been turned into errors, in which case it 
should fail, but I don't think you have to do anything to make that happen).

Nick: OK.  It is true that we aren't going to break anything if we get this 
wrong, just mildly annoy people :)

--

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



[issue24940] RotatingFileHandler uses tell in non-binary mode to determine size of the file in bytes

2015-08-26 Thread R. David Murray

Changes by R. David Murray rdmur...@bitdance.com:


--
nosy: +vinay.sajip

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



[issue24920] shutil.get_terminal_size throws AttributeError

2015-08-26 Thread R. David Murray

R. David Murray added the comment:

I think checking for None would be better.  Catching Exception might mask other 
errors that the user would want to know about.

--
nosy: +r.david.murray

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



[issue24912] The type of cached objects is mutable

2015-08-26 Thread Larry Hastings

Larry Hastings added the comment:

This exciting new feature was added in checkin c0d25de5919e addressing issue 
#22986.  Perhaps the core devs who added it would like to chime in.

--
nosy: +benjamin.peterson, njs

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24912
___
___
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-08-26 Thread Cyd Haselton

Cyd Haselton added the comment:

UPDATE:
Still working on the test_hash issue; not making much progress

QUESTION
Does gdb have to be configured with the --with-python switch in order to debug 
the python binary correctly?

--

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



[issue24915] Profile Guided Optimization improvements (better training, llvm support, etc)

2015-08-26 Thread Alecsandru Patrascu

Changes by Alecsandru Patrascu alecsandru.patra...@intel.com:


Added file: http://bugs.python.org/file40262/python2.7-pgo-v04.patch

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



[issue24915] Profile Guided Optimization improvements (better training, llvm support, etc)

2015-08-26 Thread Alecsandru Patrascu

Alecsandru Patrascu added the comment:

I modified the patches with clang support.

Also, I added an important check for the architecture on which PGO is running. 
Our proposal targets x86 platforms, since our measurements are made only on x86 
hardware.

--

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



[issue24913] deque.index() overruns deque boundary

2015-08-26 Thread Larry Hastings

Larry Hastings added the comment:

Please create a pull request at your earliest convenience.

--
priority: high - release blocker

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



[issue24941] classproperty

2015-08-26 Thread Yury Selivanov

Changes by Yury Selivanov yseliva...@gmail.com:


--
components: +Interpreter Core
nosy: +yselivanov
stage:  - needs patch
type:  - enhancement
versions: +Python 3.6

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



[issue24915] Profile Guided Optimization improvements (better training, llvm support, etc)

2015-08-26 Thread Alecsandru Patrascu

Changes by Alecsandru Patrascu alecsandru.patra...@intel.com:


Added file: http://bugs.python.org/file40263/python3.6-pgo-v04.patch

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



[issue2786] Names in traceback should have class names, if they're methods

2015-08-26 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Correcting myself:

 That information, up to now, belongs on the module.

on the function, of course.

--

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



[issue24913] deque.index() overruns deque boundary

2015-08-26 Thread Roundup Robot

Roundup Robot added the comment:

New changeset ae8ec66adc7f by Raymond Hettinger in branch '3.5':
Issue #24913: Fix overrun error in deque.index().
https://hg.python.org/cpython/rev/ae8ec66adc7f

--
nosy: +python-dev

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



[issue24913] deque.index() overruns deque boundary

2015-08-26 Thread Raymond Hettinger

Raymond Hettinger added the comment:

 Please create a pull request at your earliest convenience.

I'm not sure what that entails.  Can you just apply ae8ec66adc7f and take it 
from here?

--

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



[issue24913] deque.index() overruns deque boundary

2015-08-26 Thread Larry Hastings

Larry Hastings added the comment:

https://docs.python.org/devguide/devcycle.html#release-candidate-rc

https://mail.python.org/pipermail/python-dev/2015-August/141167.html

--

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



[issue24941] classproperty

2015-08-26 Thread Barry A. Warsaw

Changes by Barry A. Warsaw ba...@python.org:


--
nosy: +barry

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



[issue23630] support multiple hosts in create_server/start_server

2015-08-26 Thread Yann Sionneau

Yann Sionneau added the comment:

Here is a new patch, with modifications according to your review Victor.
Thanks!

--
Added file: http://bugs.python.org/file40270/multibind2.patch

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



[issue23630] support multiple hosts in create_server/start_server

2015-08-26 Thread Yann Sionneau

Changes by Yann Sionneau y...@m-labs.hk:


Removed file: http://bugs.python.org/file40270/multibind2.patch

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



[issue24941] Add classproperty as builtin class

2015-08-26 Thread Terry J. Reedy

Changes by Terry J. Reedy tjre...@udel.edu:


--
stage: needs patch - test needed
title: classproperty - Add classproperty as builtin class

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



[issue24941] Add classproperty as builtin class

2015-08-26 Thread Ryan Hiebert

Changes by Ryan Hiebert r...@ryanhiebert.com:


--
nosy: +ryanhiebert

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



[issue3548] subprocess.pipe function

2015-08-26 Thread Matheus Vieira Portela

Matheus Vieira Portela added the comment:

Let me check whether I understood you suggestion...

What you are saying is that it is already possible to pipeline shell commands 
through subprocess, such as in the following line?

subprocess.call('ls -l | grep Music', shell=True)

However, this requires the command to be executed in a shell environment. 
Hence, it would be a good idea to extend it to non-shell command execution. Is 
this right?

--

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



[issue24790] Idle: improve stack viewer

2015-08-26 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 14ac7deba91f by Terry Jan Reedy in branch '2.7':
Issue #24790: Restore unused function.
https://hg.python.org/cpython/rev/14ac7deba91f

New changeset eec5e81b38d1 by Terry Jan Reedy in branch '3.4':
Issue #24790: Restore unused function.
https://hg.python.org/cpython/rev/eec5e81b38d1

--

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



[issue24782] Merge 'configure extensions' into main IDLE config dialog

2015-08-26 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 919cee158a89 by Terry Jan Reedy in branch '2.7':
Issue #24782: In Idle extension config dialog, replace tabs with sorted list.
https://hg.python.org/cpython/rev/919cee158a89

New changeset ce13593e378c by Terry Jan Reedy in branch '3.4':
Issue #24782: In Idle extension config dialog, replace tabs with sorted list.
https://hg.python.org/cpython/rev/ce13593e378c

--
nosy: +python-dev

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