[issue22725] improve documentation for enumerate() (built-in function)

2014-10-25 Thread Van Ly

Van Ly added the comment:

I don't want to argue. Ask a 12-year old and their English teacher, Does the 
second sentence qualify as gobbledygook even if it is technically correct and 
complete and not verbose?

To be constructive and take on what has been said, an iteration on improving 
the wording: 

-- improve wording as follows:

enumerate(iteratable, start=0)

Accepts an iteratable[typo for iterable?] and returns an iterator, a special 
case 'enumerate object'. The method iterator.next() returns a tuple which pairs 
an index counter with the object at the index in iterable.

 led = ['red', 'green', 'blue']
led = ['red', 'green', 'blue']
 iter = enumerate(led)
iter = enumerate(led)
 iter.next()
iter.next()
(0, 'red')
 iter.next()
iter.next()
(1, 'green')
 iter.next()
iter.next()
(2, 'blue')

# While enumerate does not return a list of pairs, 
# it is easy to collect the pairs and construct a list as follows
 list(enumerate(led))
list(enumerate(led))
[(0, 'red'), (1, 'green'), (2, 'blue')]

--

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



[issue22722] inheritable pipes are unwieldy without os.pipe2

2014-10-25 Thread STINNER Victor

STINNER Victor added the comment:

os.dup2() is really a special case for inheritable file descriptors. See
the PEP 446.

--

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



[issue22725] improve documentation for enumerate() (built-in function)

2014-10-25 Thread Ethan Furman

Ethan Furman added the comment:

rdm was not asking for an argument, he was asking for a more detailed 
explanation of what was confusing.  Your initial response lacked courtesy and 
respect, and is not appreciated.

The rest of your reply was much better.  Next time, please skip the 
non-constructive portion.

--
nosy: +ethan.furman

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



[issue22725] improve documentation for enumerate() (built-in function)

2014-10-25 Thread Van Ly

Van Ly added the comment:

Understood. I felt the problem was self evident with sequence must be a 
sequence.

--

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



[issue22672] float arguments in scientific notation not supported by argparse

2014-10-25 Thread Jacopo Nespolo

Jacopo Nespolo added the comment:

Ned Deily: I don't quite know how to use unittest, but I'll try to look into it.

paul j3:
 There I proposed leaving '_negative_number_matcher' unchanged, 
 but only use it to set '_has_negative_number_optionals'.

I don't know argparse internals but, if I understand your argument, I think you 
still need a '_negative_number_matcher' capable of correctly match any negative 
number in any form, including scientific notation, complex j, etc..
If this is the case, then, the matcher could be simplified to something like

'^-\d+|^-.\d+'

(notice $ removed from current regex) which would only signal that something 
that starts like a negative number is present.
Then one could use complex() or float() or whatever, to check that that's 
actually the case.

I would still expect an exception to be raised if, say, I specify type=float 
and then a complex value is passed as an argument.

--

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



[issue22725] improve documentation for enumerate() (built-in function)

2014-10-25 Thread Georg Brandl

Georg Brandl added the comment:

 I felt the problem was self evident with sequence must be a sequence.

The two words are not used in the same sense: the first names the argument of 
the function, the second is one of several possible object types you can pass 
for that argument.

--
nosy: +georg.brandl

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



[issue22725] improve documentation for enumerate() (built-in function)

2014-10-25 Thread Van Ly

Van Ly added the comment:

 sequence must be a sequence

The subtle minutiae of aficionados necessary to interpret the meaning of those 
two words in their distinct relation is opaque to a new comer and doesn’t serve 
the widest possible audience usefully to get the job done quick. The second 
placed sense has a range of possibility narrower than iterable as has been 
said, all sequences are iterables but not all iterables sequences.

--

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



[issue22721] pprint output for sets and dicts is not stable

2014-10-25 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

 Hmm... is it important?

Not more than sorting pprint output at all. This looks low priority issue to 
me, but the fix looks pretty easy. Here is a patch. I hope Raymond will make a 
review, may be I missed some details.

--
keywords: +patch
stage:  - patch review
Added file: http://bugs.python.org/file37011/pprint_safe_key.patch

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



[issue22725] improve documentation for enumerate() (built-in function)

2014-10-25 Thread Van Ly

Van Ly added the comment:

The first mention of iterator should link to 'glossary.html#term-iterator'.

