[issue21130] equivalent functools.partial instances should compare equal

2014-04-06 Thread Raymond Hettinger
Raymond Hettinger added the comment: I guess a partial is a binding, not a function. Viewed in that light, it makes sense to implement same logic as used for bound methods in method_richcompare. -- keywords: +easy stage: test needed - needs patch

[issue21111] PyLong_AsUnsignedLongAndOverflow does not exist

2014-04-06 Thread Hristo Venev
Hristo Venev added the comment: I will not add PyLong_AsUnsigned*AndOverflow in my code because I don't want my code to depend on the exact implementation of PyLong. Are you seriously calling a 50-line function feature? Anyway... I propose splitting the patch in two parts: - cleanup: the

[issue21111] PyLong_AsUnsignedLongAndOverflow does not exist

2014-04-06 Thread Mark Dickinson
Mark Dickinson added the comment: Thanks for the patch! I left a couple of comments on Rietveld. The patch will also need docs and tests before it's ready to go in. There's a behaviour change in the patch which needs looking into: before the patch, PyLong_AsUnsignedLong will not call the

[issue21144] ensurepip AssertionError: Multiple .dist-info directories

2014-04-06 Thread Samuel John
Changes by Samuel John pyt...@samueljohn.de: -- nosy: +samueljohn ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21144 ___ ___ Python-bugs-list

[issue20383] Add a keyword-only spec argument to types.ModuleType

2014-04-06 Thread Nick Coghlan
Nick Coghlan added the comment: No, the attribute level arguments won't go away - __name__ deliberately differs from __spec__.name in some cases (notably in __main__), __path__ may be manipulated after the module is loaded, and __name and __file__ are both used too heavily within module code

[issue21145] Add the @cached_property decorator

2014-04-06 Thread Omer Katz
Omer Katz added the comment: The default implementation should simple: Once the property is accessed for the first time calculate the result and never calculate again. It's what both Django pip uses. You can add an optional TTL. There aren't any other features I can come up with that are common

[issue21145] Add the @cached_property decorator

2014-04-06 Thread Omer Katz
Omer Katz added the comment: I just checked and werkzeug uses the same implementation as Django pip. 2014-04-06 14:31 GMT+04:00 Omer Katz rep...@bugs.python.org: Omer Katz added the comment: The default implementation should simple: Once the property is accessed for the first time

[issue20397] distutils --record option does not validate existance of byte-compiled files

2014-04-06 Thread koobs
Changes by koobs koobs.free...@gmail.com: -- nosy: +koobs ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20397 ___ ___ Python-bugs-list mailing

[issue21109] tarfile: Traversal attack vulnerability

2014-04-06 Thread Lars Gustäbel
Lars Gustäbel added the comment: In the past, our answer to these kinds of bug reports has always been that you must not extract an archive from an untrusted source without making sure that it has no malicious contents. And that tarfile conforms to the posix specifications with respect to

[issue15955] gzip, bz2, lzma: add option to limit output size

2014-04-06 Thread Nadeem Vawda
Nadeem Vawda added the comment: I've posted a review at http://bugs.python.org/review/15955/. (For some reason, it looks like Rietveld didn't send out email notifications. But maybe it never sends a notification to the sender? Hmm.) -- ___ Python

[issue21109] tarfile: Traversal attack vulnerability

2014-04-06 Thread Larry Hastings
Larry Hastings added the comment: Thank you Lars for your thorough reply. While I agree that this isn't a release blocker, as it was clearly designed to behave this way... it seems to me that it wouldn't take much to make the tarfile module a lot safer. Specifically: * Don't allow

[issue21111] PyLong_AsUnsignedLongAndOverflow does not exist

2014-04-06 Thread Hristo Venev
Hristo Venev added the comment: I did not intend to make it so that PyLong_AsUnsignedLong* to call __int__ but it looks like a good idea because PyLong_AsLong* does that and the patch is exactly about that - removing differences between converting to signed and unsigned. Should I upload the

[issue21111] PyLong_AsUnsignedLongAndOverflow does not exist

2014-04-06 Thread Mark Dickinson
Mark Dickinson added the comment: it looks like a good idea It's not a good idea, though: you risk breaking existing third-party extension modules in surprising ways, which isn't a friendly thing to do. In any case, if anything the PyLong methods should be moving *away* from use of the

[issue21139] Idle: change default reformat width from 70 to 72

2014-04-06 Thread Saimadhav Heblikar
Changes by Saimadhav Heblikar saimadhavhebli...@gmail.com: -- nosy: +sahutd ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21139 ___ ___

[issue15955] gzip, bz2, lzma: add option to limit output size

2014-04-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Yes, Rietveld never sends a notification to the sender. I've received a notification. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15955 ___

[issue21145] Add the @cached_property decorator

2014-04-06 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/issue21145 ___ ___

[issue20383] Add a keyword-only spec argument to types.ModuleType

