[issue43196] logging.config.dictConfig shuts down socket for existing SysLogHandlers

2022-01-22 Thread Stéphane Blondon
Stéphane Blondon added the comment: I can reproduce the error on Debian/testing with: - Python 3.9.9 - Python 3.10.0 -- nosy: +sblondon status: pending -> open ___ Python tracker <https://bugs.python.org/issu

[issue39854] f-strings with format specifiers have wrong col_offset

2022-01-22 Thread Stéphane Blondon
Stéphane Blondon added the comment: I can reproduce it on python 3.8. I can't reproduce it on python 3.9 or 3.10. -- nosy: +sblondon ___ Python tracker <https://bugs.python.org/issue39

[issue42914] pprint numbers with underscore

2021-10-09 Thread Stéphane Blondon
Stéphane Blondon added the comment: Ok, I will not send a PR to change the current behavior until python4 (in case it exists one day). -- ___ Python tracker <https://bugs.python.org/issue42

[issue42914] pprint numbers with underscore

2021-10-05 Thread Stéphane Blondon
Stéphane Blondon added the comment: Python 3.10 has now been released with the underscore_numbers parameter. I wonder which release could enable the parameter by default (so it would break the previous behavior): - the next release (3.11) is probably too short. - the safest strategy

[issue45095] Easier loggers traversal tree with a logger.getChildren method

2021-09-03 Thread Stéphane Blondon
New submission from Stéphane Blondon : Currently, logging.root.manager.loggerDict is usable to do a homemade traversal of the loggers tree. However, it's not a public interface. Adding a 'logger.getChildren()' method would help to implement the traversal. The method would return a set

[issue15373] copy.copy() does not properly copy os.environment

2021-08-16 Thread Stéphane Blondon
Stéphane Blondon added the comment: I think an asdict() method is not necessary. Instanciating a dict from os.environ is enough: >>> import os >>> os.environ environ({'SHELL': '/bin/bash', ...}) >>> dict(os.environ) {'SHELL': '/bin/bash', ...}) With 'dict()', it

[issue41411] Improve and consolidate f-strings docs

2021-05-02 Thread Stéphane Blondon
Stéphane Blondon added the comment: It seems ezio-melotti hesitates to continue the modifications in the PR https://github.com/python/cpython/pull/21552#pullrequestreview-458400056 IMO, the PR improves enough the documentation, so it would be nice to merge it, even without the other changes

[issue42589] doc: Wrong "from" keyword link in Exceptions doc

2021-04-30 Thread Stéphane Blondon
Change by Stéphane Blondon : -- pull_requests: +24445 stage: backport needed -> patch review pull_request: https://github.com/python/cpython/pull/25755 ___ Python tracker <https://bugs.python.org/issu

[issue42914] pprint numbers with underscore

2021-03-22 Thread Stéphane Blondon
Stéphane Blondon added the comment: I changed the default to be backward compatible (so underscore_numbers=False). I think it would be better with underscore_numbers enabled by default but I understand the need for stability. Perhaps such break could be done in the future (in version 3.12

[issue42914] pprint numbers with underscore

2021-03-14 Thread Stéphane Blondon
Stéphane Blondon added the comment: Thank you Felipe for the news! :) I have committed a PR about this issue. Two remarks: - I changed the proposed implementation from 'format(integer, '_d')' to '{:_d}.format(integer)' because the first way raised an exception. (The `format` function

[issue42914] pprint numbers with underscore

2021-03-14 Thread Stéphane Blondon
Change by Stéphane Blondon : -- keywords: +patch pull_requests: +23624 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24864 ___ Python tracker <https://bugs.python.org/issu

[issue42914] pprint numbers with underscore

2021-02-25 Thread Stéphane Blondon
Stéphane Blondon added the comment: I add the same idea but later than you, so I'm interested by such feature. Felipe: do you want to add a pull request to this issue (with Serhiy Storchaka implementation because it's the simplest one)? If not, I plan to write it. I will write it too

[issue18163] Add a 'key' attribute to KeyError