There is a builtin iter() function. This may cause confusion in earlier 
suggested inline sample code.

-- Use the following inline sample code 
-- in place of 'iter = enumerate(led)'to avoid confusion with iter() builtin:

led = ['red', 'green', 'blue']
iterator = enumerate(led)
try:
while True:
print iterator.next()
except StopIteration:
print 'End of iterator has been reached.'

--

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



[issue22678] An OSError subclass for no space left on device would be nice

2014-10-25 Thread Tshepang Lekhonkhobe

Changes by Tshepang Lekhonkhobe tshep...@gmail.com:


--
nosy: +tshepang

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



[issue22705] Idle extension configuration: add option-help option

2014-10-25 Thread Saimadhav Heblikar

Saimadhav Heblikar added the comment:

Attached is a patch which attempts to display help text using a ToolTip. The 
additional requirement is that for entry 'name', there be another entry have a 
'name_help' in the config-extensions.def(easier to see the file to understand 
what I mean).

A few changes were required in ToolTip.py to adjust the delay in millisecond 
value.

Note : In the current patch, I have added demo help string only for CodeContext 
and AutoComplete.

--
keywords: +patch
Added file: http://bugs.python.org/file37012/issue22705-v1.diff

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



[issue22237] sorted() docs should state that the sort is stable

2014-10-25 Thread Stéphane Wirtel

Stéphane Wirtel added the comment:

ping.

--

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



[issue12916] Add inspect.splitdoc

2014-10-25 Thread Stéphane Wirtel

Stéphane Wirtel added the comment:

@berker.peksag Could you review the last patch? and keep me informed?

Thanks,

--

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



[issue22711] Distribution guide should link directly to distutils setuptools API references

2014-10-25 Thread Nick Coghlan

Nick Coghlan added the comment:

Since the community has been so successful at shouting down most previous 
attempts at fundamental Python packaging ecosystem improvements, I am 
extraordinarily hostile to anything that even hints at attempting to do so 
again. I interpreted the proposal originally put forward in this issue as just 
such an attempt. Specifically, it reads to me as ah, this link was too hard to 
find, despite still being the top link when searching 'python distutils', let's 
revert all the docs changes, so newcomers to Python can go back to being just 
as lost and confused as they were before PEP 453 was accepted and implemented.

The legacy docs are not better than packaging.python.org or the setuptools docs 
- they are actively misleading in several respects, and extracting useful 
information from them requires that you already be an expert in the Python 
packaging ecosystem so you can successfully figure out which bits you need to 
ignore and which bits provide relevant information not yet covered anywhere 
else.

However, on rereading https://docs.python.org/3/distributing/, I agree it 
should at least point readers directly at the package API references for both 
distutils and setuptools. At the moment, even the existing inline references 
aren't hyperlinked.

The distutils landing page should also point readers directly at the 
setuptools docs, rather than requiring an indirection via the packaging user 
guide.

--
title: legacy distutils docs better than packaging guide - Distribution 
guide should link directly to distutils  setuptools API references

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



[issue22721] pprint output for sets and dicts is not stable

2014-10-25 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

And here is alternative patch if the first patch is not correct. It is more 
complicated and I suppose is less efficient in common case.

--
Added file: http://bugs.python.org/file37013/pprint_safe_key_alt.patch

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



[issue18216] gettext doesn't check MO versions

2014-10-25 Thread Aaron Hill

Aaron Hill added the comment:

Is there anything that needs to be changed?

--

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



[issue22711] Distribution guide should link directly to distutils setuptools API references

2014-10-25 Thread Roundup Robot

Roundup Robot added the comment:

New changeset c46953d76d4c by Nick Coghlan in branch '3.4':
Issue #22711: improve links in new distribution docs
https://hg.python.org/cpython/rev/c46953d76d4c

New changeset cbb9efd48405 by Nick Coghlan in branch 'default':
Merge issue #22711 from 3.4
https://hg.python.org/cpython/rev/cbb9efd48405

--
nosy: +python-dev

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



[issue22711] Distribution guide should link directly to distutils setuptools API references

2014-10-25 Thread Nick Coghlan

Nick Coghlan added the comment:

I added several previously missing hyperlinks, together with a short 
description of some key setuptools benefits in the distutils landing page.

Let me know if you had more than that in mind.

