[issue3871] cross and native build of python for mingw* hosts

2012-11-23 Thread Tshepang Lekhonkhobe

Changes by Tshepang Lekhonkhobe :


--
nosy: +tshepang

___
Python tracker 

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



[issue16504] IDLE - fatal error when opening a file with certain tokenizing errors

2012-11-23 Thread Roger Serwy

Roger Serwy added the comment:

Serhiy, was msg176255 meant for issue16491?

--

___
Python tracker 

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



[issue16534] test_float failure on IA64 (HPUX)

2012-11-23 Thread Stefan Krah

Stefan Krah added the comment:

For some reason ./configure detects x87-style-double-rounding=yes, but when
I compile the test manually with the same command line "cc -Ae -g", no
double rounding is detected.

--

___
Python tracker 

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



[issue16518] add "buffer protocol" to glossary

2012-11-23 Thread Chris Jerdonek

Chris Jerdonek added the comment:

> > That's why I'm proposing "bytes-like object".
>
> If it is somehow possible to establish the term as a shorthand for the real
meaning,

This can be established via the glossary.  We can still use "buffer provider" 
for the general case, if we find that it is useful in certain circumstances.

--

___
Python tracker 

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



[issue16512] imghdr doesn't support jpegs with an ICC profile

2012-11-23 Thread Jesús Cea Avión

Changes by Jesús Cea Avión :


--
nosy: +jcea

___
Python tracker 

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



[issue6923] Need pthread_atfork-like functionality in CPython

2012-11-23 Thread Jesús Cea Avión

Changes by Jesús Cea Avión :


--
nosy: +jcea

___
Python tracker 

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



[issue16500] Add an 'afterfork' module

2012-11-23 Thread Jesús Cea Avión

Changes by Jesús Cea Avión :


--
nosy: +jcea

___
Python tracker 

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



[issue16501] deprecate RISCOS "support"

2012-11-23 Thread Jesús Cea Avión

Jesús Cea Avión added the comment:

Please, update PEP 11.

--

___
Python tracker 

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



[issue16501] deprecate RISCOS "support"

2012-11-23 Thread Jesús Cea Avión

Changes by Jesús Cea Avión :


--
nosy: +jcea

___
Python tracker 

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



[issue16540] Make itertools count, cycle, and repeat objects subscriptable like range.

2012-11-23 Thread Raymond Hettinger

Changes by Raymond Hettinger :


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



[issue16518] add "buffer protocol" to glossary

2012-11-23 Thread Stefan Krah

Stefan Krah added the comment:

Antoine Pitrou  wrote:
> > How about "object does not provide a byte buffer" for error messages
> > and "(byte) buffer provider" as a shorthand for "any buffer provider
> > that exposes its memory as a sequence of unsigned bytes in response
> > to a PyBUF_SIMPLE request"?
> 
> It's not too bad, I think. However, what I think is important is that
> the average (non-expert) Python developer understand that the function
> really accepts a bytes object, and other similar types (because, really,
> bytes is the only bytes-like type most developers will ever face).
> That's why I'm proposing "bytes-like object".

If it is somehow possible to establish the term as a shorthand for the real
meaning, then I guess it's the most economical option for documenting Python
methods (I don't think it should be used in the C-API docs though).

help (b''.join) for example would sound better with "bytes-like object"
than with "(byte) buffer provider".

--

___
Python tracker 

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



[issue16545] ast.FunctionDef sets a bad value for kw_defaults when keyword-only arguments present

2012-11-23 Thread Brett Cannon

New submission from Brett Cannon:

When there are no keyword-only arguments, the value of kw_defaults for 
FunctionDef is []. But when keyword-only arguments are present with no default 
values, it becomes [None]. That's bad as every other value in FunctionDef has a 
default of [] when there is nothing of value there (currently you can trust 
that [None] means no default value as None isn't anything in the AST).


>>> ast.dump(ast.parse('def func(*, name):pass'))
"Module(body=[FunctionDef(name='func', args=arguments(args=[], vararg=None, 
varargannotation=None, kwonlyargs=[arg(arg='name', annotation=None)], 
kwarg=None, kwargannotation=None, defaults=[], kw_defaults=[None]), 
body=[Pass()], decorator_list=[], returns=None)])"

>>> ast.dump(ast.parse('def func(name):pass'))
"Module(body=[FunctionDef(name='func', args=arguments(args=[arg(arg='name', 
annotation=None)], vararg=None, varargannotation=None, kwonlyargs=[], 
kwarg=None, kwargannotation=None, defaults=[], kw_defaults=[]), body=[Pass()], 
decorator_list=[], returns=None)])"

--
components: Library (Lib)
keywords: 3.3regression
messages: 176260
nosy: brett.cannon
priority: normal
severity: normal
stage: test needed
status: open
title: ast.FunctionDef sets a bad value for kw_defaults when keyword-only 
arguments present
versions: 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



[issue16546] ast.YieldFrom needlessly has its expr value as optional

2012-11-23 Thread Brett Cannon

New submission from Brett Cannon:

The grammar guarantees that 'yield from' statements have an expression to 
evaluate, plus a 'yield from' without an expression makes no sense.

--
components: Library (Lib)
messages: 176261
nosy: brett.cannon
priority: normal
severity: normal
stage: test needed
status: open
title: ast.YieldFrom needlessly has its expr value as optional
versions: 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



[issue12806] argparse: Hybrid help text formatter

2012-11-23 Thread rurpy the second

rurpy the second added the comment:

Additional comment loosely related to the ParagraphFormatter offered in 
previous comment...

[If this is not the right venue -- perhaps a new issue or one of the python 
mail lists would be better -- please tell me.]

