[issue35005] argparse should accept json and yaml argument types

2019-10-06 Thread Mauricio Villegas
Mauricio Villegas added the comment: FYI there is a new python package that extends argparse with the enhancements proposed here and more. https://pypi.org/project/jsonargparse/ -- nosy: +mauvilsa ___ Python tracker <https://bugs.python.

[issue40897] Inheriting from class that defines __new__ causes inspect.signature to always return (*args, **kwargs) for constructor

2021-07-10 Thread Mauricio Villegas
Mauricio Villegas added the comment: I think this is affecting me or it is a new similar issue. And it is not only for python 3.9, but also from 3.6 up. I am working on making code configurable based on signatures (see https://jsonargparse.readthedocs.io/en/stable/#classes-methods

[issue44618] inspect.signature does not work for datetime classes

2021-07-14 Thread Mauricio Villegas
Mauricio Villegas added the comment: > Doesn’t it do that with any built in function? Sorry. I did not include what is the behavior for other classes. An example could be calendar.Calendar. In this case the signature gives: >>> from calendar import Calendar >>> imp

[issue44618] inspect.signature does not work for datetime classes

2021-07-13 Thread Mauricio Villegas
Change by Mauricio Villegas : -- components: +Library (Lib) type: -> behavior ___ Python tracker <https://bugs.python.org/issue44618> ___ ___ Python-bugs-lis

[issue44618] inspect.signature does not work for datetime classes

2021-07-13 Thread Mauricio Villegas
New submission from Mauricio Villegas : Classes in the datetime module are implemented using __new__ with some named parameters. I want to be able to inspect their signature to know which are the names of the parameters it accepts like it works for most classes. However, this does not work

[issue40897] Inheriting from class that defines __new__ causes inspect.signature to always return (*args, **kwargs) for constructor

2021-07-14 Thread Mauricio Villegas
Mauricio Villegas added the comment: I created another issue since the problem appears to be a bit different: https://bugs.python.org/issue44618 -- ___ Python tracker <https://bugs.python.org/issue40

[issue44618] inspect.signature does not work for datetime classes

2021-07-17 Thread Mauricio Villegas
Mauricio Villegas added the comment: I am not sure if this affects all built-in classes, assuming that by built-in it means that `SOMEOBJECT.__class__.__module__ == 'builtins'`. For example I have C++ library that is compiled into a python module using swig. It is available as a docker

[issue44618] inspect.signature does not work for datetime classes

2021-07-17 Thread Mauricio Villegas
Mauricio Villegas added the comment: Also happens in python 3.10. === Python 3.10.0b4 === (*args, **kwargs) (self, /, *args, **kwargs) Traceback (most recent call last): ... ValueError: no signature found for builtin type -- versions: +Python 3.10