--
status: open - pending

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



[issue22711] Distribution guide should link directly to distutils setuptools API references

2014-10-25 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Le 25/10/2014 15:37, Nick Coghlan a écrit :
 
 Since the community has been so successful at shouting down most
previous attempts at fundamental Python packaging ecosystem
improvements, I am extraordinarily hostile to anything that even hints
at attempting to do so again.

You're saying that to the guy who wanted distutils2 to stay in the stdlib.

 I added several previously missing hyperlinks,

This is good. Thank you Nick!

--
status: pending - open

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



[issue22711] Distribution guide should link directly to distutils setuptools API references

2014-10-25 Thread Antoine Pitrou

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


--
resolution:  - fixed
status: open - closed

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



[issue22711] Distribution guide should link directly to distutils setuptools API references

2014-10-25 Thread Nick Coghlan

Nick Coghlan added the comment:

Also, my apologies for overreacting - I interpreted the suggestion in the worst 
possible light, which you definitely didn't deserve.

Actually going back and rereading the guide with the benefits of a few months 
distance from originally writing it made the problems you encountered *much* 
clearer to me - the relevant links were there on the distutils landing page, 
but that page itself wasn't easily reachable from the top level navigation.

--

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



[issue10548] Error in setUp not reported as expectedFailure (unittest)

2014-10-25 Thread Nick Coghlan

Nick Coghlan added the comment:

If you want the simple model, there's nothing to change (except perhaps 
documentation), as that's the way things work today.

subtest support also makes it much easier to factor out common assertions 
without relying on the setUp/tearDown protocol, so I'd be OK with explicitly 
declaring having common assertions in those methods to be an abuse of the 
protocol.

--

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



[issue22725] improve documentation for enumerate() (built-in function)

2014-10-25 Thread R. David Murray

R. David Murray added the comment:

I think you misunderstand the purpose of the documentation you are suggesting 
modifying.  It is a *reference guide*, and as such it needs to be technically 
precise and *must* correctly use the jargon of the language.  Especially 
since it also functions as the reference guide for people who implement new 
versions of Python, and need to know what behavior of things like 'enumerate' 
they need to reproduce.

That said, we also prefer the reference docs to be clear and understandable to 
someone who is a relative beginner, as long as we don't lose precision in doing 
so.  Thus the glossary and the glossary links, so yes it would be a good idea 
to add those.

I did indeed misspell iterable.

Your sentence is still incorrect...items returned by an iterator do not 
necessarily have an index (that is, you can't say myiterator[3] in the general 
case).

So, if I understand correctly, your difficulty was the confusion between the 
argument name *sequence* and the technical term ``sequence`` (referring to a 
Python object type).  I agree that that makes things confusing.  It would be 
better if the argument were named *iterable*, but we can't really change it at 
this point for backward compatibility reasons.

Maybe if we rearrange things a bit we can make it clearer.  How about this:

Return an enumerate object which when iterated[link to glossary] yields a 
two-tuple for each element in *sequence*, each tuple consisting of the sequence 
number of the element (beginning with *start*, which defaults to 0) paired with 
the element itself.  *sequence* must be a sequence, an iterator, or some other 
object which supports iteration.

That moves the distracting precise definition of *sequence* to the end, after 
you've already grasped what the function does.  You will note that I've also 
dropped the reference to next; that is implicit in the mention of when 
iterated, since it is an integral part of the iteration protocol. IMO it is a 
distraction to mention next in this context.  It confuses the beginner and 
isn't needed by the expert.

--

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



[issue22716] Add reference to the object missing an attribute to AttributeError

2014-10-25 Thread flying sheep

flying sheep added the comment:

No, this is about the object which misses an argument, not the attribute name.

But thanks for the pointer: one combined fix for both would be the smartest 
thing to do.

--
status: closed - open

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



[issue10548] Error in setUp not reported as expectedFailure (unittest)

2014-10-25 Thread R. David Murray

R. David Murray added the comment:

Oh, now I understand what the issue is.  It never even *occurred* to me that 
someone might put assertions in setUp or tearDown.  So, yeah, count me in on 
considering that an abuse of the protocol :)

(If I want to factor out common assertions, and I do it a lot, I put them in a 
helper method and call it explicitly.)

--

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



[issue22716] Add reference to the object missing an attribute to AttributeError

