[issue27639] UserList.__getitem__ doesn't account for slices
Change by Dmitry Kazakov : -- pull_requests: +13069 ___ Python tracker <https://bugs.python.org/issue27639> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue31841] Several methods of collections.UserString do not return instances of UserString or its subclasses
Change by Dmitry Kazakov : -- pull_requests: -13067 ___ Python tracker <https://bugs.python.org/issue31841> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue31841] Several methods of collections.UserString do not return instances of UserString or its subclasses
Change by Dmitry Kazakov : -- pull_requests: +13067 ___ Python tracker <https://bugs.python.org/issue31841> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue27639] UserList.__getitem__ doesn't account for slices
Change by Dmitry Kazakov : -- pull_requests: -4870 ___ Python tracker <https://bugs.python.org/issue27639> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue31841] Several methods of collections.UserString do not return instances of UserString or its subclasses
Change by Dmitry Kazakov : -- pull_requests: -4438 ___ Python tracker <https://bugs.python.org/issue31841> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue31299] Add "ignore_modules" option to TracebackException.format()
Change by Dmitry Kazakov : -- nosy: -vaultah ___ Python tracker <https://bugs.python.org/issue31299> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue31299] Add "ignore_modules" option to TracebackException.format()
Change by Dmitry Kazakov : -- pull_requests: -11522 ___ Python tracker <https://bugs.python.org/issue31299> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue31299] Add "ignore_modules" option to TracebackException.format()
Change by Dmitry Kazakov : -- pull_requests: -5065 ___ Python tracker <https://bugs.python.org/issue31299> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue31299] Add "ignore_modules" option to TracebackException.format()
Change by Dmitry Kazakov : -- pull_requests: +11522 ___ Python tracker <https://bugs.python.org/issue31299> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue31299] Add "ignore_modules" option to TracebackException.format()
Dmitry Kazakov added the comment: It would seem no one is actually interested in this proposed enhancement. I'm closing my PR, since I'm not interested in resolving the file conflict. I'll probably submit a traceback-mutating patch to the issue 16217. This issue can be closed. -- ___ Python tracker <https://bugs.python.org/issue31299> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue31299] Add "ignore_modules" option to TracebackException.format()
Dmitry Kazakov added the comment: I asked for some input on this issue in January (https://mail.python.org/pipermail/python-dev/2018-January/151590.html). Since then an important PR was merged (https://github.com/python/cpython/pull/4793), however it mutates the traceback object. Should there be a way to hide frames while keeping the original traceback object intact? If not, this issue should probably be closed. Otherwise I would appreciate a review of the PR. -- ___ Python tracker <https://bugs.python.org/issue31299> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue31299] Add "ignore_modules" option to TracebackException.format()
Change by Dmitry Kazakov <waultah...@gmail.com>: -- pull_requests: +5065 stage: needs patch -> patch review ___ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue31299> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue27639] UserList.__getitem__ doesn't account for slices
Change by Dmitry Kazakov <waultah...@gmail.com>: -- nosy: +vaultah ___ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue27639> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue27639] UserList.__getitem__ doesn't account for slices
Change by Dmitry Kazakov <waultah...@gmail.com>: -- pull_requests: +4870 stage: needs patch -> patch review ___ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue27639> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue32194] When creating list of dictionaries and updating datetime objects one by one, all values are set to last one of the list.
Dmitry Kazakov <waultah...@gmail.com> added the comment: This is not a bug in Python. Refer to this page for the explanation: https://stackoverflow.com/questions/240178/list-of-lists-changes-reflected-across-sublists-unexpectedly Basically, [{}]*3 creates a list with three references to the same dictionary. -- nosy: +vaultah ___ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue32194> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue31841] Several methods of collections.UserString do not return instances of UserString or its subclasses
Dmitry Kazakov <waultah...@gmail.com> added the comment: I added a PR. FWIW, I still think it would make sense to change the return type of UserString.join, and maybe *split* and *partition methods (to return list/tuple of UserString objects) for the sake of consistency. -- ___ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue31841> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue31841] Several methods of collections.UserString do not return instances of UserString or its subclasses
Change by Dmitry Kazakov <waultah...@gmail.com>: -- keywords: +patch pull_requests: +4438 stage: -> patch review ___ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue31841> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue31299] Add "ignore_modules" option to TracebackException.format()
Change by Dmitry Kazakov <waultah...@gmail.com>: -- pull_requests: -3274 ___ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue31299> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue31299] Add "ignore_modules" option to TracebackException.format()
Dmitry Kazakov <waultah...@gmail.com> added the comment: I only recently realized that trace.Trace accepts two similar arguments, namely ignoremods and ignoredirs. Should we try to make the API and implementation of the functionality proposed here conform to that of trace.Trace's ignoremods? Would Python-Ideas be a more appropriate place to discuss this? -- ___ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue31299> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue31906] String literals next to each other does not cause error
Dmitry Kazakov <waultah...@gmail.com> added the comment: This is a documented feature: https://docs.python.org/3/reference/lexical_analysis.html#string-literal-concatenation And yes, it was discussed before: https://mail.python.org/pipermail/python-ideas/2013-May/020527.html -- nosy: +vaultah ___ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue31906> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue31299] Add "ignore_modules" option to TracebackException.format()
Dmitry Kazakov <waul...@gmail.com> added the comment: Ping. (this issue needs a decision on ignore_modules vs filter callback, and/or patch review) -- ___ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue31299> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue31841] Several methods of collections.UserString do not return instances of UserString or its subclasses
New submission from Dmitry Kazakov <waul...@gmail.com>: A few of the methods of collections.UserString return objects of type str when one would expect instances of UserString or a subclass. Here's an example for UserString.join: >>> s = UserString(', ').join(['a', 'b', 'c']); print(repr(s), type(s)) 'a, b, c' This *looks* like a bug to me, but since I was unable to find similar bug reports, and this behaviour has existed for years, I'm not too sure. Same holds for UserString.format and UserString.format_map, which were added recently (issue 22189): >>> s = UserString('{}').format(1); print(repr(s), type(s)) '1' At least, this output is inconsistent with %-based formatting: >>> s = UserString('%d') % 1; print(repr(s), type(s)) '1' -- components: Library (Lib) messages: 304761 nosy: vaultah priority: normal severity: normal status: open title: Several methods of collections.UserString do not return instances of UserString or its subclasses type: behavior ___ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue31841> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue31299] Add "ignore_modules" option to TracebackException.format()
Dmitry Kazakov added the comment: Yes, a public built-in facility to modify a traceback would certainly be useful, although there should be a standard way to "hide" unwanted frames without mutating the traceback, too, and the traceback module seems a perfect place to add it. I have no objections to the `filter` argument, though filtering out frames based on modules to me feels by far more common a task than anything else `filter` would be capable of. I can update the PR if there's a consensus that `filter` is favored over `ignore_modules`. -- ___ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue31299> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue31299] Add "ignore_modules" option to TracebackException.format()
Changes by Dmitry Kazakov <waul...@gmail.com>: -- pull_requests: +3274 ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue31299> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16217] Tracebacks are unnecessarily verbose when using 'python -m'
Dmitry Kazakov added the comment: Since runpy also handles the execution of directories and zip files, I think it would be reasonable to clean up tracebacks in these cases, too. The ignore_modules argument would be a great addition to the traceback module. Should I create a separate issue/pull request for its implementation? -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue16217> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16217] Tracebacks are unnecessarily verbose when using 'python -m'
Dmitry Kazakov added the comment: In order to load and compile the module code, runpy calls the loader's get_code method. Because that happens outside of the normal import process, and PyImport_ImportModuleLevelObject is currently the only place where remove_importlib_frames is being invoked, tracebacks of exceptions occurring in get_code are kept unmodified. Would it be wrong to drop all importlib frames from all unhandled exceptions, except when the -v flag is present? On the other hand, since the patch from #issue15486 seems to work fine in most scenarios, I propose removing both runpy and importlib traceback entries locally inside the runpy module. There may be better solutions, though... In any case, I'm willing to write a patch. -- nosy: +vaultah ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue16217> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue30876] SystemError on importing module from unloaded package
Dmitry Kazakov added the comment: Please ignore my last message, I didn't notice the existing pull request... Sorry. -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue30876> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24548] Broken link in the unittest documentation
New submission from Dmitry Kazakov: The Simple Smalltalk Testing: With Patterns link from https://docs.python.org/3.5/library/unittest.html is dead. I found 2 mirrors but I don't think any of them should replace the broken link. 1. http://testingsoftware.blogspot.com/2007/08/smalltalk-testing-with-patterns.html (ads and spam in comments) 2. http://live.exept.de/doc/online/english/tools/misc/testfram.htm (image link is broken) -- assignee: docs@python components: Documentation messages: 246044 nosy: docs@python, wau priority: normal severity: normal status: open title: Broken link in the unittest documentation type: enhancement versions: Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24548 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24309] string.Template should be using str.format and/or deprecated
Changes by Dmitry Kazakov jsb...@gmail.com: -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24309 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14003] __self__ on built-in functions is not as documented
Changes by Dmitry Kazakov jsb...@gmail.com: -- nosy: +vlth ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14003 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24309] string.Template should be using str.format and/or deprecated
New submission from Dmitry Kazakov: I came across this piece of code in Lib/string.py:146: # We use this idiom instead of str() because the latter will # fail if val is a Unicode containing non-ASCII characters. return '%s' % (mapping[named],) This seems vestigial. I think it'd be appropriate to fix the string.Template by replacing the printf-style formatting with newer str.format everywhere in the Template's source. The obvious advantage is that by tweaking some regexes we'll make possible formatting using the following syntax ${thing.attribute_or_key} by dropping to the str.format return '{named}'.format(**mapping) # -- new version It'd also make sense to use the str.format_map to implement the Template.safe_substitute. Borrowing some ideas from issue1198569, we can then expose an additional attribute called Template.bracepattern to allow programmers use the str.format-based substitution extensively: $name ${name.thing} ${name.thing: 16} This change won't break any existing code. But I'm not exactly sure string.Template should be in Python 3 at all. It's one of the least used features and PEP 292 states it was added as an alternative to %-based substitution. I think it'd be deprecated and removed from the standard library. So what's the resolution? Should we fix it or deprecate it or both? -- components: Library (Lib) messages: 244262 nosy: vlth priority: normal severity: normal status: open title: string.Template should be using str.format and/or deprecated type: enhancement ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24309 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24309] string.Template should be using str.format and/or deprecated
Dmitry Kazakov added the comment: Ugh, I guess I was too quick to propose deprecation, sorry :( But is it a strict No to the proposed use of str.format as well? This would be a (relatively) minor but useful change which, again, won't break anything. I can write the patch. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24309 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24275] lookdict_* give up too soon
Changes by Dmitry Kazakov jsb...@gmail.com: -- nosy: +vlth ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24275 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24269] Few improvements to the collections documentation
New submission from Dmitry Kazakov: collections.Counter: Formatted the code in the See also section. collections.deque.remove: Removed the first occurrence of value. - Remove ... collections.deque.index (a followup from issue23704): Changed [, end] to [, stop] in the signature, because the implementation and the docstring of deque.index use 'stop'. Also, adapted the brief explanation from the Common Sequence Operations table. https://docs.python.org/3/library/stdtypes.html#common-sequence-operations -- assignee: docs@python components: Documentation files: collections_doc.diff keywords: patch messages: 243909 nosy: docs@python, vlth priority: normal severity: normal status: open title: Few improvements to the collections documentation type: enhancement versions: Python 3.5 Added file: http://bugs.python.org/file39473/collections_doc.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24269 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24219] Repeated integer in Lexical analysis/Integer literals section
Dmitry Kazakov added the comment: Please, do tell me if I'm wrong deleting that literal and it actually serves some purpose... -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24219 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24216] Typo in bytes.join/bytearray.join documentation
New submission from Dmitry Kazakov: This if there are any values in iterable that are note bytes-like objects should be if there are any values in iterable that are not bytes-like objects Here's a micropatch... -- assignee: docs@python components: Documentation files: bytes_join.diff keywords: patch messages: 243389 nosy: docs@python, vlth priority: normal severity: normal status: open title: Typo in bytes.join/bytearray.join documentation type: enhancement versions: Python 3.5 Added file: http://bugs.python.org/file39403/bytes_join.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24216 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24219] Repeated integer in Lexical analysis/Integer literals section
New submission from Dmitry Kazakov: One of the integers under Some examples of integer literals is repeated twice: 7 21474836470o1770b100110111 3 79228162514264337593543950336 0o3770x1 79228162514264337593543950336 0xdeadbeef I believe this comes from the old docs: https://docs.python.org/2.7/reference/lexical_analysis.html#integer-and-long-integer-literals (the L suffix was removed). -- assignee: docs@python components: Documentation files: intliteral.diff keywords: patch messages: 243418 nosy: docs@python, vlth priority: normal severity: normal status: open title: Repeated integer in Lexical analysis/Integer literals section type: enhancement versions: Python 3.5 Added file: http://bugs.python.org/file39410/intliteral.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24219 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22619] Possible implementation of negative limit for traceback functions
Changes by Dmitry Kazakov jsb...@gmail.com: Added file: http://bugs.python.org/file39166/traceback_limit_doc_rev3.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22619 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22619] Possible implementation of negative limit for traceback functions
Dmitry Kazakov added the comment: Thanks, completely missed the abs(limit) part. Here's the updated documentation patch. -- Added file: http://bugs.python.org/file39161/traceback_limit_doc_rev.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22619 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22619] Possible implementation of negative limit for traceback functions
Changes by Dmitry Kazakov jsb...@gmail.com: Added file: http://bugs.python.org/file39162/traceback_limit_doc_rev2.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22619 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22619] Possible implementation of negative limit for traceback functions
Changes by Dmitry Kazakov jsb...@gmail.com: Removed file: http://bugs.python.org/file39161/traceback_limit_doc_rev.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22619 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22619] Possible implementation of negative limit for traceback functions
Dmitry Kazakov added the comment: Here's the documentation patch. -- Added file: http://bugs.python.org/file39152/traceback_limit_doc.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22619 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22619] Possible implementation of negative limit for traceback functions
Dmitry Kazakov added the comment: I'll do that tomorrow. The patch still needs a review though... -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22619 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22619] Possible implementation of negative limit for traceback functions
Dmitry Kazakov added the comment: Again, I'm honestly sorry if I'm being annoying, but is there anything else that needs to be done in order to make this issue resolved? The stage is set to patch review, although there were no messages posted since the latest patch was submitted and there're no comments to the Patch set 6 in Rietveld. If your patch has not received any notice from reviewers (i.e., no comment made) after one month, first “ping” the issue on the issue tracker to remind the nosy list that the patch needs a review. Is this true for the patch review stage? I pinged this issue about a month ago, but haven't got any response; should I have emailed python-...@python.org even if the patch is not mine? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22619 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22619] Possible implementation of negative limit for traceback functions
Dmitry Kazakov added the comment: Thank you, Terry. You got the proposal right. I'm glad you noticed the issues with tests, I updated the patch to fix them. -- Added file: http://bugs.python.org/file37628/traceback_rev2.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22619 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22619] Possible implementation of negative limit for traceback functions
Changes by Dmitry Kazakov jsb...@gmail.com: Removed file: http://bugs.python.org/file37181/traceback.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22619 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22619] Possible implementation of negative limit for traceback functions
Changes by Dmitry Kazakov jsb...@gmail.com: Removed file: http://bugs.python.org/file37341/traceback_patch_2.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22619 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22619] Possible implementation of negative limit for traceback functions
Changes by Dmitry Kazakov jsb...@gmail.com: Removed file: http://bugs.python.org/file36919/tb_patch_2.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22619 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22619] Possible implementation of negative limit for traceback functions
Dmitry Kazakov added the comment: I improved tests for *_stack and *_tb functions, fixed a few typos and added more comments. -- Added file: http://bugs.python.org/file37632/traceback_rev3.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22619 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22619] Possible implementation of negative limit for traceback functions
Dmitry Kazakov added the comment: Hold on, I found 2 more bugs. Will update the patch soon. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22619 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22619] Possible implementation of negative limit for traceback functions
Dmitry Kazakov added the comment: Some of the patches (including the latest one) were missing Mercurial header. I'm uploading the properly formatted patch (traceback_rev_fixed.diff) -- Added file: http://bugs.python.org/file37615/traceback_rev_fixed.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22619 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22619] Possible implementation of negative limit for traceback functions
Dmitry Kazakov added the comment: I understand that this issue is far from being important, but this is going to be the fourth unreviewed file in this issue. I noted all your comments to me and fixed the patch accordingly, but ever since November I'm the only one who posts something here. I pinged the issue about 4 days ago (after a month of utter silence) and still didn't get any response. Could someone review the latest patch (the one I attach to this message - traceback_rev.diff) or at least say what's wrong with it (or with this issue, or with something else)? -- Added file: http://bugs.python.org/file37600/traceback_rev.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22619 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23167] Marshal docs say format version is 3; actual format version is 4
New submission from Dmitry Kazakov: Documentation on marshal module says that format version is 3, but Py_MARSHAL_VERSION is set to 4. Search for marshal-related issues gave me an idea that this is a documentation bug. -- assignee: docs@python components: Documentation files: marshal_doc.diff keywords: patch messages: 233429 nosy: docs@python, vlth priority: normal severity: normal status: open title: Marshal docs say format version is 3; actual format version is 4 versions: Python 3.4 Added file: http://bugs.python.org/file37598/marshal_doc.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23167 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22619] Possible implementation of negative limit for traceback functions
Dmitry Kazakov added the comment: Python Developer's Guide said to ping the issue, in case of one-month long inactivity period. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22619 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22974] Make traceback functions support negative limits
New submission from Dmitry Kazakov: This is a complete implementation of negative limits for functions from traceback module (see this proposal - https://mail.python.org/pipermail/python-ideas/2014-August/029105.html). I also added some tests. -- components: Library (Lib) files: traceback_patch_2.diff keywords: patch messages: 231943 nosy: vlth priority: normal severity: normal status: open title: Make traceback functions support negative limits type: enhancement versions: Python 3.5 Added file: http://bugs.python.org/file37336/traceback_patch_2.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22974 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22619] Possible implementation of negative limit for traceback functions
Changes by Dmitry Kazakov jsb...@gmail.com: -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22619 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22974] Make traceback functions support negative limits
Dmitry Kazakov added the comment: Indeed, this is an exact duplicate, but I feel like that issue is an embarrassment: too many unnecessary actions, bad patches, and most of messages are totally useless. I wanted to start over for once, so I closed that issue. Pardon my initial ignorance. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22974 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22974] Make traceback functions support negative limits
Changes by Dmitry Kazakov jsb...@gmail.com: -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22974 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22619] Possible implementation of negative limit for traceback functions
Dmitry Kazakov added the comment: Moved the latest patch with implementation and tests from issue 22974 (http://bugs.python.org/issue22974). -- status: closed - open Added file: http://bugs.python.org/file37341/traceback_patch_2.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22619 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22974] Make traceback functions support negative limits
Changes by Dmitry Kazakov jsb...@gmail.com: Removed file: http://bugs.python.org/file37336/traceback_patch_2.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22974 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22619] Possible implementation of negative limit for traceback functions
Dmitry Kazakov added the comment: Revisiting this issue, I realize that I made quite a few mistakes (because this was the first issue I submitted). The patch is definitely minor, and I'm no longer interested in it. This issue may now be closed. Cheers. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22619 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22619] Possible implementation of negative limit for traceback functions
Changes by Dmitry Kazakov jsb...@gmail.com: -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22619 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22619] Possible implementation of negative limit for traceback functions
Changes by Dmitry Kazakov jsb...@gmail.com: -- status: closed - open ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22619 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22619] Possible implementation of negative limit for traceback functions
Dmitry Kazakov added the comment: I updated the patch. -- Added file: http://bugs.python.org/file37181/traceback.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22619 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22619] Possible implementation of negative limit for traceback functions
Dmitry Kazakov added the comment: I'm not sure what would be the best way to support negative limit for stack functions. Actually, I think the current behavior is not intuitive. For example we could make positive limit mean the same thing for traceback and stack functions (load N entries, starting from the caller), but in that case the change will inverse the behavior of code that uses stack functions. Since the traceback module is mostly used for printing/formatting the difference won't be crucial. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22619 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22619] Possible implementation of negative limit for traceback functions
Dmitry Kazakov added the comment: I think the reason this patch hasn't been discussed well is that it only changes the behavior for traceback.*_tb functions that only deal with tracebacks. I commented on the review page that we don't have to change the behavior of traceback.*_stack functions to make it obvious. Let me show an example: import sys def a(): b() def b(): c() def c(): d() def d(): def e(): print_stack(limit=2) # Last 2 entries ''' Output: File file, line 331, in d e() File file, line 328, in e print_stack(limit=2) # Last 2 entries ''' raise Exception e() try: a() except Exception: print_exc(limit=2) # 2 entries from the caller ''' Output: Traceback (most recent call last): File file, line 336, in module a() File file, line 318, in a b() Exception ''' If we decide to unify the behavior of *_tb and *_stack functions, the change will break some existing code, although the breakage will be purely cosmetic. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22619 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22619] Possible implementation of negative limit for traceback functions
Dmitry Kazakov added the comment: Renamed the cond variable, added tuple unpacking instead of using a single variable. -- Added file: http://bugs.python.org/file36916/tb_patch.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22619 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22619] Possible implementation of negative limit for traceback functions
Changes by Dmitry Kazakov jsb...@gmail.com: Removed file: http://bugs.python.org/file36916/tb_patch.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22619 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22619] Possible implementation of negative limit for traceback functions
Changes by Dmitry Kazakov jsb...@gmail.com: -- hgrepos: +278 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22619 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22619] Possible implementation of negative limit for traceback functions
Changes by Dmitry Kazakov jsb...@gmail.com: Added file: http://bugs.python.org/file36918/4a0ec19e4288.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22619 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22619] Possible implementation of negative limit for traceback functions
Changes by Dmitry Kazakov jsb...@gmail.com: -- hgrepos: -278 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22619 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22619] Possible implementation of negative limit for traceback functions
Changes by Dmitry Kazakov jsb...@gmail.com: Removed file: http://bugs.python.org/file36918/4a0ec19e4288.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22619 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22619] Possible implementation of negative limit for traceback functions
Changes by Dmitry Kazakov jsb...@gmail.com: Added file: http://bugs.python.org/file36919/tb_patch_2.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22619 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22619] Possible implementation of negative limit for traceback functions
Dmitry Kazakov added the comment: Here's the updated (optimized) patch -- hgrepos: +277 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22619 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22619] Possible implementation of negative limit for traceback functions
Changes by Dmitry Kazakov jsb...@gmail.com: Added file: http://bugs.python.org/file36899/9cb7aaad1d85.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22619 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22619] Possible implementation of negative limit for traceback functions
Changes by Dmitry Kazakov jsb...@gmail.com: -- hgrepos: -277 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22619 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22619] Possible implementation of negative limit for traceback functions
Changes by Dmitry Kazakov jsb...@gmail.com: -- hgrepos: -275 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22619 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22619] Possible implementation of negative limit for traceback functions
New submission from Dmitry Kazakov: This is the possible patch for this proposal: https://mail.python.org/pipermail/python-ideas/2014-October/029826.html. -- components: Library (Lib) messages: 229167 nosy: vlth priority: normal severity: normal status: open title: Possible implementation of negative limit for traceback functions type: enhancement versions: Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22619 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22619] Possible implementation of negative limit for traceback functions
Dmitry Kazakov added the comment: def _extract_tb_or_stack_iter(curr, limit, extractor): # Distinguish frames from tracebacks (need to import types) if limit is None: limit = getattr(sys, 'tracebacklimit', None) elif limit 0 and isinstance(curr, types.TracebackType): seq = list(_extract_tb_or_stack_iter(curr, None, extractor)) yield from seq[limit:] else: pass -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22619 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22619] Possible implementation of negative limit for traceback functions
Dmitry Kazakov added the comment: Sorry, first time posting here; accidently pressed Enter. -- hgrepos: +275 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22619 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22619] Possible implementation of negative limit for traceback functions
Changes by Dmitry Kazakov jsb...@gmail.com: -- keywords: +patch Added file: http://bugs.python.org/file36891/9f618a0c2880.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22619 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22619] Possible implementation of negative limit for traceback functions
Dmitry Kazakov added the comment: Thanks. I replied to your comments at Retvield. I'll update the patch tomorrow. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22619 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com