2014-04-06 Thread Brett Cannon
Brett Cannon added the comment: I can dream about getting rid of the attributes, but I doubt it would happen any time soon, if at all. But we do need to make it easier to set __spec__ on a new module than it currently is to help promote its use. --

[issue21162] code in multiprocessing.pool freeze if inside some code from scikit-learn (and probably liblinear) executed on ubuntu 12.04 64 Bit

2014-04-06 Thread Richard Oudkerk
Richard Oudkerk added the comment: I would guess that the problem is simply that LogisticRegression objects are not picklable. Does the problem still occur if you do not use freeze? -- ___ Python tracker rep...@bugs.python.org

[issue21162] code in multiprocessing.pool freeze if inside some code from scikit-learn (and probably liblinear) executed on ubuntu 12.04 64 Bit

2014-04-06 Thread Ivan K
Ivan K added the comment: Sorry, I'm not sure I describe it correct. Freeze that means = goes fozen, so stop progress. It's do no do anything, but computations still load single core of my cpu for 100% untill I do not kill the python process. But the same code work's fine if executed outside

[issue21162] code in multiprocessing.pool freeze if inside some code from scikit-learn (and probably liblinear) executed on ubuntu 12.04 64 Bit

2014-04-06 Thread Richard Oudkerk
Richard Oudkerk added the comment: Ah, I misunderstood: you meant that it freezes/hangs, not that you used a freeze tool. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21162 ___

[issue21162] code in multiprocessing.pool freeze if inside some code from scikit-learn (and probably liblinear) executed on ubuntu 12.04 64 Bit

2014-04-06 Thread Ivan K
Ivan K added the comment: Yes, I'm not using any tool. Code just not working. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21162 ___ ___

[issue20998] fullmatch isn't matching correctly under re.IGNORECASE

2014-04-06 Thread Gareth Gouldstone
Gareth Gouldstone added the comment: fullmatch() is not yet implemented on the regex scanner object SRE_Scanner (issue 21002). Is it possible to adapt this patch to fix this omission? -- nosy: +Gareth.Gouldstone ___ Python tracker

[issue1191964] asynchronous Subprocess

2014-04-06 Thread Josiah Carlson
Josiah Carlson added the comment: Should have uploaded this yesterday, but I got caught up with typical weekend activities. The docs probably need more, and I hear that select.select() is disliked, so that will probably need to be changed too. -- Added file:

[issue21162] code in multiprocessing.pool freeze if inside some code from scikit-learn (and probably liblinear) executed on ubuntu 12.04 64 Bit

2014-04-06 Thread Richard Oudkerk
Richard Oudkerk added the comment: Could you try pickling and unpickling the result of func(): import cPickle data = cPickle.dumps(func([1,2,3]), -1) print cPickle.loads(data) -- ___ Python tracker rep...@bugs.python.org

[issue21162] code in multiprocessing.pool freeze if inside some code from scikit-learn (and probably liblinear) executed on ubuntu 12.04 64 Bit

2014-04-06 Thread Ivan K
Ivan K added the comment: Sorry, could you specify what is 'func' ? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21162 ___ ___

[issue21162] code in multiprocessing.pool freeze if inside some code from scikit-learn (and probably liblinear) executed on ubuntu 12.04 64 Bit

2014-04-06 Thread Ivan K
Ivan K added the comment: Sorry, stupdi question. Forget that this is from my gist -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21162 ___ ___

[issue21162] code in multiprocessing.pool freeze if inside some code from scikit-learn (and probably liblinear) executed on ubuntu 12.04 64 Bit

2014-04-06 Thread Ivan K
Ivan K added the comment: Yes, it work fine and output was LogisticRegression(C=1.0, class_weight=None, dual=False, fit_intercept=True, intercept_scaling=1, penalty=l2, random_state=None, tol=0.0001) -- ___ Python tracker

[issue12014] str.format parses replacement field incorrectly

2014-04-06 Thread Benjamin Peterson
Changes by Benjamin Peterson benja...@python.org: -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12014 ___

[issue21118] str.translate is absurdly slow in majority of use cases (takes up to 60x longer than similar functions)

2014-04-06 Thread Josh Rosenberg
Josh Rosenberg added the comment: Thanks for addressing this so fast. Annoyingly, I suspect it will not help the original case that led me to finding the slowdown (I had some code that was translating from 56 latin-1 Romance characters with diacritics to the equivalent ASCII characters, so it

[issue21119] asyncio create_connection resource warning

2014-04-06 Thread Lars Andersson
Lars Andersson added the comment: Thanks Victor, that fixes my problem. I've started using tulip/master as part of my project as that also solves other issues I have with the default asyncio of python 3.4.0, but hopefully this fix will into tulip/master as well as python 3.4.1 / 3.5.

[issue21164] print unicode in Windows console

2014-04-06 Thread Leslie Klein
New submission from Leslie Klein: The console behaves by encoding a str (using the sys.getdefaultencoding()) and then decodes the bytes to a glyph for rendering. The decoder used is 'cp437'. Apparently, there is no way to override that! See ipython notebook for summary and example of the