2014-10-25 Thread R. David Murray

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


--
resolution: duplicate - 
stage: resolved - 
superseder: Add an 'attr' attribute to AttributeError - 
versions: +Python 3.5 -Python 3.6

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



[issue10548] Error in setUp not reported as expectedFailure (unittest)

2014-10-25 Thread Nick Coghlan

Nick Coghlan added the comment:

Heh, yeah, I've written *many* check_* methods in my life - I just hadn't made 
the link between that practice, and this suggestion.

I think that switches me firmly to the don't change the behaviour camp.

--

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



[issue20584] On FreeBSD, signal.NSIG is smaller than biggest signal value

2014-10-25 Thread Philip Semanchuk

Changes by Philip Semanchuk osvens...@users.sourceforge.net:


--
nosy: +osvenskan

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



[issue22716] Add reference to the object missing an attribute to AttributeError

2014-10-25 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

See also PEP 473.

--

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



[issue22727] Improve benchmarks precision

2014-10-25 Thread Antoine Pitrou

New submission from Antoine Pitrou:

This patch tries to improve precision of benchmarks in the benchmark suite by 
two measures:
- select the best timer for the pair of interpreters (i.e. perf_counter() if 
possible)
- make hashing deterministic to avoid fluctuations between runs

--
components: Benchmarks
files: precision.patch
keywords: patch
messages: 230011
nosy: brett.cannon, pitrou, serhiy.storchaka
priority: normal
severity: normal
stage: patch review
status: open
title: Improve benchmarks precision
type: enhancement
versions: Python 3.5
Added file: http://bugs.python.org/file37014/precision.patch

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



[issue22725] improve documentation for enumerate() (built-in function)

2014-10-25 Thread Georg Brandl

Changes by Georg Brandl ge...@python.org:


--
nosy:  -georg.brandl

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



[issue22725] improve documentation for enumerate() (built-in function)

2014-10-25 Thread Ethan Furman

Ethan Furman added the comment:

+1 for rdm's change.

--

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



[issue22727] Improve benchmarks precision

2014-10-25 Thread Georg Brandl

Georg Brandl added the comment:

LGTM.

--
nosy: +georg.brandl

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



[issue22727] Improve benchmarks precision

2014-10-25 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Pushed in dc7d29be5a9e.

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

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



[issue22728] Deprecate spurious benchmarks

2014-10-25 Thread Antoine Pitrou

New submission from Antoine Pitrou:

iterative_count and threaded_count are really uninteresting benchmarks, 
inherited from Dave Beazley's GIL experiments. I suggest to deprecate them and 
remove from the all and 2n3 sets. Patch attached.

--
components: Benchmarks
files: deprecated.patch
keywords: patch
messages: 230015
nosy: pitrou
priority: normal
severity: normal
stage: patch review
status: open
title: Deprecate spurious benchmarks
type: enhancement
Added file: http://bugs.python.org/file37015/deprecated.patch

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



[issue22728] Deprecate spurious benchmarks

2014-10-25 Thread Antoine Pitrou

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


--
nosy: +brett.cannon

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



[issue22729] `wait` and `as_completed` depend on private api

2014-10-25 Thread Ben Mather

New submission from Ben Mather:

Adds `remove_done_callback` to `Future` object, removes `_waiters` attribute, 
and re-implements `wait` and `as_completed` using callbacks.

This makes it possible to extend or replace `Future` without having to mimic 
its private `_waiters` interface.

Currently waiters and callbacks are triggered at different points after a 
cancel (waiters in `set_condition_and_notify_cancel` and callbacks in 
`cancel`.)  This is a problem as it means that implementing `wait` and 
`as_completed` using `add_done_callback` will result in a behaviour change 
unless the behaviour of `add_done_callback` is changed instead. 

I don't believe the current behaviour is as documented anyway so I'm not sure 
if this is a problem.  See issue 22630.

I am a little uncertain about the O(n) implementation of `remove_done_callback` 
but can't imagine a situation where it would be a problem.

--
components: Library (Lib)
files: non-magic-waiters.patch
keywords: patch
messages: 230016
nosy: bwhmather
priority: normal
severity: normal
status: open
title: `wait` and `as_completed` depend on private api
type: behavior
versions: Python 3.4, Python 3.5, Python 3.6
Added file: http://bugs.python.org/file37016/non-magic-waiters.patch

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