2021-02-12 Thread Stéphane Blondon
Stéphane Blondon added the comment: I'm interested by such feature. I see examples of versions of the message provided by KeyError: - sometimes with a message (for example `PyErr_SetString(PyExc_KeyError, "name too long");` at [1]) - sometimes with the missing key (f

[issue42643] http.server does not support HTTP range requests

2020-12-24 Thread Stéphane Blondon
Stéphane Blondon added the comment: RangeHTTPServer seems to support python3: there is a try-except clause to manage the different import of SimpleHTTPServer: https://github.com/danvk/RangeHTTPServer/blob/master/RangeHTTPServer/__main__.py#L13 The code is under Apache 2.0 licence. I don't

[issue37779] configparser: add documentation about several read() behaviour

2020-12-24 Thread Stéphane Blondon
Stéphane Blondon added the comment: Merged by Łukasz Langa in september 2020. (Thanks Łukasz) -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue18163] Add a 'key' attribute to KeyError

2020-12-20 Thread Stéphane Blondon
Stéphane Blondon added the comment: Orian: your patch formats the error message but the original suggested solution is to store the missing key in a new attribute. I don't know if you go in the good direction. Adding an attribute is also suggested by issue #614557. -- nosy

[issue42589] doc: Wrong "from" keyword link in Exceptions doc

2020-12-20 Thread Stéphane Blondon
Change by Stéphane Blondon : -- keywords: +patch nosy: +sblondon nosy_count: 2.0 -> 3.0 pull_requests: +22734 stage: -> patch review pull_request: https://github.com/python/cpython/pull/23872 ___ Python tracker <https://bugs.python.org/i

[issue41724] SQLite returns "str" instead of "datetime.datetime" with aggregate queries.

2020-12-19 Thread Stéphane Blondon
Change by Stéphane Blondon : -- keywords: +patch nosy: +sblondon nosy_count: 5.0 -> 6.0 pull_requests: +22720 stage: -> patch review pull_request: https://github.com/python/cpython/pull/23855 ___ Python tracker <https://bugs.python.org/i

[issue37779] configparser: add documentation about several read() behaviour

2019-08-08 Thread Stéphane Blondon
Stéphane Blondon added the comment: Thank you for the idea. :) I committed something else, based on the previous example of the 'Quick Start' section. What do you think about it? -- ___ Python tracker <https://bugs.python.org/issue37

[issue37779] configparser: add documentation about several read() behaviour

2019-08-08 Thread Stéphane Blondon
Change by Stéphane Blondon : -- keywords: +patch pull_requests: +14908 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/15177 ___ Python tracker <https://bugs.python.org/issu

[issue37779] configparser: add documentation about several read() behaviour

2019-08-06 Thread Stéphane Blondon
New submission from Stéphane Blondon : The documentation is not explicit about the behaviour if several files are read by the same ConfigParser: the data are not reset between two read(). I suggest to add such information in the documentation. There is a draft: === start === When

[issue33507] Improving the html rendered by cgitb.html

2018-06-20 Thread Stéphane Blondon
Stéphane Blondon added the comment: I added the optional parameter to cgitb.html() function and removed the hardcoded css from the html code. I think there are still several improvements to do: - add documentation for the new parameter of cgitb.html() - add the same parameter to cgitb.enable

[issue33507] Improving the html rendered by cgitb.html

2018-05-18 Thread Stéphane Blondon
Stéphane Blondon <stephane.blon...@gmail.com> added the comment: > Instead of hardcoding colors, would it be better to use CSS instead. I agree with you. The current source code contains hardcoded colors. I could add an optional parameter to change the css for the cgitb.html() funct

[issue33507] Improving the html rendered by cgitb.html

2018-05-15 Thread Stéphane Blondon
Change by Stéphane Blondon <stephane.blon...@gmail.com>: -- keywords: +patch pull_requests: +6529 stage: -> patch review ___ Python tracker <rep...@bugs.python.org> <https://bugs.pyt

[issue33507] Improving the html rendered by cgitb.html

