[issue25731] Assigning and deleting __new__ attr on the class does not allow to create instances of this class

2015-12-01 Thread Eryk Sun
Changes by Eryk Sun : -- nosy: +benjamin.peterson, twouters ___ Python tracker ___ ___

[issue25770] expose name, args, and kwargs from methodcaller

2015-12-01 Thread Martin Panter
Martin Panter added the comment: Left a review comment which may help you chase that refleak Also, as a new feature, surely it should be documented? -- nosy: +martin.panter ___ Python tracker

[issue25770] expose name, args, and kwargs from methodcaller

2015-12-01 Thread Joe Jevnik
Joe Jevnik added the comment: Thanks for pointing me at the refleak, uploading an update -- Added file: http://bugs.python.org/file41203/methodcaller-attrs-1.patch ___ Python tracker

[issue25770] expose name, args, and kwargs from methodcaller

2015-12-01 Thread Joe Jevnik
Joe Jevnik added the comment: Added a test case for the mutation of keywords. -- Added file: http://bugs.python.org/file41204/methodcaller-attrs-2.patch ___ Python tracker

[issue25714] Consider isinstance(..., numbers.Integral) instead of isinstance(..., int) or isinstance(..., (int, long)) in datetime.py

2015-12-01 Thread Matt Bogosian
Matt Bogosian added the comment: > I consider this as a bug and think that we should weak some of checks > isinstance(..., int) to isinstance(..., (int, long)). numbers.Integral is too > wide type, C implementation doesn't support it. Oddly enough, the C implementation is what is working with

[issue24731] Incorrect assert in str_subtype_new

2015-12-01 Thread Kevin Modzelewski
Kevin Modzelewski added the comment: Awesome, thanks! -- ___ Python tracker ___ ___ Python-bugs-list mailing

[issue23674] super() documentation isn't very clear

2015-12-01 Thread Martin Panter
Martin Panter added the comment: Here are some specific changes I suggest: 1. Most confusing: super() uses the MRO of the second argument, not the first. 2. Clarify that is is not just the first argument that is skipped in the MRO, it is all preceding classes as well. The first argument does

[issue20503] super behaviour and abstract base classes (either implementation or documentation/error message is wrong)

2015-12-01 Thread Martin Panter
Martin Panter added the comment: I am proposing some documentation changes in Issue 23674 which would address this. -- assignee: -> docs@python components: +Documentation -Interpreter Core dependencies: +super() documentation isn't very clear nosy: +docs@python, martin.panter

[issue25770] expose name, args, and kwargs from methodcaller

2015-12-01 Thread Martin Panter
Martin Panter added the comment: This is a bit odd. You can mutate the keyword arguments, but you are not allowed to change the positional arguments (“args” is readonly). If you want this to be part of the supported API, it should be documented, but it seems like bad design IMO. --

[issue25177] OverflowError in statistics.mean when summing large floats

2015-12-01 Thread Steven D'Aprano
Steven D'Aprano added the comment: Larry, Is it too late to get this into 3.5rc1? changeset 99407:ed45a09e5a69 Thanks. -- nosy: +larry ___ Python tracker

[issue25772] Misleading descriptions about built-in `super.`

2015-12-01 Thread Eryk Sun
Eryk Sun added the comment: > Just FYI, 'super' is not a type No, super is a type: >>> super It's one of 3 types defined in Objects/typeobject.c: PyBaseObject_Type : "object" PyType_Type : "type" PySuper_Type : "super" A super instance (CPython superobject)

[issue25772] Misleading descriptions about built-in `super.`

2015-12-01 Thread R. David Murray
R. David Murray added the comment: Heh. OK, learn something new every day. -- ___ Python tracker ___ ___

[issue25698] The copy_reg module becomes unexpectedly empty in test_cpickle

2015-12-01 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: At the problematic breakpoint mentioned in msg255630, copy_reg is nearly empty. (Pdb) sys.modules['copy_reg'] (Pdb) dir(sys.modules['copy_reg']) ['__builtins__', '__doc__', '__file__', '__name__', '__package__'] (Pdb) sys.modules['copy_reg'].__file__

[issue25698] The copy_reg module becomes unexpectedly empty in test_cpickle

2015-12-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Was it empty before running any test_cpickle tests? Could you find after what test it becomes empty? -- ___ Python tracker

