[issue16770] Selection in IDLE often skips first character

2012-12-25 Thread Ned Deily

Ned Deily added the comment:

Sorry, I'm not able to reproduce the behavior you report, either using a 
current OS X 10.8.2 system with python.org 2.7.3 and ActiveTcl 8.5.13 or on a 
virtual 10.6.8 system with an 8.5.12 ActiveTcl.  That said, such behavior would 
almost certainly be due to behavior within Tk or OS X rather than IDLE or 
Python itself.  It might also depend on what font and font size you are using 
and on OS X extension programs you might have installed.  Or on one or more 
System Preferences settings like input method.  Since there are so many 
variables, it can be very difficult to isolate exactly what difference is 
significant in such cases.

Just to be sure, exactly which version of Tk 8.5 are you using with this IDLE?  
Assuming you have a version of Xcode command line tools installed, type the 
following commands in the IDLE shell window:

import Tkinter, subprocess, _tkinter
Tkinter.Tcl().eval('info patchlevel')
print(subprocess.check_output(["otool", "-L", _tkinter.__file__]))

--
assignee: ronaldoussoren -> ned.deily
nosy: +ned.deily

___
Python tracker 

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



[issue16773] int() half-accepts UserString

2012-12-25 Thread Ed Campbell

Changes by Ed Campbell :


--
nosy: +esc24

___
Python tracker 

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



[issue16775] Add test coverage for os.removedirs()

2012-12-25 Thread Andrew Svetlov

Changes by Andrew Svetlov :


--
components: Library (Lib)
keywords: easy
nosy: asvetlov
priority: normal
severity: normal
status: open
title: Add test coverage for os.removedirs()
versions: Python 3.2, Python 3.3, Python 3.4

___
Python tracker 

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



[issue16775] Add test coverage for os.removedirs()

2012-12-25 Thread Roundup Robot

New submission from Roundup Robot:

New changeset c3acc5ead883 by Andrew Svetlov in branch '3.2':
Add test coverage for os.removedirs (#16775)
http://hg.python.org/cpython/rev/c3acc5ead883

New changeset dbe9413686b3 by Andrew Svetlov in branch '3.3':
Add test coverage for os.removedirs (#16775)
http://hg.python.org/cpython/rev/dbe9413686b3

New changeset 60240ce64789 by Andrew Svetlov in branch 'default':
Add test coverage for os.removedirs (#16775)
http://hg.python.org/cpython/rev/60240ce64789

--
nosy: +python-dev

___
Python tracker 

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



[issue16775] Add test coverage for os.removedirs()

2012-12-25 Thread Andrew Svetlov

Changes by Andrew Svetlov :


--
resolution:  -> fixed
stage:  -> committed/rejected

___
Python tracker 

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



[issue16775] Add test coverage for os.removedirs()

2012-12-25 Thread Andrew Svetlov

Changes by Andrew Svetlov :


--
status: open -> closed

___
Python tracker 

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



[issue16644] Wrong code in ContextManagerTests.test_invalid_args() in test_subprocess.py

2012-12-25 Thread Andrew Svetlov

Changes by Andrew Svetlov :


--
nosy: +asvetlov

___
Python tracker 

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



[issue16776] Document PyCFunction_New and PyCFunction_NewEx functions

2012-12-25 Thread Andrew Svetlov

New submission from Andrew Svetlov:

c-api docs has no documentation for those public API functions.

--
assignee: docs@python
components: Documentation
keywords: easy
messages: 178115
nosy: asvetlov, docs@python
priority: normal
severity: normal
status: open
title: Document PyCFunction_New and PyCFunction_NewEx functions
type: enhancement
versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4

___
Python tracker 

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



[issue15422] Get rid of PyCFunction_New macro

2012-12-25 Thread Andrew Svetlov

Andrew Svetlov added the comment:

#16776 created for documenting PyCFunction_New/PyCFunction_NewEx

--

___
Python tracker 

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



[issue15422] Get rid of PyCFunction_New macro

2012-12-25 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 3a86a3f1d89a by Andrew Svetlov in branch 'default':
Issue #15422: get rid of PyCFunction_New macro
http://hg.python.org/cpython/rev/3a86a3f1d89a

--
nosy: +python-dev

___
Python tracker 

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



[issue15422] Get rid of PyCFunction_New macro

2012-12-25 Thread Andrew Svetlov

Changes by Andrew Svetlov :


--
resolution:  -> fixed
stage: patch review -> committed/rejected
status: open -> closed

___
Python tracker 

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



[issue16218] Python launcher does not support unicode characters

2012-12-25 Thread Andrew Svetlov

Andrew Svetlov added the comment:

Victor, are you done all work for the issue?
Can it be closed?

--

___
Python tracker 

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



[issue16765] Superfluous import in cgi module

2012-12-25 Thread Roundup Robot

Roundup Robot added the comment:

New changeset f77648af7ff0 by Ezio Melotti in branch '2.7':
#16765: remove unused import.
http://hg.python.org/cpython/rev/f77648af7ff0

--
nosy: +python-dev

___
Python tracker 

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



[issue16765] Superfluous import in cgi module

2012-12-25 Thread Ezio Melotti

Ezio Melotti added the comment:

Fixed, thanks for the report!

> I wasn't sure about the patch format, so I added a unified diff.

The best way is to get a clone of CPython and use "hg diff > patch.diff".  You 
can find more information about it in the devguide.

--
assignee:  -> ezio.melotti
resolution:  -> fixed
stage: needs patch -> committed/rejected
status: open -> closed

___
Python tracker 

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



[issue16748] Ensure test discovery doesn't break for modules testing C and Python implementations

2012-12-25 Thread Ezio Melotti

Changes by Ezio Melotti :


--
nosy: +ezio.melotti

___
Python tracker 

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



[issue16666] docs wrongly imply socket.getaddrinfo takes keyword arguments in 2.x

2012-12-25 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 1e5e7064e872 by Ezio Melotti in branch '2.7':
#1: document default values for socket.getaddrinfo in the text to clarify 
that it doesn't accept keyword args.
http://hg.python.org/cpython/rev/1e5e7064e872

--
nosy: +python-dev

___
Python tracker 

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



[issue16666] docs wrongly imply socket.getaddrinfo takes keyword arguments in 2.x

2012-12-25 Thread Ezio Melotti

Ezio Melotti added the comment:

Fixed, thanks for the report!

--
assignee: docs@python -> ezio.melotti
resolution:  -> fixed
stage:  -> committed/rejected
status: open -> closed
type:  -> enhancement

___
Python tracker 

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



[issue879399] socket line buffering

2012-12-25 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 5be3fa83d436 by Kristján Valur Jónsson in branch '2.7':
issue #879399
http://hg.python.org/cpython/rev/5be3fa83d436

--
nosy: +python-dev

___
Python tracker 

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



[issue879399] socket line buffering

2012-12-25 Thread Kristján Valur Jónsson

Changes by Kristján Valur Jónsson :


--
resolution:  -> fixed

___
Python tracker 

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



[issue14574] SocketServer doesn't handle client disconnects properly

2012-12-25 Thread Kristján Valur Jónsson

Kristján Valur Jónsson added the comment:

So, should I commit this?  The change is really trivial.

--

___
Python tracker 

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



[issue16765] Superfluous import in cgi module

2012-12-25 Thread Michiel Holtkamp

Michiel Holtkamp added the comment:

Thanks, I will do that next time. Happy holidays everyone!

--

___
Python tracker 

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



[issue16742] PyOS_Readline drops GIL and calls PyOS_StdioReadline, which isn't thread safe

2012-12-25 Thread Kristján Valur Jónsson

Changes by Kristján Valur Jónsson :


--
nosy: +kristjan.jonsson

___
Python tracker 

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



[issue879399] socket line buffering

2012-12-25 Thread Andrew Svetlov

Changes by Andrew Svetlov :


--
stage: patch review -> committed/rejected
status: open -> closed

___
Python tracker 

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



[issue16677] Hard to find operator precedence in Lang Ref.

2012-12-25 Thread Roundup Robot

Roundup Robot added the comment:

New changeset a0f6c68ea12f by Ezio Melotti in branch '2.7':
#16677: rename section header and fix markup.
http://hg.python.org/cpython/rev/a0f6c68ea12f

New changeset 2eab4f7b7280 by Ezio Melotti in branch '3.2':
#16677: rename section header and fix markup.
http://hg.python.org/cpython/rev/2eab4f7b7280

New changeset 356af3fc6471 by Ezio Melotti in branch '3.3':
#16677: merge with 3.2.
http://hg.python.org/cpython/rev/356af3fc6471

New changeset 9a65501a71e6 by Ezio Melotti in branch 'default':
#16677: merge with 3.3.
http://hg.python.org/cpython/rev/9a65501a71e6

--
nosy: +python-dev

___
Python tracker 

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



[issue16777] "Evaluation order" doc section is wrong about dicts

2012-12-25 Thread Ezio Melotti

New submission from Ezio Melotti:

http://docs.python.org/2/reference/expressions.html#evaluation-order
says that the dicts are evaluated in this order:
  {expr1: expr2, expr3: expr4}

however each value is evaluated before the respective key:
def f(x):
  print(x)
  return x

{f('k1'): f('v1'), f('k2'): f('v2')}

v1
k1
v2
k2
{'k1': 'v1', 'k2': 'v2'}

--
assignee: ezio.melotti
components: Documentation
messages: 178127
nosy: chris.jerdonek, ezio.melotti
priority: normal
severity: normal
stage: needs patch
status: open
title: "Evaluation order" doc section is wrong about dicts
type: enhancement
versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4

___
Python tracker 

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



[issue16677] Hard to find operator precedence in Lang Ref.

2012-12-25 Thread Ezio Melotti

Ezio Melotti added the comment:

I think it's better to keep the two sections separate, so I just changed the 
title from "Summary" to "Operator precedence".
While I was at it I also fixed the markup in a few places in the section and 
noticed a mistake in the "Evaluation order" (reported in #16777).
Regarding the index entries I don't see anything wrong with the current ones, 
but I'm not sure how they are supposed to work and I generally find Google more 
reliable than the Sphinx search.

--
assignee: docs@python -> ezio.melotti
resolution:  -> fixed
stage: needs patch -> committed/rejected
status: open -> closed

___
Python tracker 

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



[issue16777] "Evaluation order" doc section is wrong about dicts

2012-12-25 Thread Ezio Melotti

Ezio Melotti added the comment:

This has already been reported in #11205.

--
resolution:  -> duplicate
stage: needs patch -> committed/rejected
status: open -> closed
superseder:  -> Evaluation order of dictionary display is different from 
reference manual.

___
Python tracker 

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



[issue16715] Get rid of IOError. Use OSError instead

2012-12-25 Thread Andrew Svetlov

Andrew Svetlov added the comment:

Fixed.

--
resolution:  -> fixed
stage:  -> committed/rejected
status: open -> closed

___
Python tracker 

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



[issue16715] Get rid of IOError. Use OSError instead

2012-12-25 Thread Roundup Robot

New submission from Roundup Robot:

New changeset 7d69d04522e3 by Andrew Svetlov in branch 'default':
Replace IOError with OSError (#16715)
http://hg.python.org/cpython/rev/7d69d04522e3

--
nosy: +python-dev

___
Python tracker 

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



[issue15422] Get rid of PyCFunction_New macro

2012-12-25 Thread Georg Brandl

Georg Brandl added the comment:

I don't think this is the only use of this particular idiom; I recall it is 
used every time we "amend" a function with an _Ex version. 

Why was this change necessary?

--
nosy: +georg.brandl, pitrou

___
Python tracker 

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



[issue11205] Evaluation order of dictionary display is different from reference manual.

2012-12-25 Thread Ezio Melotti

Ezio Melotti added the comment:

I came across the same problem in #16777.

IMHO the current behavior is better, and the documentation should be fixed 
instead, for the following reasons:
 1) it's consistent with assignments, where the RHS is evaluated before the LHS 
(see also msg128500).  This should also be the behavior of the dict(k=v) 
syntax, and what I personally expect;
 2) changing it back is not backward-compatible with any code written during 
the last 10 years;
 3) keeping the current behavior and fixing the docs is simpler than fixing the 
code to match the docs;

In addition, I would avoid writing code with side-effects in a dict literal, 
even if the order was documented and guaranteed.  The fact that we don't see 
many reports about this seems to indicate that people don't write such code, or 
if they do they rely on the current order.

--
nosy: +ezio.melotti, gvanrossum
type:  -> behavior

___
Python tracker 

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



[issue15422] Get rid of PyCFunction_New macro

2012-12-25 Thread Georg Brandl

Georg Brandl added the comment:

BTW it would be good if you could have at least one other developer look at 
issues like this and get a "LGTM" vote before committing all by yourself.

--

___
Python tracker 

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



[issue16772] int() accepts float number base

2012-12-25 Thread Georg Brandl

Georg Brandl added the comment:

Can you give examples?  I'm unable to guess what exactly you are reporting from 
quick experiments.

--
nosy: +georg.brandl

___
Python tracker 

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



[issue16772] int() accepts float number base

2012-12-25 Thread Ezio Melotti

Ezio Melotti added the comment:

2.7$ ./python -c 'int("5", 12.5)'
Traceback (most recent call last):
  File "", line 1, in 
TypeError: integer argument expected, got float
3.2$ ./python -c 'int("5", 12.5)'
3.2$

--

___
Python tracker 

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



[issue16772] int() accepts float number base

2012-12-25 Thread Georg Brandl

Georg Brandl added the comment:

Ah.  I was thinking of things like ``int('1.2', 10)``, not the base itself 
being a float.

In this case, looks like a bug to me.

--

___
Python tracker 

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



[issue9022] TypeError in wsgiref.handlers when using CGIHandler

2012-12-25 Thread Senthil Kumaran

Changes by Senthil Kumaran :


--
resolution:  -> duplicate
stage:  -> committed/rejected
status: open -> closed
superseder:  -> Add fixups for encoding problems to wsgiref

___
Python tracker 

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



[issue15005] trace corrupts return result on chained execution

2012-12-25 Thread anatoly techtonik

anatoly techtonik added the comment:

The trace module helps to gather program flow statistics and see the 
differences in patterns for large systems when program evolves. In particular, 
components ported to Python 3 should still behave the same way on Python 2.

Right now the behavior under the trace is broken.

--

___
Python tracker 

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



[issue15422] Get rid of PyCFunction_New macro

2012-12-25 Thread Andrew Svetlov

Andrew Svetlov added the comment:

1. Yes, you right. We use this idiom also for PyAST_CompileEx, PyErr_WarnEx and 
bunch of functions in ./Include/pythonrun.h
2. Patch is very simple and was available for review almost 3 months.
I assumed that developers looked on this and had no objections.
Sorry if I was wrong.
3. The change is not required. But, I think, it can be helpful to use direct 
function calls instead of macros, especially for functions which are part of 
Stable API.

--

___
Python tracker 

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



[issue16748] Ensure test discovery doesn't break for modules testing C and Python implementations

2012-12-25 Thread Stefan Krah

Stefan Krah added the comment:

Perhaps I misunderstood something, but test_decimal.py *is* using the
exact idiom from PEP-399 and it works. Why do you want to "fix" the
usage of this idiom?

--
nosy: +skrah

___
Python tracker 

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



[issue16709] unittest discover order is filesystem specific - hard to reproduce

2012-12-25 Thread Ezio Melotti

Ezio Melotti added the comment:

Should this be considered a new feature or should it be applied to older 
versions as well?

--
keywords: +easy
stage:  -> needs patch
type:  -> enhancement

___
Python tracker 

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



[issue16684] Unicode property value abbreviated names and long names

2012-12-25 Thread Ezio Melotti

Ezio Melotti added the comment:

The script should probably be integrated in Tools/unicode/makeunicodedata.py.

--

___
Python tracker 

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



[issue16770] Selection in IDLE often skips first character

2012-12-25 Thread Irwin Jungreis

Irwin Jungreis added the comment:

The output of the commands you suggested is below. I've attached a short video 
showing the problem (listen for the mouse clicks). I also tried with a variety 
of fonts (proportional and fixed) and font sizes, both bold and not bold, and 
all had the same problem. (Set a large font size to make the problem easier to 
reproduce.) I don't think I have changed any settings in Universal Access, and 
can't think of any extensions that are related. I probably have changed Mouse 
settings like Tracking Speed, but since the problem occurs using the mouse and 
the trackpad it seems unlikely to be due to settings in either.

Thanks for your attention.

>>> import Tkinter, subprocess, _tkinter
>>> Tkinter.Tcl().eval('info patchlevel')
'8.5.11'
>>> print(subprocess.check_output(["otool", "-L", _tkinter.__file__]))
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_tkinter.so:
/Library/Frameworks/Tcl.framework/Versions/8.5/Tcl (compatibility 
version 8.5.0, current version 8.5.11)
/Library/Frameworks/Tk.framework/Versions/8.5/Tk (compatibility version 
8.5.0, current version 8.5.11)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current 
version 125.2.0)

--
Added file: http://bugs.python.org/file28431/IMG_1194.MOV

___
Python tracker 

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



[issue16760] Get rid of MatchObject in regex HOWTO

2012-12-25 Thread Roundup Robot

Roundup Robot added the comment:

New changeset b11f98872c0f by Ezio Melotti in branch '2.7':
#16760: use ref:`match-objects` instead of :class:`MatchObject`.
http://hg.python.org/cpython/rev/b11f98872c0f

New changeset 7c4ef8faeb4a by Ezio Melotti in branch '3.2':
#16760: use ref:`match-objects` instead of :class:`MatchObject`.
http://hg.python.org/cpython/rev/7c4ef8faeb4a

New changeset 4ba1e90e0119 by Ezio Melotti in branch '3.3':
#16760: merge with 3.2.
http://hg.python.org/cpython/rev/4ba1e90e0119

New changeset f684dd2d by Ezio Melotti in branch 'default':
#16760: merge with 3.3.
http://hg.python.org/cpython/rev/f684dd2d

--
nosy: +python-dev

___
Python tracker 

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



[issue16778] Logger.findCaller needs to be smarter

2012-12-25 Thread Glynn Clements

New submission from Glynn Clements:

The current behaviour of logging.Logger.findCaller() makes it awkward to add 
custom logging interfaces.

E.g. suppose that you define a custom logging level (NOTICE) then add a 
notice() function (analogous to logging.info() etc), the resulting LogRecord 
structure will have pathname, filename, module, funcName and lineno members 
which refer to the notice() function itself, rather than to its caller.

This can be hacked around e.g. by using code.compile_command to lie about the 
source filename, but that's ugly and highly unintuitive.

--
components: Library (Lib)
messages: 178145
nosy: glynnc
priority: normal
severity: normal
status: open
title: Logger.findCaller needs to be smarter
type: enhancement
versions: Python 2.7

___
Python tracker 

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



[issue16760] Get rid of MatchObject in regex HOWTO

2012-12-25 Thread Ezio Melotti

Ezio Melotti added the comment:

Fixed, thanks for the report!

--
assignee: docs@python -> ezio.melotti
resolution:  -> fixed
stage:  -> committed/rejected
status: open -> closed

___
Python tracker 

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



[issue16778] Logger.findCaller needs to be smarter

2012-12-25 Thread R. David Murray

Changes by R. David Murray :


--
nosy: +vinay.sajip

___
Python tracker 

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



[issue16772] int() accepts float number base

2012-12-25 Thread Mark Dickinson

Mark Dickinson added the comment:

I agree that this should be fixed.

--
nosy: +mark.dickinson

___
Python tracker 

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



[issue16766] small disadvantage of htmlentitydefs

2012-12-25 Thread Ezio Melotti

Ezio Melotti added the comment:

That's because ' is not a valid character reference in HTML 4, but only in 
HTML5/XML/XHTML.  A mapping that contains a list of HTML 5 entities has been 
added from Python 3.3.  Modules like HTMLParser also include ' among the 
entities while parsing.

--
assignee:  -> ezio.melotti
resolution:  -> invalid
stage:  -> committed/rejected
status: open -> closed
type:  -> behavior

___
Python tracker 

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



[issue16760] Get rid of MatchObject in regex HOWTO

2012-12-25 Thread Andrew Svetlov

Andrew Svetlov added the comment:

We need to rename MatchObject to match object than (see #16443)

--

___
Python tracker 

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



[issue16760] Get rid of MatchObject in regex HOWTO

2012-12-25 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 3bee420d400f by Andrew Svetlov in branch '3.2':
rename MathcObject to match object in doctrings for re module (#16760)
http://hg.python.org/cpython/rev/3bee420d400f

New changeset 73b24ee09e0a by Andrew Svetlov in branch '3.3':
rename MathcObject to match object in doctrings for re module (#16760)
http://hg.python.org/cpython/rev/73b24ee09e0a

New changeset 8ebbab768e1b by Andrew Svetlov in branch 'default':
rename MathcObject to match object in doctrings for re module (#16760)
http://hg.python.org/cpython/rev/8ebbab768e1b

--

___
Python tracker 

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



[issue16760] Get rid of MatchObject in regex HOWTO

2012-12-25 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 6ca8f965fd65 by Andrew Svetlov in branch '2.7':
rename MathcObject to match object in doctrings for re module (#16760)
http://hg.python.org/cpython/rev/6ca8f965fd65

--

___
Python tracker 

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



[issue16443] Add docstrings to regular expression match objects

2012-12-25 Thread Andrew Svetlov

Andrew Svetlov added the comment:

Fixed in #16760

--

___
Python tracker 

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



[issue16760] Get rid of MatchObject in regex HOWTO

2012-12-25 Thread Andrew Svetlov

Andrew Svetlov added the comment:

Done

--

___
Python tracker 

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



[issue16760] Get rid of MatchObject in regex HOWTO

2012-12-25 Thread Ezio Melotti

Ezio Melotti added the comment:

Thanks!

--

___
Python tracker 

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



[issue14468] Update cloning guidelines in devguide

2012-12-25 Thread Ezio Melotti

Ezio Melotti added the comment:

"hg graft" should also be mentioned.  I now use "hg graft 2.7" instead of "hg 
export 2.7 | hg import -" to copy changeset from 2.7 to 3.2 (and then merge on 
3.3/3.x).

--

___
Python tracker 

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



[issue16748] Ensure test discovery doesn't break for modules testing C and Python implementations

2012-12-25 Thread Stefan Krah

Stefan Krah added the comment:

I finally understood the issue. So this does not work:

./python -m unittest discover Lib/test/ 'test_dec*.py'

Neither does this:

./python -m unittest discover Lib/test/ 'test_multipro*.py'

And this fails, too (still hanging):

./python -m unittest discover Lib/test/ 'test_thread*.py'

I'm not sure why tests in the Python test suite should be discoverable.
If I read this ...

http://www.voidspace.org.uk/python/weblog/arch_d7_2009_05_30.shtml

..., the feature is for projects that don't have a test collection machinery.

--

___
Python tracker 

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



[issue15422] Get rid of PyCFunction_New macro

2012-12-25 Thread Georg Brandl

Georg Brandl added the comment:

There is no silent acceptance.  No comment means that nobody reviewed it, which 
is no surprise given the number of open issues :)

--

___
Python tracker 

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



[issue15422] Get rid of PyCFunction_New macro

2012-12-25 Thread Georg Brandl

Georg Brandl added the comment:

So given #1 and #3, I would recommend reverting the part of the patch that 
removes the macro.  Changing caller sites in CPython sources is fine.

--

___
Python tracker 

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



[issue15422] Get rid of PyCFunction_New macro

2012-12-25 Thread Andrew Svetlov

Changes by Andrew Svetlov :


--
resolution: fixed -> 
stage: committed/rejected -> 
status: closed -> open

___
Python tracker 

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



[issue16709] unittest discover order is filesystem specific - hard to reproduce

2012-12-25 Thread Michael Foord

Michael Foord added the comment:

It smells like a feature to me (it isn't a direct "bug" fix anyway). It can be 
applied to earlier versions of Python through a new unittest2 release.

--
versions: +Python 3.5 -Python 2.7, Python 3.2, Python 3.3

___
Python tracker 

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



[issue16779] Fix compiler warning when building extension modules on 64-bit Windows

2012-12-25 Thread Jeremy Kloth

New submission from Jeremy Kloth:

The 64-bit linker doesn't mangle the dllexport'ed module init function (from 
PyMODINIT_FUNC) so it causes an exported name conflict.  We cannot just remove 
that name from export_symbols as the module may not have used PyMODINIT_FUNC on 
its init function.

The attached patch "fixes" the problem by suppressing the warning.

I personally would prefer the "pure" approach by assuming that the module 
initialization function would be required to be declared by PyMODINIT_FUNC and 
therefore the symbol would not need to be exported on the command line.

--
assignee: eric.araujo
components: Build, Distutils
files: msvc9compiler.diff
keywords: patch
messages: 178160
nosy: eric.araujo, jkloth, tarek
priority: normal
severity: normal
status: open
title: Fix compiler warning when building extension modules on 64-bit Windows
versions: Python 3.3, Python 3.4, Python 3.5
Added file: http://bugs.python.org/file28432/msvc9compiler.diff

___
Python tracker 

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



[issue14574] SocketServer doesn't handle client disconnects properly

2012-12-25 Thread Charles-François Natali

Charles-François Natali added the comment:

> So, should I commit this?  The change is really trivial.

LGTM.
This should be applied to 2.7.

--

___
Python tracker 

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



[issue16773] int() half-accepts UserString

2012-12-25 Thread Mark Dickinson

Changes by Mark Dickinson :


--
nosy: +mark.dickinson

___
Python tracker 

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



[issue16772] int() accepts float number base

2012-12-25 Thread Roundup Robot

Roundup Robot added the comment:

New changeset e510e028c486 by Gregory P. Smith in branch 'default':
Fixes issue #16772: int() constructor second argument (base) must be an int.
http://hg.python.org/cpython/rev/e510e028c486

--
nosy: +python-dev

___
Python tracker 

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



[issue16772] int() accepts float number base

2012-12-25 Thread Gregory P. Smith

Gregory P. Smith added the comment:

If someone thinks this should go into 3.2 and 3.3 they're welcome to do it; no 
objections from me.  (The behavior was unintentional and thus a bug, but it is 
still a minor behavior change)

--
nosy: +gregory.p.smith

___
Python tracker 

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



[issue16774] Additional recipes for itertools docs

2012-12-25 Thread Alexey Kachayev

Alexey Kachayev added the comment:

Added:
* takelast
* droplast

--
Added file: http://bugs.python.org/file28433/itertools.doc.v2.diff

___
Python tracker 

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



[issue16780] fail to compile python in msys with mingw

2012-12-25 Thread Lee Long

New submission from Lee Long:

Hi all, 
  For some reason, I have to develop my software with mingw under windows. 
First of all, I need python installed in the msys but I try all my ways to 
install 2.6.x, 2.7.x, 3.2.x and 3.3.0, no one succeed. I search all issues and 
google the related information online, it seems that it doesn't support python 
on mingw? But what stranger is there are a few posts here with the patch 
presented, so is there any way to make the source compiled in mingw? I try all 
the available patches but again, it didn't solve the problem. Here are the 
error messages when I try to compile the 3.3.0 in mingw, 

  ./configure  ---> no problem
  make ---> errors shown below
  Objects/exceptions.c:2527:5: error: 'EALREADY' undeclared (first use in this 
function)
  Objects/exceptions.c:2527:5: note: each undeclared identifier is reported 
only once for each function it appears in
  Objects/exceptions.c:2528:5: error: 'EINPROGRESS' undeclared (first use in 
this function)
  Objects/exceptions.c:2529:5: error: 'EWOULDBLOCK' undeclared (first use in 
this function)
  Objects/exceptions.c:2532:5: error: 'ESHUTDOWN' undeclared (first use in this 
function)
  Objects/exceptions.c:2536:5: error: 'ECONNABORTED' undeclared (first use in 
this function)
  Objects/exceptions.c:2538:5: error: 'ECONNREFUSED' undeclared (first use in 
this function)
  Objects/exceptions.c:2540:5: error: 'ECONNRESET' undeclared (first use in 
this function)
  Objects/exceptions.c:2557:5: error: 'ETIMEDOUT' undeclared (first use in this 
function)
  make: *** [Objects/exceptions.o] Error 1

I've been working on these for two days, really has no idea what's wrong with 
these.

BTW, I saw in some similar posts, there are more then one patch uploaded in 
different time, I patch each at a time from old to new, is that the right order 
to do so or I only have to patch the latest one? 

Thanks.

--
components: Build, Windows
messages: 178165
nosy: mwtree
priority: normal
severity: normal
status: open
title: fail to compile python in msys with mingw
versions: Python 3.3

___
Python tracker 

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



[issue16772] int() accepts float number base

2012-12-25 Thread Chris Jerdonek

Chris Jerdonek added the comment:

A test also needs to be added, though I'm sure one will be added as part of 
issue 16761.

--

___
Python tracker 

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



[issue16677] Hard to find operator precedence in Lang Ref.

2012-12-25 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Changing 'datum' to 'value' is a nice touch that I overlooked. It is definitely 
friendlier to people whose native language is not latin-infested. Thanks.

--

___
Python tracker 

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



[issue14574] SocketServer doesn't handle client disconnects properly

2012-12-25 Thread Roundup Robot

Roundup Robot added the comment:

New changeset df51cb946d27 by Kristján Valur Jónsson in branch '2.7':
Issue #14574: Ignore socket errors raised when flushing a connection on close.
http://hg.python.org/cpython/rev/df51cb946d27

--
nosy: +python-dev

___
Python tracker 

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



[issue14574] SocketServer doesn't handle client disconnects properly

2012-12-25 Thread Kristján Valur Jónsson

Changes by Kristján Valur Jónsson :


--
resolution:  -> fixed

___
Python tracker 

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



[issue14574] SocketServer doesn't handle client disconnects properly

2012-12-25 Thread Andrew Svetlov

Andrew Svetlov added the comment:

Not clean to me: has python3 the same bug?

--
nosy: +asvetlov

___
Python tracker 

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



[issue15990] solidify argument/parameter terminology

2012-12-25 Thread Roundup Robot

Roundup Robot added the comment:

New changeset ecf3cd3af502 by Chris Jerdonek in branch '2.7':
Add additional links and index entries for "argument" and "parameter".
http://hg.python.org/cpython/rev/ecf3cd3af502

New changeset 31e1f0b7f42e by Chris Jerdonek in branch '3.2':
Add additional links and index entries for "argument" and "parameter".
http://hg.python.org/cpython/rev/31e1f0b7f42e

New changeset 7a4a1fc6b3ee by Chris Jerdonek in branch '3.3':
Merge from 3.2: add links and index entries for "argument" and "parameter."
http://hg.python.org/cpython/rev/7a4a1fc6b3ee

New changeset 10e4d28d0090 by Chris Jerdonek in branch 'default':
Merge from 3.3: add links and index entries for "argument" and "parameter."
http://hg.python.org/cpython/rev/10e4d28d0090

--

___
Python tracker 

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



[issue16218] Python launcher does not support unicode characters

2012-12-25 Thread STINNER Victor

STINNER Victor added the comment:

The issue is now fixed on all platforms for Python 3.4. Please keep the
issue open until all changes are backported to Python 3.3 or even Python
3.2.

--

___
Python tracker 

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



[issue16772] int() accepts float number base

2012-12-25 Thread Mark Dickinson

Mark Dickinson added the comment:

Greg:  please could you add a test?

I think that the new check may be too strict:  should we also be prepared to 
accept any object that implements __index__ as a base?  (Similar to the way 
that round accepts an __index__-aware object for its second argument.)

 It would have been nice to have a chance to review this change before 
it was committed. 

--

___
Python tracker 

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



[issue16218] Python launcher does not support unicode characters

2012-12-25 Thread Andrew Svetlov

Andrew Svetlov added the comment:

I assign the issue to you than. Is it ok?

--
assignee: asvetlov -> haypo

___
Python tracker 

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



[issue14901] Python Windows FAQ is Very Outdated

2012-12-25 Thread Roundup Robot

Roundup Robot added the comment:

New changeset e8793c5f0ebc by Chris Jerdonek in branch '3.2':
Fix Sphinx warning (missing "setting-envvars" reference).
http://hg.python.org/cpython/rev/e8793c5f0ebc

--

___
Python tracker 

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



[issue16780] fail to compile python in msys with mingw

2012-12-25 Thread Lee Long

Lee Long added the comment:

I then try compiling the version 2.7.3, different errors were shown while 'make'

  ./Modules/posixmodule.c:6151:5: warning: implicit declaration of function 
'wait'[-Wimplicit-function-declaration]
  ./Modules/posixmodule.c: In function 'posix_fdopen':
  ./Modules/posixmodule.c:6751:9: warning: implicit declaration of function 
'fcntl' [-Wimplicit-function-declaration]
  ./Modules/posixmodule.c:6751:27: error: 'F_GETFL' undeclared (first use in 
this function)
  ./Modules/posixmodule.c:6751:27: note: each undeclared identifier is reported 
only once for each function it appears in
  ./Modules/posixmodule.c:6753:23: error: 'F_SETFL' undeclared (first use in 
this function)
  ./Modules/posixmodule.c: In function 'posix_pipe':
  ./Modules/posixmodule.c:6816:5: warning: implicit declaration of function 
'pipe' [-Wimplicit-function-declaration]
  ./Modules/posixmodule.c: At top level:
  ./Modules/posixmodule.c:671:1: warning: 'posix_fildes' defined but not used 
[-Wunused-function]
  ./Modules/posixmodule.c:7480:1: warning: 'conv_confname' defined but not used 
[-Wunused-function]
  ./Modules/posixmodule.c:8387:1: warning: 'setup_confname_table' defined but 
not used [-Wunused-function]
  make: *** [Modules/posixmodule.o] Error 1

--
versions: +Python 2.7

___
Python tracker 

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



[issue16780] fail to compile python in msys with mingw

2012-12-25 Thread R. David Murray

R. David Murray added the comment:

The bug tracker is not a place to get help, but is rather for reporting bugs 
and proposing patches.

We do not currently support msys/mingw.  As you have observed, various patches 
have been proposed; however, in order for any of them to get committed, we need 
the modifications to be broken down into easily reviewable pieces.  If you are 
interested in tackling this project, please post individually motivated and 
reviewable patches as separate issues.

Since you are seeking help in this issue rather than proposing a patch, I 
recommend you post to the python-list mailing list, and see if there is anyone 
with answers to your questions, or interested in working on this with you.

--
nosy: +r.david.murray
stage:  -> committed/rejected
status: open -> closed

___
Python tracker 

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



[issue16781] execfile/exec messes up with imports in executed file

2012-12-25 Thread anatoly techtonik

New submission from anatoly techtonik:

When a Python file is exec()uted, it magically fails to find names in imported 
modules. The most magical thing in the examples below (b3.py in attach for 
Python 3) is that first reference to wintypes.LONG in print statement is 
actually successfull.

--- a.py
from ctypes import wintypes

print(wintypes.LONG)

class LOGFONT(object):
  field = wintypes.LONG


--- b2.py (Python 2 version)
def main():
  execfile('a.py')
main()


--- Output

Traceback (most recent call last):
  File "b2.py", line 4, in 
main()
  File "b2.py", line 2, in main
execfile('a.py')
  File "a.py", line 5, in 
class LOGFONT(object):
  File "a.py", line 6, in LOGFONT
field = wintypes.LONG
NameError: name 'wintypes' is not defined

--
components: Interpreter Core
files: b3.py
messages: 178177
nosy: techtonik
priority: normal
severity: normal
status: open
title: execfile/exec messes up with imports in executed file
versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4
Added file: http://bugs.python.org/file28434/b3.py

___
Python tracker 

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



[issue16781] execfile/exec messes up with imports in executed file

2012-12-25 Thread anatoly techtonik

Changes by anatoly techtonik :


Added file: http://bugs.python.org/file28435/a.py

___
Python tracker 

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



[issue16781] execfile/exec messes up with imports in executed file

2012-12-25 Thread anatoly techtonik

Changes by anatoly techtonik :


Added file: http://bugs.python.org/file28436/b2.py

___
Python tracker 

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



[issue14574] SocketServer doesn't handle client disconnects properly

2012-12-25 Thread Kristján Valur Jónsson

Kristján Valur Jónsson added the comment:

Semantically, but I am told that due to py3k's different file buffering, that 
those errors don't percolate through. According to Charles-Francois' post from 
apr, 14th:
"Note that Python 3.3 doesn't have this problem."

--

___
Python tracker 

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



[issue7083] locals() behaviour differs when tracing is in effect

2012-12-25 Thread anatoly techtonik

anatoly techtonik added the comment:

I'm 3rd to vote for reopening this issue to clarify documentation or to fix 
(read below).

== Why it is important to fix
1. First personal user story. Until I saw the localstest.py I couldn't figure 
out what all locals() definitions are talking about. Dictionary, that is a 
copy, but the copy is sporadically updated when nobody is using in background. 
It is a weird dictionary with inconsistent behavior placed at a rather critical 
part of the language.

2. Second personal story. I probably run into the same bug in issue16781. 
Probably, because I still don't understand what really happens. It is only a 
suspicion, and it is bad because with my experience I'm supposed to know what 
happens, but I never had the time to dig deeper until now.

3. locals() is referenced in exec/execfile() docs for the explanation of 
arguments. Magic of locals() multiplied by exec.execfile() gives a next level 
of headache when you need to resolve this. Add settrace() to the formula to 
awake a hater in you.

exec/execfile() are used in Python-based scripting tools (such as SCons), in 
trace scripts and when Python is embedded as a scripting language. Coding on 
this level should be easy to make more interesting tools to appear.

== Fix Idea 
1. Is it possible to rename locals() to _locals(), and leave user visible API 
function local() for an object that updates itself every time it is accessed?

--
components: +Documentation
nosy: +techtonik
versions: +Python 2.7

___
Python tracker 

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



[issue16781] execfile/exec execution of class statement does not access locals()

2012-12-25 Thread R. David Murray

R. David Murray added the comment:

The fact that the print works should be a clue that Python is in fact finding 
the module and importing it.  So your problem actually has to do with 
namespaces, which is something you have to think about when using exec or 
execfile.  You can see this by replacing your import with any variable setting 
(say, a=1) and referencing that in the class body.

The problem here is that execfile is operating inside a function, therefore the 
local and global namespaces are different.  wintypes gets imported into the 
*local* namespace.

Now, if you inline this type of code by hand, wintypes (or a) is found in the 
local namespace when the class statement is executed.  But when it is done via 
execfile, it is not.  

I'm not clear on whether or not this is a bug, but if it isn't there is 
certainly missing documentation in the description of execfile.

--
nosy: +benjamin.peterson, r.david.murray
title: execfile/exec messes up with imports in executed file -> execfile/exec 
execution of class statement does not access locals()
type:  -> behavior
versions:  -Python 3.1

___
Python tracker 

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



[issue16712] collections.abc.Sequence should not provide __reversed__

2012-12-25 Thread INADA Naoki

INADA Naoki added the comment:

__contains__ is required for Container.
So there is a clear reason to define it.

Additionaly, 
http://docs.python.org/3.3/reference/datamodel.html#object.__contains__
doesn't discourage to implement slower pure-python method.

In case of __reversed__, I can't find a reason to require it and
reference discourage it explicitly.

--

___
Python tracker 

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



[issue14468] Update cloning guidelines in devguide

2012-12-25 Thread Chris Jerdonek

Chris Jerdonek added the comment:

Note that "hg graft" is already mentioned/discussed in the devguide here:

http://docs.python.org/devguide/committing.html#porting-between-major-versions

--

___
Python tracker 

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



[issue16782] No curses.initwin: Incorrect package docstring for curses

2012-12-25 Thread Thomas Ballinger

New submission from Thomas Ballinger:

Lib/curses/__init__.py has `curses.initwin()` in the docstring example code, 
but this function does not exist (should be `initscr()`)

Bad in at least back to 2.4

--
assignee: docs@python
components: Documentation
files: docfix.patch
keywords: patch
messages: 178183
nosy: Thomas.Ballinger, docs@python
priority: normal
severity: normal
status: open
title: No curses.initwin: Incorrect package docstring for curses
versions: Python 3.3
Added file: http://bugs.python.org/file28437/docfix.patch

___
Python tracker 

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



[issue16781] execfile/exec execution of class statement does not access locals()

2012-12-25 Thread Benjamin Peterson

Benjamin Peterson added the comment:

The best solution is to just always pass an explicit namespace to exec. That 
should be documented.

--

___
Python tracker 

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



[issue16772] int() accepts float number base

2012-12-25 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 60f7197f991f by Gregory P. Smith in branch 'default':
Test for issue16772 and redoes the previous fix to accept __index__-aware
http://hg.python.org/cpython/rev/60f7197f991f

--

___
Python tracker 

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



[issue16761] Fix int(base=X)

2012-12-25 Thread Gregory P. Smith

Gregory P. Smith added the comment:

Having just looked added something to test_int as part of issue16772... There 
appears to be an explicit test _for_ this strange behavior in there:

http://hg.python.org/cpython/file/60f7197f991f/Lib/test/test_int.py#l233

test_base_arg_with_no_x_arg

I have no idea why this exists or was desired.

--
nosy: +gregory.p.smith

___
Python tracker 

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



[issue16761] Fix int(base=X)

2012-12-25 Thread Chris Jerdonek

Chris Jerdonek added the comment:

See this thread:

http://mail.python.org/pipermail/python-dev/2012-December/123283.html

--

___
Python tracker 

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



[issue16772] int() accepts float number base

2012-12-25 Thread Gregory P. Smith

Gregory P. Smith added the comment:

Thanks for the pointer to round(). PyNumber_AsSsize_t was just what the doctor 
ordered.

PS Grump acknowledged and accepted.  Its trunk and we're nowhere near a freeze 
so I figured it'd be fine to iterate on it in trunk if needed.

--

___
Python tracker 

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



[issue16783] sqlite3 accepts strings it cannot return

2012-12-25 Thread William D. Colburn

New submission from William D. Colburn:

This seems to be just like issue6010, which is closed as "not as bug" which is 
simple irresponsible on the part of Python.

The problem is that I can store data into sqlite3 which cannot be retrieved.  
The data I encountered was a string with a \xa0 in it that was read from 
urllib2.  I deposited that data into an sqlite3 database with no trouble at 
all.  Later, however, sqlite3 would throw an exception when I tried to retrieve 
the data.

Martin v. Löwis says this is user error because sqlite3 assumes UTF-8. It makes 
no sense that storeable data cannot be retrieved and that the failure of 
sqlite3 is a user-error.  If sqlite3 assumes UTF-8, then the error should have 
been caught when I did the store because I was not storing UTF-8 data.  
Accepting bad input and blaming the user later down the line is bad bug 
handling, especially because the two events might be separated by a tremendous 
gap of time and code which makes debugging quite hard.  I was only able to find 
the errant character by popping the streamed webpage into emacs as both python 
and firefox showed me a normal looking string with nothing wrong with it.

--
components: Unicode
messages: 178189
nosy: William.D..Colburn, ezio.melotti
priority: normal
severity: normal
status: open
title: sqlite3 accepts strings it cannot return
type: behavior
versions: Python 2.7

___
Python tracker 

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



[issue16781] execfile/exec execution of class statement does not access locals()

2012-12-25 Thread anatoly techtonik

anatoly techtonik added the comment:

The workaround with the best case is a magical knowledge, which many don't 
possess and don't understand (I still don't get it). It's very tempting to ask 
why passing explicit namespace is the best solution, but instead I'd like to 
concentrate on this case where execfile() is not given any arguments. The 
documentation says:

   If both dictionaries are omitted, the expression is executed in the 
environment where execfile() is called.

>From this description I understand that the code should be executed just like 
>inline code. Why it can not? What limitation of Python doesn't make this 
>possible? Is there any secret reason under cover?

--

___
Python tracker 

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



[issue3831] Multiprocessing: Expose underlying pipe in queues

2012-12-25 Thread B. Clausius

Changes by B. Clausius :


--
nosy: +barcc

___
Python tracker 

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