[issue15799] httplib client and statusline

2014-09-26 Thread Senthil Kumaran

Senthil Kumaran added the comment:

Sorry that I did not get involved earlier.

It is difficult to prove any problem with the current behavior and it is 
rightly closed. The issue which was originally raised seems to me a cosmetic 
one, which won't get exhibited as well.

Here is  simple test case and the output with the current behavior.

# testcases.py

testcases = [HTTP/1.1 200, HTTP/1.1 200 OK, HTTP/1.1 200  , HTTP/1.1   
200]
for tc in testcases:
try:
version, status, reason = tc.split(None, 2)
print %s (%s,%s,%s) % (tc, version, status, reason)
except ValueError:
version, status = tc.split(None, 1)
print %s (%s, %s) % (tc, version, status)


$ python testcases.py
HTTP/1.1 200 (HTTP/1.1, 200)
HTTP/1.1 200 OK (HTTP/1.1,200,OK)
HTTP/1.1 200   (HTTP/1.1, 200  )
HTTP/1.1   200 (HTTP/1.1, 200)

The problem is the status code (str at the moment) has a trailing spaces. 
And now, the status code is not used as string. Just after the parsing, the 
status is converted to integer, Line 337: status = int(status) and rest of 
urllib and http/client's behavior use status as int rather than as string.

Thanks!

--
type: enhancement - behavior

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



[issue19645] decouple unittest assertions from the TestCase class

2014-09-26 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Here are most popular idioms which deserve special assertion methods:

assertHasAttr(obj, name) == assertTrue(hasattr(obj, name))
assertIsSubclass(type, expected) == assertTrue(issubclass(type, expected))
assertTypeIs(obj, expected) == assertIs(type(obj), expected)
assertTypedEqual(actual, expected) == assertIs(type(actual), type(expected)) 
and assertEqual(actual, expected) # or assertIsInstance(actual, type(expected))?
assertStartsWith(actual, prefix) == assertTrue(s.startswith(prefix))
assertEndsWith(actual, suffix) == assertTrue(s.endswith(suffix))
assertUnorderedSequenceEqual(first, second) == assertTrue(all(x in second for x 
in first)) and assertTrue(all(x in first for x in second)) and 
assertEqual(len(first), len(second))

--
nosy: +serhiy.storchaka

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