I notice that argparse.ArgumentParser requires a class (as opposed to instance) 
for the formatter_class parameter.  A cursory look at argparse gives me the 
impression that this is only so that ArgumentParser can instantiate the 
instance with a 'prog' argument.

If ArgumentParser accepted a HelpFormatter object (rather than a class), then a 
user could instantiate a custom formatter class with arguments that would 
customize its behavior.  For example, I would be able to write a single 
ParagraphFormatter class that was instantiated like 

  formatter = ParagraphFormatter (multiline=False)

or  

  formatter = ParagraphFormatter (multiline=True)

If one has other requirements, perhaps apply one kind of formatting to 
description/epilogue text and another to the arguments text, then there is an 
even greater multiplicity of classes that could be avoided by instantiating a 
single formatter class with arguments.

So why can't ArgumentParser look at the formatter_class value: if it's a class 
proceed as now, but if it's an class instance, simply set its ._prog attribute 
and use it as is:

def _get_formatter(self):
if isinstance (self.formatter_class, ): 
return self.formatter_class(prog=self.prog)
else:
self.formatter_class._prog = prog
return self.formatter_class

Of course the "formatter_class" parameter name would then require a little 
explanation but that's what documentation is for.

--

___
Python tracker 

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



[issue12806] argparse: Hybrid help text formatter

2012-11-23 Thread rurpy the second

rurpy the second added the comment:

I happened upon this issue while Googling for a formatter with the behavior 
described here.

