[issue4591] 32-bits unsigned user/group identifier

2013-02-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: (perhaps we need as PyNumber_AsLongIndex() to do the direct conversion to a C long, it would make things easier in many cases) In this case we need PyNumber_AsLongAndOverflowIndex() and PyNumber_AsUnsignedLongIndex(). And a lot of other parallel functions

[issue4591] 32-bits unsigned user/group identifier

2013-02-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Not technically the topic of this issue, but should we just lock down _Py_Uid_Converter() to ints? I just copied this code from PyArg_ParseTuple*() for 'l' format. This is still accepted: os.setuid(Decimal(1000.2)) Any C implemented function which

[issue16935] unittest should understand SkipTest at import time during test discovery

2013-02-11 Thread Zachary Ware
Zachary Ware added the comment: I think this patch should cover the test and Doc changes necessary. Of course, let me know if it doesn't :) -- Added file: http://bugs.python.org/file29039/issue16935.v2.diff ___ Python tracker rep...@bugs.python.org

[issue4591] 32-bits unsigned user/group identifier

2013-02-11 Thread Stefan Krah
Stefan Krah added the comment: Serhiy Storchaka rep...@bugs.python.org wrote: Not technically the topic of this issue, but should we just lock down _Py_Uid_Converter() to ints? I just copied this code from PyArg_ParseTuple*() for 'l' format. os.setuid(Decimal(1000.2)) I know that this

[issue17130] Add runcall() function to profile.py and cProfile.py

2013-02-11 Thread Guido van Rossum
Guido van Rossum added the comment: Antoine, what about the decorator? I've come across a few use cases. --Guido van Rossum (sent from Android phone) On Feb 10, 2013 10:14 AM, Antoine Pitrou rep...@bugs.python.org wrote: Antoine Pitrou added the comment: +1 for runcall() and the context

[issue17052] unittest discovery should use self.testLoader

2013-02-11 Thread Chris Jerdonek
Chris Jerdonek added the comment: Thanks a lot for taking care of this issue, Michael. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17052 ___

[issue17130] Add runcall() function to profile.py and cProfile.py

2013-02-11 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: See issue 9285 in which I wrote a decorator for profile/cProfile. That can be modified to work both as a decorator or a context manager by using contextlib.contextmanager. Shall I continue in issue 9285 and rewrite that patch? -- nosy:

[issue15767] add ModuleNotFoundError

2013-02-11 Thread Brett Cannon
Brett Cannon added the comment: Right, so what's typical? =) I mean do most people see ImportError for optional modules (e.g. not on support platforms), or do most people see ImportError because they messed up and tried to import something that they expected but actually isn't there for some

[issue12077] Harmonizing descriptor protocol documentation

2013-02-11 Thread Franck Michea
Franck Michea added the comment: Here is at least a correction of Descriptors' HowTo. There are two versions since some stuff differs (object inheritance, ...). Here are some of my interrogations though: - RevealAccess is not using instance parameter, so value is shared. Is this intended? -

[issue12077] Harmonizing descriptor protocol documentation

2013-02-11 Thread Franck Michea
Changes by Franck Michea franck.mic...@gmail.com: Added file: http://bugs.python.org/file29041/12077_descriptor_howto_python2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12077 ___

[issue17130] Add runcall() function to profile.py and cProfile.py

2013-02-11 Thread Guido van Rossum
Guido van Rossum added the comment: Sure, I will comment on that issue. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17130 ___ ___

[issue9285] Add a profile decorator to profile and cProfile

2013-02-11 Thread Guido van Rossum
Guido van Rossum added the comment: Brief comments: - Please don't call it profile -- we already have a module by that name. - Please make it so that both the decorator and context manager can specify a file where to dump the raw data -- basically it needs to have the same functionality as

[issue9285] Add a profile decorator to profile and cProfile

2013-02-11 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: Ok, will look into this soon. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9285 ___ ___ Python-bugs-list

