[issue41295] CPython 3.8.4 regression on __setattr__ in multiinheritance with metaclasses

2020-07-17 Thread David Caro
David Caro added the comment: > David, which issue number is this? It's issue41295, pr #21473 -- ___ Python tracker <https://bugs.python.org

[issue41295] CPython 3.8.4 regression on __setattr__ in multiinheritance with metaclasses

2020-07-14 Thread David Caro
David Caro added the comment: Just sent a PR that fixes the issue (a first approach), let me know if it's addressing the issue correctly or if there's a better way. Thanks! -- ___ Python tracker <https://bugs.python.o

[issue41295] CPython 3.8.4 regression on __setattr__ in multiinheritance with metaclasses

2020-07-14 Thread David Caro
Change by David Caro : -- keywords: +patch nosy: +David Caro nosy_count: 5.0 -> 6.0 pull_requests: +20617 stage: -> patch review pull_request: https://github.com/python/cpython/pull/21473 ___ Python tracker <https://bugs.python.org/i

[issue39960] Using typename.__setattr__ in extension type with Py_TPFLAGS_HEAPTYPE is broken (hackcheck too eager?)

2020-07-14 Thread David Caro
Change by David Caro : -- nosy: +David Caro nosy_count: 5.0 -> 6.0 pull_requests: +20618 pull_request: https://github.com/python/cpython/pull/21473 ___ Python tracker <https://bugs.python.org/issu

[issue41231] Type annotations lost when using wraps by default

2020-07-08 Thread David Caro
David Caro added the comment: Elaborating on the last message, given the following code: ``` 1 #!/usr/bin/env python3 2 3 from functools import wraps 4 5 6 def return_string(wrapped): 7 @wraps(wrapped) 8 def wrapper(an_int: int) -> str: 9 return str(wrap

[issue41231] Type annotations lost when using wraps by default

2020-07-08 Thread David Caro
David Caro added the comment: As a note, mypy does not tpyecheck the wrapper functions, probably because it would not be possible with the current code (as the typing hints get lost): https://mypy.readthedocs.io/en/latest/generics.html?highlight=wrapper#declaring-decorators

[issue41231] Type annotations lost when using wraps by default

2020-07-08 Thread David Caro
Change by David Caro : -- keywords: +patch pull_requests: +20538 stage: -> patch review pull_request: https://github.com/python/cpython/pull/21392 ___ Python tracker <https://bugs.python.org/issu

[issue8814] functools.WRAPPER_ASSIGNMENTS should include __annotations__

2020-07-08 Thread David Caro
Change by David Caro : -- nosy: +David Caro nosy_count: 4.0 -> 5.0 pull_requests: +20539 pull_request: https://github.com/python/cpython/pull/21392 ___ Python tracker <https://bugs.python.org/iss

[issue41231] Type annotations lost when using wraps by default

2020-07-07 Thread David Caro
David Caro added the comment: Hi Terry, That would not work in this case, as I'd want to override all annotations with the wrapper function ones if there's any, instead of merging them. The specific use case, is a type checker (part of TestSlide testing framework), to veri

[issue41231] Type annotations lost when using wraps by default

2020-07-07 Thread David Caro
New submission from David Caro : In version 3.2, bpo-8814 introduced copying the __annotations__ property from the wrapped function to the wrapper by default. That would be the desired behavior when your wrapper function has the same signature than the function it wraps, but in some cases

[issue11021] email MIME-Version headers for each part in multipart message

2011-03-14 Thread David Caro
David Caro added the comment: Of course, the RFC that discusses the MIME-Version Header is RFC-2045 http://www.ietf.org/rfc/rfc2045.txt Extract of the page 8: "Note that the MIME-Version header field is required at the top level of a message. It is not required for each body part

[issue11021] email MIME-Version headers for each part in multipart message

2011-01-26 Thread David Caro
New submission from David Caro : When attaching a subpart to a multipart message, python should follow the recomendations of the rfcs and remove the MIME-Version header of each part, leaving only one MIME-Version header at the beggining of the message. >>> from email.mime.multipa

[issue10981] argparse: options starting with -- match substrings

2011-01-26 Thread David Caro
David Caro added the comment: Yes it is, here http://docs.python.org/dev/library/argparse.html#argument-abbreviations. -- ___ Python tracker <http://bugs.python.org/issue10

[issue10981] argparse: options starting with -- match substrings

2011-01-22 Thread David Caro
David Caro added the comment: It is not an issue, it will try to match all the optional parameters, and if only one matches, then it will use it: 2110 elif option_string.startswith(option_prefix): 2111 action = self._option_string_actions[option_string

[issue10981] argparse: options starting with -- match substrings

2011-01-22 Thread David Caro
Changes by David Caro : -- title: options starting with -- match substrings -> argparse: options starting with -- match substrings ___ Python tracker <http://bugs.python.org/issu

[issue10981] options starting with -- match substrings

2011-01-22 Thread David Caro
Changes by David Caro : -- components: +Extension Modules versions: +Python 2.6 ___ Python tracker <http://bugs.python.org/issue10981> ___ ___ Python-bugs-list m

[issue10981] options starting with -- match substrings

2011-01-22 Thread David Caro
New submission from David Caro : When parsing option like --optionname, --option will match it too example: >>> import argparse >>> parser = argparse.ArgumentParser() >>> parser = argparse.ArgumentParser() >>> parser.add_argument('--superstring'