I put together a formatter derived from the code submitted by GraylinKim 
(2011-08-22) and offer it for consideration (though it is missing some things 
like docstrings and hasn't been tested very thoroughly).

As per other comments, it uses additional indentation rather than leading 
special characters to start a new block.  Differently than GraylinKim's code, 
additional indentation suppresses wrapping or any formatting.  However, it 
would be easy to change that as I hope is obvious from the code.

There are two common ways of denoting a block of text (a block being text that 
should be reformatted as a single unit; aka paragraph)

 1. A group of text lines ending with newlines followed by a blank line to 
denote the end of the block.

 2. A single (long) text line where the terminating newline denotes the end of 
the block (i.e. one line == one block).

Both occur in the context of argparse help text:

Example of #1:
   p.add_argument (,
   help='''block1 block1 block1 block1 
   block1 block1 block1 block1
   block1 block1 block1 block1

   block2 block2 block2 block2
   block2 block2 block2 block2''')

Examples of #2:
   p.add_argument (,
   help='block1 block1 block1 block1 '
   'block1 block1 block1 block1 '
   'block1 block1 block1 block1 \n'
   ''
   'block2 block2 block2 block2 '
   'block2 block2 block2 block2 ')

   p.add_argument (,
   help='''block1 block1 block1 block1 \
   block1 block1 block1 block1 \
   block1 block1 block1 block1 \

   block2 block2 block2 block2 \
   block2 block2 block2 block2 ''')

There is no way, when reading lines of text, to tell whether one is reading 
text in the form of #1 or #2, when one sees a newline.  So a formatter really 
needs to be able to be told which form it is being given.  This seems to 
require two separate formatter classes (though they call common code.)

The first form (call it multiline blocked text) is formatted by 
ParagraphFormatterML.  The second form (call it single-line blocked text; I 
often use form #2a) by ParagraphFormatter.

--
nosy: +rurpy2
Added file: http://bugs.python.org/file28091/paraformatter.py

___
Python tracker 

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



[issue16518] add "buffer protocol" to glossary

2012-11-23 Thread Antoine Pitrou

Antoine Pitrou added the comment:

> > Well, we should still write a Python documentation, not a NumPy
> > documentation (on this tracker anyway). Outside of NumPy, there's little
> > use for multi-dimensional objects.
> 
> Ok, but people should not be surprised if their (Python) array.array() of
> double or their array of ctypes structs is silently accepted by some byte
> consuming function.

Probably. My own (humble :-)) opinion is that array.array() is a
historical artifact, and its use doesn't seem to be warranted in modern
Python code. ctypes is obviously a very special library, and not for the
faint of heart.

> How about "object does not provide a byte buffer" for error messages
> and "(byte) buffer provider" as a shorthand for "any buffer provider
> that exposes its memory as a sequence of unsigned bytes in response
> to a PyBUF_SIMPLE request"?

It's not too bad, I think. However, what I think is important is that
the average (non-expert) Python developer understand that the function
really accepts a bytes object, and other similar types (because, really,
bytes is the only bytes-like type most developers will ever face).
That's why I'm proposing "bytes-like object".

--

___
Python tracker 

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



[issue16518] add "buffer protocol" to glossary

2012-11-23 Thread Stefan Krah

Stefan Krah added the comment:

Antoine Pitrou  wrote:
> > PEP-3118 Py_buffer structs are essentially how NumPy works internally.
> 
> Well, we should still write a Python documentation, not a NumPy
> documentation (on this tracker anyway). Outside of NumPy, there's little
> use for multi-dimensional objects.

Ok, but people should not be surprised if their (Python) array.array() of
double or their array of ctypes structs is silently accepted by some byte
consuming function.

How about "object does not provide a byte buffer" for error messages
and "(byte) buffer provider" as a shorthand for "any buffer provider
that exposes its memory as a sequence of unsigned bytes in response
to a PyBUF_SIMPLE request"?

--

___
Python tracker 

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



[issue16504] IDLE - fatal error when opening a file with certain tokenizing errors

2012-11-23 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

The bug is somewhere in print_exception() function in Lib/idlelib/run.py.

--

___
Python tracker 

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



[issue16518] add "buffer protocol" to glossary

2012-11-23 Thread Antoine Pitrou

Antoine Pitrou added the comment:

> > I wouldn't use "bytes-like object".
> 
> What about "buffer-like object"?

"buffer-like" means "like a buffer" which is wrong on two points:
- "buffer" is not defined at this point, so the user doesn't understand
what it means
- we are not talking about an object which is "like a buffer", but which
"provides a buffer"

--

___
Python tracker 

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



[issue16518] add "buffer protocol" to glossary

2012-11-23 Thread Chris Jerdonek

Chris Jerdonek added the comment:

> I wouldn't use "bytes-like object".

What about "buffer-like object"?

--

___
Python tracker 

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



[issue16518] add "buffer protocol" to glossary

2012-11-23 Thread Antoine Pitrou

Antoine Pitrou added the comment:

> I wouldn't use "bytes-like object". One can certainly argue that *memoryview*
> should be bytes-like as a matter of preference, but the buffer protocol
> specifies strongly (or even statically) typed multi-dimensional arrays.

Ach :-(

> PEP-3118 Py_buffer structs are essentially how NumPy works internally.

Well, we should still write a Python documentation, not a NumPy
documentation (on this tracker anyway). Outside of NumPy, there's little
use for multi-dimensional objects.

--

___
Python tracker 

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



[issue16518] add "buffer protocol" to glossary

2012-11-23 Thread Stefan Krah

Stefan Krah added the comment:

I wouldn't use "bytes-like object". One can certainly argue that *memoryview*
should be bytes-like as a matter of preference, but the buffer protocol
specifies strongly (or even statically) typed multi-dimensional arrays.

PEP-3118 Py_buffer structs are essentially how NumPy works internally.

--
nosy: +skrah

___
Python tracker 

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



[issue16544] Add external link to ast docs

2012-11-23 Thread Andrew Svetlov

Andrew Svetlov added the comment:

I've done it just now sending him message via bitbucket.

--

___
Python tracker 

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



[issue16518] add "buffer protocol" to glossary

2012-11-23 Thread Ezio Melotti

Ezio Melotti added the comment:

> I would vote for "bytes-like object"

Sounds like a good compromise between brevity and clarity to me.

--

___
Python tracker 

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



[issue16518] add "buffer protocol" to glossary

2012-11-23 Thread Antoine Pitrou

Antoine Pitrou added the comment:

> Do we have a recommended (and preferably briefer) way of saying, "any
> object that supports the buffer protocol"?

It depends where. There's no recommended way yet, but I would vote for
"bytes-like object" in error messages that are targetted at the average
developer.

The docs (glossary?) could explain that "bytes-like object" is the same
as "buffer-providing object" or "object implementing the buffer
protocol".

--

___
Python tracker 

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



[issue16518] add "buffer protocol" to glossary

2012-11-23 Thread Ezio Melotti

Ezio Melotti added the comment:

> "Buffer object" doesn't mean anything in Python 3 and, furthermore,
> it might be mixed up with the Python 2 `buffer` type.

Agreed.

> As for the error messages, they are generally very bad on this topic,
> so I would vote to change them :-)

I would say that they are verbose maybe, but not necessary bad.
Using "any object that supports the buffer protocol" without explicitly 
mentioning bytes (and bytearray) might end up being even more confusing (if 
that's what it's being proposed).

--

___
Python tracker 

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



[issue16540] Make itertools count, cycle, and repeat objects subscriptable like range.

2012-11-23 Thread Neil Girdhar

Neil Girdhar added the comment:

Thanks, that works.

One of the things I like about Python is that you can write what you mean.  I 
figured that since I meant "repeat [] as many times as necessary", that I 
should write it that way.  So, from an intuitive standpoint, I still feel that 
these itertools types intuitively implement InfiniteSequence.  Although I 
recognize that some people might see them only in the narrower sense of 
Iterators.

--

___
Python tracker 

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



[issue16518] add "buffer protocol" to glossary

2012-11-23 Thread Chris Jerdonek

Chris Jerdonek added the comment:

s/any//

--

___
Python tracker 

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



[issue16518] add "buffer protocol" to glossary

2012-11-23 Thread Chris Jerdonek

Chris Jerdonek added the comment:

Do we have a recommended (and preferably briefer) way of saying, "any object 
that supports the buffer protocol"?

--

___
Python tracker 

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



[issue16543] Use "positional arguments" in PyArg_UnpackTuple

2012-11-23 Thread Ezio Melotti

Ezio Melotti added the comment:

Using this as meta-issue is fine -- there are already enough issues :)
The issues can probably be fixed in a single patch too, since it should just be 
a matter of changing the text of a few error messages.

--

___
Python tracker 

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



[issue16518] add "buffer protocol" to glossary

2012-11-23 Thread Antoine Pitrou

Antoine Pitrou added the comment:

"Buffer protocol" is the right term. "Buffer object" doesn't mean anything in 
Python 3 and, furthermore, it might be mixed up with the Python 2 `buffer` type.

As for the error messages, they are generally very bad on this topic, so I 
would vote to change them :-)

--

___
Python tracker 

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



[issue16543] Use "positional arguments" in PyArg_UnpackTuple

2012-11-23 Thread Chris Jerdonek

Chris Jerdonek added the comment:

I would keep any "global" discussion (for decision and coordination purposes) 
as part of a single meta-issue, but retain individual instances that need to be 
corrected as separate issues.  I don't think we should try to fix them all as 
part of one patch or issue.  I'm okay with the discussion happening here, or 
with opening a fresh issue that points to the various issues (including this 
one).

--

___
Python tracker 

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



[issue16544] Add external link to ast docs

2012-11-23 Thread Ezio Melotti