[issue15767] add ModuleNotFoundError

2013-02-11 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On Feb 11, 2013, at 05:31 PM, Brett Cannon wrote: Right, so what's typical? =) I mean do most people see ImportError for optional modules (e.g. not on support platforms), or do most people see ImportError because they messed up and tried to import something

[issue4591] 32-bits unsigned user/group identifier

2013-02-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: There is a problem with test_pwd on 64-bit platform. Fixed in changesets a0983e46feb1 and 1e9fa629756c: Raise KeyError instead of OverflowError when getpwuid's argument is out of uid_t range. -- ___ Python

[issue17130] Add runcall() function to profile.py and cProfile.py

2013-02-11 Thread Antoine Pitrou
Antoine Pitrou added the comment: Antoine, what about the decorator? I've come across a few use cases. I don't know, I'm thinking that there should be one obvious way to do it :-) By that I mean that the context manager is more generic than the decorator. Or do you want to decorate functions

[issue4591] 32-bits unsigned user/group identifier

2013-02-11 Thread Antoine Pitrou
Antoine Pitrou added the comment: In this case we need PyNumber_AsLongAndOverflowIndex() and PyNumber_AsUnsignedLongIndex(). And a lot of other parallel functions for other cases. This can exponentially increase a number of functions. I don't think it will be exponential :-) --

[issue17181] SSLContext.set_servername_callback should be able to set argument

2013-02-11 Thread Antoine Pitrou
Antoine Pitrou added the comment: (functools.partial is another solution to the problem) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17181 ___

[issue17130] Add runcall() function to profile.py and cProfile.py

2013-02-11 Thread Guido van Rossum
Guido van Rossum added the comment: If I quickly want to profile one function, with the decorator I have to insert a with-statement in its body and mess with the indentation of the entire body. With a decorator it's just a one-line insertion. -- ___

[issue17130] Add runcall() function to profile.py and cProfile.py

2013-02-11 Thread Antoine Pitrou
Antoine Pitrou added the comment: Ah, fair enough. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17130 ___ ___ Python-bugs-list mailing list

[issue15767] add ModuleNotFoundError

2013-02-11 Thread Brett Cannon
Brett Cannon added the comment: Screw it, I'll go with ModuleNotFoundError since it is a subclass of ImportError and so it might come off as weird as saying the superclass is an Error but the subclass is not. -- ___ Python tracker

[issue17184] re.VERBOSE doesn't respect whitespace in '( ?Pfoo...)'

2013-02-11 Thread Roy Smith
New submission from Roy Smith: # Python 2.7.3 # Ubuntu 12.04 import re pattern = r( ?Pphrase.*) regex = re.compile(pattern, re.VERBOSE) The above raises an exception in re.compile(): Traceback (most recent call last): File ./try.py, line 6, in module regex = re.compile(pattern,

[issue15606] re.VERBOSE whitespace behavior not completely documented

2013-02-11 Thread Roy Smith
Changes by Roy Smith r...@panix.com: -- nosy: +roysmith ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15606 ___ ___ Python-bugs-list mailing list

[issue17170] string method lookup is too slow

2013-02-11 Thread Florent Xicluna
Changes by Florent Xicluna florent.xicl...@gmail.com: -- nosy: +flox, haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17170 ___ ___

[issue17184] re.VERBOSE doesn't respect whitespace in '( ?Pfoo...)'

2013-02-11 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- components: +Regular Expressions nosy: +ezio.melotti, mrabarnett ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17184 ___

[issue15606] re.VERBOSE whitespace behavior not completely documented

2013-02-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: See also related issue11204. -- nosy: +serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15606 ___

[issue17130] Add runcall() function to profile.py and cProfile.py

2013-02-11 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: As for runcall() we haven't the ability to freely support kwargs *and* filename. I see two possibilities. Kill kwargs, as such: +def runcall(func, *args, filename=None, sort=-1): +Run func(*args) under profiler, optionally saving results in +