[issue19642] shutil to support equivalent of: rm -f /dir/*

2014-09-26 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Rather like this:

for n in os.listdir(dirpath):
p = os.path.join(dirpath, n)
if os.path.isdir(p):
shutil.rmtree(p)
else:
os.unlink(p)

--
nosy: +serhiy.storchaka

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



[issue22401] argparse: 'resolve' conflict handler damages the actions of the parent parser

2014-09-26 Thread paul j3

Changes by paul j3 ajipa...@gmail.com:


Added file: http://bugs.python.org/file36728/sample3.py

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



[issue22401] argparse: 'resolve' conflict handler damages the actions of the parent parser

2014-09-26 Thread paul j3

Changes by paul j3 ajipa...@gmail.com:


Removed file: http://bugs.python.org/file36656/sample3.py

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



[issue22501] Optimise PyLong division by 1 or -1

2014-09-26 Thread Stefan Behnel

New submission from Stefan Behnel:

The attached patch adds fast paths for PyLong division by 1 and -1, as well as 
dividing 0 by something. This was found helpful for fractions normalisation, as 
the GCD that is divided by can often be |1|, but firing up the whole division 
machinery for this eats a lot of CPU cycles for nothing.

There are currently two test failures in test_long.py because dividing a huge 
number by 1 or -1 no longer raises an OverflowError. This is a behavioural 
change, but I find it acceptable. If others agree, I'll fix the tests and 
submit a new patch.

--
components: Interpreter Core
files: div_by_1_fast_path.patch
keywords: patch
messages: 227590
nosy: mark.dickinson, pitrou, scoder, serhiy.storchaka
priority: normal
severity: normal
status: open
title: Optimise PyLong division by 1 or -1
type: performance
versions: Python 3.5
Added file: http://bugs.python.org/file36729/div_by_1_fast_path.patch

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



[issue22464] Speed up fractions implementation

2014-09-26 Thread Stefan Behnel

Stefan Behnel added the comment:

I tried it, but it seems better to open a new ticket for this as there are 
behavioural changes. See #22501.

--
status: open - closed

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



[issue22143] rlcompleter.Completer has duplicate matches

2014-09-26 Thread Claudiu Popa

Claudiu Popa added the comment:

The patch looks good. Could you add a test?

--
nosy: +Claudiu.Popa

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



[issue16512] imghdr doesn't recognize variant jpeg formats

2014-09-26 Thread Claudiu Popa

Changes by Claudiu Popa pcmantic...@gmail.com:


--
stage: patch review - test needed

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



[issue22464] Speed up fractions implementation

2014-09-26 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Please do not use is for number comparison. This can be broken unexpectedly 
in future or on alternative implementation.

--

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



[issue22501] Optimise PyLong division by 1 or -1

2014-09-26 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Perhaps it would be worth to special case multiplying on 0, 1 and -1 and adding 
0, 1 and -1 too.

--
stage:  - patch review

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



[issue22501] Optimise PyLong division by 1 or -1

2014-09-26 Thread STINNER Victor

STINNER Victor added the comment:

Any optimization requires a benchmark. What is the speedup?

--
nosy: +haypo

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



[issue22501] Optimise PyLong division by 1 or -1

2014-09-26 Thread STINNER Victor

STINNER Victor added the comment:

I proposed an optimization for x  0 (as part of a larger patch to optimize 
2 ** x) but the issue was rejected:
http://bugs.python.org/issue21420#msg217802

Mark Dickson wrote (msg217863):
There are many, many tiny optimisations we *could* be making in 
Objects/longobject.c; each of those potential optimisations adds to the cost of 
maintaining the code, detracts from readability, and potentially even slows 
down the common cases fractionally.  In general, I think we should only be 
applying this sort of optimization when there's a clear benefit to real-world 
code.  I don't think this one crosses that line.

--

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



[issue22501] Optimise PyLong division by 1 or -1

2014-09-26 Thread Stefan Behnel

Stefan Behnel added the comment:

Attaching a similar patch for long_mul().

--
Added file: http://bugs.python.org/file36730/mul_by_1_fast_path.patch

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



[issue22501] Optimise PyLong division by 1 or -1

2014-09-26 Thread Stefan Behnel

Stefan Behnel added the comment:

 Any optimization requires a benchmark. What is the speedup?

I gave numbers in ticket #22464.


Since many Fraction input values can already be normalised for some reason, the 
following change shaves off almost 30% of the calls to 
PyNumber_InPlaceFloorDivide() in the telco benchmark during Fraction 
instantiation according to callgrind, thus saving 20% of the CPU instructions 
that go into tp_new().


I then proposed to move this into the PyLong type in general, rather than 
letting Fraction itself do it less efficiently.

--

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



[issue22501] Optimise PyLong division by 1 or -1

2014-09-26 Thread Stefan Behnel

Stefan Behnel added the comment:

@Serhiy: moving the fast path into l_divmod() has the disadvantage of making it 
even more complex because we'd then also want to determine the modulus, but 
only if requested, and it can be 1, 0 or -1, depending on the second value. 
Sounds like a lot more if's.

--

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



[issue22501] Optimise PyLong division by 1 or -1

2014-09-26 Thread Stefan Behnel

Stefan Behnel added the comment:

Combined patch for both mul and div that fixes the return value of 
long_true_div(), as found by Serhiy, and removes the useless change in 
long_divrem(), as found by Antoine. Thanks!

All test_long.py tests pass now.

--
Added file: http://bugs.python.org/file36731/mul_div_by_1_fast_path.patch

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



[issue22501] Optimise PyLong division by 1 or -1

2014-09-26 Thread Stefan Behnel

Stefan Behnel added the comment:

@Serhiy: please ignore my comment in msg227599. I'll submit a patch that moves 
the specialisation to l_divmod().

--

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



[issue22501] Optimise PyLong division by 1 or -1

2014-09-26 Thread Stefan Behnel

Stefan Behnel added the comment:

Thanks for the reviews, here's a new patch.

--
Added file: http://bugs.python.org/file36732/mul_div_by_1_fast_path_2.patch

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



[issue22141] rlcompleter.Completer matches too much

2014-09-26 Thread Lorenz Quack

Lorenz Quack added the comment:

Oops!

tests sound like a good Idea.
I realized my fix doesn't work.
I had not noticed this before because in my application I had already 
implemented a workaround :/

The problem with catching the trailing parenthesis is that the group then does 
not match the attribute of the class.
I'll be back with a new patch and test case.

--

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



[issue22501] Optimise PyLong division by 1 or -1

2014-09-26 Thread Stefan Behnel

Changes by Stefan Behnel sco...@users.sourceforge.net:


Removed file: http://bugs.python.org/file36732/mul_div_by_1_fast_path_2.patch

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



[issue22501] Optimise PyLong division by 1 or -1

2014-09-26 Thread Stefan Behnel

Stefan Behnel added the comment:

Sorry, last patch version contained a use before type check bug.

--
Added file: http://bugs.python.org/file36733/mul_div_by_1_fast_path_3.patch

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



[issue22501] Optimise PyLong division by 1 or -1

2014-09-26 Thread Stefan Behnel

Stefan Behnel added the comment:

Here is an incremental patch that adds fast paths for adding and subtracting 0.

Question: the module calls long_long() in some places (e.g. long_abs()) and 
thus forces the return type to be exactly a PyLong and not a subtype. My 
changes use a plain incref+return input value in some places. Should they 
call long_long() on it instead?

--
Added file: http://bugs.python.org/file36734/add_sub_0_fast_path.patch

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



[issue13611] Integrate ElementC14N module into xml.etree package

2014-09-26 Thread Chris E

Chris E added the comment:

Whilst in most cases this would be correct, in this case it looks like the 
original contributor took a subset of what the original author wrote and put it 
into the python libraries.

Until relatively recently the ElementTree.py file included a stanza that 
attempted to import the ElementC14N module and conditionally set up the 'c14n' 
key value in _serialize

--
nosy: +cbz

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



[issue22501] Optimise PyLong division by 1 or -1

2014-09-26 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Le 26/09/2014 12:57, Stefan Behnel a écrit :
 
 Question: the module calls long_long() in some places (e.g.
long_abs()) and thus forces the return type to be exactly a PyLong and
not a subtype. My changes use a plain incref+return input value in
some places. Should they call long_long() on it instead?

Ah, yes, they should. The return type should not depend on the input
*values* :-)

--

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



[issue8212] A tp_dealloc of a subclassed class cannot resurrect an object

2014-09-26 Thread Antoine Pitrou

Antoine Pitrou added the comment:

I think PEP 442 makes this request obsolete: you can simply implement 
tp_finalize() and incref the object naturally from there. Kristjan, what do you 
think?

--

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



[issue13611] Integrate ElementC14N module into xml.etree package

2014-09-26 Thread Antoine Pitrou

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


--
nosy: +eli.bendersky

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



[issue22501] Optimise PyLong division by 1 or -1

2014-09-26 Thread Stefan Behnel

Changes by Stefan Behnel sco...@users.sourceforge.net:


Added file: http://bugs.python.org/file36736/mul_div_by_1_fast_path_3.patch

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



[issue22501] Optimise PyLong division by 1 or -1

2014-09-26 Thread Stefan Behnel

Stefan Behnel added the comment:

Ok, updating both patches.

--
Added file: http://bugs.python.org/file36735/add_sub_0_fast_path_2.patch

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



[issue22197] Allow better verbosity / output control in test cases

2014-09-26 Thread Antoine Pitrou

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


--
nosy: +rbcollins

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



[issue17462] argparse FAQ: how it is different from optparse

2014-09-26 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 84313c61e60d by Berker Peksag in branch '3.4':
Issue #17462: Add a paragraph about advantages of argparse over optparse.
https://hg.python.org/cpython/rev/84313c61e60d

New changeset 45e1c0029aff by Berker Peksag in branch 'default':
Issue #17462: Add a paragraph about advantages of argparse over optparse.
https://hg.python.org/cpython/rev/45e1c0029aff

--
nosy: +python-dev

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



[issue22501] Optimise PyLong division by 1 or -1

2014-09-26 Thread Stefan Behnel

Stefan Behnel added the comment:

I reran the fractions benchmark over the final result and the overall gain 
turned out to be, well, small. It's a clearly reproducible 2-3% faster. That's 
not bad for the macro impact of a micro-optimisation, but it's not a clear 
argument for throwing more code at it either.

I'll leave it to you to decide.

--

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



[issue17462] argparse FAQ: how it is different from optparse

2014-09-26 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 4eb847e7ddde by Berker Peksag in branch '2.7':
Issue #17462: Add a paragraph about advantages of argparse over optparse.
https://hg.python.org/cpython/rev/4eb847e7ddde

--

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



[issue17462] argparse FAQ: how it is different from optparse

2014-09-26 Thread Berker Peksag

Berker Peksag added the comment:

Thanks for the patch, Anastasia.

--
assignee: eric.araujo - berker.peksag
keywords: +easy
nosy: +berker.peksag
resolution:  - fixed
stage: commit review - resolved
status: open - closed

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



[issue19610] setup.py does not allow a tuple for classifiers

2014-09-26 Thread Berker Peksag

Changes by Berker Peksag berker.pek...@gmail.com:


--
assignee:  - berker.peksag

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



[issue22327] test_gdb failures on Ubuntu 14.10

2014-09-26 Thread Stefan Krah

Stefan Krah added the comment:

I'm seeing the same, it could be an Ubuntu issue:

https://bugs.launchpad.net/ubuntu/+source/gdb/+bug/1348275

--
nosy: +skrah

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



[issue16324] MIMEText __init__ does not support Charset instance

2014-09-26 Thread Berker Peksag

Berker Peksag added the comment:

Here's an updated patch.

--
nosy: +berker.peksag
stage:  - patch review
type: behavior - enhancement
versions: +Python 3.5 -Python 3.2
Added file: http://bugs.python.org/file36737/issue16324_v2.diff

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



[issue22445] Memoryviews require more strict contiguous checks then necessary

2014-09-26 Thread Stefan Krah

Stefan Krah added the comment:

Ok, here's my take on the situation:

1) As far as Python is concerned, shape[0] == 1 was already special-cased, so
   people could not rely on canonical Fortran or C strides anyway.


2) Accessing an element via strides should be done using PyBuffer_GetPointer(),
   which can of course handle non-canonical strides.


3) Breakage will only affect NumPy users, since practically no one else is
   using multidimensional arrays.


Regarding your option 2b):  I think it may be confusing, the buffer protocol
is already so complicated.


So, I think purity wins here.  If you are sure that all future NumPy versions
will ship with precise contiguity checks, then I'll commit the new patch in 3.5 
(earlier versions should not be changed IMO).


I've moved the checks for 0 in shape[i] to the beginning (len == 0).  I hope
there are no applications that set len incorrectly, but they would be severely
broken anyway.

--
stage:  - patch review
versions: +Python 3.5
Added file: http://bugs.python.org/file36738/issue22445.diff

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



[issue16324] MIMEText __init__ does not support Charset instance

2014-09-26 Thread R. David Murray

R. David Murray added the comment:

The updated patch looks good to me.  Go ahead and commit it.

--

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



[issue19642] shutil to support equivalent of: rm -f /dir/*

2014-09-26 Thread Antoine Pitrou

Antoine Pitrou added the comment:

 rm -rf /dir

Isn't it shutil.rmtree()? Am I missing something?

 rm -f /dir/*

So it should skip dotted files, or remove them?

--

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



[issue22486] Add math.gcd()

2014-09-26 Thread Stefan Behnel

Stefan Behnel added the comment:

Thanks, Serhiy. However, something is wrong with the implementation. The 
benchmark runs into an infinite loop (it seems). And so do the previous 
patches. Does it work for you?

--

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



[issue22486] Add math.gcd()

2014-09-26 Thread Stefan Behnel

Stefan Behnel added the comment:

I compiled it with 30 bit digits, in case that's relevant. (It might be.)

--

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



[issue22197] Allow better verbosity / output control in test cases

2014-09-26 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

There is the verbose attribute of the test.support module.

--
nosy: +serhiy.storchaka

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



[issue22486] Add math.gcd()

2014-09-26 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

It works to me (compiled with 15-bit digits). Cold you please add debugging 
prints (before and after the call of math.gcd()) and find which operation is 
looping (math.gcd() itself, and for what arguments, or some Python code)?

--

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



[issue22197] Allow better verbosity / output control in test cases

2014-09-26 Thread Ezio Melotti

Ezio Melotti added the comment:

That only works for the CPython test suite (and it's not a public API).

FWIW I'm +1 on the idea, but I would have to see how it will get implemented in 
a patch.

--
stage:  - needs patch

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



[issue22197] Allow better verbosity / output control in test cases

2014-09-26 Thread R. David Murray

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


--
nosy: +r.david.murray

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



[issue22197] Allow better verbosity / output control in test cases

2014-09-26 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Usages of test.support.verbose should be replaced by self.verbosity.

As for output buffering, may be replace sys.stdout by file-like object which 
flushes its buffered content to original stdout on failure and discard it on 
success. Or add the self.log file-like object with such behavior and redirect 
all verbose output to it.

--

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



[issue22197] Allow better verbosity / output control in test cases

2014-09-26 Thread Ezio Melotti

Ezio Melotti added the comment:

 As for output buffering, may be replace sys.stdout by file-like object
 which flushes its buffered content to original stdout on failure and
 discard it on success.

This is what the --buffer option is already supposed to do (I only found out 
about it thanks to this issue, the name is not very indicative of what it 
does...).  IIUC what Antoine is suggesting is having a more fine-grained 
control of the buffering, and the ability to set it from individual test cases 
rather than using a global command line flag or unittest.main(buffer=True) 
(which is only used while executing the test file directly).

--

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



[issue22501] Optimise PyLong division by 1 or -1

2014-09-26 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Oh, such small gain and only on one specific benchmark not included still in 
standard benchmark suite, looks discourage. May be other benchmarks have gain 
from these changes?

--

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



[issue22501] Optimise PyLong division by 1 or -1

2014-09-26 Thread STINNER Victor

STINNER Victor added the comment:

 2-3% faster

3% is not enough to justify the change.

--

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



[issue22197] Allow better verbosity / output control in test cases

2014-09-26 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Indeed, I'm sorry for suggesting two features in one issue :-)

Feature #1 is self.verbosity (as a read-only variable) on test cases. Sounds 
like a no-brainer, IMHO :-)

Feature #2 is selective enabling of the buffering feature in test cases. This 
rather misnamed features only prints out stdout when the test fails, which is 
useful when you want permanent debug statements that only pollute stdout when 
there is a test failure.

--

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



[issue22486] Add math.gcd()

2014-09-26 Thread Stefan Behnel

Stefan Behnel added the comment:

This is what hangs for me:

math.gcd(1216342683557601535506311712, 436522681849110124616458784)

a and b keep switching between both values, but otherwise, the loop just 
keeps running.

The old fractions.gcd() gives 32 for them.

--

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



[issue22486] Add math.gcd()

2014-09-26 Thread Stefan Behnel

Stefan Behnel added the comment:

I can confirm that it works with 15 bit digits.

--

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



[issue18554] os.__all__ is incomplete

2014-09-26 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 7230978647a8 by Yury Selivanov in branch 'default':
os: Include posix functions in os.__all__. Closes issue #18554.
https://hg.python.org/cpython/rev/7230978647a8

--
nosy: +python-dev

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



[issue18554] os.__all__ is incomplete

2014-09-26 Thread Yury Selivanov

Yury Selivanov added the comment:

Thanks for the patch.

I've committed this to 3.5 only, as there is a slight chance that it breaks 
backwards compatibility for some scripts.

--
resolution:  - fixed
status: open - closed

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



[issue22501] Optimise PyLong division by 1 or -1

2014-09-26 Thread Stefan Behnel

Stefan Behnel added the comment:

Since Serhiy gave another round of valid feedback, here's an updated patch.

--
Added file: http://bugs.python.org/file36739/mul_div_by_1_fast_path_3.patch

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



[issue22203] inspect.getargspec() returns wrong spec for builtins

2014-09-26 Thread Yury Selivanov

Yury Selivanov added the comment:

The problem is that map  filter are classes, and their __init__ and __new__ 
methods do not provide any text_signature, hence signature uses the one from 
object.__init__.

--

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



[issue22203] inspect.getargspec() returns wrong spec for builtins

2014-09-26 Thread Yury Selivanov

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


--
nosy: +larry

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



[issue22437] re module: number of named groups is limited to 100 max

2014-09-26 Thread Yury Selivanov

Yury Selivanov added the comment:

I'm fine with either one, Serhiy. The static one looks good to me.

--

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



[issue22203] inspect.getargspec() returns wrong spec for builtins

2014-09-26 Thread Larry Hastings

Larry Hastings added the comment:

We should be able to get proper signatures for 3.5.  For 3.4, probably the best 
thing is to prevent the signature / raise an error.

--

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



[issue22486] Add math.gcd()

2014-09-26 Thread Mark Dickinson

Mark Dickinson added the comment:

To avoid regressions, please can we leave the old `fractions.gcd` exactly as it 
was?  

For example, the current `fractions.gcd` *does* work for Fraction instances 
[1].  That's certainly not its intended use, but I wouldn't be surprised if 
there's code out there that uses it in that way.  It also just happens to work 
for nonnegative finite float inputs, because a % b gives exact results when a 
and b are positive floats, so no error is introduced at any point.

I'd also worry about breaking existing uses involving integer-like objects 
(instances of numpy.int64, for example) in place of instances of ints.

[1] By works, I mean that if a and b are Fractions then gcd(a, b) returns a 
Fraction such that (1) a and b are integer multiples of gcd(a, b), and (2) 
gcd(a, b) is an integer multiple of any other number with this property.

--

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



[issue22486] Add math.gcd()

2014-09-26 Thread Mark Dickinson

Mark Dickinson added the comment:

 This is what hangs for me:

Uh-oh.  Sounds like I screwed up somewhere. I'll take a look this weekend, 
unless Serhiy beats me too it.

--

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



[issue22460] idle editor: replace all in selection

2014-09-26 Thread Terry J. Reedy

Terry J. Reedy added the comment:

This is an interesting idea, but not a high priority.  One can selectively 
replace now with [Find], [Replace], and [Replace+Find] buttons. I have been 
thinking about improving the Search and Replace dialogs, so I will not 
immediately reject this.  Some additional comments follow.

A changed method name has to be replaced in all use sites, not just in the 
class definition.  Some editors will make replacements across multiple files.

Renaming a local variable in a def statement, or the loop variable in a for 
statement (using the [X] whole word option) would be good uses.

[Replace All] could be defined to only apply to a selection when there is a 
selection.

The new feature would be more useful if there were a 'select suite' or 'select 
statement' command that would, for instance, select an entire def statement if 
the cursor were on the first line, with the 'def' keyword.

Currently, on Windows, the 'found' highlight does not work when there is a 
selection.  That might be a simple fix.  There is already an issue for fixing 
Search dialogs.

Do you know of any other editors with this feature?

--
nosy: +terry.reedy

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



[issue22486] Add math.gcd()

2014-09-26 Thread Mark Dickinson

Mark Dickinson added the comment:

 too it.

Bah. to it.  Stupid fingers.

--

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



[issue22486] Add math.gcd()

2014-09-26 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Thank you Stefan. I confirm that it hangs with 30-bit digits.

One existing bug is in the use of PyLong_AsLong() before simple Euclidean 
loop. It  should be PyLong_AsLongLong() if the long is not enough for two 
digits. But there is another bug in inner loop...

--

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



[issue22466] problem with installing python 2.7.8

2014-09-26 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Khalid, when responding by email, please delete the message you are responding 
to.

Steve, is there any reason to leave this open?  IE, do you plan to change the 
installer in response to this?

--
nosy: +terry.reedy

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



[issue22466] problem with installing python 2.7.8

2014-09-26 Thread Steve Dower

Steve Dower added the comment:

Nope - closed.

--
resolution:  - not a bug
stage:  - resolved
status: open - closed

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



[issue22501] Optimise PyLong division by 1 or -1

2014-09-26 Thread Stefan Behnel

Stefan Behnel added the comment:

I callgrinded it again and it confirmed that the gain when doing this inside of 
long_div() and friends is way lower than doing it right in Fraction.__new__(). 
It's not safe to do there, though, as is tests on integers are generally not 
a good idea in Python code. (Although it doesn't break anything if it fails, as 
it's a pure optimisation to avoid useless overhead.)

The micro benchmarks with timeit confirm that it's as fast as expected.

Large numbers before:

$ ./python -m timeit -s 'x = 2**2000 + 3**234 + 5**891 + 7**1234' ' -x'
1000 loops, best of 3: 0.177 usec per loop
$ ./python -m timeit -s 'x = 2**2000 + 3**234 + 5**891 + 7**1234' 'x * -2'
100 loops, best of 3: 0.329 usec per loop
$ ./python -m timeit -s 'x = 2**2000 + 3**234 + 5**891 + 7**1234' 'x // -2'
10 loops, best of 3: 2.8 usec per loop

$ ./python -m timeit -s 'x = 2**2000 + 3**234 + 5**891 + 7**1234' 'x * -1'
100 loops, best of 3: 0.329 usec per loop
$ ./python -m timeit -s 'x = 2**2000 + 3**234 + 5**891 + 7**1234' 'x // -1'
10 loops, best of 3: 2.36 usec per loop

$ ./python -m timeit -s 'x = 2**2000 + 3**234 + 5**891 + 7**1234' 'x * 1'
100 loops, best of 3: 0.333 usec per loop
$ ./python -m timeit -s 'x = 2**2000 + 3**234 + 5**891 + 7**1234' 'x // 1'
10 loops, best of 3: 2.37 usec per loop


Patched:

$ ./python -m timeit -s 'x = 2**2000 + 3**234 + 5**891 + 7**1234' ' -x'
1000 loops, best of 3: 0.176 usec per loop
$ ./python -m timeit -s 'x = 2**2000 + 3**234 + 5**891 + 7**1234' 'x * -2'
100 loops, best of 3: 0.328 usec per loop
$ ./python -m timeit -s 'x = 2**2000 + 3**234 + 5**891 + 7**1234' 'x // -2'
10 loops, best of 3: 2.8 usec per loop

$ ./python -m timeit -s 'x = 2**2000 + 3**234 + 5**891 + 7**1234' 'x * -1'
1000 loops, best of 3: 0.177 usec per loop
$ ./python -m timeit -s 'x = 2**2000 + 3**234 + 5**891 + 7**1234' 'x // -1'
1000 loops, best of 3: 0.178 usec per loop

$ ./python -m timeit -s 'x = 2**2000 + 3**234 + 5**891 + 7**1234' 'x * 1'
1000 loops, best of 3: 0.0244 usec per loop
$ ./python -m timeit -s 'x = 2**2000 + 3**234 + 5**891 + 7**1234' 'x // 1'
1000 loops, best of 3: 0.0258 usec per loop


Small numbers before:

$ ./python -m timeit -s 'x = 5' 'x * -2'
1000 loops, best of 3: 0.0408 usec per loop
$ ./python -m timeit -s 'x = 5' 'x // -2'
1000 loops, best of 3: 0.0714 usec per loop

$ ./python -m timeit -s 'x = 5' 'x * -1'
1000 loops, best of 3: 0.0293 usec per loop
$ ./python -m timeit -s 'x = 5' 'x * 1'
1000 loops, best of 3: 0.0282 usec per loop

$ ./python -m timeit -s 'x = 5' 'x // 1'
1000 loops, best of 3: 0.0529 usec per loop
$ ./python -m timeit -s 'x = 5' 'x // -1'
1000 loops, best of 3: 0.0536 usec per loop


Patched:

$ ./python -m timeit -s 'x = 5' 'x * -2'
1000 loops, best of 3: 0.0391 usec per loop
$ ./python -m timeit -s 'x = 5' 'x // -2'
1000 loops, best of 3: 0.0718 usec per loop

$ ./python -m timeit -s 'x = 5' 'x * -1'
1000 loops, best of 3: 0.0267 usec per loop
$ ./python -m timeit -s 'x = 5' 'x * 1'
1000 loops, best of 3: 0.0265 usec per loop

$ ./python -m timeit -s 'x = 5' 'x // 1'
1000 loops, best of 3: 0.0259 usec per loop
$ ./python -m timeit -s 'x = 5' 'x // -1'
1000 loops, best of 3: 0.0285 usec per loop


Note: we're talking µsecs here, not usually something to worry about. And it's 
unlikely that other benchmarks see similarly high speedups as the one for 
fractions (due to the relatively high likelihood of the GCD being 1 there).

I'm ok with closing this ticket as won't fix.

--

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



[issue22444] Floor divide should return int

2014-09-26 Thread Petr Viktorin

Changes by Petr Viktorin encu...@gmail.com:


--
nosy: +encukou

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



[issue17319] http.server.BaseHTTPRequestHandler send_response_only doesn't check the type and value of the code.

2014-09-26 Thread Yury Selivanov

Yury Selivanov added the comment:

I left some comments in the codereview.

I think that having some half-baked solution is great, but I really would like 
to see a proper fix, i.e. with remove_header and other methods fixed. Ideally, 
you should add a UserDict implementation for headers that implements proper 
__XXXitem__ methods.

--
nosy: +yselivanov
versions: +Python 3.5 -Python 3.4

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



[issue5550] [urllib.request]: Comparison of HTTP headers should be insensitive to the case

2014-09-26 Thread Yury Selivanov

Yury Selivanov added the comment:

I left some comments in the codereview.

I think that having some half-baked solution is great, but I really would like 
to see a proper fix, i.e. with remove_header and other methods fixed. Ideally, 
you should add a UserDict implementation for headers that implements proper 
__XXXitem__ methods.

--
nosy: +yselivanov

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



[issue17319] http.server.BaseHTTPRequestHandler send_response_only doesn't check the type and value of the code.

2014-09-26 Thread Yury Selivanov

Yury Selivanov added the comment:

Oups, my previous comment is related to issue #5550, wrong window.

--

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



[issue5550] [urllib.request]: Comparison of HTTP headers should be insensitive to the case

2014-09-26 Thread Yury Selivanov

Yury Selivanov added the comment:

Ideally, we should just wait when PEP 455 lands, so we can use TransformDict 
for headers.

Also, I don't think we can land a fix for this in any pythons out there, I 
would focus on making this right in 3.5

--

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



[issue20267] TemporaryDirectory does not resolve path when created using a relative path

2014-09-26 Thread Yury Selivanov

Yury Selivanov added the comment:

A second version of the patch (tempfile_02), fixing more tempfile functions to 
properly support relative paths. Please review.

--
nosy: +serhiy.storchaka
Added file: http://bugs.python.org/file36740/tempfile_02.patch

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



[issue21397] tempfile.py: Fix grammar in docstring, comment typos

2014-09-26 Thread Yury Selivanov

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


--
resolution:  - fixed
status: open - closed

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



[issue21397] tempfile.py: Fix grammar in docstring, comment typos

2014-09-26 Thread Roundup Robot

Roundup Robot added the comment:

New changeset adac8ba7b1b1 by Yury Selivanov in branch '2.7':
tempfile: Fix docstring. Issue #21397, patch by R. David Murray.
https://hg.python.org/cpython/rev/adac8ba7b1b1

New changeset 500d3d6f22ff by Yury Selivanov in branch '3.4':
tempfile: Fix docstring. Issue #21397, patch by R. David Murray.
https://hg.python.org/cpython/rev/500d3d6f22ff

New changeset db17f57c32af by Yury Selivanov in branch 'default':
tempfile: Fix docstring. Issue #21397, patch by R. David Murray.
https://hg.python.org/cpython/rev/db17f57c32af

--
nosy: +python-dev

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



[issue5309] distutils doesn't parallelize extension module compilation

2014-09-26 Thread Roundup Robot

Roundup Robot added the comment:

New changeset bbe57429eba0 by Antoine Pitrou in branch 'default':
Issue #5309: distutils' build and build_ext commands now accept a ``-j``
https://hg.python.org/cpython/rev/bbe57429eba0

--
nosy: +python-dev

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



[issue5309] distutils doesn't parallelize extension module compilation

2014-09-26 Thread Antoine Pitrou

Antoine Pitrou added the comment:

This is now pushed.

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

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



[issue1764286] inspect.getsource does not work with decorated functions

2014-09-26 Thread Roundup Robot

Roundup Robot added the comment:

New changeset ad9cc6124a19 by Yury Selivanov in branch 'default':
inspect: Fix getsource() to support decorated functions.
https://hg.python.org/cpython/rev/ad9cc6124a19

--
nosy: +python-dev

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



[issue20267] TemporaryDirectory does not resolve path when created using a relative path

2014-09-26 Thread Antony Lee

Antony Lee added the comment:

This looks reasonable.  Note that the output of gettempdir is always passed as 
first argument to os.path.join (possibly via _mkstemp_inner), so perhaps you 
should rather define something like

def _absolute_child_of_parent_or_tmpdir(parent, *args):
Return the absolute child of parent, or gettempdir() if parent is None, 
given by *args.

if parent is None:
parent = _sanitize_dir # inline the code here
return _os.path.join(parent, *args)

and use that function instead.

This factorizes the code a little bit more and makes intent clearer (I don't 
think _sanitize_dir is a very clear name).

--

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



[issue1764286] inspect.getsource does not work with decorated functions

2014-09-26 Thread Yury Selivanov

Yury Selivanov added the comment:

Thanks for the bug report and patch! Committed to 3.5.

--
resolution:  - fixed
status: open - closed

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



[issue21397] tempfile.py: Fix grammar in docstring, comment typos

2014-09-26 Thread Berker Peksag

Changes by Berker Peksag berker.pek...@gmail.com:


--
stage: commit review - resolved

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



[issue22389] Generalize contextlib.redirect_stdout

2014-09-26 Thread Yury Selivanov

Yury Selivanov added the comment:

@Berker Peksag: The patch looks fine, although I would rename 'redirect_stream' 
- '_redirect_stream' or '_RedirectStream'

--
nosy: +yselivanov

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



[issue1764286] inspect.getsource does not work with decorated functions

2014-09-26 Thread Berker Peksag

Changes by Berker Peksag berker.pek...@gmail.com:


--
stage: patch review - resolved

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



[issue22389] Generalize contextlib.redirect_stdout

2014-09-26 Thread Yury Selivanov

Yury Selivanov added the comment:

@Berker Peksag: Also, please update the docs.

--

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



[issue22389] Generalize contextlib.redirect_stdout

2014-09-26 Thread Berker Peksag

Berker Peksag added the comment:

Good point. Will update the patch. Thanks!

--
type:  - enhancement

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



[issue20267] TemporaryDirectory does not resolve path when created using a relative path

2014-09-26 Thread Yury Selivanov

Yury Selivanov added the comment:

Antony, I agree regarding the poor naming of '_sanitize_dir()' helper. As for 
your other suggestion, I think such a refactoring will actually make code 
harder to follow (+ it's more invasive). Generally, I'm in favour of 
transforming parameters like 'dir' closer to the beginning of the method's 
code, so that it's immediately obvious what's going on, and is also easier to 
put debug code [like 'print(mkdtemp call for: , dir)'].

--

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



[issue16324] MIMEText __init__ does not support Charset instance

2014-09-26 Thread Roundup Robot

Roundup Robot added the comment:

New changeset d43d4d4ebf2c by Berker Peksag in branch 'default':
Issue #16324: _charset parameter of MIMEText now also accepts 
email.charset.Charset instances.
https://hg.python.org/cpython/rev/d43d4d4ebf2c

--
nosy: +python-dev

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



[issue16324] MIMEText __init__ does not support Charset instance

2014-09-26 Thread Berker Peksag

Berker Peksag added the comment:

Thanks for the patch, Claude and thanks for the review, David!

--
assignee:  - berker.peksag
resolution:  - fixed
stage: patch review - resolved
status: open - closed

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



[issue20267] TemporaryDirectory does not resolve path when created using a relative path

2014-09-26 Thread Antony Lee

Antony Lee added the comment:

I don't feel strongly about this, so either way is fine.

--

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



[issue22197] Allow better verbosity / output control in test cases

2014-09-26 Thread Martin Panter

Changes by Martin Panter vadmium...@gmail.com:


--
nosy: +vadmium

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