[issue9157] Allow inspection of used decorators on a function

2010-07-04 Thread Mitar
New submission from Mitar mmi...@gmail.com: Sometimes it is useful to be able to check which decorators are already applied to a function, especially when you are constructing them dynamically. I am proposing that for all decorators in Python would be suggested that they maintain a list

[issue9157] Allow inspection of used decorators on a function

2010-08-21 Thread Mitar
Mitar mmi...@gmail.com added the comment: Here is the concrete code how I imagined that: http://code.djangoproject.com/ticket/13854 So this would be not made in code of `wraps` function, but would be contract for implementers to do it, if they want to be visible (maybe they still do not want

[issue1652] subprocess should have an option to restore SIGPIPE to default action

2010-09-02 Thread Mitar
Mitar mmi...@gmail.com added the comment: GHC Haskell compiler is currently opting for a different solution: installing an default empty handler which is cleared by exec automatically and signal handler is restored back to SIG_DFL: http://hackage.haskell.org/trac/ghc/ticket/4274

[issue2504] Add gettext.pgettext() and variants support

2009-08-11 Thread Mitar
Mitar mmi...@gmail.com added the comment: I would just like to add that I am also looking forwards to this feature. -- nosy: +mitar ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2504

[issue14653] Improve mktime_tz to use calendar.timegm instead of time.mktime

2012-04-23 Thread Mitar
New submission from Mitar mmi...@gmail.com: I would suggest improvement of mktime_tz to use calendar.timegm internally instead of time.mktime. The problem is that on Windows mktime_tz fails with mktime argument out of range for this code: mktime_tz(parsedate_tz('Thu, 1 Jan 1970 00:00:00 GMT

[issue15881] multiprocessing 'NoneType' object is not callable

2012-09-12 Thread Mitar
Changes by Mitar mmi...@gmail.com: -- nosy: +mitar ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15881 ___ ___ Python-bugs-list mailing list

[issue30995] Support logging.getLogger(style='{')

2017-07-22 Thread Mitar
New submission from Mitar: Currently, using non-legacy formatting in logging message is really cumbersome. I think a new style could be supported much easier using the following: logger = logging.getLogger(style='{') logger.misc('User {} logged in', username} This is both backwards compatible

[issue30995] Support logging.getLogger(style='{')

2017-07-27 Thread Mitar
Mitar added the comment: > That's the problem, right there. I don't think the ways of doing this are > bulletproof and require too much cooperation between third-party libraries. Which third-party libraries? The thing I am proposing works for that particular file you call get

[issue15450] Allow dircmp.subdirs to behave well under subclassing

2018-01-03 Thread Mitar
Change by Mitar <mmi...@gmail.com>: -- nosy: +mitar ___ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue15450> ___ ___ Python-bugs

[issue12932] filecmp.dircmp does not allow non-shallow comparisons

2018-01-03 Thread Mitar
Change by Mitar <mmi...@gmail.com>: -- nosy: +mitar ___ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue12932> ___ ___ Python-bugs

[issue15450] Allow dircmp.subdirs to behave well under subclassing

2018-01-03 Thread Mitar
Change by Mitar <mmi...@gmail.com>: -- pull_requests: +4962 ___ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue15450> ___ __

[issue21363] io.TextIOWrapper always closes wrapped files

2018-10-20 Thread Mitar
Mitar added the comment: I have a similar problem that text wrapper is closing the handle, and if I want to make a workaround, it also fails: buffer = io.Bytes() with io.TextIOWrapper(buffer, encoding='utf8') as text_buffer: write_content_to(text_buffer) text_buffer.flush

[issue37374] Minidom does not have to escape quote inside text segments

2019-06-22 Thread Mitar
Change by Mitar : -- keywords: +patch pull_requests: +14134 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14312 ___ Python tracker <https://bugs.python.org/issu

[issue5752] xml.dom.minidom does not escape CR, LF and TAB characters within attribute values

2019-06-22 Thread Mitar
Change by Mitar : -- nosy: +mitar ___ Python tracker <https://bugs.python.org/issue5752> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyth

[issue14465] xml.etree.ElementTree: add feature to prettify XML output

2019-06-22 Thread Mitar
Change by Mitar : -- nosy: +mitar ___ Python tracker <https://bugs.python.org/issue14465> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyth

[issue37374] Minidom does not have to escape quote inside text segments

2019-06-22 Thread Mitar
New submission from Mitar : I am using Minidom to pretty-print XML. But currently if there is a quote inside a text segment it escapes it to To my understanding this is unnecessary if all other symbols are escaped. This escaping makes it really ugly and defeats the purpose of me using

[issue37374] Minidom does not have to escape quote inside text segments

2019-06-23 Thread Mitar
Mitar added the comment: FYI, this is exactly how ElementTree.tostring does it. So this would make ElementTree.tostring behave the same as minidom. @dhilst: I do not think a parameter is needed here. This is completely compatible with HTML. It is just that currently an additional

[issue36841] Supporting customization of float encoding in JSON

2019-05-08 Thread Mitar
Mitar added the comment: That would be awesome! BTW, just as an additional example, JavaScrpt's JSON.stringify encodes NaN and Infinity to null. By having a custom function I could for example try to match such implementation. -- ___ Python

[issue13824] argparse.FileType opens a file and never closes it

2019-05-06 Thread Mitar
Mitar added the comment: Why not make FileType instance also a context manager, so you could do something like: with arguments.input as f: assert arguments.input is f For backwards compatibility, FileType would open eagerly as now, but it would be closed at exit from context manager

[issue36841] Supporting customization of float encoding in JSON

2019-05-07 Thread Mitar
New submission from Mitar : Currently, there is only one argument which allows customization how float numbers are encoded in JSON: allow_nan. But this does not allow one to hook into the encoding of floating points really. The JSONEncoder is not called for float numbers. The motivation

[issue13824] argparse.FileType opens a file and never closes it

2019-05-07 Thread Mitar
Mitar added the comment: > So it's already possible to do what you describe, simply by doing: I think there is an edge case here if a stdin/stdout is opened? It would get closed at exist from the context, no? So I suggest that a slight extension of what open otherwise returns is retur

[issue17239] XML vulnerabilities in Python

2019-06-28 Thread Mitar
Change by Mitar : -- nosy: +mitar ___ Python tracker <https://bugs.python.org/issue17239> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyth

[issue37442] Minidom should not pretty-print inside text elements

2019-06-28 Thread Mitar
New submission from Mitar : Inside text elements both in HTML and SVG white-space is significant and introduces differences in how things are rendered. By default in general all white-space is collapsed into one space and then this is rendered, adding additional text content. I observed

[issue37374] Minidom does not have to escape quote inside text segments

2019-06-29 Thread Mitar
Mitar added the comment: Sure, but is old behavior useful in any use case? Every bugfix changes old behavior in an irreversible way. So in which use case you want the old behavior? Can you elaborate here? -- ___ Python tracker <ht

[issue22848] Subparser help does not respect SUPPRESS argument

2020-05-02 Thread Mitar
Change by Mitar : -- nosy: +mitar ___ Python tracker <https://bugs.python.org/issue22848> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyth

[issue24739] allow argparse.FileType to accept newline argument

2021-10-25 Thread Mitar
Mitar added the comment: I think the issue is that it is hard to subclass it. Ideally, call to open would be made through a new _open method which would then call it, and one could easily subclass that method if/when needed. -- nosy: +mitar