[issue25698] The copy_reg module becomes unexpectedly empty in test_cpickle

2015-12-01 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: Well, one thing I noticed is that init_stuff() in cPickle.c can leak the copy_reg module object, if any of the subsequent PyObject_GetAttr*() calls fail. They return -1 without decref'ing copyreg. Probably not a horrible leak since it's probably rare, but

[issue25774] [benchmarks] Adjust to allow uploading benchmark data to codespeed

2015-12-01 Thread Zachary Ware
New submission from Zachary Ware: Here's a patch to the benchmarks repo that allows running a benchmark on a single interpreter and returning raw data, and provides a script to upload the raw data to a codespeed instance. It's a bit of a quick hack, but is effective. This is a prerequisite

[issue25768] compileall functions do not document return values

2015-12-01 Thread Nicholas Chammas
Nicholas Chammas added the comment: OK, here's a patch. I reviewed the doc style guide [0] but I'm not 100% sure if I'm using the appropriate tense. There are also a couple of lines that go a bit over 80 characters, but the file already had a few of those. Am happy to make any adjustments,

[issue25698] The copy_reg module becomes unexpectedly empty in test_cpickle

2015-12-01 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On Dec 01, 2015, at 06:26 PM, Barry A. Warsaw wrote: >I'll note one other thing. Doko mentioned that in our build environment, >cPickle is built in, not an extension. Which may be relevant because in a from-hg-head build of Python 2.7, this problem doesn't

[issue25768] compileall functions do not document return values

2015-12-01 Thread Brett Cannon
Brett Cannon added the comment: Thanks, Nicholas! I'll have a look when I have a chance (hopefully no later than Friday). -- assignee: docs@python -> brett.cannon ___ Python tracker

[issue25768] compileall functions do not document return values

2015-12-01 Thread Nicholas Chammas
Nicholas Chammas added the comment: And I just signed the contributor agreement. (Some banner showed up when I attached the patch to this issue asking me to do so.) -- ___ Python tracker

[issue25698] The copy_reg module becomes unexpectedly empty in test_cpickle

2015-12-01 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: This just gets weirder. I've narrowed it down to running this command: build-static/python Lib/test/regrtest.py test_doctest test_cpickle fails every time. What's even weirder is that I hacked regrtest to print some useful information before and after each

[issue25735] math.factorial doc should mention integer return type

2015-12-01 Thread Sonali Gupta
Sonali Gupta added the comment: States that math.factorial(x) returns x factorial as an integer. -- keywords: +patch nosy: +mine0901 Added file: http://bugs.python.org/file41206/bug.patch ___ Python tracker

[issue25770] expose name, args, and kwargs from methodcaller

2015-12-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: "keywords" is unusual name. The most used name for the dict of keyword arguments is "kwargs". $ find Lib/ -name '*.py' -exec egrep -ho '\*\*[a-zA-Z_0-9]+' '{}' + | sort | uniq -c | sort -nr | head 803 **kwargs 442 **kw 244 **kwds ... If you

[issue25770] expose name, args, and kwargs from methodcaller

2015-12-01 Thread Joe Jevnik
Joe Jevnik added the comment: I only want this feature to keep the usage close to functools.partial. I was actually sort of surprised to see that mutation of the dict held in partial, but I would rather be consistent. -- ___ Python tracker

[issue14285] Traceback wrong on ImportError while executing a package

2015-12-01 Thread Martin Panter
Martin Panter added the comment: Now I have a deeper understanding I think this can be handled separately to Issue 16217. This patch pulls together my previous two patches, and adds a fix. There are two aspects of my fix: 1. Import the package before calling find_spec() on the __main__

[issue19771] runpy should check ImportError.name before wrapping it

2015-12-01 Thread Martin Panter
Martin Panter added the comment: My new patch for Issue 14285 should avoid the main problem. However there would still be at least one leftover minor fix worth appyling: fix the exception message to use type(ex).__name__, not repr(type(ex)). -- dependencies: +Traceback wrong on

[issue14285] Traceback wrong on ImportError while executing a package

2015-12-01 Thread Martin Panter
Changes by Martin Panter : Added file: http://bugs.python.org/file41205/internal-error.patch ___ Python tracker ___

[issue14285] Traceback wrong on ImportError while executing a package