Ezio Melotti added the comment:

I would suggest to contact the author and ask him if he wants to contribute 
those docs to Python.  They could be then be merged to the current docs or 
included as a separate HOWTO.

--
nosy: +ezio.melotti
type:  -> enhancement

___
Python tracker 

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



[issue16544] Add external link to ast docs

2012-11-23 Thread Andrew Svetlov

New submission from Andrew Svetlov:

http://greentreesnakes.readthedocs.org/en/latest/index.html
is excellent and comprehensive documentation for ast tree structures.
It would be nice to incorporate that docs into stdlib documentation, but adding 
*see also* section is good enoigh as first step.

--
assignee: docs@python
components: Documentation
keywords: easy
messages: 176239
nosy: asvetlov, docs@python
priority: normal
severity: normal
stage: needs patch
status: open
title: Add external link to ast docs
versions: 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



[issue16524] File access not always working with Python for Windows 32 bits on Windows 64 bits OS

2012-11-23 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
resolution:  -> invalid
status: open -> closed

___
Python tracker 

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



[issue16518] add "buffer protocol" to glossary

2012-11-23 Thread Terry J. Reedy

Terry J. Reedy added the comment:

I would use the term that is currently used in some error messages.

--
nosy: +terry.reedy

___
Python tracker 

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



[issue16510] Using appropriate checks in tests

2012-11-23 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
nosy: +terry.reedy

___
Python tracker 

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



[issue16543] Use "positional arguments" in PyArg_UnpackTuple

2012-11-23 Thread Mark Dickinson

Mark Dickinson added the comment:

+1 to msg176229

--

___
Python tracker 

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



[issue16543] Use "positional arguments" in PyArg_UnpackTuple

2012-11-23 Thread Ezio Melotti

Ezio Melotti added the comment:

#16520 could be assimilated by this issue, if we decide to widen its scope as I 
suggested in msg176229.

--

___
Python tracker 

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



[issue16508] include the "object" type in the lists of documented types

2012-11-23 Thread Terry J. Reedy

Terry J. Reedy added the comment:

good idea

--
nosy: +terry.reedy

___
Python tracker 

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



[issue16504] IDLE - fatal error when opening a file with certain tokenizing errors

2012-11-23 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
nosy: +terry.reedy
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



[issue16543] Use "positional arguments" in PyArg_UnpackTuple

2012-11-23 Thread Chris Jerdonek

Chris Jerdonek added the comment:

> TypeError: f() missing 1 required positional argument: 'a'

By the way, changing this message is the subject of issue 16520 (which should 
probably be retitled).

--

___
Python tracker 

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



[issue10712] 2to3 fixer for deprecated unittest method names

2012-11-23 Thread Ezio Melotti

Changes by Ezio Melotti :


--
nosy: +gregory.p.smith
versions: +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



[issue2454] sha and md5 fixer

2012-11-23 Thread Gregory P. Smith

Gregory P. Smith added the comment:

Any code conversion is useful. This will help with old libraries and is
even good for just updating old 2.4 code to 2.7 best practices.

--

___
Python tracker 

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



[issue16543] Use "positional arguments" in PyArg_UnpackTuple

2012-11-23 Thread Ezio Melotti

Ezio Melotti added the comment:

I would be fine with just dropping "positional" there, and say "required 
argument".  With no further specification it means the "default" type of 
argument, i.e. positional or keyword.  See also the end of msg170876.

--

___
Python tracker 

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



[issue16491] IDLE and except: raise from

2012-11-23 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

On Linux the result is the same.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue16543] Use "positional arguments" in PyArg_UnpackTuple

2012-11-23 Thread Chris Jerdonek

Chris Jerdonek added the comment:

> TypeError: f() missing 1 required positional argument: 'a'

Yes, I think this should also be changed because passing "a" as a keyword 
argument is okay:

>>> f(a=1)

I would suggest something like--

TypeError: f() missing argument for parameter 'a'

--

___
Python tracker 

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



[issue8109] Server-side support for TLS Server Name Indication extension

2012-11-23 Thread Piotr Dobrogost

Changes by Piotr Dobrogost :


--
nosy: +piotr.dobrogost

___
Python tracker 

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



[issue16543] Use "positional arguments" in PyArg_UnpackTuple

2012-11-23 Thread Ezio Melotti

Ezio Melotti added the comment:

Maybe we should follow a more systematic approach and collect the different 
errors raised in the different situations, and then come up with error messages 
that are accurate and follow the terminology that we are adopting in #15990.

--

___
Python tracker 

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



[issue16540] Make itertools count, cycle, and repeat objects subscriptable like range.

2012-11-23 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Why not use `dummy = [[]] * 3` as dummy?

--

___
Python tracker 

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



[issue16491] IDLE and except: raise from

2012-11-23 Thread Terry J. Reedy

Terry J. Reedy added the comment:

I marked this as 3.3+ bug because double reporting is new in 3.x and 'from 
None' is new in 3.3 (it causes a TypeError in the raise statement ;-).

Command prompt output appears 'correct' (as intended).
[I added blank lines before each try: for reading ease]

Python 3.3.0 (v3.3.0:bd8afb90ebf2, Sep 29 2012, 10:57:17)
 [MSC v.1600 64 bit (AMD64)] on win32

>>> try:
... 1/0
... except ZeroDivisionError as exp:
... raise TypeError('Divided by 0')
...
Traceback (most recent call last):
  File "", line 2, in 
ZeroDivisionError: division by zero

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "", line 4, in 
TypeError: Divided by 0

>>> try:
... 1/0
... except ZeroDivisionError as exp:
... raise TypeError('Divided by 0') from exp
...
Traceback (most recent call last):
  File "", line 2, in 
