[issue31113] Stack overflow with large program

2017-08-06 Thread Manuel Krebber
Manuel Krebber added the comment: @Serhiy That would require me to compile Python myself though, right? Is there a reason why the limit is only for try/for and not for if? @Antoine Well, the goal is to be able to generate Python 2 compatible code . I will try to split the code into more

[issue31113] Stack overflow with large program

2017-08-04 Thread Manuel Krebber
Manuel Krebber added the comment: I have already tried to reduce the nesting, but it still crashes. I have to admit that ~20 levels of nesting are still quite a lot. But I am surprised that so few levels of nesting already are a problem for the parser... I have attached the generated code

[issue31113] Stack overflow with large program

2017-08-03 Thread Manuel Krebber
Manuel Krebber added the comment: 1) Yes. 2) A .pyc file was not generated. 3) It is always the same location where the error occurs. 4) It did not crash on the linux machine that I tested it on. I have tried to split the code up into multiple files, but it still crashes. I have uploaded

[issue31113] Stack overflow with large program

2017-08-03 Thread Manuel Krebber
New submission from Manuel Krebber: With a pattern matching library I am generating some Python code that matches patterns. For a very big pattern set I generate a Python file which is about 20MB and has ~300K LOC. When I try to execute the file with Python 3.6.2 on Windows 10 (64bit

[issue29418] inspect.isroutine does not return True for some bound builtin methods

2017-02-02 Thread Manuel Krebber
New submission from Manuel Krebber: Some of the builtin methods are not recognized as such by inspect.isroutine(). inspect.ismethoddescriptor() only returns True for the unbound versions of the methods but not the bound ones. For example: >>> inspect.isroutine(object.__st

[issue29377] Add the 'wrapper_descriptor' type to the types module

2017-02-01 Thread Manuel Krebber
Manuel Krebber added the comment: One question I was wondering about is whether those types should be checked by inspect.isroutine() as well. -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue29377] Add the 'wrapper_descriptor' type to the types module

2017-01-30 Thread Manuel Krebber
Manuel Krebber added the comment: Okay, I added MethodDescriptorType to the types module and updated the docs. Hope this is okay now. -- Added file: http://bugs.python.org/file46455/slot-wrapper-types.patch ___ Python tracker <rep...@bugs.python.

[issue26355] Emit major version based canonical URLs for docs

2017-01-27 Thread Manuel Krebber
Manuel Krebber added the comment: Sorry, I accidentally replied to the worng issue -.- -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue29377] Add the 'wrapper_descriptor' type to the types module

2017-01-27 Thread Manuel Krebber
Manuel Krebber added the comment: I created the last patch without commiting, so maybe this one will work properly with the revision tool. -- Added file: http://bugs.python.org/file46429/slot-wrapper-types.patch ___ Python tracker <

[issue26355] Emit major version based canonical URLs for docs

2017-01-27 Thread Manuel Krebber
Changes by Manuel Krebber <ad...@wheerd.de>: Removed file: http://bugs.python.org/file46428/slot-wrapper-types.patch ___ Python tracker <rep...@bugs.python.org> <http://bugs.python

[issue26355] Emit major version based canonical URLs for docs

2017-01-27 Thread Manuel Krebber
Manuel Krebber added the comment: I create the last diff without creating a commit, so maybe this one works better. -- nosy: +Wheerd Added file: http://bugs.python.org/file46428/slot-wrapper-types.patch ___ Python tracker <rep...@bugs.python.

[issue29377] Add the 'wrapper_descriptor' type to the types module

2017-01-26 Thread Manuel Krebber
Manuel Krebber added the comment: Alright, I added some tests and tried it again with the patch. -- Added file: http://bugs.python.org/file46427/slot-wrapper-types.patch ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue29377] Add the 'wrapper_descriptor' type to the types module

2017-01-26 Thread Manuel Krebber
Manuel Krebber added the comment: I added some docs, but I am not sure what I would want to test here. There are no tests for types.BuiltinMethodType either. Maybe the string representation of it could be tested, but an isinstance test seems pretty redundant. I hope this patch file works

[issue29377] Add the 'wrapper_descriptor' type to the types module

2017-01-26 Thread Manuel Krebber
Manuel Krebber added the comment: I would suggest the names SlotWrapperType and MethodWrapperType because I think they match their string representations the closest. For checking whether something is a method/function one could also use inspect.isroutine (or inspect.ismethoddescriptor

[issue29377] Add the 'wrapper_descriptor' type to the types module

2017-01-26 Thread Manuel Krebber
Changes by Manuel Krebber <ad...@wheerd.de>: -- keywords: +patch Added file: http://bugs.python.org/file46420/0001-Added-SlotWrapperType-and-MethodWrapperType-to-the-t.patch ___ Python tracker <rep...@bugs.python.org> <http://

[issue29377] Add the 'wrapper_descriptor' type to the types module

2017-01-26 Thread Manuel Krebber
New submission from Manuel Krebber: There currently is no type in the types module for the slot wrappers/wrapper_descriptor types. I would like to have something like WrapperDescriptor = type(object.__init__) added to it (or maybe even add it to MethodType). This would be helpful

[issue28773] typing.FrozenSet missing in documentation.

2016-11-22 Thread Manuel Krebber
Manuel Krebber added the comment: I updated the patch to add reflect the covariance. -- Added file: http://bugs.python.org/file45606/frozenset-doc.patch ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue28773] typing.FrozenSet missing in documentation.

2016-11-22 Thread Manuel Krebber
New submission from Manuel Krebber: The typing.FrozenSet is missing in the typing module documentation. I have attached a patch that adds it similar to the typing.Set which is already in the documentation. -- components: Library (Lib) files: frozenset-doc.patch keywords: patch

[issue28296] Add __le__ and __ge__ to collections.Counter

2016-09-28 Thread Manuel Krebber
Manuel Krebber added the comment: Oh, I should have searched properly before creating this ticket. Sorry about that. I guess I will be subclassing Counter in my project then, to get this functionality... Only problem is, that when using the builtin __add__ etc. of my Counter subclass, I

[issue28296] Add __le__ and __ge__ to collections.Counter

2016-09-28 Thread Manuel Krebber
New submission from Manuel Krebber: I would really like there to be comparison operators for collection.Counter similar to the ones for sets. While you can now use minus to some degree for that comparison, it is very inefficient. I have attached an implementation of __ge__ and __le__