2018-05-14 Thread Stéphane Blondon
Stéphane Blondon <stephane.blon...@gmail.com> added the comment: current.png is a screenshot of the html shown in a browser with 3.8 branch next.png is a screenshot of the modified cgitb.html() function. -- Added file: https://bugs.python.org/file47589/curre

[issue33507] Improving the html rendered by cgitb.html

2018-05-14 Thread Stéphane Blondon
New submission from Stéphane Blondon <stephane.blon...@gmail.com>: cgitb.html() returns HTML code viewable in a browser. It would be nice to improve the rendering to have something more readable (increase space between each call, increase contrast for the source code) and more modern

[issue33311] cgitb: remove parentheses when the error is in module

2018-05-01 Thread Stéphane Blondon
Change by Stéphane Blondon <stephane.blon...@gmail.com>: -- pull_requests: +6371 ___ Python tracker <rep...@bugs.python.org> <https://bugs.python

[issue33311] cgitb: remove parentheses when the error is in module

2018-04-18 Thread Stéphane Blondon
Change by Stéphane Blondon <stephane.blon...@gmail.com>: -- keywords: +patch pull_requests: +6215 stage: -> patch review ___ Python tracker <rep...@bugs.python.org> <https://bugs.pyt

[issue3356] some tests fail with 'make EXTRA_CFLAGS="-DPy_DEBUG"' (test_distutils, test_set)

2018-04-18 Thread Stéphane Blondon
Change by Stéphane Blondon <stephane.blon...@gmail.com>: -- pull_requests: +6216 ___ Python tracker <rep...@bugs.python.org> <https://bugs.pytho

[issue33311] cgitb: remove parentheses when the error is in module

2018-04-18 Thread Stéphane Blondon
New submission from Stéphane Blondon <stephane.blon...@gmail.com>: The cgitb module displays a traceback in text or html. When a module is called, there are no parameters (displayed as '()'). I think they are unnecessary and the parentheses should be removed. ### example for the text v

[issue33256] module is not displayed by cgitb.html

2018-04-10 Thread Stéphane Blondon
Change by Stéphane Blondon <stephane.blon...@gmail.com>: -- keywords: +patch pull_requests: +6138 stage: -> patch review ___ Python tracker <rep...@bugs.python.org> <https://bugs.pyt

[issue33256] module is not displayed by cgitb.html

2018-04-10 Thread Stéphane Blondon
Change by Stéphane Blondon <stephane.blon...@gmail.com>: -- type: -> behavior ___ Python tracker <rep...@bugs.python.org> <https://bugs.pyt

[issue33256] module is not displayed by cgitb.html

2018-04-10 Thread Stéphane Blondon
New submission from Stéphane Blondon <stephane.blon...@gmail.com>: The html produced by cgitb.html() does not display because the square brackets are interpreted as a html tag (see the picture in attachement). This bug occurs if the code is called directly in the module, not inside a fu

[issue33183] Refactoring: replacing some assertTrue by assertIn

2018-03-29 Thread Stéphane Blondon
New submission from Stéphane Blondon <stephane.blon...@gmail.com>: In several cases, tests use ```self.assertTrue(a in b)```. Using ```self.assertIn(a, b)``` seems to be better. For examples: ./Lib/test/test_inspect.py: self.assertTrue('(po, pk' in repr(sig)) ./Lib/test/test_configpar

[issue32234] Add context management to mailbox.Mailbox

2018-03-28 Thread Stéphane Blondon
Stéphane Blondon <stephane.blon...@gmail.com> added the comment: The availability of context manager does not make it mandatory if it does not fit some needs. > In the last example on https://docs.python.org/3/ > library/mailbox.html#examples inbox is locked and unlocked mult

[issue32234] Add context management to mailbox.Mailbox

2018-03-23 Thread Stéphane Blondon
Stéphane Blondon <stephane.blon...@gmail.com> added the comment: I don't know about something blocking the merge. I sent a message to Barry on Github the 3th january but perhaps it was a wrong timing (too soon after new year). -- ___ Python t