[issue22630] `concurrent.futures.Future.set_running_or_notify_cancel` does not notify cancel

2014-10-25 Thread Ben Mather

Ben Mather added the comment:

Have uploaded patch to re-implement `wait` and `as_completed` using callbacks.  
See issue 22729.  Sorry for sitting on it for so long.

--
Added file: http://bugs.python.org/file37017/non-magic-waiters.patch

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



[issue22672] float arguments in scientific notation not supported by argparse

2014-10-25 Thread paul j3

paul j3 added the comment:

Patch tests are added to an existing 'Lib/test/test_argparse.py' file.  I use 
existing test cases as a pattern any new tests.

-

Your test file runs fine with the patch I proposed for Issue 9334.

-

The argparse code uses '_negative_number_matcher' for 2 purposes

1) to test whether an option_string looks like a negative number, and set the 
'self._has_negative_number_optionals' attribute.

parser.add_argument('-2')
parser.add_argument('-1.234')

2) to test whether an argument string (an element of sys.argv) looks like one 
of those option_strings, or is an argument (positional or argument to your 
'-a').

The 'type' in for your '-a' argument is separate issue.  That is used convert a 
string to a number, float, complex or what ever, and raise an error it if can't 
do so.

In your case './test.py -a -1e5' fails because '-1e5' fails the 2nd test, and 
thus is not recognized as an argument to '-a'. Understanding the details of 
this requires digging into the logic of the _parse_optional() method.

'./test.py -a-1e5' or './test.py -a=-1e5' work because the number is correctly 
recognized as an argument.

For issue 9334 I looked at generalizing '_negative_number_matcher' as you did.  
But unless you want to use something like:

parser.add_argument('-1.2e-34')

and set the 'self._has_negative_number_optionals' to '[True]', the matcher 
doesn't need to be more general.

It's only the test in '_parse_optional()' that needs to be generalized to 
handle scientific and complex notation.  And for that I figured that wrapping 
'complex()' in a 'try' block was just as general and reliable as a complicated 
're' pattern.  At least that was my claim in issue 9334, and I haven't gotten 
feedback on that.

I'd suggest reading the 9334 discussion, and testing that patch.  That patch 
includes some tests for scientific and complex numbers.

That issue and patch also adds a 'args_default_to_positional' parameter. I 
wonder if the two changes should be put in separate patches.

--

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



[issue22727] Improve benchmarks precision

2014-10-25 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

For more precise results it may be worth to run interpreters several times with 
random hash seed and then select the best time. Different interpreters can have 
different effect on the same seed.

--

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



[issue22727] Improve benchmarks precision

2014-10-25 Thread Antoine Pitrou

Antoine Pitrou added the comment:

You thereotically need 2**63 runs to select the best answer, though. You don't 
know how the distribution of hash seeds can influence the results, which means 
mere sampling may not be sufficient.

--

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



[issue12885] distutils.filelist.findall() fails on broken symlink in Py2.x

2014-10-25 Thread Jason R. Coombs

Jason R. Coombs added the comment:

This issue has been monkeypatched by setuptools for 7 years: 
https://bitbucket.org/pypa/setuptools/commits/4556f9d08ef7

--
assignee: tarek - 
components:  -Distutils2
nosy: +dstufft, jason.coombs
versions: +Python 3.4, Python 3.5 -3rd party, Python 3.2, Python 3.3

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



[issue22729] `wait` and `as_completed` depend on private api

2014-10-25 Thread Ned Deily

Changes by Ned Deily n...@acm.org:


--
nosy: +bquinlan

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



[issue22261] Document how to use Concurrent Build when using MsBuild

2014-10-25 Thread Roundup Robot

Roundup Robot added the comment:

New changeset f35403bf8c91 by Zachary Ware in branch 'default':
Issue #22261: Add a note to PCbuild\readme.txt about MSBuild switches.
https://hg.python.org/cpython/rev/f35403bf8c91

--
nosy: +python-dev

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



[issue22261] Document how to use Concurrent Build when using MsBuild

2014-10-25 Thread Zachary Ware

Zachary Ware added the comment:

I finally made it back to this and committed a tweaked version of your patch.  
Thanks for the report and patch!

--
resolution:  - fixed
stage: needs patch - resolved
status: open - closed

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