[issue11204] re module: strange behaviour of space inside {m, n}

2013-02-11 Thread Roy Smith
Changes by Roy Smith r...@panix.com: -- nosy: +roysmith ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11204 ___ ___ Python-bugs-list mailing list

[issue16997] subtests

2013-02-11 Thread Chris Jerdonek
Chris Jerdonek added the comment: what if there are 500 subtests in a loop and you don't want 500 failures to be registered for that test case? Parametered tests have the same issue. In this case you simply don't use subtests or test cases. Right, but then you lose out on both of the

[issue17184] re.VERBOSE doesn't respect whitespace in '( ?Pfoo...)'

2013-02-11 Thread Matthew Barnett
Matthew Barnett added the comment: It does look like a duplicate to me. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17184 ___ ___

[issue16997] subtests

2013-02-11 Thread Brett Cannon
Changes by Brett Cannon br...@python.org: -- nosy: -brett.cannon ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16997 ___ ___ Python-bugs-list

[issue16997] subtests

2013-02-11 Thread Yaroslav Halchenko
Changes by Yaroslav Halchenko yarikop...@gmail.com: -- nosy: -Yaroslav.Halchenko ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16997 ___ ___

[issue15351] Add to unittest.TestCase support for using context managers

2013-02-11 Thread Michael Foord
Changes by Michael Foord mich...@voidspace.org.uk: -- assignee: - michael.foord ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15351 ___ ___

[issue13555] cPickle MemoryError when loading large file (while pickle works)

2013-02-11 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: Removed file: http://bugs.python.org/file29020/pickle_overflow-3.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13555 ___

[issue13555] cPickle MemoryError when loading large file (while pickle works)

2013-02-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Test updated too. Now it doesn't try to write a string larger than 2 GiB (it's impossible), instead writes a lot of shorter strings with total size larger than 2 GiB. -- Added file: http://bugs.python.org/file29042/pickle_overflow-4.diff

[issue17170] string method lookup is too slow

2013-02-11 Thread Terry J. Reedy
Terry J. Reedy added the comment: A related issue: the speed of finding and hence replacing chars in strings is known to have regressed in 3.3 relative to 3.2, especially on Windows. For long strings, that will negate in 3.3 the speedup for the initial method call. See #16061, with patches.

[issue17185] create_autospec

2013-02-11 Thread Chris Withers
New submission from Chris Withers: Sticking an issue in at Michael's request... Older versions of mock had a helper called mocksignature. In newer versions, create_autospec replaces this, but doesn't get it right sometimes: from inspect import getargspec from mock import create_autospec

[issue17186] no way to introspect registered atexit handlers

2013-02-11 Thread Chris Withers
New submission from Chris Withers: Python 2 had a private but usable way of introspecting and manipulating registered atexit handlers by way of the atexit._exithandlers. In Python 3, registering and unregistering are handled, but there is no longer a way to see what atexit handlers are

[issue17187] Python segfaults from improperly formed and called function

2013-02-11 Thread Larry Hastings
New submission from Larry Hastings: Python 3.3 added a nice new feature: if you don't supply enough positional parameters to a function, it tells you the names of the positional parameters you omitted. Unfortunately, the code that prints this error message assumes that the function is

[issue17187] Python segfaults from improperly formed and called function

2013-02-11 Thread Larry Hastings
Changes by Larry Hastings la...@hastings.org: -- keywords: +patch Added file: http://bugs.python.org/file29044/lch.bandaid.for.malformed.fn.crash.1.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17187

[issue16851] Hint about correct ismethod and isfunction usage

2013-02-11 Thread Greg Couch
Greg Couch added the comment: In my opinion, the Python 2.7 results are wrong. In Python 2.7, inspect.ismethod returns True for both bound and unbound methods -- ie., is broken according to the documentation. As a workaround, I'm using: def is_bound_method(obj): return hasattr(obj,

