[issue21232] Use of '1' instead of 'True' as 'splitlines' argument in difflib documentation
Changes by Jayanth Koushik jnkous...@gmail.com: -- assignee: docs@python components: Documentation nosy: docs@python, jayanthkoushik priority: normal severity: normal status: open title: Use of '1' instead of 'True' as 'splitlines' argument in difflib documentation type: enhancement versions: Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4, Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21232 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21232] Use of '1' instead of 'True' as 'splitlines' argument in difflib documentation
New submission from Jayanth Koushik: In the difflib documentation, multiple uses of 'splitlines' use '1' as the 'keepends' argument. In Python 2.x, 1 is not guaranteed to be True and while this is guaranteed in 3.x, it would be much clearer to specify the argument as 'True'. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21232 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8931] '#' has no effect with 'c' type
Roundup Robot added the comment: New changeset 16efa8d27e4c by Eric V. Smith in branch '3.4': Closed issue #8931: Make alternate formatting for 'c' raise an exception. Patch by Torsten Landschoff. http://hg.python.org/cpython/rev/16efa8d27e4c -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8931 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8931] '#' has no effect with 'c' type
Changes by Eric V. Smith e...@trueblade.com: -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8931 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21146] update gzip usage examples in docs
Wolfgang Maier added the comment: well, buffering is not the issue here. It's that the file iterator used in the current example is line-based, so whatever the buffer size you're doing unnecessary inspection to find and split on line terminators. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21146 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21233] Add *Calloc functions to CPython memory allocation API
New submission from Nathaniel Smith: Numpy would like to switch to using the CPython allocator interface in order to take advantage of the new tracemalloc infrastructure in 3.4. But, numpy relies on the availability of calloc(), and the CPython allocator API does not expose calloc(). https://docs.python.org/3.5/c-api/memory.html#c.PyMemAllocator So, we should add *Calloc variants. This met general approval on python-dev. Thread here: https://mail.python.org/pipermail/python-dev/2014-April/133985.html This would involve adding a new .calloc field to the PyMemAllocator struct, exposed through new API functions PyMem_RawCalloc, PyMem_Calloc, PyObject_Calloc. [It's not clear that all 3 would really be used, but since we have only one PyMemAllocator struct that they all share, it'd be hard to add support to only one or two of these domains and not the rest. And the higher-level calloc variants might well be used. Numpy array buffers are often small (e.g., holding only a single value), and these small buffers benefit from small-alloc optimizations; meanwhile, large buffers benefit from calloc optimizations. So it might be optimal to use a single allocator that has both.] We might also have to rename the PyMemAllocator struct to ensure that compiling old code with the new headers doesn't silently leave garbage in the .calloc field and lead to crashes. -- components: Interpreter Core messages: 216281 nosy: njs priority: normal severity: normal status: open title: Add *Calloc functions to CPython memory allocation API type: enhancement versions: Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21233 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12220] minidom xmlns not handling spaces in xmlns attribute value field
Marek Stepniowski added the comment: I agree that Unsupported syntax is a more accurate message. Changed in the newest patch. -- Added file: http://bugs.python.org/file34866/minidom_space_char_in_namespace_unsupported.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12220 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21191] os.fdopen() may eat file descriptor and still raise exception
Dima Tisnek added the comment: Banjamin, Your patch looks good to me! I have a small concern regarding We now know we will succeed... -- should there be a test case to make sure fstat test here matches whatever test is/was done on a lower level? Or is your code now such that it will explicitly succeed because it doesn't call anything that can fail after the comment? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21191 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21233] Add *Calloc functions to CPython memory allocation API
Changes by Stefan Krah stefan-use...@bytereef.org: -- nosy: +skrah ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21233 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21227] Decimal class error messages for integer division aren't good
Changes by Stefan Krah stefan-use...@bytereef.org: -- assignee: docs@python - skrah nosy: +skrah ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21227 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21197] venv does not create lib64 directory and appropriate symlinks
Roundup Robot added the comment: New changeset 4d9b24b2f1b8 by Vinay Sajip in branch '3.4': Issue #21197: Add lib64 - lib symlink in venvs on 64-bit non-OS X POSIX. http://hg.python.org/cpython/rev/4d9b24b2f1b8 New changeset 947515cc8957 by Vinay Sajip in branch 'default': Closes #21197: Add lib64 - lib symlink in venvs on 64-bit non-OS X POSIX. http://hg.python.org/cpython/rev/947515cc8957 -- nosy: +python-dev resolution: - fixed stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21197 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21191] os.fdopen() may eat file descriptor and still raise exception
Benjamin Peterson added the comment: On Tue, Apr 15, 2014, at 2:34, Dima Tisnek wrote: Dima Tisnek added the comment: Banjamin, Your patch looks good to me! I have a small concern regarding We now know we will succeed... -- should there be a test case to make sure fstat test here matches whatever test is/was done on a lower level? Or is your code now such that it will explicitly succeed because it doesn't call anything that can fail after the comment? That's what I mean. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21191 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21234] __contains__ and friends should check is for all elements first
New submission from Jurjen N.E. Bos: It all started when adding an __equals__ method to a self made class. The effect was that my program slowed down enormously, which came as a surprise. This is because when doing an operation that does linear search through a container, the interpreter checks all items one by one, first checking identity and then equality. If the __equals__ method is slow, this is slower than needed. In python, you effectively get: class myContainer: def __contains__(self, obj): for i in range(len(self)): if self[i] is obj: return True if self[i]==obj: return True return False My proposal is to change this to: class myContainer: def __contains__(self, obj): for i in range(len(self)): if self[i] is obj: return True for i in range(len(self)): if self[i]==obj: return True return False The net effect would be approximately: - if the object is exactly in the container, the speedup is significant. - if the object is not in the container, there is no difference. - if an object is in the container that is equal to the object, it will be slower, but not very much. In the normal use case, this will probably feel to the user as a speed improvement, especially when the __equals__ is slow. I tried to find cases in which this would change behaviour of programs, but I couldn't find any. If this _does_ change behaviour in some noticeable and unwanted way, let me know! (Documenting would also be a good idea, then.) The accompanying file gives some timings to show what I mean, e.g. Time in us to find an exact match (begin, middle, end): 0.042335559340708886 31.610660936887758 62.69573781716389 Time in us to find an equal match (begin, middle, end): 0.3730294263293299 31.421928646805195 63.177373531221896 Time if not found: 63.44531546956001 And now for an object that has no __equal__: Time in us to find a thing (begin, middle, end): 0.03555453901338268 9.878883646121661 19.656711762284473 Time if not found: 19.676395048315776 (Python 2.7 does something completely different with objects without __equal__, so the test gives quite different results.) -- components: Interpreter Core files: containsDemo.py messages: 216286 nosy: jneb priority: normal severity: normal status: open title: __contains__ and friends should check is for all elements first type: performance versions: Python 3.1, Python 3.2, Python 3.3, Python 3.4, Python 3.5 Added file: http://bugs.python.org/file34867/containsDemo.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21234 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21203] logging configurators ignoring documented options
Vinay Sajip added the comment: I'm not sure I can accept the change in 2.7, because it is technically a new feature and would mean that configs would not be treated the same way in all 2.7.x versions failing in some and not in others. You can get the equivalent behaviour using '()' rather than 'class', and the 'class' keyword is only mentioned in the docs against Handlers, not Formatters. The patch for the default branch looks OK. Thanks! -- versions: -Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21203 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21203] logging configurators ignoring documented options
Roundup Robot added the comment: New changeset 2d33cbf02522 by Vinay Sajip in branch 'default': Closes #21203: Updated fileConfig and dictConfig to remove inconsistencies. Thanks to Jure Koren for the patch. http://hg.python.org/cpython/rev/2d33cbf02522 -- nosy: +python-dev resolution: - fixed stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21203 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20752] Difflib should provide the option of overriding the SequenceMatcher
Chris Rose added the comment: Updated according to review. -- Added file: http://bugs.python.org/file34868/difflib-sm.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20752 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20752] Difflib should provide the option of overriding the SequenceMatcher
Claudiu.Popa added the comment: Hi. I added a couple of comments for your previous patch, the new one doesn't seem to have a review link. -- nosy: +Claudiu.Popa ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20752 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20752] Difflib should provide the option of overriding the SequenceMatcher
Chris Rose added the comment: Addressed comments regarding documentation and assertion formats in the test. -- Added file: http://bugs.python.org/file34869/difflib-sm.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20752 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21209] q.put(some_tuple) fails when PYTHONASYNCIODEBUG=1
Yury Selivanov added the comment: Guido, I'm feeling a bit uncomfortable with the patch I pushed. I think we should adjust the solution, to avoid having arguments to 'gen.send' packed in two nested tuples. Please take a look at the new patch (corowrapper_03.patch). It adds some amount of ugliness, but with it in place, I'd be more sure that we don't brake anything. -- Added file: http://bugs.python.org/file34870/corowrapper_03.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21209 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20752] Difflib should provide the option of overriding the SequenceMatcher
Chris Rose added the comment: Patch against tip -- Added file: http://bugs.python.org/file34871/difflib-sm.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20752 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17861] put opcode information in one place
Kushal Das added the comment: New patch from a clean repo, with changed opcode.h -- Added file: http://bugs.python.org/file34872/issue17861_v5.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17861 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21235] importlib's spec module create algorithm is not exposed
New submission from Armin Ronacher: 3.4 deprecates load_module on the loaders and now proposes to use create_module (optionally) and exec_module. Unfortunately for external callers these interfaces are not useful because you need to reimplement _SpecMethods.create and a whole bunch of other stuff for it. Right now a caller can get hold of _SpecMethods by importing from _frozen_importlib but that seems very unsupported and is obviously entirely not exposed. Is there a reason those methods are not on the ModuleSpec directly but on a private wrapper? Example usage: from types import ModuleType from importlib.machinery import ModuleSpec, SourceFileLoader from _frozen_importlib import _SpecMethods loader = SourceFileLoader('plugin_base', 'my_file.py') spec = ModuleSpec(name=loader.name, loader=loader) mod = _SpecMethods(spec).create() In the absence of _SpecMethods a caller needs to do this: from importlib.machinery import ModuleSpec, SourceFileLoader loader = SourceFileLoader('plugin_base', 'my_file.py') spec = ModuleSpec(name=loader.name, loader=loader) if not hasattr(loader, 'create_module'): module = types.ModuleType(loader.name) else: module = loader.create_module(spec) module.__loader__ = loader module.__spec__ = spec try: module.__package__ = spec.parent except AttributeError: pass loader.exec_module(module) (And that is not the whole logic yet) -- keywords: 3.4regression messages: 216295 nosy: aronacher priority: normal severity: normal status: open title: importlib's spec module create algorithm is not exposed versions: Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21235 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21235] importlib's spec module create algorithm is not exposed
Armin Ronacher added the comment: On further investigation that is not even enough yet due to the new locking mechanism. I'm not even sure if exposing _SpecMethods would be enough. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21235 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue837046] pyport.h redeclares gethostname() if SOLARIS is defined
Michael Stahl added the comment: we carry a patch in LibreOffice for exactly this problem: http://cgit.freedesktop.org/libreoffice/core/tree/external/python3/python-3.3.0-i42553.patch.2 this was found many years ago in OOo: https://issues.apache.org/ooo/show_bug.cgi?id=42553 there is at least one file in the LO code which includes pyport.h (which i have just verified via generated header dependencies), and the LO build system globally defines a SOLARIS macro on that platform, so there's a real-world problem caused by this. so if you could re-open this and merge that patch we could finally get rid of it on our side; there doesn't appear to be a downside to me since according to this bug report the prototype is wrong for Solaris 2.6 already, and older versions ought to have died out by now. -- nosy: +mst ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue837046 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1650090] doctest doesn't find nested functions
Changes by R. David Murray rdmur...@bitdance.com: -- nosy: +r.david.murray ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1650090 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15795] Zipfile.extractall does not preserve file permissions
Glenn Jones added the comment: Patch cleaned up based on previous comments. -- Added file: http://bugs.python.org/file34873/issue15795_cleaned.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15795 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21027] difflib new cli interface
Claudiu.Popa added the comment: Raymond, any news on this? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21027 ___ ___ 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
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 rep...@bugs.python.org http://bugs.python.org/issue1704474 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21209] q.put(some_tuple) fails when PYTHONASYNCIODEBUG=1
STINNER Victor added the comment: I think we should adjust the solution, to avoid having arguments to 'gen.send' packed in two nested tuples. I should check, but I think that Python create a tuple for you if you don't pass directly a tuple, so it's not very different. Anyway, it is only used for debug, so I don't think that performances matter here. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21209 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21209] q.put(some_tuple) fails when PYTHONASYNCIODEBUG=1
Guido van Rossum added the comment: I agree with Yuri and I approve of the patch. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21209 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21235] importlib's spec module create algorithm is not exposed
Eric Snow added the comment: I agree that this is something we need to address in 3.5. Adding this to 3.4 won't be an option since it would require a new feature. However, Loader.load_module() is only deprecated (and won't be removed in 3.X), so the current approach will still work until we provide a new approach in 3.5. The only gap is that now it is possible (even if very unlikely) that in 3.4 you would run into a loader that does not implement load_module(), which would obviously break direct calls to the method. :( For 3.4 such direct calls in the stdlib to loader.load_module() were replaced with this (mostly): spec = importlib.util.spec_from_loader(name, loader) # or importlib.util.spec_from_file_location(...) methods = _SpecMethods(spec) mod = methods.load() As you already noted, this relies on a current implementation detail of importlib._bootstrap. We'd rather not encourage use of such private API so providing a simple replacement makes sense. Futhermore, for 3.5 (in the soon timeframe) I'm planning on working on improving the import system abstractions*. My expectation is that part of that will be exposing most or all of the functionality of _SpecMethods directly. At the same time I don't want that API to be a distraction. I think accomplishing both is doable. So you shouldn't need to worry about create() or anything else. * Suggestions welcome. :) You can email me directly (ericsnowcurren...@gmail.com). -- components: +Library (Lib) nosy: +brett.cannon, eric.snow, ncoghlan versions: +Python 3.5 -Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21235 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15795] Zipfile.extractall does not preserve file permissions
Claudiu.Popa added the comment: Hello. I added a couple of comments to your latest patch. -- nosy: +Claudiu.Popa ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15795 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10523] argparse has problem parsing option files containing empty rows
Caelyn McAulay added the comment: I've attached a patch making the changes I suggested, assuming that the current behaviour is desirable. It documents the behaviour of argparse on files with blank lines and changes the way the error message that argparse generates when encountering unrecognized arguments is generated. When a blank line is included at the end of a file, the resulting error message is now: argparse_example.py: error: unrecognized arguments: ''. This also makes it obvious when the problem is white space, e.g. if an argument has trailing spaces, this also makes that obvious. -- keywords: +patch Added file: http://bugs.python.org/file34875/argparse_blanklines.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10523 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20318] subprocess.Popen can hang in threaded applications in Python 2
Gregory P. Smith added the comment: I added a pointer to subprocess32 in the 2.7 subprocess docs in dd52365c8721. -- resolution: - wont fix stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20318 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21235] importlib's spec module create algorithm is not exposed
Brett Cannon added the comment: Are you after just the module creation/initialization code so you can call exec_module() yourself, Armin, or do you want even more of the algorithm exposed (e.g. the lock stuff)? There are not tons of importlib users to the level of wanting to re-implement import to the level of wanting to control module creation, setting sys.modules manually, etc., so we are constantly trying to figure out how far to go in exposing things without going so far as to make it impossible to make changes. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21235 ___ ___ 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
Changes by A.M. Kuchling a...@amk.ca: -- stage: needs patch - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20103 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20752] Difflib should provide the option of overriding the SequenceMatcher
Chris Rose added the comment: As a historical record, it should be noted that this is driven by an actual use case: I was experimenting with using Bazaar's patience diff implementation, and I saw that in order for them to use a custom sequence matcher, they had to essentially copy-paste and modify the stdlib diff methods in order to inject their own sequence matchers. That struck me as a bad thing, and that's pretty much what led to this. I welcome a discussion of the API itself; there's definitely a bit of an odd challenge in describing the usage of the matcher variants when both are used (in line_matcher and char_matcher roles). A possible approach would be to consider matcher factories to take _just_ a junk function, nothing else, and use the SequenceMatcher API's set_seqs method to actually provide the sequences in all cases. This fits the character use case, which reuses the matcher, and the line use case which does not. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20752 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21236] patch to use cabinet.lib instead of fci.lib (fixes build with Windows SDK 8.0)
New submission from Michael Stahl: building with MSVC2012 and the Windows SDK 8.0 fails according to this page, the fci.lib is no longer available and cabinet.lib should be used instead: http://social.msdn.microsoft.com/Forums/en-US/vcgeneral/thread/3b85f36e-dffe-4589-adc3-13673b349812/ For Windows 8 onward fci.lib and fdi.lib will become private internal libraries and will not included in Windows SDK here is a patch to do that: http://cgit.freedesktop.org/libreoffice/core/tree/external/python3/python-3.3.0-msvc2012.patch.1 the author of the patch is Peter Foley. -- components: Windows messages: 216309 nosy: mst priority: normal severity: normal status: open title: patch to use cabinet.lib instead of fci.lib (fixes build with Windows SDK 8.0) type: compile error versions: Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21236 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21233] Add *Calloc functions to CPython memory allocation API
Changes by Éric Araujo mer...@netwok.org: -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21233 ___ ___ 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
A.M. Kuchling added the comment: Patch to add impl_detail() looks fine to me. -- versions: +Python 2.7, Python 3.5 -Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1704474 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21222] Mock create_autospec with name argument fails
Michael Foord added the comment: You can use kwargs.pop instead of the two step fetch and delete. For the test, could you add an assert that the name is used. Can you add an extra underscore to the method name, to make it: test_create_autospec_with_name -- nosy: +michael.foord ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21222 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21235] importlib's spec module create algorithm is not exposed
Armin Ronacher added the comment: I'm not sure myself what I need right now. I personally have avoided importlib/imp entirely for my code and I roll with manual module creation because it is most stable between 2.6 - 3.4 but it's getting more complicated to work because of all the new attributes (__package__, __spec__ etc.). This particular case came from SQLAlchemy I believe (I tried to help Mike Bayer transition his code). It's true that create() is the wrong function, load() is actually what should have been used there. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21235 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21237] Update Python 2/3 porting HOWTO's suggestion for dealing with map()
New submission from Brett Cannon: In Python 2.6 and newer you can import future_builtins and use everything from there. In Python 2.5 it should be itertools.imap(). This is much cleaner than the current suggestion at https://docs.python.org/2/howto/pyporting.html#update-map-for-imbalanced-input-sequences -- assignee: brett.cannon components: Documentation keywords: easy messages: 216315 nosy: brett.cannon priority: normal severity: normal stage: needs patch status: open title: Update Python 2/3 porting HOWTO's suggestion for dealing with map() type: enhancement ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21237 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21220] Enhance obmalloc allocation strategy
Kristján Valur Jónsson added the comment: Update patch with suggestions from Larry -- Added file: http://bugs.python.org/file34876/obmalloc.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21220 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20438] inspect: Deprecate getfullargspec?
Stéphane Wirtel added the comment: In this patch, I deprecate the inspect.getfullargspec function in the documentation and raise an warnings.warn with DeprecationWarning. Need feedback, because the inspect.getargspec() informs the user that it can use the getfullargspec() and I think we should use inspect.signature instead of inspect.getfullargspec() and inspect.getargspec(). Thank you -- keywords: +patch nosy: +matrixise Added file: http://bugs.python.org/file34877/issue20438_deprecate_inspect-getfullargspec.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20438 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20438] inspect: Deprecate getfullargspec?
Stéphane Wirtel added the comment: Here is the output of my test: ./python3.5 -Wd test.py test.py:9: DeprecationWarning: Deprecated warnings.warn('Deprecated', DeprecationWarning) /private/tmp/python/lib/python3.5/inspect.py:955: DeprecationWarning: Use inspect.signature() instead of inspect.getfullargspec() warnings.warn(Use inspect.signature() instead of inspect.getfullargspec(), DeprecationWarning) FullArgSpec(args=[], varargs='args', varkw='kwargs', defaults=None, kwonlyargs=[], kwonlydefaults=None, annotations={}) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20438 ___ ___ 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
A.M. Kuchling added the comment: I agree with Chris's logic; the incorrect size seems to be a curses/ncurses bug that has gotten fixed somewhere along the line. You also aren't able to shrink the terminal to be smaller than the size of a derived window created with derwin(), but you seem to get an exception when you try rather than a crash. This seems reasonable to me. I don't think we need to document this behaviour, because that edge case would really belong in the ncurses documentation (and they might change it from version to version). -- resolution: - invalid stage: test needed - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue984870 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15370] test_runpy should include namespace package tests
A.M. Kuchling added the comment: Because Nick both originally created this ticket and also added the new tests (http://hg.python.org/cpython/rev/51dddfead80a/), I'll assume he knew what he was doing when he named those methods, and simply forgot to close this issue. -- assignee: - ncoghlan nosy: +akuchling resolution: - fixed stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15370 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18099] wsgiref sets Content-Length: 0 on 304 Not Modified
Changes by Christian Theune c...@gocept.com: -- versions: +Python 3.5 -Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18099 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21238] unittest.mock.Mock should not allow you to use non-existent assert methods
New submission from Michael Foord: A common problem with unittest.mock.Mock is to mistype an assert method. Because mocks create attributes on demand your test will pass without error. We should raise an AttributeError if you access any attribute name (that doesn't exist) starting with assert or assret. There should also be a keyword argument allowing you to get the old behaviour if you need it (but this new feature should be on by default). Will also need docs. -- assignee: michael.foord components: Library (Lib) messages: 216320 nosy: kushal.das, michael.foord priority: normal severity: normal stage: needs patch status: open title: unittest.mock.Mock should not allow you to use non-existent assert methods type: behavior versions: Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21238 ___ ___ 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
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 rep...@bugs.python.org http://bugs.python.org/issue20103 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21235] importlib's spec module create algorithm is not exposed
Changes by Yury Selivanov yselivanov...@gmail.com: -- nosy: +yselivanov ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21235 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21239] unittest.mock.patch.stopall intermittently doesn't work when the same thing is patched multiple times
New submission from Michael Foord: stopall does not always stop all patches to single target http://code.google.com/p/mock/issues/detail?id=226 What steps will reproduce the problem? python code to reproduce error import mock def myfunc(): return 'hello' m = mock.patch('__main__.myfunc').start() m.return_value = 'firstmock' myfunc() m2 = mock.patch('__main__.myfunc').start() m2.return_value = 'secondmock' myfunc() mock.patch.stopall() myfunc() What is the expected output? What do you see instead? I would expect the output from above to be: 'firstmock' 'secondmock' 'hello' Instead, sometimes it comes out as: 'firstmock' 'secondmock' 'firstmock' This result is non-deterministic though so it may also come out as expected. Re-run several times to get the error. This is a result of using a set to store the active patches. Conversion from a set to a list is non-deterministic because the set has no notion of order. Please provide any additional information below. This use case may seem strange, but it shows up in large unit tests where a base class sets up a default patch to catch external calls or something similar and then an individual unit test requiring specific mock behavior patches it differently. I have a patch here that fixes the problem using a list to store the patches to maintain order and call them in reverse order to stop them in the correct order. https://code.google.com/r/blak111-mockfix/source/detail?r=3c2f72b0253075d628afb333a79b7cb118132294 -- assignee: michael.foord messages: 216322 nosy: michael.foord priority: normal severity: normal stage: patch review status: open title: unittest.mock.patch.stopall intermittently doesn't work when the same thing is patched multiple times type: behavior versions: Python 3.4, Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21239 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21240] Add an abstactmethod directive to the Python ReST domain
New submission from Eric Snow: I'd like to be able to mark abstract methods in the docs more explicitly and have their presentation in the docs be more obvious. So I'd like to propose abstractmethod as a new directive to join the existing ones (classmethod, staticmethod, etc.). (This is motivated by msg216314.) -- assignee: docs@python components: Documentation messages: 216323 nosy: docs@python, eric.snow priority: normal severity: normal status: open title: Add an abstactmethod directive to the Python ReST domain type: enhancement versions: Python 3.4, Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21240 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21235] importlib's spec module create algorithm is not exposed
Eric Snow added the comment: I've opened up #21240 to address the the docs concern. Thanks for bringing it up. :) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21235 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21209] q.put(some_tuple) fails when PYTHONASYNCIODEBUG=1
Roundup Robot added the comment: New changeset 2729823525fe by Yury Selivanov in branch '3.4': asyncio.tasks: Make sure CoroWrapper.send proxies one argument correctly http://hg.python.org/cpython/rev/2729823525fe New changeset 552ee474f3e7 by Yury Selivanov in branch 'default': asyncio.tasks: Make sure CoroWrapper.send proxies one argument correctly http://hg.python.org/cpython/rev/552ee474f3e7 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21209 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21240] Add an abstactmethod directive to the Python ReST domain
Changes by Brett Cannon br...@python.org: -- nosy: +georg.brandl ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21240 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21203] logging configurators ignoring documented options
Jure Koren added the comment: I agree about the 2.7 branch, I did that one off the top of my head after struggling with backporting the code to 2.7. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21203 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11316] RFC822 header parsing API inconsistencies between httplib.HTTPMessage and email.message.Message
Changes by R. David Murray rdmur...@bitdance.com: -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11316 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20438] inspect: Deprecate getfullargspec?
Brett Cannon added the comment: I was thinking about suggesting we don't code deprecate getfullargspec() but the function seems to be new to Python 3 and so that worry for Python 2/3 code is not founded. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20438 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21235] importlib's spec module create algorithm is not exposed
Armin Ronacher added the comment: Also mostly unrelated importlib now does something I have never seen an ABC do: the ABC has create_module but concrete implementations mostly have that function entirely absent. That should probably be reconsidered as it's super confusing. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21235 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20438] inspect: Deprecate getfullargspec?
Yury Selivanov added the comment: How about we deprecate with a warning getfullargspec(); deprecate getargspec() in docs only (in 3.6 we'll fully deprecate all function parameters API except Signature)? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20438 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21209] q.put(some_tuple) fails when PYTHONASYNCIODEBUG=1
Yury Selivanov added the comment: I should check, but I think that Python create a tuple for you if you don't pass directly a tuple, so it's not very different. That's what I thought, but still, better to have the code clearly expressing what it does, than relying on obscure implementation/protocol details. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21209 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21235] importlib's spec module create algorithm is not exposed
Changes by Florent Xicluna florent.xicl...@gmail.com: -- nosy: +flox type: - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21235 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2159] dbmmodule inquiry function is performance prohibitive
Eric Olson added the comment: The performance is still an issue in python 3. Attaching a patch for python 3, performance numbers are below. Measuring ndbm time for a falsey check on an open db with 100 entries. gdbm performance is similar. Before patch: db is not None: 6.9141387939453125e-06 not db: 0.0006985664367675781 Factor: 101X (slow) After patch: db is not None: 4.76837158203125e-06 not db: 4.0531158447265625e-06 Factor: 1X (expected) Also, added a couple tests to verify bool(db) returns the correct value. -- nosy: +eolson Added file: http://bugs.python.org/file34879/dbm_bool.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2159 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21075] fileinput should use stdin.buffer for rb mode
Sam Kimbrel added the comment: Patch attached that checks for 'b' in self._mode and sets self._file to sys.stdin.buffer as appropriate. -- keywords: +patch nosy: +sam.kimbrel Added file: http://bugs.python.org/file34880/21075-fileinput-stdin.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21075 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16236] Doc/Makefile should have $PYTHON=python2
Berker Peksag added the comment: You can now build the Python documentation with using Python 3. See msg216161 in issue 10224 for more information. -- nosy: +berker.peksag resolution: - out of date stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16236 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20438] inspect: Deprecate getfullargspec?
Stéphane Wirtel added the comment: Just one thing, how do you work for the deprecation? 1. you deprecate in the doc for 3.5? 2. you deprecate in the code for 3.6? 3. you remove the code in 3.7? What's the strategy in this case or in general? Thanks -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20438 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21241] Variable name with number causes interactive console to crash
New submission from Henk-Jaap Wagenaar: Executing in the interactive console: foo1 = 0 and then foo1 gives Segmentation Fault: 11 on OS X 10.9.2, Python 3.3.2 (v3.3.2:d047928ae3f6, May 13 2013, 13:52:24) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] If foo1 is defined in a program, and interactive mode is entered, assigning a value to it seg faults the console as well, but executing foo1 *does* work. It does not seem to crash problems on my friends PC (running Ubuntu). -- messages: 216334 nosy: Henk-Jaap.Wagenaar priority: normal severity: normal status: open title: Variable name with number causes interactive console to crash versions: Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21241 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21241] Variable name with number causes interactive console to crash
Changes by Henk-Jaap Wagenaar superhenkj...@gmail.com: -- type: - crash ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21241 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21241] Variable name with number causes interactive console to crash
Ned Deily added the comment: See Issue18458. Update to the latest Python 3.3.5 or 3.4.0. -- nosy: +ned.deily resolution: - duplicate stage: - committed/rejected superseder: - interactive interpreter crashes and test_readline fails on OS X 10.9 Mavericks due to libedit update ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21241 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21234] __contains__ and friends should check is for all elements first
Wolfgang Maier added the comment: - if an object is in the container that is equal to the object, it will be slower, but not very much. You don't know that in general. It depends on where in the sequence the equal object sits, and also on how expensive the equality check is compared to the identity check. A simplified example over your rather lengthy one: l=list(range(2000)) any(e is 900 or e == 900 for e in l) # mimicking current behaviour True any(e is 900 for e in l) or any(e == 900 for e in l) # your suggestion True The second example takes about twice as long as the first one because the identity check has to be run on the whole list, when the equality check discovers the match half way through the sequence. Given that equality is usually more likely than identity, I guess, you would pay a price for your suggestion more often than you profit from it. -- nosy: +wolma ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21234 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21241] Variable name with number causes interactive console to crash
Changes by Ned Deily n...@acm.org: -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21241 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20438] inspect: Deprecate getfullargspec?
Brett Cannon added the comment: How warnings are handled vary from case to case. Typically its documentation-only if we want to warn people that they shouldn't use something because there is a better alternative but the code is not fundamentally broken and its in Python 2. If there is something wrong with it or it's just in Python 3 then a deprecation warning with a decided amount of time for when the code will be removed. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20438 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21220] Enhance obmalloc allocation strategy
Antoine Pitrou added the comment: In Python 3, arenas are allocated using mmap(), so wherever the arena ends up in the address space shouldn't matter, should it? Also, the new strategy adds an O(n) component in the allocator. -- nosy: +neologix, pitrou, tim.peters ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21220 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20438] inspect: Deprecate getfullargspec?
Stéphane Wirtel added the comment: ok, so in this case, I can only change the documentation with a .. deprecated:. But for the future, how can we know we have to deprecate this function for = 3.6 ? Will you parse the documentation and check there is an deprecation to add in the code? Or is there a file with the future deprecations? Are you agree with the deprecation in the documentation? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20438 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20438] inspect: Deprecate getfullargspec?
Yury Selivanov added the comment: I'd +1 for: 1. Deprecating getfullargsspec in docs; 2. Deprecating getargspec in docs and code (since it's an ancient and outdated API) Brett? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20438 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20438] inspect: Deprecate getfullargspec?
Stéphane Wirtel added the comment: Brett, If you agree with Yury, I will provide a patch with these tasks. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20438 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20438] inspect: Deprecate getfullargspec?
Brett Cannon added the comment: Since getfullargspec is new in Python 3 and inspect.signature fundamentally improves things in Python 3 due to Argument Clinic I would say go ahead and code deprecate getfullargspec (we can do a DeprecationWarning for 3.5 and 3.6 and remove in 3.7; people needing compatibility can just use getargspec). As for getargspec, it was already deprecated so just leave it deprecated and update its message to say to use inspect.signature. As for keeping track of this stuff, Stéphane, as part of the test that makes sure the warning is raised, add to that test -- don't need a separate method -- some code that will fail if the function exists in Python 3.7 or later. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20438 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21222] Mock create_autospec with name argument fails
Kushal Das added the comment: New patchset with changes made as suggested. -- Added file: http://bugs.python.org/file34881/issue21222_v2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21222 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21217] inspect.getsourcelines finds wrong lines when lambda used argument to decorator
A Kaptur added the comment: v2 of the patch incorporating the comments at http://bugs.python.org/review/21217/ -- Added file: http://bugs.python.org/file34882/issue21217-v2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21217 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21217] inspect.getsourcelines finds wrong lines when lambda used argument to decorator
Yury Selivanov added the comment: Apart from one nit, the patch is looking good. Also, could you please sign the contributor agreement, as described here: https://docs.python.org/devguide/coredev.html#sign-a-contributor-agreement -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21217 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21242] Generalize configure check for working Python executable
New submission from Brett Cannon: configure.ac has a check that sets ASDLGEN based on what Python interpreter to use for running various scripts which generate files related to the AST. It probably should be generalized so that there's only one check for any script usage in Makefile.pre.in since there is really no need to check multiple times for the same thing. -- components: Build messages: 216346 nosy: brett.cannon, kushal.das priority: low severity: normal stage: needs patch status: open title: Generalize configure check for working Python executable versions: Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21242 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1521196] smtplib login fails with aol smtp server
R. David Murray added the comment: This will be fixed as part of issue 15014, which also adds support for providing user created auth methods. -- resolution: - duplicate stage: test needed - committed/rejected status: open - closed superseder: - smtplib: add support for arbitrary auth methods ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1521196 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17861] put opcode information in one place
Kushal Das added the comment: New patch with changes as suggested by Brett. -- Added file: http://bugs.python.org/file34883/issue17861_v6.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17861 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20983] Python 3.4 'repair' Windows installation does not install pip setuptools packages
Don DeZutter added the comment: Martin: Thank you for your prompt and helpful response to my attempt to tag along to a possibly similar bug. I had been working on my issue for about two weeks and truly believed it was a bug before i adventured as I did. As you know, the difference between a problem and a bug is who comes up with the fix. I continued working my issue and discovered I could reinstall by running msiexec with the /l *v option and again with the /fa /l*v option which forces all file files to be reinstalled. I still consider this to be a bug in the Python installer because the installer does not truly repair. But I am a happy camper now will use the python-list you recommended. Don DeZutter On Mon, Apr 14, 2014 at 11:26 PM, Martin v. Löwis rep...@bugs.python.orgwrote: Martin v. Löwis added the comment: Don: This is not a helpdesk system, but a bug tracker; the difference is that we don't help you here, but you help us. If you need help yourself, I suggest subscribing to python-list, at https://mail.python.org/mailman/listinfo/python-list and posting a question there. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20983 ___ -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20983 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18229] attribute headers of http.server.BaseHTTPRequestHandler sometimes does not exists
Caelyn McAulay added the comment: Added comment to documentation concerning when the headers attribute gets set. I confirmed that the headers attribute is only ever set in the parse_request method of BaseHTTPRequestHandler and only if the request is successfully parsed as HTTP. -- keywords: +patch nosy: +math_foo Added file: http://bugs.python.org/file34884/documentation18229.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18229 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21217] inspect.getsourcelines finds wrong lines when lambda used argument to decorator
Claudiu.Popa added the comment: - We added tests of decorated classes. The source of decorated classes does not include the decorators, which is different than the usual behavior of decorated functions. What is the correct behavior here? There is an open issue for this, http://bugs.python.org/issue1764286. It has a patch which uses inspect.unwrap in order to unwrap the decorated functions. -- nosy: +Claudiu.Popa ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21217 ___ ___ 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
Changes by Yury Selivanov yselivanov...@gmail.com: -- assignee: - yselivanov ___ 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
[issue21217] inspect.getsourcelines finds wrong lines when lambda used argument to decorator
Yury Selivanov added the comment: Claudiu: I'll take a look at your patch, thanks! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21217 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21242] Generalize configure check for working Python executable
Meador Inge added the comment: I am not sure I follow. In configure.ac I see one check for Python: AC_SUBST(ASDLGEN) AC_CHECK_PROGS(PYTHON, python$PACKAGE_VERSION python3 python, not-found) if test $PYTHON = not-found; then ASDLGEN=@echo python: $PYTHON! cannot run \$(srcdir)/Parser/asdl_c.py # else ASDLGEN=$PYTHON fi and a couple of uses for it in Makefile.pre.in: $(AST_H): $(AST_ASDL) $(ASDLGEN_FILES) $(MKDIR_P) $(AST_H_DIR) $(ASDLGEN) -h $(AST_H_DIR) $(AST_ASDL) $(AST_C): $(AST_H) $(AST_ASDL) $(ASDLGEN_FILES) $(MKDIR_P) $(AST_C_DIR) $(ASDLGEN) -c $(AST_C_DIR) $(AST_ASDL) Are you suggesting that the variable name 'ASDLGEN be renamed to something more general so that any scripts that need to be run *before* building the interpreter can use it? I don't see any other AC_CHECK_PROGS checks for Python in configure.ac. Apologies if I am being dense today :-) -- nosy: +meador.inge ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21242 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21243] Auto-generate exceptions.c from a Python file
New submission from Brett Cannon: There isn't very much that's special about the various exceptions (although maybe there will be some day). Anyway, it seems like we could, if we so desired, define the exceptions in Python and then auto-generate the C code. The other option is to obviously just load the exceptions from Python code, store the various objects in various C attributes, and update the C API for exceptions to operate off of the Python-defined exception objects (question is what performance impact that would have). The key question, though, is whether any of this is actually worth it. =) -- components: Interpreter Core messages: 216354 nosy: brett.cannon priority: low severity: normal stage: needs patch status: open title: Auto-generate exceptions.c from a Python file type: enhancement versions: Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21243 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21242] Generalize configure check for working Python executable
Meador Inge added the comment: Ah, okay, this looks in reference to the opcode generation stuff in issue17861. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21242 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21242] Generalize configure check for working Python executable
Brett Cannon added the comment: You figured out the reason for the interest; I filed the bug faster than Kushal could commit his code. =) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21242 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21217] inspect.getsourcelines finds wrong lines when lambda used argument to decorator
A Kaptur added the comment: v3 of patch, including misc/news update, docstring for function, and removing class decorator tests, since it sounds like those are better handled in http://bugs.python.org/issue1764286. -- Added file: http://bugs.python.org/file34885/issue21217-v3.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21217 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17861] put opcode information in one place
Roundup Robot added the comment: New changeset 56e7fa27f979 by Kushal Das in branch 'default': Closes Issue 17861: Autogenerate Include/opcode.h from opcode.py. http://hg.python.org/cpython/rev/56e7fa27f979 -- nosy: +python-dev resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17861 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21223] fix test_site/test_startup_imports when some of the extensions are built as builtins
Roundup Robot added the comment: New changeset ebb9595af548 by doko in branch '3.4': - Issue #21223: Pass test_site/test_startup_imports when some of the extensions http://hg.python.org/cpython/rev/ebb9595af548 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21223 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21236] patch to use cabinet.lib instead of fci.lib (fixes build with Windows SDK 8.0)
Changes by Ned Deily n...@acm.org: -- components: +Build nosy: +loewis, zach.ware type: compile error - ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21236 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21223] fix test_site/test_startup_imports when some of the extensions are built as builtins
Changes by Matthias Klose d...@debian.org: -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21223 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17660] mock.patch could whitelist builtins to not need create=True
Berker Peksag added the comment: +.. note:: I think using a note directive is not necessary here. Also it looks a bit ugly :) https://dl.dropboxusercontent.com/u/166024/issue17660.png +.. versionchanged:: 3.5 + If you are patching builtins in a module then you don't + need to pass `create=True`, it will be added by default. -- nosy: +berker.peksag ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17660 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com