2015-12-01 Thread Nick Coghlan
Nick Coghlan added the comment: Martin, your patch looks good to me, and is at the very least an improvement over the status quo (which clearly traps exceptions that it shouldn't), so I'd say go ahead and apply it. Thanks for digging into this and figuring out a clean solution. --

[issue25698] The copy_reg module becomes unexpectedly empty in test_cpickle

2015-12-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thanks Barry. Running test_cpickle after test_doctest I now can reproduce the problem in a from-hg-head build of Python 2.7. -- ___ Python tracker

[issue25698] The copy_reg module becomes unexpectedly empty in test_cpickle

2015-12-01 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On Dec 01, 2015, at 06:47 PM, Serhiy Storchaka wrote: >Thanks Barry. Running test_cpickle after test_doctest I now can reproduce the >problem in a from-hg-head build of Python 2.7. That's interesting because I can't! (Neither from the 2.7.11rc1 tarball.)

[issue25698] The copy_reg module becomes unexpectedly empty in test_cpickle

2015-12-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Ah, sorry, I missed and mislead you. My tests were specially hacked to simulate a bug (sys.modules['copy_reg'] = object()). No, actually I can't reproduce it. -- ___ Python tracker

[issue25698] The copy_reg module becomes unexpectedly empty in test_cpickle

2015-12-01 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: I added cPickle to Modules/Setup.local and rebuilt from hg. cPickle's a built-in but I still can't reproduce the problem. -- ___ Python tracker

[issue25768] compileall functions do not document return values

2015-12-01 Thread Nicholas Chammas
Nicholas Chammas added the comment: :thumbsup: Take your time. -- ___ Python tracker ___ ___ Python-bugs-list

[issue25775] Bug tracker emails go to spam

2015-12-01 Thread Nicholas Chammas
New submission from Nicholas Chammas: Not sure where to report this. Is there a component for the bug tracker itself? Anyway, Gmail sends emails from this bug tracker to spam and flags each one with the following message: > Why is this message in Spam? It is in violation of Google's

[issue25768] compileall functions do not document return values

2015-12-01 Thread Nicholas Chammas
Nicholas Chammas added the comment: Oh derp. It appears this is dup of issue24386. Apologies. -- status: open -> closed ___ Python tracker ___

[issue25768] compileall functions do not document return values

2015-12-01 Thread Nicholas Chammas
Nicholas Chammas added the comment: Whoops, wrong issue. Reopening. -- status: closed -> open ___ Python tracker ___

[issue25775] Bug tracker emails go to spam

2015-12-01 Thread Nicholas Chammas
Nicholas Chammas added the comment: Oh derp. It appears this is dup of issue24386. Apologies. -- status: open -> closed ___ Python tracker ___

[issue25775] Bug tracker emails go to spam

2015-12-01 Thread R. David Murray
Changes by R. David Murray : -- resolution: -> duplicate stage: -> resolved superseder: -> Bug Tracker emails going to gmail spam ___ Python tracker

[issue25770] expose name, args, and kwargs from methodcaller

2015-12-01 Thread Stéphane Wirtel
Stéphane Wirtel added the comment: Hi, I just tried your patch with the last revision and I have an error with the tests. stephane@sg1 ~/s/h/cpython> ./python -m test test_operator [1/1] test_operator Fatal Python error: ./Modules/_operator.c:975 object at 0x7ff804c2e3d8 has negative ref

[issue25772] Misleading descriptions about built-in type `super.`

2015-12-01 Thread Martin Panter
Martin Panter added the comment: I agree. I think Issue 23674 already covers this. I will try to propose some changes there. -- nosy: +martin.panter resolution: -> duplicate status: open -> closed superseder: -> super() documentation isn't very clear

[issue25698] The copy_reg module becomes unexpectedly empty in test_cpickle

2015-12-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: http://buildbot.python.org/all/builders/PPC64LE%20Fedora%202.7/builds/164/steps/test/logs/stdio Failed a number of tests that directly or indirectly use copy_reg. First failed test is test_cpickle. -- title: test regressions introduced with the fix

[issue25772] Misleading descriptions about built-in type `super.`

2015-12-01 Thread Juchen Zeng
New submission from Juchen Zeng: A few days ago, I was learning built-in type `super` through [python official doc](https://docs.python.org/2/library/functions.html#super). And I was mislead by its documentation, in the part of how `__mro__` resolution works. Below is the part which confuse

[issue25717] tempfile.TemporaryFile fails when dir option set to directory residing on host OS mount

2015-12-01 Thread Bohuslav "Slavek" Kabrda
Bohuslav "Slavek" Kabrda added the comment: The patch looks good to me. -- ___ Python tracker ___ ___

[issue25768] compileall functions do not document return values

2015-12-01 Thread Brett Cannon
Brett Cannon added the comment: At this point the return values are probably as official as they are going to be since these are such old functions. If you want to write a patch, Nicholas, please see https://docs.python.org/devguide/ for instructions on how to do that. -- nosy:

[issue25771] importlib: '.submodule' is not a relative name (no leading dot)

2015-12-01 Thread Brett Cannon
Brett Cannon added the comment: So both proposed messages are correct depending on what you want to accomplish; it all depends on whether the leading dot was the mistake or the missing package was. And the message does make some sense if you read it more like "'.submodule' is not a relative

[issue25773] Deprecate deleting with PyObject_SetAttr, PyObject_SetAttrString and PySequence_SetItem

2015-12-01 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: If the third argument of PyObject_SetAttr(), PyObject_SetAttrString() or PySequence_SetItem() is NULL, these functions delete an attribute or an item. This is rather undocumented implementation detail. There are special counterparts for deleting:

[issue25772] Misleading descriptions about built-in `super.`

2015-12-01 Thread R. David Murray
R. David Murray added the comment: Just FYI, 'super' is not a type, it is a function that returns a proxy. (In python3 there is also compiler magic involved in the no-argument form, but it is still a function :) -- nosy: +r.david.murray title: Misleading descriptions about built-in

[issue4709] Mingw-w64 and python on windows x64

2015-12-01 Thread Henry Gomersall
Henry Gomersall added the comment: Of course, I mean: *To be clear, the MinGW situation surely cannot be worse than the current situation.* -- ___ Python tracker

[issue4709] Mingw-w64 and python on windows x64

2015-12-01 Thread Duncan McBryde
Changes by Duncan McBryde : -- nosy: +Duncan McBryde ___ Python tracker ___ ___

[issue22138] patch.object doesn't restore function defaults

2015-12-01 Thread Xiadong Zhu
Xiadong Zhu added the comment: How's the issue going on? The situation to mock function's ``__defaults__`` attribute is general, as default argument is determinate after function definition, when we need to test a function such as: def access_db(statement, backend=default_db_backend):

[issue22138] patch.object doesn't restore function defaults

2015-12-01 Thread Michael Foord
Michael Foord added the comment: Sean's patch looks good to me. -- ___ Python tracker ___ ___

[issue25177] OverflowError in statistics.mean when summing large floats

2015-12-01 Thread Roundup Robot
Roundup Robot added the comment: New changeset 4bc9405c4f7b by Steven D'Aprano in branch '3.4': Fix for issue #25177 with the mean of very small and very large numbers. https://hg.python.org/cpython/rev/4bc9405c4f7b New changeset ed45a09e5a69 by Steven D'Aprano in branch '3.5': Fixed issue

[issue22138] patch.object doesn't restore function defaults

2015-12-01 Thread R. David Murray
Changes by R. David Murray : -- stage: needs patch -> commit review ___ Python tracker ___

[issue25770] expose name, args, and kwargs from methodcaller

2015-12-01 Thread Joe Jevnik
Joe Jevnik added the comment: Thanks for review, looking into the reference count issue. -- ___ Python tracker ___

[issue25768] compileall functions do not document return values

2015-12-01 Thread Nicholas Chammas
Nicholas Chammas added the comment: Exciting! I'm on it. -- ___ Python tracker ___ ___ Python-bugs-list

[issue25601] test_cpickle failure on the ware-gentoo-x86 buildbot

2015-12-01 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: I'm duping this one to issue25698 because while it came later, it has a lot more information. They are clearly the same bug. -- nosy: +barry superseder: -> The copy_reg module becomes unexpectedly empty in test_cpickle

[issue25601] test_cpickle failure on the ware-gentoo-x86 buildbot

2015-12-01 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- resolution: -> duplicate stage: -> resolved status: open -> closed ___ Python tracker ___