[issue15370] test_runpy should include namespace package tests

2014-04-14 Thread Christian Hudon

Christian Hudon added the comment:

As far as I can see, this is now tested by the following tests in test_runpy:

test_run_module_in_namespace_package
test_run_package_in_namespace_package
test_run_namespace_package
test_run_namespace_package_in_namespace_package

(These new tests were in introduced in revision 87961, on Dec 15th, 2013.)

Can someone who knows more about CPython's implementation confirm that these 
tests do cover what was intended with this bug report (and then close the bug), 
or if not, flesh out the bug report with what's missing, and I'll do my best to 
add the missing tests.

--
nosy: +chrish42

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



[issue20103] Documentation of itertools.accumulate is confused

2014-04-14 Thread Christian Hudon

Christian Hudon added the comment:

The following patch improves (I hope) the documentation of 
itertools.accumulate. Comments and feedback welcome.

Terry, I did not implement your suggestion of changing "returns" to "yields", 
as it would have made things inconsistent with the documentation (and 
docstrings) of pretty much all the other generators in the itertools module, as 
they all use this idiom also. If one of the Python documentation experts thinks 
this change is also a good idea, please just open a new bug report for that and 
put me in the nosy list, and I'll do the change for all relevant generators in 
the itertools module.

--
keywords: +patch
nosy: +chrish42
Added file: http://bugs.python.org/file34839/accumulate_doc.patch

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



[issue1704474] optparse tests fail under Jython

2014-04-14 Thread Christian Hudon

Christian Hudon added the comment:

Which version of Jython should I concentrate on to make these tests pass? The 
2.5.4 release candidate, or the 2.7 beta?

--
nosy: +chrish42

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



[issue984870] curses: getmaxyx() breaks when the window shrinks

2014-04-14 Thread Christian Hudon

Christian Hudon added the comment:

I get the same traceback. The traceback happens only when the window is shrunk 
below the size specified in derwin(). It's easy to see this by changing the 
first and second arguments to the derwin call to something like 2, 2, and then 
you can resize the window to a much smaller size without getting this 
exception. (My curses.version is 2.2 also. Running on OSX Mavericks.)

The getmaxyx() function reports the correct size when the window is shrunk. 
Also note that the upstream bug has been closed, with the comment "Not seen in 
python 2.7".

So I think we can close this. Maybe we want to document the behavior of 
derwin() and related functions of raising _curses.error when the dimensions of 
the terminal are smaller than that of the window, though? (Or maybe raise a 
better exception?) That should probably be another bug report, though.

--
nosy: +chrish42

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



[issue1704474] optparse tests fail under Jython

2014-04-14 Thread Christian Hudon

Christian Hudon added the comment:

I'll use Jython 2.7. The Jython people can backport the fix to 2.5.4, if they 
want it there too.

So... this is marked as related to Python 3.2, but Jython is on Python 2 of 
course. I'll just take the version as being wrong. So, what should the patch 
that fixes this be based on? Not Python 3, obviously. But CPython 2.7's latest? 
Or the Jython 2.7 repository? And where should the fix be committed? In 
CPython's repository, or in Jython?

--

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



[issue1704474] optparse tests fail under Jython

2014-04-15 Thread Christian Hudon

Christian Hudon added the comment:

Actually, the only optparse test failing on jython 2.7 beta 1 currently is the 
one that relies on sys.getrefcount. Adding a test_support.impl_detail() guard 
makes all the tests pass. (See attached patch.)

I'd propose adding this patch to both the python3 and python2 tips, as it would 
make the life of other, non-cpython implementations easier, and then closing 
this bug.

--
Added file: http://bugs.python.org/file34874/jython.diff

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



[issue20103] Documentation of itertools.accumulate is confused

2014-04-15 Thread Christian Hudon

Christian Hudon added the comment:

Second revision, incorporating comments. Also document the behavior when passed 
an empty input iterable.

--
Added file: http://bugs.python.org/file34878/accumulate2.diff

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



[issue20309] Not all method descriptors are callable

2014-04-16 Thread Christian Hudon

Christian Hudon added the comment:

Work in progress for fixing this bug. (See descr_v1.diff) I converted the 
"curious.py" file into additional testcases. I started writing the functions 
for the tp_call slots for class and static methods.

To do: add tests to make sure that the code works for more than what's accepted 
by function_call(), then switch to using PyObject_Call() (which is the right 
function to use here, thanks to ncoghlan for catching that). Will finish this 
in the next few days.

--
keywords: +patch
nosy: +chrish42
Added file: http://bugs.python.org/file34928/descr_v1.diff

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



[issue20309] Not all method descriptors are callable

2014-04-17 Thread Christian Hudon

Christian Hudon added the comment:

Here is the (first?) complete version of the patch. All tests pass. Note that I 
had to remove a test that was checking that the object returned from 
staticmethod was not callable.

Let me know if I should add more tests, or if there are any other problems with 
the patch. Thanks!

--
Added file: http://bugs.python.org/file34959/descr_v2.diff

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



[issue20309] Not all method descriptors are callable

2015-04-13 Thread Christian Hudon

Christian Hudon added the comment:

Updated patch to work with current state of repository. Tests still pass 
(including the new ones).

--
Added file: http://bugs.python.org/file38942/descr_v3.diff

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



[issue20309] Not all method descriptors are callable

2015-04-14 Thread Christian Hudon

Christian Hudon added the comment:

As a newbie to the CPython source code (and as someone who started working on 
this bug because it was on the lists of easy bugs for PyCon 2014), I don't have 
a strong attachment either way, as long as some kind of decision is reached, 
and I can check this off my list.

If forced to take a stance, I would probably agree that this might be reaching 
into "foolish consistency" territory, as I just don't see myself ever using the 
new possibilities that this added code would allow.

If the decision is made to fix this, I'll improve the tests to actually call 
these new callables (and check that the result of the call is correct). I'll 
wait until the "we should fix this" decision is made to work on the patch 
again, though. But if this is closed as not-a-bug, I'll be a happy camper too 
(as I've learned some stuff about CPython internals in the process).

--

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