[issue16997] subtests

2013-02-11 Thread Andrew Bennetts
Andrew Bennetts added the comment: googletest (an xUnit style C++ test framework) has an interesting feature: in addition to assertions like ASSERT_EQ(x, y) that stop the test, it has EXPECT_EQ(x, y) etc that will cause the test to fail without causing it to stop. I think this decoupling of

[issue17188] Document 'from None' in raise statement doc.

2013-02-11 Thread Terry J. Reedy
New submission from Terry J. Reedy: Language manual, section 7.8. The raise statement has no mention of the 'from None' option. Indeed it says if given, the second expression must be another exception class or instance, which would exclude None. Library manual, Ch 5. Built-in Exceptions, says

[issue17159] Remove explicit type check from inspect.Signature.from_function()

2013-02-11 Thread Terry J. Reedy
Terry J. Reedy added the comment: I opened separate issue #17188: Document 'from None' in raise statement doc. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17159 ___

[issue17189] Add zip64 support to shutil

2013-02-11 Thread William Mallard
New submission from William Mallard: This patch enables creation of 64-bit zip files via make_archive(). make_archive uses ZipFile to create zip files. ZipFile already supports creation of 64-bit archives via a kwarg, but make_archive hard-codes it to 32-bit. This patch exposes the option in

[issue1518] Fast globals/builtins access (patch)

2013-02-11 Thread Larry Hastings
Larry Hastings added the comment: It sort of looks like this was closed because we assumed we were moving to Unladen Swallow. We're not. Should this be reopened? -- nosy: +larry ___ Python tracker rep...@bugs.python.org

[issue17111] test_surrogates of test_fileio fails sometimes on OS X 10.4

2013-02-11 Thread Roundup Robot
Roundup Robot added the comment: New changeset 9497adb7355f by Ned Deily in branch '2.7': Issue #17111: Prevent test_surrogates (test_fileio) failure on OS X 10.4. http://hg.python.org/cpython/rev/9497adb7355f -- nosy: +python-dev ___ Python tracker

[issue17111] test_surrogates of test_fileio fails sometimes on OS X 10.4

2013-02-11 Thread Ned Deily
Changes by Ned Deily n...@acm.org: -- resolution: - fixed stage: commit review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17111 ___

[issue17190] _FAST opcodes do no range checking

2013-02-11 Thread Larry Hastings
New submission from Larry Hastings: The implementations for LOAD_FAST, STORE_FAST, and DELETE_FAST don't check that the index is = the size of fastlocals. So it's a snap to crash the interpreter with hand-written bytecode, by going past the end of the fastlocals array. Kaboom! Attached is

[issue17190] _FAST opcodes do no range checking

2013-02-11 Thread Raymond Hettinger
Raymond Hettinger added the comment: It could be that this is not an interesting bug, that policy suggests that anyone who can write their own bytecode is a Consenting Adult. Yes, that is correct on all counts. Sorry, this is an *ancient* discussion, long ago put to bed. Besides, did you

[issue1518] Fast globals/builtins access (patch)

2013-02-11 Thread Antoine Pitrou
Antoine Pitrou added the comment: See issue 10401. Quoting myself: “Here is the Nth patch for a globals/builtins cache. As other caches at the same kind, it shows very small to no gain on non-micro benchmarks, showing that contrary to popular belief, globals/builtins lookup are not a major

[issue4591] 32-bits unsigned user/group identifier

2013-02-11 Thread Roundup Robot
Roundup Robot added the comment: New changeset 3893ab574c55 by Serhiy Storchaka in branch '3.2': Issue #4591: Uid and gid values larger than 2**31 are supported now. http://hg.python.org/cpython/rev/3893ab574c55 New changeset 035cbc654889 by Serhiy Storchaka in branch '2.7': Issue #4591: Uid

<    1   2