ZeroDivisionError: division by zero

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "", line 4, in 
TypeError: Divided by 0

>>> try:
... 1/0
... except ZeroDivisionError as exp:
... raise TypeError('Divided by 0') from None
...
Traceback (most recent call last):
  File "", line 4, in 
TypeError: Divided by 0

---
In IDLE on Win 7 64, all three give
Traceback (most recent call last):
  File "F:\Python\mypy\tem.py", line 4, in 
raise TypeError('Divided by 0')  # except for change here
TypeError: Divided by 0

We need to see non-Windows IDLE output to see if problem is limited to running 
with pythonw. Here is copy-paste code.

try:
1/0
except ZeroDivisionError as exp:
raise TypeError('Divided by 0') from None

--
nosy: +serwy, terry.reedy
stage:  -> needs patch
title: try-except-raise-bug -> IDLE and except: raise from
versions: +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



[issue16543] Use "positional arguments" in PyArg_UnpackTuple

2012-11-23 Thread Mark Dickinson

Mark Dickinson added the comment:

> Here the error message is about "positional arguments," which are
> different from parameters.

Okay.  So is it also planned to change the existing error messages for 
user-defined functions?  E.g.:

>>> def f(a, b=1):
... pass
... 
>>> f()
Traceback (most recent call last):
  File "", line 1, in 
TypeError: f() missing 1 required positional argument: 'a'


If yes, then I think all these changes need to be coordinated, and that 
probably involves submitting a proposal to the mailing list.  If no, then I 
think the change proposed in this issue is not an improvement, since it makes 
the error messages overall inconsistent.

--

___
Python tracker 

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



[issue16540] Make itertools count, cycle, and repeat objects subscriptable like range.

2012-11-23 Thread Neil Girdhar

Neil Girdhar added the comment:

My code looks like this:

presignal_abd = [[], [0.1, 0.6], []]
tarsignal_abd = [[], [0.4, 0.9], []]
diagsignal_abd = [[], [0.1, 0.6, 0.7, 0.8], []]
# etc.

for (filename,
 observations,
 presignals,
 tarsignals,
 diagsignals,
 diagram_type) in zip(['events-deduction', 'events-abduction', 
'events-accomodation', 'events-learning', 'events-learning-2'],
  [observations_ded, observations_abd, 
observations_tra, observations_tra1, observations_tra],
  [repeat_([]), presignal_abd, presignal_tra, 
repeat_([]), presignal_tra],
  [repeat_([]), tarsignal_abd, tarsignal_tra, 
repeat_([]), tarsignal_tra],
  [repeat_([]), diagsignal_abd, diagsignal_tra, 
repeat_([]), diagsignal_tra],
  [0, 1, 2, 3, 3]):
second_set_of_events = presignals[1]


I am using repeat_ objects (itertools.repeat objects) to fill as dummies.

--

___
Python tracker 

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



[issue16480] pyvenv 3.3 fails to create symlinks for /local/{bin, lib} to /{bin, lib}

2012-11-23 Thread Vinay Sajip

Vinay Sajip added the comment:

IIUC, Debian Experimental is not a complete distribution. Are there other, 
non-experimental OS variants where posix_local is used with Python 3.x?

On my Ubuntu Oneiric and Precise 64-bit machines, the default install scheme on 
the official Python 3.2 - as determined by sysconfig._get_default_scheme() - is 
"posix_prefix".

--

___
Python tracker 

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



[issue16543] Use "positional arguments" in PyArg_UnpackTuple

2012-11-23 Thread Chris Jerdonek

Chris Jerdonek added the comment:

> This can be fixed by adding "positional" before "arguments" in the error 
> message.

Do we know for sure that the values in the args argument in a call to 
PyArg_UnpackTuple always correspond to the positional arguments of a call to a 
Python function?  Can PyArg_UnpackTuple be used in other ways?

--

___
Python tracker 

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



[issue16540] Make itertools count, cycle, and repeat objects subscriptable like range.

2012-11-23 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

What kind of problem you want to solve? I'm sure there is a simple enough 
solution without changing itertools objects.

--

___
Python tracker 

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



[issue16540] Make itertools count, cycle, and repeat objects subscriptable like range.

2012-11-23 Thread Neil Girdhar

Neil Girdhar added the comment:

My suggestion is then to update collection.abc to have an InfiniteSequence, 
which inherits from Iterable, and adds abstract methods __getitem__ and mixin 
methods __iter__.

Then, itertools count, cycle, and repeat could implement 
collection.abc.InfiniteSequence, and collections.abc.Iterator (for 
backwards-compatibility).

--

___
Python tracker 

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



[issue16532] AMD64 Windows 7 build failures

2012-11-23 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Ah, thank you! There is a test failure on 3.2, but it's probably unrelated.

--
resolution:  -> fixed
status: open -> closed

___
Python tracker 

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



[issue16519] site.venv() should use abspath(executable)

2012-11-23 Thread Roundup Robot

Roundup Robot added the comment:

New changeset fe2200c1c2d3 by Vinay Sajip in branch '3.3':
Issue #16519: Used os.path.abspath, removed unnecessary code for 
executable_name.
http://hg.python.org/cpython/rev/fe2200c1c2d3

New changeset a874c4a6ad5f by Vinay Sajip in branch 'default':
Closes #16519: Merged fix from 3.3.
http://hg.python.org/cpython/rev/a874c4a6ad5f

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



[issue16543] Use "positional arguments" in PyArg_UnpackTuple

2012-11-23 Thread Chris Jerdonek

Chris Jerdonek added the comment:

> Here we're using 'positional' to refer to parameters that PEP 362 calls 
> "POSITIONAL_ONLY", whereas the regular TypeErrors (e.g. produced for 
> user-defined functions) use 'positional' to mean what PEP 362 calls 
> "POSITIONAL_OR_KEYWORD".

Here the error message is about "positional arguments," which are different 
from parameters.   (As you know, issue 15990 is to document this distinction in 
the glossary.)

Incidentally, it looks like the documentation for several of the functions in 
this part of the C API should probably be updated in this regard, for example:

http://docs.python.org/dev/c-api/arg.html#PyArg_UnpackTuple
http://docs.python.org/dev/c-api/arg.html#PyArg_ParseTuple

The PyArg_UnpackTuple documentation says, for example:

"A simpler form of parameter retrieval which does not use a format string to 
specify the types of the arguments. Functions which use this method to retrieve 
their parameters..."

The two occurrences of "parameter" here should be changed to "argument."

--

___
Python tracker 

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



[issue4473] POP3 missing support for starttls

2012-11-23 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Patches committed. Thank you very much!

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



[issue4473] POP3 missing support for starttls

2012-11-23 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 79e33578dc05 by Antoine Pitrou in branch 'default':
Issue #4473: Ensure the socket is shutdown cleanly in POP3.close().
http://hg.python.org/cpython/rev/79e33578dc05

New changeset d30fd9834cec by Antoine Pitrou in branch 'default':
Issue #4473: Add a POP3.capa() method to query the capabilities advertised by 
the POP3 server.
http://hg.python.org/cpython/rev/d30fd9834cec

New changeset 2329f9198d7f by Antoine Pitrou in branch 'default':
Issue #4473: Add a POP3.stls() to switch a clear-text POP3 session into an 
encrypted POP3 session, on supported servers.
http://hg.python.org/cpython/rev/2329f9198d7f

--
nosy: +python-dev

___
Python tracker 

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



[issue16306] Multiple error line for unknown command line parameter

2012-11-23 Thread Ezio Melotti

Ezio Melotti added the comment:

Buildbots are happy, closing.
Thanks Serhiy for the patches!

--
status: open -> closed

___
Python tracker 

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



[issue4473] POP3 missing support for starttls

2012-11-23 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Thank you Lorenzo. Your patch lacks a couple of details, such as "versionadded" 
and "versionchanged" tags, but I can handle this myself.

--

___
Python tracker 

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



[issue16543] Use "positional arguments" in PyArg_UnpackTuple

2012-11-23 Thread Chris Jerdonek

Changes by Chris Jerdonek :


--
nosy: +chris.jerdonek

___
Python tracker 

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



[issue16543] Use "positional arguments" in PyArg_UnpackTuple

2012-11-23 Thread Ezio Melotti

Ezio Melotti added the comment:

> Okay, but what exactly is this fixing? 

If the function parses positional args, it should say so in the error message.  
If the function is never used (except for min/max) or if the error is never 
reported, then we have a different problem.

Even if this code is not used I don't think we can remove it, since this it's a 
public function, and even if we are not using it someone might be using it and 
benefit from the improved error message.

--

___
Python tracker 

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



[issue16543] Use "positional arguments" in PyArg_UnpackTuple

2012-11-23 Thread Mark Dickinson

Mark Dickinson added the comment:

> If there are no such cases I think we should fix it.

Okay, but what exactly is this fixing?  I can't find any examples apart from 
max and min where the new error messages seem any better than the old.  Your 
first message talks about "a function that receives both positional and keyword 
arguments", by which I guess you mean 'both required and optional arguments';  
in any case, I can't find any such function (apart from max and min) that uses 
PyArg_ParseTuple.  So it seems to me that there's not actually any problem to 
be solved.

(And I think max and min probably need to be reworked to not use 
PyArg_ParseTuple at all.)

--

___
Python tracker 

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



[issue16528] 3.2 docs not updating on docs.python.org

2012-11-23 Thread Chris Jerdonek

Changes by Chris Jerdonek :


--
keywords: +easy
resolution: invalid -> fixed
type: behavior -> enhancement

___
Python tracker 

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



[issue16528] 3.2 docs not updating on docs.python.org

2012-11-23 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 31bb42754962 by Chris Jerdonek in branch 'default':
Clarify that only the latest maintenance branches are rebuilt (issue #16528).
http://hg.python.org/devguide/rev/31bb42754962

--
nosy: +python-dev

___
Python tracker 

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



[issue16543] Use "positional arguments" in PyArg_UnpackTuple

2012-11-23 Thread Mark Dickinson

Mark Dickinson added the comment:

One more thing:  I'm not sure this is the right terminology.  Here we're using 
'positional' to refer to parameters that PEP 362 calls "POSITIONAL_ONLY", 
whereas the regular TypeErrors (e.g. produced for user-defined functions) use 
'positional' to mean what PEP 362 calls "POSITIONAL_OR_KEYWORD".  This seems 
like it'll only increase the current confusion between different parameter 
types.

--

___
Python tracker 

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



[issue16543] Use "positional arguments" in PyArg_UnpackTuple

2012-11-23 Thread Ezio Melotti

Ezio Melotti added the comment:

> do you know of any other cases where this gives a misleading error message?

Actually my concern was about cases where the new error might be 
wrong/misleading, but I haven't checked yet.  If there are no such cases I 
think we should fix it; the error message will be better in the few cases we 
have in the stdlib and for all the external libs that are using the function.

Another thing that I haven't checked is if there are similar functions (e.g. to 
parse kwargs) that needs the same treatment (#16520 might be one such example).

--

___
Python tracker 

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



[issue16543] Use "positional arguments" in PyArg_UnpackTuple

2012-11-23 Thread Mark Dickinson

Mark Dickinson added the comment:

Of course, the 'arguments' -> 'argument' fix would still be nice to have.

--

___
Python tracker 

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



[issue16543] Use "positional arguments" in PyArg_UnpackTuple

2012-11-23 Thread Mark Dickinson

Mark Dickinson added the comment:

Now that I look at uses of PyArg_UnpackTuple, I'm wondering whether this needs 
to be fixed at all.  Apart from `max` and `min`, do you know of any other cases 
where this gives a misleading error message?

Almost all the uses I can find are for simple functions/methods where all 
arguments are positional-only.  (Ex:  range, pow, slice, dict.pop).

max and min *do* clearly need an error message fix.

(Apologies: I know it was me who suggested that PyArg_UnpackTuple needed fixing 
in the first place.  But now I'm not sure that's true.)

--

___
Python tracker 

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



[issue16523] attrgetter and itemgetter signatures in docs need cleanup

2012-11-23 Thread Chris Jerdonek

Chris Jerdonek added the comment:

You can also make that distinction using *.  For example:

.. function:: attrgetter(attr, *attrs)

or

.. function:: attrgetter(attr)
  attrgetter(attr1, attr2, *attrs)

(cf. http://docs.python.org/dev/library/functions.html#max )

Elsewhere we started to prefer using two signature lines where two or more 
"behaviors" are possible, which might be good to do in any case.  With the 
"..." notation, this would look like:

.. function:: attrgetter(attr)
  attrgetter(attr1, attr2, ...)

--

___
Python tracker 

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



[issue16543] Use "positional arguments" in PyArg_UnpackTuple

2012-11-23 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

> +(min == 1 ? "" : "s"), l);

In second part of patch should be "max". Reformat the code so that `min` and 
`(min == 1 ? "" : "s")` will be in one line and it will be more clear.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue16543] Use "positional arguments" in PyArg_UnpackTuple

2012-11-23 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



[issue16515] TypeError message incorrect for max() with one keyword arg

2012-11-23 Thread Ezio Melotti

Ezio Melotti added the comment:

I created #16543 for PyArg_UnpackTuple.
Once that is fixed we can continue with this.

--
dependencies: +Use "positional arguments" in PyArg_UnpackTuple

___
Python tracker 

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



[issue16523] attrgetter and itemgetter signatures in docs need cleanup

2012-11-23 Thread Ezio Melotti

Ezio Melotti added the comment:

I thought about that, but wanted to make a distinction between the form that 
accepts only 1 arg and returns an item and the form that receives 2+ args and 
returns a tuple.

--
nosy: +ezio.melotti

___
Python tracker 

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



[issue16543] Use "positional arguments" in PyArg_UnpackTuple

2012-11-23 Thread Ezio Melotti

New submission from Ezio Melotti:

This came up in #16515.
While using PyArg_UnpackTuple to parse the positional arguments in a function 
that receives both positional and keyword arguments, the error message returned 
when the number of arguments is incorrect is misleading, e.g.:
>>> max(foo=1)
TypeError: max expected 1 arguments, got 0

This can be fixed by adding "positional" before "arguments" in the error 
message.  The attached patch fixes this and the pluralization of "argument(s)".

--
assignee: ezio.melotti
components: Interpreter Core
files: unpacktuple.diff
keywords: patch
messages: 176202
nosy: ezio.melotti
priority: normal
severity: normal
stage: test needed
status: open
title: Use "positional arguments" in PyArg_UnpackTuple
type: enhancement
versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4
Added file: http://bugs.python.org/file28090/unpacktuple.diff

___
Python tracker 

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



[issue16523] attrgetter and itemgetter signatures in docs need cleanup

2012-11-23 Thread Chris Jerdonek

Chris Jerdonek added the comment:

+.. function:: attrgetter(attr[, attr2, attr3, ...])

Why not reword to use the *attr notation?  It is even already being used below:

+   The function is equivalent to::
 
   def attrgetter(*items):
   if any(not isinstance(item, str) for item in items):

--

___
Python tracker 

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



[issue16539] Turn off 'No handlers could be found for logger' message

2012-11-23 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc added the comment:

Python 3 has exactly the same documentation:
http://docs.python.org/3.3/howto/logging.html#configuring-logging-for-a-library

--
nosy: +amaury.forgeotdarc
resolution: wont fix -> works for me
status: languishing -> closed

___
Python tracker 

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



[issue16541] tk_setPalette doesn't accept keyword parameters

2012-11-23 Thread Guilherme Polo

Guilherme Polo added the comment:

If doing list(kw.items()) works, I'm fine with that. If it does not, then 
ttk._format_optdict(kw) should.

--

___
Python tracker 

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



[issue16531] Allow IPNetwork to take a tuple

2012-11-23 Thread Ezio Melotti

Changes by Ezio Melotti :


--
keywords: +easy
nosy: +ezio.melotti
stage:  -> needs patch

___
Python tracker 

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



[issue16530] documentation of os.wait3

2012-11-23 Thread Ezio Melotti

Ezio Melotti added the comment:

Fixed, thanks for the report!

--
assignee: docs@python -> ezio.melotti
nosy: +ezio.melotti
resolution:  -> fixed
stage:  -> committed/rejected
status: open -> closed
versions:  -Python 2.6, Python 3.1

___
Python tracker 

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



[issue16530] documentation of os.wait3

2012-11-23 Thread Roundup Robot

Roundup Robot added the comment:

New changeset a2038edb51cd by Ezio Melotti in branch '2.7':
#16530: the "options" arg of os.wait3 is required.
http://hg.python.org/cpython/rev/a2038edb51cd

New changeset 1cf1194a443e by Ezio Melotti in branch '3.2':
#16530: the "options" arg of os.wait3 is required.
http://hg.python.org/cpython/rev/1cf1194a443e

New changeset 7359ade2ab0b by Ezio Melotti in branch '3.3':
#16530: merge with 3.2.
http://hg.python.org/cpython/rev/7359ade2ab0b

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

--
nosy: +python-dev

___
Python tracker 

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



[issue16540] Make itertools count, cycle, and repeat objects subscriptable like range.

2012-11-23 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

> Apologies if this is a bad question, but why do count, cycle, and repeat 
> return iterators rather than iterables?

Actually they are iterables too.

--

___
Python tracker 

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



[issue16542] http//bugs.python/joko.suwito

2012-11-23 Thread Ezio Melotti

Changes by Ezio Melotti :


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



[issue16523] attrgetter and itemgetter signatures in docs need cleanup

2012-11-23 Thread Ezio Melotti

Changes by Ezio Melotti :


--
keywords: +patch
nosy: +chris.jerdonek
stage: needs patch -> patch review
versions: +Python 3.2
Added file: http://bugs.python.org/file28089/issue16523.diff

___
Python tracker 

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



[issue16541] tk_setPalette doesn't accept keyword parameters

2012-11-23 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

There are two ways to fix this issue:

1. Fix tk_setPalette() (just wrap kw.items() with list() or tuple()).
2. Fix C implementation of _flatten() for work with any iterators.

--
nosy: +gpolo, serhiy.storchaka
stage:  -> needs patch
type: compile error -> behavior
versions: +Python 3.2, Python 3.4

___
Python tracker 

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



[issue16542] http//bugs.python/joko.suwito

2012-11-23 Thread joko suwito

New submission from joko suwito:

thank you

--
messages: 176194
nosy: joko.suwito
priority: normal
severity: normal
status: open
title: http//bugs.python/joko.suwito

___
Python tracker 

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



[issue16541] tk_setPalette doesn't accept keyword parameters

2012-11-23 Thread Helmut Jarausch

New submission from Helmut Jarausch:

import tkinter as Tk
root= Tk.Tk()
root.tk_setPalette(background = 'AntiqueWhite1', foreground = 'blue')

but python-3.3:0+ (3.3:27cb1a3d57c8+) gives

Traceback (most recent call last):
  File "Matr_Select.py", line 174, in 
root.tk_setPalette(background = 'AntiqueWhite1', foreground = 'blue')
  File "/usr/lib64/python3.3/tkinter/__init__.py", line 390, in 
tk_setPalette
+ _flatten(args) + _flatten(kw.items()))
TypeError: argument must be sequence

Thanks for looking into it,
Helmut.

--
components: Tkinter
messages: 176193
nosy: HJarausch
priority: normal
severity: normal
status: open
title: tk_setPalette doesn't accept keyword parameters
type: compile error
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



[issue16488] Add context manager support to epoll object

2012-11-23 Thread Andrew Svetlov

Andrew Svetlov added the comment:

+0 for patch

--
nosy: +asvetlov

___
Python tracker 

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



[issue16539] Turn off 'No handlers could be found for logger' message

2012-11-23 Thread anatoly techtonik

anatoly techtonik added the comment:

I'd say this is a pretty valid issue with "won't fix" or "workaround available" 
resolution.

The question - is the same behavior preserved for Python 3?

--
resolution: invalid -> wont fix
status: closed -> languishing

___
Python tracker 

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



[issue16540] Make itertools count, cycle, and repeat objects subscriptable like range.

2012-11-23 Thread Éric Araujo

Éric Araujo added the comment:

The point of itertools is to implement building blocks for iterators, which are 
memory-efficient and can sometimes be infinite, contrary to sequences.

--
nosy: +eric.araujo

___
Python tracker 

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



[issue16518] add "buffer protocol" to glossary

2012-11-23 Thread Ezio Melotti

Changes by Ezio Melotti :


--
stage:  -> needs patch

___
Python tracker 

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



[issue16509] sqlite3 docs do not explain check_same_thread

2012-11-23 Thread Ezio Melotti

Changes by Ezio Melotti :


--
nosy: +ghaering
stage:  -> needs patch
versions: +Python 3.2, Python 3.4

___
Python tracker 

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



[issue16508] include the "object" type in the lists of documented types

2012-11-23 Thread Ezio Melotti

Changes by Ezio Melotti :


--
stage:  -> needs patch

___
Python tracker 

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



[issue16477] tarfile fails to close file handles in case of exception

2012-11-23 Thread Andrew Svetlov

Andrew Svetlov added the comment:

LGTM

--
nosy: +asvetlov

___
Python tracker 

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



[issue16519] site.venv() should use abspath(executable)

2012-11-23 Thread Éric Araujo

Changes by Éric Araujo :


--
nosy: +eric.araujo, vinay.sajip

___
Python tracker 

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



[issue16526] Python does not cross compile properly

2012-11-23 Thread Éric Araujo

Éric Araujo added the comment:

See also:

http://bugs.python.org/issue3754
  cross-compilation support for python build

http://bugs.python.org/issue1006238
  cross compile patch

http://bugs.python.org/issue1597850
  Cross compiling patches for MINGW (superseder of 
http://bugs.python.org/issue1339673, cross compile and mingw support)

http://bugs.python.org/issue3871
  cross and native build of python for mingw32 with distutils

http://bugs.python.org/issue3718
  environment variable MACHDEP and python build system

http://bugs.python.org/issue10782
  Not possible to cross-compile due to poor detection of %lld support in printf

--
nosy: +eric.araujo

___
Python tracker 

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



  1   2   >